Created
December 28, 2019 10:14
-
-
Save scheibel/99a4c0f4504ca25d0088c131c071f31f to your computer and use it in GitHub Desktop.
ShaderToy demo
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
float utilityFunction(float t, float value) | |
{ | |
return t; | |
} | |
float subFunction(float t, vec2 uv) | |
{ | |
return utilityFunction(t, texture(iChannel0, uv)[0]); | |
} | |
void mainImage( out vec4 fragColor, in vec2 fragCoord ) | |
{ | |
// Normalized pixel coordinates (from 0 to 1) | |
vec2 v_uv = fragCoord/iResolution.xy; | |
float a = subFunction(0.5, v_uv); | |
fragColor = vec4(1.0,a,0.0,1.0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment