A cube rendered in real time with shader code written on the website shadertoy. This project was created when I was studying real time graphics and the rendering pipeline. In order to better grasp the concepts involved when turning three dimensional vertex data into visible pixels on screen I decided to create a simplified version of the process using shadertoy. Projects on the website are written in glsl along with some additional functions provided by shadertoy. The cube was rendered by taking a set of verticies and transforming them into clip space, projecting these onto the screen, and rasterizing the triangles to form the cube.
For this project I had to research the different steps that goes into rendering something on screen more in depth. I read about and applied the math required to render 3D vertecies onto a 2D plane with perspective projection as well as how to detect when a pixel is inside a triangle. The set of vertecies had corresponding normals due to me wanting to implement a lighting model as well, however I did not have the time for it. The biggest challenge, which came right before the cube was finished, was an issue where it would not render properly because I was using the wrong function for triangle rasterization. It was difficult to tell if the problem was due to a fault in the projection, rasterization, or if I had simply misunderstood the pipeline, but after several more reviews of litterature and cross comparing with similar projects I managed to find out the issue.
After this project I felt more familiar with the real time graphics pipeline and I had also gotten some experience writing shader code using glsl. In the future I might go back and add lighting to further experiment with vertex normals.