- use the exact sRGB->linear transfer function in HDR mode as the 2.2 gamma approximation is visibly inaccurate in this case

This commit is contained in:
Magnus Norddahl 2019-05-01 00:55:31 +02:00
commit 1973001834
5 changed files with 24 additions and 4 deletions

View file

@ -167,6 +167,7 @@ void FGLRenderer::prepareInterleavedPresent(FPresentShaderBase& shader)
shader.Uniforms->Saturation = clamp<float>(vid_saturation, -15.0f, 15.0f);
shader.Uniforms->GrayFormula = static_cast<int>(gl_satformula);
}
shader.Uniforms->HdrMode = 0;
shader.Uniforms->ColorScale = (gl_dither_bpc == -1) ? 255.0f : (float)((1 << gl_dither_bpc) - 1);
shader.Uniforms->Scale = {
screen->mScreenViewport.width / (float)mBuffers->GetWidth(),