Depth perception is based on Stereopsis and Learned Cues.
Here again, the brain is adding something that was not in the original stimulus. There are two contributors to this creative process: Stereopsis and Learned Cues.
Stereopsis: This is the illusion of a third dimension in space created by the brain. The cues for the brain to perform this constructive process are the angles of the line of sight on an object.
When that angle matches the line of sight from each eye the brain combines the two images into one and builds the illusion of 3D.
When I was in the Air Force doing what they called photo intelligence, we had to look at photos taken from high above cities and try to describe what we were seeing. What we were seeing on the photo, by and large, were relatively meaningless patches of different shapes, sizes and shades.
NOTES: See an interesting site on 3D.
NOTES: Here is a little more on 3D at the professorial level.