press space to stress test only strictly convex polygons are guaranteed to work, expects the polygons to be rendered front to back for 3d this uses scanline rasterizing to rasterize polygons and then takes the resulting spans and inserts them into the (inverse) c-buffer, look at https://www.flipcode.com/archives/Harmless_Algorithms-Issue_01_Fine_Occlusion_Culling_Algorithms.shtml#cbuffer if you wanna learn more about it this is pretty slow but it should good if the shading part is super slow cause it has 0 overdraw, combining it with other culling methods like pvs could make it actually viable for scratch maybe idk the reason the stress test only uses triangles are cause random convex polygons are kinda hard to generate and i didnt wanna do allat