Glitch Chronicles

C++ CPU based Real-Time Ray Tracing from Scratch

Published: (Updated: ) in The corner of Yuriy Georgiev (aka jeux), , , , , , , , , , , , , , , by .

CPU based real-time ray tracing is definitely a thing (with certain amount of sacrifices).

I just implemented real-time reflections and shadows.

It seems that physically correct shadows are extremely important. It’s good that all the knowledge about the light and the behavior of the photons is out there and is pretty clear and straightforward.

This demo shows simply just those two elements of the ray tracing and I don’t plan to dig much further into it. I guess if I make use of some optimizations it will make sensitive jump in the performance.

Anyone who wants to play a bit with it or just want to see how its done can download the source code from my github. Beware, its coded quick and dirty just for the sake of the experiment.

Download src

Spread the fun

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *