← All resources

Part 2, Coloring Light as it passes through Stained Glass

Auto-discovered

Blog Intermediate

Various

Visit resource ↗

Description

Valerio Marty’s Medium follow-up extends his Unity volumetric light raymarch with stained-glass tinting via nested world-space rays and a custom depth buffer for non-shadow-casting glass.

Each lit march step casts toward the sun, stepping through screen-space UVs to read a ScriptableRendererFeature depth pass (R8 linear camera distance). Hits sample glass albedo into RGB scattering; disabled shadows on glass are required.

Documents performance tradeoffs (4 - 8 inner samples), screen-space limitations, and keyword toggles between monochrome and colored paths. Builds on his prior volumetric tutorial and Alexander Ameye render-feature patterns.

Unity URP/HDRP intermediate shader work; niche but cited for stylized cathedral lighting and tech-art student portfolios.