[client] egl: make it possible to configure HDR to SDR mapping

This commit is contained in:
Geoffrey McRae
2023-10-20 15:26:27 +11:00
parent 844a37a276
commit 78df2073ff
4 changed files with 73 additions and 18 deletions

View File

@@ -21,6 +21,8 @@ uniform int scaleAlgo;
uniform float nvGain;
uniform int cbMode;
uniform bool isHDR;
uniform bool mapHDRtoSDR;
uniform float mapHDRGain;
void main()
{
@@ -40,8 +42,8 @@ void main()
}
}
if (isHDR)
color.rgb = mapToSDR(color.rgb);
if (isHDR && mapHDRtoSDR)
color.rgb = mapToSDR(color.rgb, mapHDRGain);
if (cbMode > 0)
color = cbTransform(color, cbMode);