Fractal: coined by the mathematician Benoit Mandelbrot in 1975
“A rough or fragmented geometric shape that can be split into parts, each of which is (at least approximately) a reduced-size copy of the whole.” The Fractal Geometry of Nature, Benoit Mandelbrot
Fractals are characterized by having a fine structure at small scales (keep zooming in and you’ll continue to find fluctuations)
void surf (Input IN, inout SurfaceOutputStandard o)
{
float2 c = (IN.uv_MainTex / _Zoom) + _Offset.xy;
float2 z = 0;
int iter;
float4 color;
for (iter = 0; iter < _MaxIterations; iter++) {
z = float2(z.x * z.x - z.y * z.y, 2 * z.x * z.y) + c;
if (length(z) > 2) break;
}
if (iter == _MaxIterations) {
color = float4(0,0,0,1);
} else {
color = float4(sin(iter / _Red), sin(iter / _Green), sin(iter / _Blue), 1) / 4 + 0.75;
}
o.Albedo = color;
}
https://www.shadertoy.com/view/Mss3R8
https://www.shadertoy.com/view/4dXGDX
https://www.shadertoy.com/view/3llyzl
Same function as Mandelbrot set, but different dynamic!
For each different c, you will have a different shape!