21 lines
447 B
GLSL
21 lines
447 B
GLSL
#version 300 es
|
|
precision highp float;
|
|
|
|
in vec2 v_texcoord;
|
|
uniform sampler2D tex;
|
|
out vec4 fragColor;
|
|
|
|
void main() {
|
|
vec4 c = texture(tex, v_texcoord);
|
|
|
|
// Scanlines: jede zweite Zeile leicht abdunkeln
|
|
float scanline = mod(floor(v_texcoord.y * 1000.0), 2.0);
|
|
c.rgb *= 1.0 - scanline * 0.25;
|
|
|
|
// Leichte Vignette für den Röhren-Look
|
|
vec2 uv = v_texcoord - 0.5;
|
|
c.rgb *= 1.0 - dot(uv, uv) * 1.2;
|
|
|
|
fragColor = c;
|
|
}
|