Does anyone know a precise calculation on converting a pixel to 3D units?
Say for example I have a rectanlge that is 100 position on x and y. How can I compute for the 3D units of those?
This image for example
You can see that I want to have the red circled thing to be illuminated by the light to have a shadow. But when I tried to convert it to 3D units by dividing the width of the screen to the pixel coordinate its not accurate as you can see the green circled thing has a shadow which should be the red one.
Anyone?