opengl/glshader: use gamma 2.2 for sRGB render targets
The sRGB global colordescription uses gamma 2.2, so this function also has to do it, or the shader will end up doing a colorspace conversion where there shouldn't be one. This also meams that HDR content will be wrongly encoded, but fixing that while also dealing with sRGB content correctly requires a lot more invasive changes, in KWin and in the screenshot and screencast APIs. BUG: 478967
This commit is contained in:
parent
20bee00681
commit
c1e09f65c9
1 changed files with 1 additions and 1 deletions
|
@ -463,7 +463,7 @@ bool GLShader::setColorspaceUniformsToSRGB(const ColorDescription &src)
|
|||
{
|
||||
return setUniform(GLShader::MatrixUniform::ColorimetryTransformation, src.colorimetry().toOther(src.sdrColorimetry()))
|
||||
&& setUniform(GLShader::IntUniform::SourceNamedTransferFunction, int(src.transferFunction()))
|
||||
&& setUniform(GLShader::IntUniform::DestinationNamedTransferFunction, int(NamedTransferFunction::sRGB))
|
||||
&& setUniform(GLShader::IntUniform::DestinationNamedTransferFunction, int(NamedTransferFunction::gamma22))
|
||||
&& setUniform(FloatUniform::SdrBrightness, src.sdrBrightness())
|
||||
&& setUniform(FloatUniform::MaxHdrBrightness, src.sdrBrightness());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue