Last active
November 15, 2015 22:33
-
-
Save PsichiX/36342501a92f995b9f47 to your computer and use it in GitHub Desktop.
Circle-cut GLSL 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
varying vec2 vUv0; | |
uniform vec4 uTint; | |
void main(void) | |
{ | |
float f = step(dot(vUv0.xy), 1.0); | |
gl_FragColor = vec4(uTint.rgb, uTint.a * f); | |
} |
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
attribute vec2 aPosition; | |
attribute vec2 aUv0; | |
varying vec2 vUv0; | |
void main(void) | |
{ | |
vUv0 = aUv0 * vec2(2.0) - vec2(1.0); | |
gl_Position = transform(aPosition); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment