My attempt to make a software renderer to learn more about the algorithms behind graphics. It can load gltf or obj file formats.
I implemented a simple rasterization algorithm that does the classic World -> View -> Projection transforms to get the vertices into screen space where I then figure out how to colour each pixel. The lighting is nothing fancy just a simple diffuse lighting calculation that is baked into the rasterization step. To improve performance I am using a vectorized way of doing the vertex transform with the desired matrix and am using a tile-based approach with multi-threading.
End Result:
-
Hold down RMB and use the mouse to look around.
-
While holding RMB can move around using WASD.
-
Q will open a file dialog that allows selection of a model to load.
-
ESC to close the window.
OBJ models (Teapot, Stanford Bunny) from common-3d-test-models.
glTF models (Sponza, Avocado) from glTF-Sample-Models.