Building the orange

Today in my computer graphics class I decided to just open up a text editor and implement a simple ray tracer in GLSL. The idea was to take the students through the process of writing a ray tracer from the ground up in GPU shader code.

To my surprise, by the time we were done I had implemented an animated orange:

orange

I had not planned on building an orange. Yet somehow, as I followed my creative muse over the course of the lecture, that is what I ended up doing.

After the class was over, I went back and broke up the code I had writtem into successive steps. This way the students could review the journey from a blank screen to a virtual orange.

In case you are also interested in following along on that journey, here is my “building the orange” breakdown.

Leave a Reply

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