diff --git a/11/tmp/vortex.frag b/11/tmp/vortex.frag index cfc6823..e2f2550 100644 --- a/11/tmp/vortex.frag +++ b/11/tmp/vortex.frag @@ -73,6 +73,11 @@ float cascade(vec2 st, vec2 zoom, float time, float warp) { void main() { vec2 st = gl_FragCoord.xy/u_resolution.xy; + if (u_resolution.x>u_resolution.y) { + st.x *= u_resolution.x/u_resolution.y; + } else { + st.y *= u_resolution.y/u_resolution.x; + } vec3 color = vec3(0.0); vec2 pos = st-vec2(.5); float r = dot(pos,pos); @@ -86,4 +91,4 @@ void main() { color *= 1.0-smoothstep(.11,.13,r); gl_FragColor = vec4(color,1.0); -} \ No newline at end of file +}