Overview

For the final project of the CSCI1230: Introduction to Computer Graphics course at Brown University, I worked with Michael Cosgrove to develop “Snowy Sunrise”, a real-time GPU raymarched scene featuring L-systems, screen-space volumetric lighting, and fast-approximate anti-aliasing.

I was responsible for implementing both the volumetric lighting effect and fast-approximate anti-aliasing.

Render Pipeline

Our program uses three main shaders:

  1. A raymarching shader, which renders the scene (both the landscape and the trees) to two render targets: a texture containing the normal, raymarched scene and an “occlusion texture”, where all objects in the raymarched scene are rendered black with the light source as a white circle. (Originally, we had two separate raymarches for the occlusion texture and the normal scene—however, we were able to significantly optimize the performance of our program by combining them into a single shader with multiple render targets.)

    A sample of the occlusion texture.
    A sample of the scene texture without the volumetric lighting effect.
  2. A volumetric lighting shader, which takes samples from the occlusion texture in a radial fashion to simulate light rays shining across the screen. This shader then additively blends the light ray samples with the original texture to achieve the desired lighting effect.

    The volumetric lighting texture, as sampled from the occlusion texture.
    The scene texture additively blended with the volumetric lighting texture.
  3. A FXAA shader, which performs edge detection on the texture returned by the volumetric lighting shader and applies an anti-aliasing effect to those edges.

    The edges where the FXAA effect is applied are highlighted in red.
Snowy Sunrise was developed in December 2018.
watch demo