-
-
Save guidoschmidt/0ae6755a85297a4720ffefe2d6d70975 to your computer and use it in GitHub Desktop.
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
#ifdef GL_ES | |
precision mediump float; | |
precision mediump int; | |
#endif | |
varying vec4 vertColor; | |
varying vec3 vertNormal; | |
varying vec3 vertLightDir; | |
varying vec4 vertTexCoord; | |
float rand(vec2 co){ | |
return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453); | |
} | |
void main() { | |
vec4 color = vertColor; | |
color.a *= pow(rand(gl_FragCoord.xy*0.001), 0.4); | |
gl_FragColor = color; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment