mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-15 02:28:24 +00:00
c4001c727a
This feture is to allow the use of the key combination <super>+N to increase the brightness of the screen when using monitors with poor backlighting. Can help in some games. N = Night vision
33 lines
566 B
GLSL
33 lines
566 B
GLSL
#version 300 es
|
|
|
|
in highp vec2 uv;
|
|
out highp vec4 color;
|
|
|
|
uniform int nv;
|
|
uniform highp float nvGain;
|
|
|
|
uniform sampler2D sampler1;
|
|
uniform sampler2D sampler2;
|
|
uniform sampler2D sampler3;
|
|
|
|
void main()
|
|
{
|
|
highp vec4 yuv = vec4(
|
|
texture(sampler1, uv).r,
|
|
texture(sampler2, uv).r,
|
|
texture(sampler3, uv).r,
|
|
1.0
|
|
);
|
|
|
|
highp mat4 yuv_to_rgb = mat4(
|
|
1.0, 0.0 , 1.402, -0.701,
|
|
1.0, -0.344, -0.714, 0.529,
|
|
1.0, 1.772, 0.0 , -0.886,
|
|
1.0, 1.0 , 1.0 , 1.0
|
|
);
|
|
|
|
color = yuv * yuv_to_rgb;
|
|
if (nv == 1)
|
|
color *= nvGain;
|
|
}
|