modify phosphor-basic.frag for PDF presentations v_0
authorFrantišek Kučera <franta-hg@frantovo.cz>
Thu, 28 Dec 2023 00:57:23 +0100
branchv_0
changeset 36 0ffb35999bb0
parent 35 dcb2ad86e23c
child 37 fb673fa1cad5
modify phosphor-basic.frag for PDF presentations
shaders/phosphor-basic.frag
--- a/shaders/phosphor-basic.frag	Thu Dec 28 00:37:59 2023 +0100
+++ b/shaders/phosphor-basic.frag	Thu Dec 28 00:57:23 2023 +0100
@@ -24,18 +24,19 @@
 	fColor = texture(uTexture, vTextureXY).rgba;
 
 	// fColor = grayscale(fColor);
-	// fColor = invert(fColor);
+	fColor = invert(fColor);
 	fColor = (fColor-rand(vTextureXY)*0.3) * 1.6;
 
 	float lineCount = textureSize(uTexture, 0).y / uTextureScale;
+	lineCount /= 6.5;
 	fColor.xyz *= abs(sin(radians(vTextureXY.y * 180. * lineCount)));
 
 	// float columnCount = textureSize(uTexture, 0).x / uTextureScale;
 	// fColor.xyz *=
 	//  clamp(abs(sin(radians(vTextureXY.x * 180. * columnCount)))+0.6, 0., 1.);
 
-	// fColor = grayscale(fColor) * vec4(1.00, 0.80, 0.10, 1.00); // amber
-	fColor = grayscale(fColor) * vec4(0.30, 0.80, 0.20, 1.00); // green
+	fColor = grayscale(fColor) * vec4(1.00, 0.80, 0.10, 1.00); // amber
+	// fColor = grayscale(fColor) * vec4(0.30, 0.80, 0.20, 1.00); // green
 
 	// let us move decades ago, when screens were greener and future brighter
 }