Starfields

Version 5 of 6

Fractal star volume.

GPU · after Star Nest · 2013

This version

After Kali's Star Nest: a folded fractal volume sampled along every view ray. Stars and dust appear from maths, not from a list.

How this version works

Rendered at half scale, this shader constructs a viewing ray for each pixel and rotates both the ray and a moving camera position. It takes 14 samples along the ray, folding each sample into repeating space before performing 14 absolute-value and inverse-squared-length iterations. Changes in the iterated vector's length produce an intensity measure, which is accumulated with distance-dependent colour weights and fading. Later samples can receive additional attenuation, and the final colour is mixed towards grey, tinted and adjusted with a power function.

The trick in this version

The GPU evaluates a procedural volume rather than projecting stored stars. Half-scale rendering reduces the pixel workload of the nested loops, which perform 196 fractal iterations per fragment.

Historical context · GPU

  1. 2013 · Pablo Andrioli (Kali)

    Star Nest

    No points at all: a volumetric fractal that reads as stars and nebulae. A descendant of the starfield rather than the same algorithm.

  2. 2013 · Morgan McGuire

    A starfield shader for games

    A performance-engineered adaptation renders procedural parallax at 3.7 ms per 1080p frame by working at reduced resolution and upsampling.

  3. 2022 · ColorauGuiyino

    Star Nest in an engine

    The shader becomes a reusable engine component, with the advice to render it downscaled because it is so expensive.

Platform
GPU · after Star Nest
Era
GPU
Rendered on
GPU
Tags
volumetric · kaliset
Sources
Star Nest (2013)Star Nest in an engine (2022)