We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f2fef0b commit 5752416Copy full SHA for 5752416
tft.glsl
@@ -0,0 +1,23 @@
1
+/** Size of TFT "pixels" */
2
+float resolution = 4.0;
3
+
4
+/** Strength of effect */
5
+float strength = 0.5;
6
7
+void _scanline(inout vec3 color, vec2 uv)
8
+{
9
+ float scanline = step(1.2, mod(uv.y * iResolution.y, resolution));
10
+ float grille = step(1.2, mod(uv.x * iResolution.x, resolution));
11
+ color *= max(1.0 - strength, scanline * grille);
12
+}
13
14
+void mainImage(out vec4 fragColor, in vec2 fragCoord)
15
16
+ vec2 uv = fragCoord.xy / iResolution.xy;
17
+ vec3 color = texture(iChannel0, uv).rgb;
18
19
+ _scanline(color, uv);
20
21
+ fragColor.xyz = color;
22
+ fragColor.w = 1.0;
23
0 commit comments