Krolyxon
Commit 6b9cdf8

Branches

Refs →

aurora.confighyprshaders02_green_tint.glsl

16 lines · 397 B · GLSL

1#version 300 es
2// Pure Green Channel Shader - FIXED
3precision highp float;
4
5in vec2 v_texcoord;
6uniform sampler2D tex;
7out vec4 fragColor;
8
9const vec3 LUMA = vec3(0.2126, 0.7152, 0.0722);
10
11void main() {
12 vec4 pixColor = texture(tex, v_texcoord);
13 float gray = dot(pixColor.rgb, LUMA);
14 // FIXED: Now correctly outputs to GREEN channel
15 fragColor = vec4(0.0, gray, 0.0, pixColor.a);
16}