From 3b69e6bdf484a6b1cf95cf6449e73218e840380b Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Fri, 17 Jul 2026 17:15:13 +1000 Subject: [PATCH] [client] egl: fix masked color cursor HDR mapping --- client/renderers/EGL/shader/cursor_mono.frag | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/client/renderers/EGL/shader/cursor_mono.frag b/client/renderers/EGL/shader/cursor_mono.frag index 7a0227f0..bb2d83f3 100644 --- a/client/renderers/EGL/shader/cursor_mono.frag +++ b/client/renderers/EGL/shader/cursor_mono.frag @@ -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; }