Neon Constellation (Shader Render)
Introduction
Neon Constellation isn't simulating anything to do with real world constellations. However, it is simulating the perfectly elastic physics of bodies in motion within an indealized enclosed system. In other words, the kinetic energy observable in the simulation remains constant until an external interference is applied. It is also simulating the casting of shadows.
Reflective Analysis On Writing Shaders
This curio was my first time in writing shader code. In the simulation for the Coriolis effect, I needed to use WebGL for 3D rendering. I noticed that the rendering performance in 3D was quite slow, especially when trails were enabled. This was despite the fact that the amount of vertices in the render was miniscule compared to what modern games demanded. It became apparent to me that if I wanted to take my projects a step further, I would need to learn to make use of the GPU myself.
Shaders are incredibly powerful, as they allow you to easily parallelize highly optimized renders on the GPU. If you're interested in learning more about what you can do with shaders, I implore you to head over to Shadertoy to peruse through the works of others, all made using GLSL shaders!
Despite the visible results, my first experience writing shader code wasn't seamless. There was no direct feedback loop, so it made testing issues incredibly tedious. There were limited debugging capabilities, as code executes on the GPU. Optimizing shader code required knowledge in mathematics for vector and matrix operations. "If" statements may cause branching, which hinders the rendering performance. When I read other people's code, it was like trying to decipher an ancient cryptic text. I had no idea what I was doing when I was working on this curio, and I doubt many would either. But despite all that, this experience was something I definitely don't regret. After all, programming wouldn't be nearly as fun if it wasn't challenging.