https://gitlab.kitware.com/vtk/vtk/-/issues/19849
In https://github.com/Kitware/VTK/blob/master/Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx,
void main() { float gamma = 2.2;
// for each sample in the multi sample buffer...
ivec2 itexcoords = ivec2(floor(textureSize(tex) * texCoord));
vec3 accumulate = vec3(0.0,0.0,0.0);
float alpha = 0.0;
for (int i = 0; i < samplecount; i++)
{
vec4 sampleValue = texelFetch(tex, itexcoords, i);
// apply gamma correction and sum
accumulate += pow(sampleValue.rgb, vec3(gamma));
alpha += sampleValue.a;
}
// divide and reverse gamma correction
accumulate /= float(samplecount);
gl_FragData[0] = vec4(pow(accumulate, vec3(1.0/gamma)), alpha/float(samplecount));
}
is done if MSAA ON and regardless of SRGB How do I turn it off? I guess there is no way,
Can anyone fix it to do gamma correction only for SRGB?