void mainImage( out vec4 fragColor, in vec2 fragCoord )
{
    vec2 uv = 1.-fragCoord.yx / iResolution.xy;
    
    //storm settings
    float strength = smoothstep(-1.0,-1.0,sin(iTime*0.25));  // 0.0 - 1.0
    float blowout_factor = 2.5;
    float distort_strength = 0.2;
    float xspd = -1.0;
    float yspd = 0.1;
    
    //setup texture scaling and movement
    float tex_x = mod( ((uv.x * 4.0) + (iTime * xspd)) , 1.0 );
    float tex_y = mod( ((uv.y * 4.0) + (iTime * yspd)) , 1.0 );
    
    float tex1_x = mod( ((uv.x * 2.0) + (iTime * xspd)) , 1.0 );
    float tex1_y = mod( ((uv.y * 2.0) + (iTime * yspd)) , 1.0 );
    
    float tex2_x = mod( ((uv.x * 1.0) + (iTime * xspd)) , 1.0 );
    float tex2_y = mod( ((uv.y * 1.0) + (iTime * yspd)) , 1.0 );
    
    //get 3 layers of texture
    float texColor = texture( iChannel1, vec2(tex_x,tex_y) ).r;
    float texColor1 = texture( iChannel1, vec2(tex1_x,tex1_y) ).r;
    float texColor2 = texture( iChannel1, vec2(tex2_x,tex2_y) ).r;
    
    //mix texture layers  
    float t = max( max(dot( texColor, 0.28), dot( texColor1, 0.34)), dot( texColor2, 0.34));
  	t *= strength;
    
    //set storm intensity as distort
    float noise = smoothstep(0.11,0.45,t);
    vec2 sceneNoise = uv + (vec2(noise*xspd,noise*yspd)*distort_strength);
    
    //get scene
    vec3 sceneColor = texture( iChannel0, sceneNoise ).rgb;
    
    t *= blowout_factor;
    
    //mix colorized textures to scene
    fragColor.rgb = mix(sceneColor, vec3(0.65, 0.52, 0.44), t);
}
