e5a5c78045
This allows to rasterize a single primitive instead of two, and avoid trashing the cache between the 2 triangles drawing.
17 lines
292 B
GLSL
17 lines
292 B
GLSL
uniform sampler2D tex;
|
|
uniform float low;
|
|
|
|
out vec4 FragColor;
|
|
|
|
vec3 getCIEYxy(vec3 rgbColor);
|
|
|
|
void main()
|
|
{
|
|
vec2 uv = gl_FragCoord.xy / 512;
|
|
vec3 col = texture(tex, uv).xyz;
|
|
float luma = getCIEYxy(col).x;
|
|
|
|
col *= smoothstep(1., 10., luma);
|
|
FragColor = vec4(col, 1.0);
|
|
}
|