basic: added color panes and moving lights; utilities: added shapes; weird: added piet (doesnt scale)
This commit is contained in:
12
basic/color_panes.glsl
Normal file
12
basic/color_panes.glsl
Normal file
@@ -0,0 +1,12 @@
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
||||
uniform vec2 u_resolution;
|
||||
uniform vec2 u_mouse;
|
||||
|
||||
void main(){
|
||||
vec2 st = gl_FragCoord.xy/u_resolution.xy;
|
||||
|
||||
gl_FragColor = vec4(floor(vec3(st, u_mouse.x/u_resolution.x)+0.5),1.0);
|
||||
}
|
14
basic/moving_lights.glsl
Normal file
14
basic/moving_lights.glsl
Normal 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);
|
||||
}
|
Reference in New Issue
Block a user