Created
January 10, 2020 07:00
-
-
Save duskvirkus/1cf3ad6fc8153b5cf36c2354a8756f79 to your computer and use it in GitHub Desktop.
Mouse threashold shader.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://editor.thebookofshaders.com/ | |
#ifdef GL_ES | |
precision mediump float; | |
#endif | |
uniform vec2 u_resolution; | |
uniform vec2 u_mouse; | |
uniform float u_time; | |
void main() { | |
vec2 st = gl_FragCoord.xy/u_resolution.xy; | |
st.x *= u_resolution.x/u_resolution.y; | |
vec3 color = vec3(step(u_mouse.y/u_resolution.y, st.y)); | |
gl_FragColor = vec4(color,1.0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment