3

Am I correct in assuming that you can only get SRGB conversions for free in modern GPU's on texture reads via samplers if an SRGB texture format is used?

So if I want to access the same SRGB textures via images with image load/store I will have to do any SRGB/linear conversions manually?

IE Doing something such as:

float LinearToSRGB(float value)
{ 
    if( value< 0.0031308 )
        value*= 12.92;
    else
        val = 1.055 * pow(value, 1.0/2.4) - 0.055;

    return value;
}
iam
  • 1,623
  • 1
  • 14
  • 28

1 Answers1

0

Exactly.
As long as you're not using sRGB textures, OpenGL assumes all texture data is in linear space.

Tara
  • 1,673
  • 22
  • 30