Rendering to textures has a color change
When I use one to render to texture and then sample back, the color is mapped from 255 to 209. I suspect that gamma conversion occurs when rendering to texture. Is there a way to avoid this situation?
Support and community hang-out spot for Ogre3D
https://forums.ogre3d.org/
When I use one to render to texture and then sample back, the color is mapped from 255 to 209. I suspect that gamma conversion occurs when rendering to texture. Is there a way to avoid this situation?
For me this was solved when I changed here:
Code: Select all
TextureGpu* renderTexture;
renderTexture->setPixelFormat(from:
PFG_RGBA8_UNORM ); // dark jpg saved, good preview in app
to:
PFG_RGBA8_UNORM_SRGB ); // good jpg saved, white preview in app
As I said in Github, gamma conversion does NOT convert 255 into 209. In both linear and sRGB space 255 is 255.
Thus something else must be going on.
I forgot to ask: Did you try using RenderDoc? It even has source level debugging for shaders.