Category: Tutorial

  • A Journey Through the Atmosphere

    A Journey Through the Atmosphere

    This post describes how to model the density of the atmosphere at different altitude. This is a critical step, since the atmospheric density is one of the parameters necessary to correctly calculate the Rayleigh scattering. You can find all the post in this series here: You can download the Unity package for this tutorial at…

  • The Mathematics of Rayleigh Scattering

    The Mathematics of Rayleigh Scattering

    This post introduces the Mathematics of Rayleigh Scattering, which is the optical phenomenon that causes the sky to appear blue. The equations derived in this tutorial will be translated into shader code in the next tutorial. You can find all the post in this series here: You can download the Unity package for this tutorial…

  • CD-ROM Shader: Diffraction Grating – Part 2

    CD-ROM Shader: Diffraction Grating – Part 2

    This post completes the series on how to create a shader for CD-ROMs. You can find the complete series here: A link to download the Unity project used in this series is also provided at the end of the page.

  • The Theory Behind Atmospheric Scattering

    The Theory Behind Atmospheric Scattering

    This is the second part of the tutorial on volumetric atmospheric scattering. In this post we will start deriving the equations that govern this complex, yet beautiful optical phenomenon. You can find all the post in this series here: You can download the Unity package for this tutorial at the bottom of the page.

  • Intersecting The Atmosphere

    Intersecting The Atmosphere

    You can find all the post in this series here: You can download the Unity package for this tutorial at the bottom of the page.

  • Volumetric Atmospheric Scattering

    Volumetric Atmospheric Scattering

    If you have lived long enough on planet Earth, you might have wondered why the sky is usually blue, yet red at sunset. The optical phenomenon which is (mostly) responsible for that is called Rayleigh scattering. This tutorial will explain how to model atmospheric scattering to reproduce many of the visual effects that planets exhibit.…

  • CD-ROM Shader: Diffraction Grating – Part 1

    CD-ROM Shader: Diffraction Grating – Part 1

    This post will guide you through the creation of a shader that reproduces the rainbow reflections that can be seen on CD-ROMs and DVDs. This tutorial is part of a longer series on physically based iridescence. You can find the complete series here: A link to download the Unity project used in this series is…

  • Fast Subsurface Scattering in Unity (Part 1)

    Fast Subsurface Scattering in Unity (Part 1)

    Most (if not all) optical phenomena that materials exhibit can be replicated by simulating how the individual rays of light propagate and interact. This approach is referred in the scientific literature as ray tracing, and it is often too computationally expensive for any real-time application. Most modern engines rely on massive simplifications that, despite being…

  • Understanding Diffraction Grating

    Understanding Diffraction Grating

    The first post in this series, The Nature of Light, introduced the dual nature of light, exhibiting behaviours which are typical of both waves and particles. In this part, we will see how those two aspects are both necessary for iridescence to arise. You can find the complete series here: A link to download the…

  • Improving the Rainbow – Part 2

    Improving the Rainbow – Part 2

    In the previous part of this tutorial, Improving the Rainbow – Part 1, we have seen different techniques to reproduce the colours of the rainbow procedurally. Solving this problem efficiently will allow us to simulate physically based reflections with a much higher fidelity. The purpose of this post is to introduce a novel approach that…

">