r/GraphicsProgramming • • Oct 11 '26

whats wrong with my Cube??? :(

Post image

I know what is missing, but can you figure it out???

heres the repo btw:
https://github.com/Tetraeder4/3DRenderer/tree/467c8d1ac8dbd09a23ce7bc7e2fcba59afe36ea5/3DRenderer

100 Upvotes

28 comments sorted by

View all comments

Show parent comment

12

u/_Fibbles_ Oct 11 '26

I've had a look through the code and there doesn't seem to be any zbuffer implementation as far as I can see. The render target is just an array of vec3 and the rasterizer is just writing triangles over the top of each other with no consideration for depth.

7

u/sol_runner Oct 11 '26

Yeah I'm on mobile. The image is a classic symptom of some sort of raster order issue.