It's called imaging. A lens in your eye converts direction into position information, that is, an image on your retina. With the information of two slightly displaced images the visual cortex can convert the images into a 3D representation of your field of view. Photons are relevant only for very low intensity light or for the operation of the detector molecules in the retina.