this post was submitted on 22 Sep 2026
151 points (100.0% liked)
Programming
28604 readers
252 users here now
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Rules
- Follow the programming.dev instance rules
- Keep content related to programming in some way
- If you're posting long videos try to add in some form of tldr for those who don't want to watch videos
Wormhole
Follow the wormhole through a path of communities !webdev@programming.dev
founded 3 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Writing rasterizer by hand is an incredible fun exercise. Get some basic reading on the graphics, don't do gpt first. You will never see games as you had before.
Culling faces is simple: you have geometry in camera space. Take a dot product between a surface normal and view direction vector and if it's negative then the normal is pointing away from you and the face is invisible.
Proper techniques with occlusion and stuff are more complicated, such as painter algorithm or z-budgeting or others
Thanks for the tip. I'll have to try that out later when I have time.
After noticing that ChatGPT had quite a different vision than I did, I've mostly been brute forcing the projection math by drawing a cube on paper and seeing how the 3D coordinates are transformed to 2D space. The only useful thing it actually helped me with was figuring out which 3D file format was most compatible for parsing into my objects. It tried writing a parser for that format, which I looked at and then decided to do it myself with less lines of code ;D