shadermeh/shaders/noise4.frag

23 lines
480 B
GLSL

#define PI 3.14159
#define TWO_PI (PI * 2.0)
#define N 26
void mainImage(out vec4 fragColor, in vec2 fragCoord)
{
vec2 v = (fragCoord.xy - iResolution.xy) / min(iResolution.x, iResolution.y);
v *= 5.0;
v -= vec2(200.0);
float col = 0.10;
for (int i = 0; i < N; i++) {
float a = float(i) * (TWO_PI / N) * 61.95;
col += cos(TWO_PI * (v.y * cos(a) + v.x * sin(a) + sin(iTime * 0.004) * 100.0));
}
col /= 3.0;
fragColor = vec4(col*1.50, -col*1.0,-col*1.0, 1.0);
}