mirror of
https://github.com/Rezmason/matrix.git
synced 2026-04-22 07:39:30 -07:00
Pushed virtually all the shader source into shader files that load as assets.
This commit is contained in:
11
shaders/highPass.frag
Normal file
11
shaders/highPass.frag
Normal file
@@ -0,0 +1,11 @@
|
||||
precision mediump float;
|
||||
varying vec2 vUV;
|
||||
uniform sampler2D tex;
|
||||
uniform float highPassThreshold;
|
||||
void main() {
|
||||
vec3 lumaColor = texture2D(tex, vUV).rgb;
|
||||
if (lumaColor.r < highPassThreshold) lumaColor.r = 0.0;
|
||||
if (lumaColor.g < highPassThreshold) lumaColor.g = 0.0;
|
||||
if (lumaColor.b < highPassThreshold) lumaColor.b = 0.0;
|
||||
gl_FragColor = vec4(lumaColor, 1.0);
|
||||
}
|
||||
Reference in New Issue
Block a user