Rasterizer

OpenGL / C++ / Qt

The Process

I created a rasterizer that draws scenes of both 2D and 3D polygons. I also implemented an interactive camera that displays perspective projection to the viewer. The Mario mesh consists of a collection of polygons, which my program breaks down into triangles and vertices,  and performs a series of transformations on the vertex data. I used perspective-correct interpolation to include the depth information for each vertex into its color computation. This is how I achieved the appearance of a 3D Mario on a 2D screen. Additionally, I implemented lambertian reflection which accounts for the light direction and brightness in the scene.