r/GraphicsProgramming • u/Batteryofenergy1 • Oct 18 '26
Progress on Software Rendered game in C
This is some progress of a free game i have been working. This is fully software rendered on the CPU and OpenGL is only used to render the image. I use multiple threads to render the game at full 1080p. Using SIMD instructions helps a lot to get a decent frame rate. But i am still kinda dissapointed by the performance, i think Michael Abrash's binning technique would improve it, but right now, it is decent. I am getting around 70-140 frames with I5-12400.
502
Upvotes
View all comments
Show parent comment
1
u/Batteryofenergy1 Oct 21 '26
I use a BVH Tree for rendering and collision testing. All static geometry and objects are in the same tree. The tree is traversed and culled using frustrum culling. Then i process the culled amount into a generic RenderSurface struct. After transforming each triangle into screen space, i occlusion cull the screen space bounding box against the previous frame's depth buffer, this causes some pop in. After that i sort the polygons front to back using min screen space depth, this causes the nearest polygons to be rendered first and the polygons in the back can skip expensive shading.