mirror of
https://github.com/patriciogonzalezvivo/thebookofshaders
synced 2024-11-19 15:25:41 +00:00
24 lines
452 B
GLSL
24 lines
452 B
GLSL
// Author @patriciogv - 2015
|
|
// http://patriciogonzalezvivo.com
|
|
|
|
#ifdef GL_ES
|
|
precision mediump float;
|
|
#endif
|
|
|
|
uniform vec2 u_resolution;
|
|
uniform vec2 u_mouse;
|
|
uniform float u_time;
|
|
|
|
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),1.0);
|
|
} |