basic: added color panes and moving lights; utilities: added shapes; weird: added piet (doesnt scale)

This commit is contained in:
2017-06-06 01:30:01 -04:00
parent 86e54bd373
commit aca017dec1
4 changed files with 71 additions and 0 deletions

14
basic/moving_lights.glsl Normal file
View File

@@ -0,0 +1,14 @@
#ifdef GL_ES
precision mediump float;
#endif
uniform vec2 u_resolution;
uniform vec2 u_mouse;
uniform float u_time;
void main(){
vec2 p1 = vec2(0.8*abs(sin(u_time)), 0.8*abs(cos(u_time)));
vec2 p2 = u_mouse/u_resolution;
vec2 st = gl_FragCoord.xy/u_resolution;
gl_FragColor = vec4(vec3(pow(distance(st,vec2(p1))*0.5,distance(st,p2)*0.5)), 1.0);
}