← All resources

I Tried Ray-Tracing Glass and Rainbows

Auto-discovered

Video / channel Intermediate

Sebastian Lague

Visit resource ↗

Description

[video] I Tried Ray-Tracing Glass and Rainbows is a Coding Adventure YouTube episode by Sebastian Lague that extends a path tracer with dielectric glass, caustics, and a simplified rainbow model.

It covers Snell refraction and Fresnel splits, stack-based then probabilistic reflection versus refraction, absorption coloring, frosted roughness, sphere-lens inversion, mist and mug caustics, water-mesh caustics from a fluid sim, and rainbow arcs near 42 and 51 degrees via probabilistic raindrop hits.

It is for intermediate graphics learners comfortable with basic path tracing who want dielectrics and light focusing explained visually. Prior Coding Adventure ray-tracing episodes help but the glass path is walked step by step.

Access is a free long-form YouTube video with live coding, 2D ray diagrams, and offline renders.

It is useful as an approachable demo of why glass, caustics, and rainbows are hard and which probabilistic shortcuts still look convincing.