mirror of
https://github.com/bvanroll/shaders.git
synced 2025-08-29 20:12:48 +00:00
ik hou meer van deze versie :)
This commit is contained in:
@@ -10,7 +10,7 @@ uniform float u_time;
|
||||
|
||||
|
||||
float circle_grid(in vec2 _st, in float _radius, in float amount, in float speed, in float xdir, in float ydir){
|
||||
vec2 dist = (_st*5.)+((u_time*speed)*vec2(xdir,ydir));
|
||||
vec2 dist = (_st*amount)+((u_time*speed)*vec2(xdir,ydir));
|
||||
dist = fract(dist);
|
||||
dist = dist-vec2(0.5);
|
||||
return 1.-smoothstep(_radius-(_radius*.01),_radius+(_radius*.01),
|
||||
@@ -21,9 +21,9 @@ void main() {
|
||||
vec2 st = gl_FragCoord.xy/u_resolution;
|
||||
vec3 color = vec3(0.0,0.0,0.0);
|
||||
vec2 stm = (u_mouse/u_resolution)-vec2(.5);
|
||||
color.r = circle_grid(st,(sin(u_time*5.)+1.)/2., 8., 2.,stm.x*-1., stm.y*-1.);
|
||||
color.g = circle_grid(st,(sin(u_time*20.)+1.)/4., 8., 2.,stm.x*-1., stm.y*-1.);
|
||||
color.b = circle_grid(st,(sin(u_time*30.)+1.)/8., 8., 2.,stm.x*-1., stm.y*-1.);
|
||||
color.r = circle_grid(st,(sin(u_time)+1.)/2., 8., 2.,stm.x, stm.y*-1.);
|
||||
color.g = circle_grid(st,(sin(u_time*2.)+1.)/4., 8., 2.,stm.x*-1., stm.y*-1.);
|
||||
color.b = circle_grid(st,(sin(u_time*3.)+1.)/8., 8., 2.,stm.x*-1., stm.y);
|
||||
//color.g = circle_grid(st,1.,2.*(sin(u_time)+1.), 2.,stm.x*-1., stm.y*-1.);
|
||||
//float b = circle_grid(st,1.,3.*(sin(u_time)+1.), 2.,stm.x*-1., stm.y*-1.);
|
||||
//color = vec3(r,g,b);
|
||||
|
Reference in New Issue
Block a user