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; }