new shader: scanlines-basic.frag v_0
authorFrantišek Kučera <franta-hg@frantovo.cz>
Sun, 03 Dec 2023 19:22:25 +0100
branchv_0
changeset 17 f53a040bdc89
parent 16 0883358bc11d
child 18 c4384f43c739
new shader: scanlines-basic.frag
shaders/scanlines-basic.frag
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/shaders/scanlines-basic.frag	Sun Dec 03 19:22:25 2023 +0100
@@ -0,0 +1,12 @@
+#version 330 core
+
+uniform  sampler2D  uTexture;
+in       vec2       vTextureXY;
+out      vec4       fColor;
+
+void main(){
+	fColor = texture(uTexture, vTextureXY).rgba;
+
+	float lineCount = 260.;
+	fColor.xyz *= abs(sin(radians(vTextureXY.y * 180. * lineCount)));
+}