Page 1 of 1

compositors and hardware gamma

Posted: Sat Jan 22, 2011 9:15 pm
by sparkprime
http://www.ogre3d.org/docs/manual/manual_30.html#SEC150

says:

gamma
If present, this directive means that sRGB gamma correction will be enabled on writes to this texture. You should remember to include the opposite sRGB conversion when you read this texture back in another material, such as a quad. This option will automatically enabled if you use a render_scene pass on this texture and the viewport on which the compositor is based has sRGB write support enabled.

What does it mean that the viewport has sRGB write support enabled? I can't find anything in Ogre::Viewport for selecting this. I actually want the texture to not be gamma corrected -- it's a deferred shading pipeline and it's gamma correcting my depth values. However the ultimate target (post lighting) does have hardware gamma enabled because it's a framebuffer of visible colours.

Re: compositors and hardware gamma

Posted: Sat Jan 22, 2011 10:46 pm
by dark_sylinc
Ummm, good question. Gamma is an RT option, not viewport's

Re: compositors and hardware gamma

Posted: Sun Jan 23, 2011 6:17 am
by sparkprime
It should not automatically turn on gamma for intermediate textures, and especially not on the basis that the final output target has gamma. I'm going to delete the code that does this in my local fork.

Re: compositors and hardware gamma

Posted: Sun Jan 23, 2011 6:40 am
by dark_sylinc
I couldn't agree more.
This is an issue I haven't looked myself too much, but definitely needs attention. Keep us informed how it works for you! :)

Upload the patches if you want so I can give them a try too

Re: compositors and hardware gamma

Posted: Wed Mar 11, 2015 2:26 am
by cyrfer
I realize this is old, but I'm using OGRE 1.7.3. I am wondering if I am subject to this problem. What version removed this problem?

Can I avoid it by choosing a pixel format? I read somewhere that OGRE only tries to use sRGB for 8 byte formats. If my target format is different, maybe Float16, would that avoid the problem?