A deep-dive into implementing real-time atmospheric scattering in the browser using shaders and raymarching. Covers Rayleigh and Mie scattering, ozone absorption, and transmittance to render realistic sky domes and sunsets. Extends the technique into a post-processing effect for 3D scenes, then scales it to render full planetary atmospheres with ray-sphere intersection. Also explores eclipse handling, alien atmospheres (Mars), and a LUT-based optimization approach inspired by Sebastian Hillaire's production-ready technique, using Transmittance, Sky-view, and Aerial Perspective lookup tables to replace expensive nested raymarching loops with texture lookups.
Table of contents
How to Render a SkyPlanetary AtmosphereLUT Based Atmospheric ScatteringFinal ThoughtsSort: