Software Rasterizer
CPU implementation of a very efficient rasterizer which utilizes AVX2 instructions and lock-free multi-threading programming. Using tiled rendering the program consumes 8 pixels at the same time, which together with std::execution threading library makes it very fast and robust. The viewer of the project is a very simple OpenGL applicatoin which renders a texture to a quad. The texture is generated by the CPU Renderer.h class. The pipeline contains most of the modern GPU rasterizers stages.
The code can be found in the repository.
Performance
All tests were done on CPU Intel i4790k with 4 cores. 60 fps is the maximum for GLFW window.
Scene | Triangles | Shader | Filter | FPS |
---|---|---|---|---|
Bedroom | 1491750 | Phong | Nearest | 10.1 |
Panther | 2004842 | Phong | Nearest | 6.3 |
References/Credits
[0] Optimizing the basic rasterizer
[1] Rasterization on larrabee
[2] Rasterization practical implementation
[3] EDXRaster
Post image from the project.