[2.2.3][GL3Plus] No way to disable gamma/sRGB conversion?

Discussion area about developing with Ogre-Next (2.1, 2.2 and beyond)


Scorg
Gnoblar
Posts: 3
Joined: Sun Aug 28, 2016 5:56 am

[2.2.3][GL3Plus] No way to disable gamma/sRGB conversion?

Post by Scorg »

Hello.

While porting from 2.1 to 2.2.3 I have noticed that hardware sRGB conversion is enabled and cannot be disabled neither with "sRGB Gamma Conversion" option, nor the "gamma" option to Root::createRenderWindow(). I have tracked the cause to an unconditional glEnable( GL_FRAMEBUFFER_SRGB ) in GL3PlusRenderPassDescriptor::performLoadActions(). This causes actually incorrect colors (brighter, pow'ed to 1/2.2 or so) to be put out.

I wonder what was the reason to force HW sRGB conversion, because my very limited knowledge about OpenGL suggests that there is no way for me to revert this conversion before displaying the framebuffer. I suspect it has something to do with texture loading/sampling, or possibly be a bug somewhere.

If necessary, I will provide screenshots showing the problem, though it's basically a darker (2.1) vs brighter (2.2) image.
User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5446
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1348

Re: [2.2.3][GL3Plus] No way to disable gamma/sRGB conversion?

Post by dark_sylinc »

This is a bug. Fixed.

Thanks for the report!