Add noise

This commit is contained in:
Joshua Seigler 2019-11-05 14:40:42 -05:00
parent df579cead2
commit 0e271449a6
4 changed files with 47 additions and 18 deletions

View file

@ -0,0 +1,17 @@
precision mediump float;
uniform vec2 u_resolution;
float random (vec2 st) {
return fract(sin(dot(st.xy,
vec2(12.9898,78.233)))*
43758.5453123);
}
void main() {
vec2 st = gl_FragCoord.xy/u_resolution.xy;
float rnd = random( st );
gl_FragColor = vec4(vec3(rnd),0.05);
}