--- a/shaders/scanlines-basic.frag Tue Dec 26 15:41:07 2023 +0100
+++ b/shaders/scanlines-basic.frag Tue Dec 26 23:46:45 2023 +0100
@@ -1,12 +1,13 @@
#version 330 core
uniform sampler2D uTexture;
+uniform float uTextureScale;
in vec2 vTextureXY;
out vec4 fColor;
void main() {
fColor = texture(uTexture, vTextureXY).rgba;
- float lineCount = textureSize(uTexture, 0).y;
+ float lineCount = textureSize(uTexture, 0).y / uTextureScale;
fColor.xyz *= abs(sin(radians(vTextureXY.y * 180. * lineCount)));
}