Session 010 - Spheres Orbit
SESSIONS is a project consisting of individual sessions of WebGL programming, with the goal of focusing on being prolific, and creating some kind of output.
I was curious about exploring reflections with this piece. I boiled down all of the background calculations to a single function that takes a direction vector. This was quite nice for computing the background and reflections of the spheres. Earlier on I had an error computing the reflection since I wasn’t taking into account the view matrix. After fixing it I ended up reverting the fix since I preferred the “mistaken” implementation.
One part I still haven’t solved is computing the background in a single triangle draw call. I added an icosphere around the camera which was much easier to handle the background.