[client] egl: fix masked color cursor HDR mapping

This commit is contained in:
Geoffrey McRae
2026-07-17 17:15:13 +10:00
parent 405ed65858
commit 3b69e6bdf4

View File

@@ -2,11 +2,14 @@
precision highp float;
precision highp int;
#include "hdr.h"
in vec2 uv;
out vec4 color;
uniform sampler2D sampler1;
uniform float scale;
uniform bool mapSDRtoPQ;
void main()
{
@@ -26,5 +29,11 @@ void main()
if (tmp.rgb == vec3(0.0, 0.0, 0.0))
discard;
if (mapSDRtoPQ)
{
vec3 linear = bt709to2020(srgb2lin(tmp.rgb));
tmp.rgb = lin2pq(linear * (203.0 / 10000.0));
}
color = tmp;
}