Fractal relief, normals and light
A 3D-looking fractal does not require a volumetric fractal. A two-dimensional scalar field can be interpreted as height, differentiated into normals and shaded like a surface.

Choose the height field
Smooth iteration, potential, distance or a composite effect can supply height. Nonlinear scale and clamping determine whether fine boundary detail becomes a ridge, a plateau or noise. The chosen field is an artistic interpretation rather than a physical terrain.
Iteration count, smooth potential and distance fields produce very different heights. Raw iterations create steps, continuous potential softer terraces, and distance sharp boundary ridges. Height should be normalized before lighting and its scale saved. Otherwise a gradient change can alter relief even though the user expects only color.
Normals from neighboring samples
Finite differences estimate horizontal and vertical slopes. Their cross-product or equivalent gradient formula yields a normal direction. Sampling step should follow output pixel scale; otherwise deep zoom or high-resolution export changes the apparent sharpness.
Normals come from differences between neighboring height samples. Their strength depends on pixel spacing and zoom; an unscaled fixed difference makes the same relief appear steeper at another resolution. Central differences are more symmetric than one-sided ones. Tile edges need halo samples to avoid lighting seams.
Directional and point light
Directional light uses one direction everywhere, like a distant source. Point light depends on vector and distance from every surface point and may attenuate. Ambient, diffuse, specular and occlusion-like terms should expose distinct controls and active states.
Directional light has one direction for every pixel. Point light also needs a position and distance to each surface point, producing changing direction and attenuation. A UI switch that changes only its label while the shader still reads a direction uniform can never activate Point. State model, uniform layout and shader branch must carry the same light type.
Sources and further reading
This article summarizes the following specialist sources in original wording. Accessed and editorially reviewed 12 August 2026.
- The Science of Fractal ImagesSpringer
- Metal overviewApple Developer Documentation


