--- a/shaders/phosphor-basic.frag Tue Dec 05 22:55:25 2023 +0100
+++ b/shaders/phosphor-basic.frag Wed Dec 06 22:54:24 2023 +0100
@@ -26,10 +26,10 @@
// fColor = invert(fColor);
fColor = (fColor-rand(vTextureXY)*0.3) * 1.6;
- float lineCount = 200.;
+ float lineCount = textureSize(uTexture, 0).y;
fColor.xyz *= abs(sin(radians(vTextureXY.y * 180. * lineCount)));
- // float columnCount = 320;
+ // float columnCount = textureSize(uTexture, 0).x;
// fColor.xyz *=
// clamp(abs(sin(radians(vTextureXY.x * 180. * columnCount)))+0.6, 0., 1.);
--- a/shaders/scanlines-basic.frag Tue Dec 05 22:55:25 2023 +0100
+++ b/shaders/scanlines-basic.frag Wed Dec 06 22:54:24 2023 +0100
@@ -7,6 +7,6 @@
void main() {
fColor = texture(uTexture, vTextureXY).rgba;
- float lineCount = 200.;
+ float lineCount = textureSize(uTexture, 0).y;
fColor.xyz *= abs(sin(radians(vTextureXY.y * 180. * lineCount)));
}