POC / Radiance Cascades
Trying to build up my intuition around Suslik's Radiance Cascades GI approach.
-
implementations:
- shadertoy: Radiance Cascades implementation by fad - includes some temporal latency due to shadertoy limitations.
- shadertoy: Radiance Cascades 2d Smooth WIP - Suslik's fork of fad's work
-
blog posts / videos:
- Yaazarai wrote about Radiance Cascades on GM Shader Tuts
- SimonDev made a nice introductory video: Exploring a New Approach to Realistic Lighting: Radiance Cascades
-
calulators and other utilities
-
kornel made a calcualator to compute the optimal cascade interval lengths based on the penumbra angle, minimum light size and probe spacing.
2D
Things are simpler in 2D so we'll start there.
Radiance Intervals (2D)
In 2D these are bands/shells/annuluses/crusts(🍕) of radiance values where relative to the previous level, each cascade level:
- doubles the inner radius of the band
- doubles the width of the band
- doubles the number of rays per probe
- halves the total number of rays
- offsets the rays to avoid overlaps (e.g.,
angle = TAU * (rayIndex + 0.5) / rayCount
)
source: flatland-2d/radiance-intervals-2d.js
Ray Distributions (2D)
Note: this demo is limited to spatial doubling for cascade levels irregardless of the branching factor, which is the common case for flatland.
Probe Ray Interpolation (2D)
source: flatland-2d/probe-interpolation-2d.js
Flatland (2D)
Debug/Development
Radiance Cascade Parameters
Brush Parameters
This demo requires WebGPU - in other words, you should open this page in Chrome or Edge.
source: flatland-2d/flatland-2d.js
Screenspace probes with Worldspace Intervals (3D)
Compute a storage cost table for screen-space probes with world space intervals
World Space
Screen Space
General
source: ssprobes-wsintervals/ssprobes-wsintervals.js
World Space Probes (3D)
Compute a storage cost table for world space probes, using a ping-pong buffer, at various spatial resolutions.
rayCount = 6
bytesPerRay = 16
diameter3 * rayCount * bytesPerRay * 2
diameter | megabytes | MB per slice |
Licensing
Text / Images
tmpvar's radiance cascades 2D playground is licensed under CC BY 4.0
which includes the text and images on this page.Linked Source Code
All of the linked source code is licensed MIT as specified in the header of each file.