PDA

View Full Version : Glows



MickeyMouse
04-01-2005, 05:41 AM
Do you know what kind of postprocessing filtering is used in "Prince of Persia WT", so they have those nice glows around windows?

Here is one screenshot: http://media.xbox.ign.com/media/654/654733/img_2498620.html

Does the algorithm look like:
- render scene normally
- create texture from color buffer
- create all mipmap levels for this texture
- blend (what kind of blending?) color buffer with some (which?) of the mipmap levels
?

Thanks for any help.

ZbuffeR
04-01-2005, 06:35 AM
basically yes, but the blurred scene texture does not need to be a full detailed scene. you can get away with much lower resolution, and draw only basic shapes (white windows, candles, etc).
Here, search for 'glow', the paper is about direct3d, but most ideas are still valid in opengl :
http://developer.nvidia.com/object/GDC_2003_Presentations.html

tfpsly
04-01-2005, 12:10 PM
You may render to a much lower res texture (256x256 or even 128x128), and you may only render the objects that need to emit glow in its color buffer. Still you'll need to render all other object in its zbuffer to have proper occlusion (you shall not see your glow emitting objects through a column or a character over it).

The "create all mipmaps" step is to get a blurred version of this texture. I don't know if this will be faster than blurring it on your own (which I does currently).

Then render it with additive blending with one (or more to get stronger glow) full screen quad(s).