Contrast and Brightness
You see all these games where you can change the contrast and brightness, and I was wondering if anyone knew how it could be done in opengl, I've tried SetColorAdjustment, but that doesn't seem to work (then again, I might be doing something wrong).
Thenks!
Typically, contrast and brightness should not be setup on the game level. It's better to show a grey+black quad and tell the user "use your monitor settings so that the black and grey quads merge".
There are very few applications where you really need to expose color and brightness contrast. Anyway, the function you mentioned does this. You can also use SetDeviceGammaRamp which does it too. But keep in mind that both functions don't use OpenGL. If you want ot do it at the OpenGL level, there are two ways :
1- render big quads (that fill the whole screen) with blending enabled,
2- render your scene to a texture (typically a pbuffer) and map this texture ont he screen with some kind of pixel shader that setups the color correction. (pixel shader does not necessarily means ARB_fragment_program and-the-like, it can simply be a two-stage multitexturing setup)
There are very few applications where you really need to expose color and brightness contrast. Anyway, the function you mentioned does this. You can also use SetDeviceGammaRamp which does it too. But keep in mind that both functions don't use OpenGL. If you want ot do it at the OpenGL level, there are two ways :
1- render big quads (that fill the whole screen) with blending enabled,
2- render your scene to a texture (typically a pbuffer) and map this texture ont he screen with some kind of pixel shader that setups the color correction. (pixel shader does not necessarily means ARB_fragment_program and-the-like, it can simply be a two-stage multitexturing setup)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement