Fractal rendering with Apple Metal

A fractal renderer repeats a compact mathematical rule for millions of pixels. Apple Metal makes that parallel workload a natural fit for the GPU—provided precision and scheduling are handled deliberately.

One formula, millions of independent pixels

For every image coordinate, the renderer maps a pixel into the complex plane and iterates the selected formula. Most pixels can be evaluated independently, so Metal can distribute the work across many GPU threads instead of processing the image serially on the CPU.

The result is not only an iteration count. Smooth iteration values, orbit information, distance estimates and normals can feed later color, texture and lighting stages without changing the underlying region.

Interaction first, refinement second

While a view is moving or a slider is changing, responsiveness matters more than the final sample count. MandelKit can present a useful intermediate result and then progressively replace it with the full-resolution render once interaction settles.

That distinction explains why a quick preview and a finished export can follow different schedules while representing the same coordinates and visual settings.

Precision changes with the depth

Ordinary floating-point arithmetic is fast and sufficient near the initial view. At extreme zoom levels, neighboring pixels can become closer than that representation can distinguish. MandelKit then moves to its deep-zoom pipeline with a high-precision reference orbit and perturbation techniques.

Metal remains valuable for the large per-pixel workload, while high-precision work is concentrated where it has the greatest effect.

A native pipeline across Apple devices

The same scene model and visual vocabulary are shared across macOS, iOS and iPadOS. Actual render resolution and workload are adapted to the display and device instead of calculating Retina density when the connected display cannot show it.

  • Mac: large workspace, tiled high-resolution export and sustained exploration.
  • iPad: direct touch navigation with a spacious inspector.
  • iPhone: the same regions and renderer in a compact, touch-first interface.