|
This demo does a full screen post process glare addition. It calculates
over-bright areas of the scene, by calculating which fragments go over
1.0f in intensity, and does a repetitive scaling and jittering on the
scene as a series of textures, to get the blur. It then re-renders the
scene. (Future optimization to remove 2nd render) and adds on the blur
over the top. So when the Ambient+diffuse+specular levels of a particular
fragment exceeds 1.0f, it contributes to a glare blur over that part of
the image.
All in real-time, I get well over 140fps on a GF4. It does use a fair
bit of fill-rate. Press H to show tweakable things to improve speed..
Enjoy. Click image to download.
|