Ocelli and apposition eyes

Pigment-pit ocelli detect the amount of light. They don’t detect shapes. However, if you put enough of them in apposition and have each detect light from only one direction then the brain combines inputs and recognizes shapes.