I was looking stuff up about octopus eyes and noticed an article titled "What animal has a more sophisticated eye, Octopus or Insect."
I remembered talking about the convergent evolution of eyes and how the octopus eye differed in that the nerves are attached at the back. Apparently that's because the eye evolved as an invagination of the skin, meaning that the eye evolved from the skin going inwards rather than an outward extension of the brain.
The article says that all invertebrate eyes develop as an invagination while vertebrate eyes are all extensions of the brain. I wonder if invertebrate invagination includes insects?