Going further than the tutorial:

  • Changed the color
  • Added effects

Live Version:


GLSL / ShaderToy Code

void mainImage( out vec4 fragColor, in vec2 fragCoord )
{
    // Normalized pixel coordinates (from 0 to 1)
    vec2 uv = 6.0 * fragCoord/iResolution.xy;
    
    for (int n = 1; n < 50; n++) {
        float i = float(n);
        uv += vec2(3.0 / i * sin(i * uv.y + iTime + 1.0 * i * 2.0) + 0.8, 1.0 / i * sin(uv.x + iTime + 0.3 * i) + 1.6);
    }
    
     
    
    vec3 color = vec3(0.5 * sin(uv.x) + 0.5, 0.5 * sin(uv.y) + 0.5, sin(uv.x + uv.y));
    color *= vec3(0.0, 0.0, 1.0);


    // Output to screen
    fragColor = vec4(color,1.0);
}

Tutorial I followed:


Resources:
ShaderToy

Leave a Reply

Your email address will not be published. Required fields are marked *