Color manipulation

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?

1 -
change the material/light properties while rendering

2 -
glReadPixels/glDrawPixels with blending as a rendering post process

3 -
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.

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.

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? :slight_smile: