Gravitational Beam Emitter - Radical Ed



#ifdef GL_ES
precision highp float;
#endif

#define PI 3.14159265359
#define TWO_PI 6.28318530718

vec2 rotate(vec2 v, float a) {
float s = sin(a);
float c = cos(a);
mat2 m = mat2(c, -s, s, c);
return m * v;
}

void mainImage( out vec4 fragColor, in vec2 fragCoord ){
vec2 st = fragCoord.xy/iResolution.xy;
vec3 color = vec3(0.0);
float d = 0.0;

st.x = st.x *2.-1.;
st.y = st.y *1.-0.5;

float a = atan(st.x,st.y)+PI;
d = abs(abs(cos(a*12.*iTime))*sin(a*3.))*.5*abs(sin(iTime))+.1;

color = vec3(smoothstep(.4,.41,d));
//color *= vec3(0.9,0.9,0.0);

fragColor = vec4(color,1.0);
}

Leave a Reply

Update cookies preferences