I am a beginner in 3D rendering, and for a learning experience, I wanted to make my own engine from scratch. I have been looking for a long time, and haven't been able to find something that gives a way to find the distance from the camera of each individual pixel. Does anybody know what I could do to find those values? (I work in Java.)
If anyone wants more details, I will be happy to give!