ISF - Generators - roywig's B-W Sunflower Zoom
/*{
"DESCRIPTION": "Your shader description",
"CREDIT": "anonymous",
"CATEGORIES": [
"Your category"
],
"INPUTS": [
{
"LABEL": "TWISTS",
"NAME": "TWISTS",
"TYPE": "float",
"DEFAULT": 5,
"MIN": -50,
"MAX": 50
},
{
"LABEL": "SEGMENTS",
"NAME": "SEGMENTS",
"TYPE": "float",
"DEFAULT": -5,
"MIN": -50,
"MAX": 50
},
{
"LABEL": "SKEW",
"NAME": "SKEW",
"TYPE": "float",
"DEFAULT": 5,
"MIN": -50,
"MAX": 50
},
{
"LABEL": "PITCH",
"NAME": "PITCH",
"TYPE": "float",
"DEFAULT": 5,
"MIN": -50,
"MAX": 50
},
{
"LABEL": "SHARPNESS",
"NAME": "SHARPNESS",
"TYPE": "float",
"DEFAULT": 1,
"MIN": 0,
"MAX": 1
},
{
"LABEL": "SHARPNESSSCALE",
"NAME": "SHARPNESSSCALE",
"TYPE": "float",
"DEFAULT": 1000,
"MIN": 0,
"MAX": 1000
}
]
}*/
// Ported from "B/W Sunflower Zoom" by roywig: https://www.shadertoy.com/view/4lc3Wn
vec3 iResolution = vec3(RENDERSIZE, 1.);
float iGlobalTime = TIME;
void mainImage( out vec4 fragColor, in vec2 z )
{
z = z/iResolution.xy-.5;
z.x *= iResolution.x/iResolution.y;
z = vec2(log(length(z)),atan(z.y,z.x)); //complex logarithm
z.x -= (iGlobalTime);
z *= mat2(int(TWISTS),int(SEGMENTS),int(SKEW),int(PITCH)); //mat2(0.707,-0.707,0.707,0.707)*2./0.283;
// Drawing time.
fragColor = vec4(SHARPNESS*SHARPNESSSCALE*sin(z.x)*sin(z.y));
}
void main(void) {
mainImage(gl_FragColor, gl_FragCoord.xy);
}