compositors and hardware gamma
- sparkprime
- Ogre Magi
- Posts: 1137
- Joined: Mon May 07, 2007 3:43 am
- Location: Ossining, New York
- x 13
- Contact:
compositors and hardware gamma
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.
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.
- dark_sylinc
- OGRE Team Member
- Posts: 5296
- Joined: Sat Jul 21, 2007 4:55 pm
- Location: Buenos Aires, Argentina
- x 1278
- Contact:
Re: compositors and hardware gamma
Ummm, good question. Gamma is an RT option, not viewport's
- sparkprime
- Ogre Magi
- Posts: 1137
- Joined: Mon May 07, 2007 3:43 am
- Location: Ossining, New York
- x 13
- Contact:
Re: compositors and hardware gamma
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.
- dark_sylinc
- OGRE Team Member
- Posts: 5296
- Joined: Sat Jul 21, 2007 4:55 pm
- Location: Buenos Aires, Argentina
- x 1278
- Contact:
Re: compositors and hardware gamma
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
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
-
- Orc
- Posts: 424
- Joined: Wed Aug 01, 2007 8:13 pm
- Location: Venice, CA, USA
- x 7
Re: compositors and hardware gamma
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?
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?