0.00
60.0 fps

twisted sine noise

cheap noise

Log in to post a comment.

#version 300 es
precision highp float;

uniform float iTime;
uniform float iLoop;
uniform float uTwist; // value=2, min=0, max=2., step=0.01
uniform float ufalloff; // value=.9, min=0.5, max=1., step=0.01
uniform float uContrast; // value=.2, min=0., max=0.5, step=0.01
uniform float uColor; // value=.5, min=0., max=1., step=0.01

in  vec2 vScreen;
out vec4 fragColor;


#define PI 3.1415
//identity rotated GOLDEN_ANGLE around x, then around y
#define m3 mat3(-0.7373, 0.4562, 0.4980, 0, -0.7373, 0.6754, 0.6754, 0.4980, 0.5437)


void main()
{
     vec3 p = vec3(vScreen * PI, iTime * 0.2);

      float a = 1.;
       vec3 n = vec3(0);
       for(int i = 0; i <7 ; i++){
         p = m3 * p; 
         vec3 s = sin( p.zxy / a) * a;  
         p += s * uTwist;
         n += s;
         a *= ufalloff;
       }  
    
    fragColor.xyz = mix(vec3((n.x + n.y + n.z) * 0.5), n, uColor) * uContrast + 0.5;
}