A downloadable piece of garbage

Why bother making real ray tracing when you can simply use ray marching!

Hmm, but distance calculations are too complicated for someone as lazy as me, so we can just check for intersections when the ray is inside the object.

But that's too much effort for most shapes, so lets just use unrotated unit cubes snapped to the grid and just round position for intersection tests.

Aaaand since we're using unit cubes, reflection is just making a number negative, I did terribly in my vectors anyway.

Oh, any btw this is all unoptimized code running in Python, not even using Numba.

Download

Download
rt.py 4.2 kB

Install instructions

You need Python 3 with PIL

Leave a comment

Log in with itch.io to leave a comment.