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.
Our program uses three main shaders:
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 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.
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.