Volumetrics raytracer

View source on Forgejo

Play in browser (sorry, this won't work in text mode!)

How to use

You can use the imgui controls to change scene.
The raytraced volumetrics are in the Volumetrics scene, but do note it has performance issues on web! It runs smoothly on Linux :)

Summary

As a research project, I expanded a university assignment where we write a CPU raytracer to also support volumetric smoke. I used a raymarching technique to step through voxels of smoke, and cast reflection rays to calculate lighting via Beer's law.

Tech Used

Things Learned