All non-trivial shaders are now loaded from files.

This commit is contained in:
Rezmason
2022-10-11 21:27:46 -07:00
parent e8be232e9b
commit f0898e7ecf
5 changed files with 33 additions and 28 deletions

View File

@@ -0,0 +1,14 @@
precision mediump float;
uniform sampler2D tex;
uniform float highPassThreshold;
varying vec2 vUV;
void main() {
vec4 color = texture2D(tex, vUV);
if (color.r < highPassThreshold) color.r = 0.0;
if (color.g < highPassThreshold) color.g = 0.0;
if (color.b < highPassThreshold) color.b = 0.0;
gl_FragColor = color;
}