Skip to content

Commit

Permalink
upd_res_frag
Browse files Browse the repository at this point in the history
  • Loading branch information
inozemtsev-roman committed Jul 3, 2022
1 parent 40665df commit 9033bab
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions algo.glsl
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
vec2 hash2( vec2 p )
{
p = vec2( dot(p,vec2(63.31,127.63)), dot(p,vec2(395.467,213.799)) );
return -1.0 + 2.0*fract(sin(p)*43141.59265);
p = vec2( dot(p,vec2(63.31,127.63)), dot(p,vec2(395.467,213.799)) );
return -1.0 + 2.0*fract(sin(p)*43141.59265);
}

void mainImage( out vec4 fragColor, in vec2 fragCoord )
void main(void)
{
float invzoom = 100.;
vec2 uv = invzoom*((fragCoord-0.5*iResolution.xy)/iResolution.x);
float bounds = smoothstep(9.,10.,length(uv*vec2(0.7,0.5)));
float invzoom = 64.;
vec2 uv = invzoom*((gl_FragCoord.xy-0.5*resolution.xy)/resolution.x);
float bounds = smoothstep(9.,10.,length(uv*vec2(0.74,0.55)));

float a=0.;
vec2 h = vec2(floor(7.*iTime), 0.);
vec2 h = vec2(floor(7.*time), 0.);
for(int i=0; i<50; i++){
float s=sign(h.x);
h = hash2(h)*vec2(15.,20.);
a += s*atan(uv.x-h.x, uv.y-h.y);
a += s*atan(uv.x-h.x, uv.y-h.y);
}

uv += 20.*abs(hash2(h));

a+=atan(uv.y, uv.x);

float w = 0.8;
float p=(1.-bounds)*w;
float p=(1.-bounds)*w;
float s = min(0.3,p);
float l = length(uv)+0.319*a;
float l = length(uv)+0.319*a;

float m = mod(l,2.);
float v = (1.-smoothstep(2.-s,2.,m))*smoothstep(p,p+s,m);

fragColor = vec4(v,v,v,1.);
}
glFragColor = vec4(v,v,v,1.);
}

0 comments on commit 9033bab

Please sign in to comment.