View Full Version : Color manipulation
12-26-2005, 04:21 AM
After rendering a scene with color materials and dynamic lighting, I'd like to somehow "over-expose" the resulting image. The only way I've found is by rendering the entire scene twice; first to a texture and then to the image buffer, then blending the texture over the scene. Unfortunately, this looks butt-ugly with larger resolutions because of texture size restrictions, and it more than halves the framerate. Is there a faster way to achieve the same thing?
change the material/light properties while rendering
glReadPixels/glDrawPixels with blending as a rendering post process
vertex/pixel shaders during rendering
method 1 and 3 are probably the fastest, method 2 is almost surely slow, but avoid size restrictions since no texture is used.
12-28-2005, 03:34 AM
I'd strongly advise against using glRead/DrawPixels.
For postprocessing effects you can use rectangular textures to match the screen size exactly. You don't need to render the scene twice, just render it once to the texture and then render the result texture to the screen twice.
But depending on what you mean by "overexpose", it may be better to just double the light intensity.
As dmy already said you can use fragment shaders to make arbitraty adjustments to the final color values. In the most simple case, you can just multiply the final value by 2. Do a search for HDR for more complex handling of different exposure.
01-02-2006, 08:43 AM
Thanks for the input, both of you. From what I understand, a pixel shader seems like the best way to achieve what I want.
One thing before I start figuring out how to do this, what OpenGL version is required? :-)
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.