← All resources

Analytic Fog Rendering With Volumetric Primitives

Auto-discovered

Blog Advanced

matejlou

Visit resource ↗

Description

Technical blog post by matejlou on rendering fog regions with spatially varying density using analytic integrals over volumetric primitives. The URL is one free article with math derivations and shader-oriented discussion.

It reviews transmittance and the Beer-Lambert law, distance fog, bounded primitives, and limits of ray marching for heterogeneous volumes. The core develops radial density functions - linear, quadratic, quartic, spiky, and Gaussian - with antiderivatives along rays, plus notes on lighting hacks, particles, and boolean cutouts.

Aimed at advanced graphics programmers comfortable with integrals and volume rendering ideas. Expect formulas rather than a node-graph walkthrough.

Access is a free WordPress blog post from February 2025, with a linked Shadertoy visualization mentioned for the density functions. No paywall on the article itself.

Useful when you want alias-resistant analytic fog primitives instead of relying only on sampled ray marches for local density blobs.