mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-07-20 22:32:01 +00:00
[client] egl: fix masked color cursor HDR mapping
This commit is contained in:
@@ -2,11 +2,14 @@
|
|||||||
precision highp float;
|
precision highp float;
|
||||||
precision highp int;
|
precision highp int;
|
||||||
|
|
||||||
|
#include "hdr.h"
|
||||||
|
|
||||||
in vec2 uv;
|
in vec2 uv;
|
||||||
out vec4 color;
|
out vec4 color;
|
||||||
|
|
||||||
uniform sampler2D sampler1;
|
uniform sampler2D sampler1;
|
||||||
uniform float scale;
|
uniform float scale;
|
||||||
|
uniform bool mapSDRtoPQ;
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
@@ -26,5 +29,11 @@ void main()
|
|||||||
if (tmp.rgb == vec3(0.0, 0.0, 0.0))
|
if (tmp.rgb == vec3(0.0, 0.0, 0.0))
|
||||||
discard;
|
discard;
|
||||||
|
|
||||||
|
if (mapSDRtoPQ)
|
||||||
|
{
|
||||||
|
vec3 linear = bt709to2020(srgb2lin(tmp.rgb));
|
||||||
|
tmp.rgb = lin2pq(linear * (203.0 / 10000.0));
|
||||||
|
}
|
||||||
|
|
||||||
color = tmp;
|
color = tmp;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user