There are nine basic types of eyes in the animal kingdom. All eyes did NOT evolve from a single ancestor with eyes. Eyes have evolved over 40 separate times in the animal kingdom. Also, details of embryology reveal that different kinds of eyes develop in different ways, confirming different origins. The larger the eye, the sharper the image, and better the resolving power.
Photocells contain stacks of light-sensitive pigments.
Stimulus is converted to a nerve impulse. For example, rods and cones. Photocells pointing in different directions tells animal about direction , if Brain monitors which photocells are firing. A simple cup can detect the direction of light. The deeper the cup, the better the eye can distinguish different directions.