The nature of perception posed major problems for the philosophers of the 17th and 18th centuries. You might suppose that you see the world directly. Yet on at least one widely accepted interpretation of Descartes' way of ideas, we do not perceive the world directly. All that we see directly are our own ideas. We infer the existence of the external world from our ideas. This is sometimes called the represntative or causal theory of perception. Descartes, Arnauld and Malebranche and Locke (and many other less famous philosophers) were all supposed to have held this theory of perception.
This provides a major opening for skepticism. We perceive ideas directly, but how do we know that our ideas accurately represent the world -- or even that there is a world independent of our ideas? Perhaps our ideas are not being caused by the world but by an evil demon! One can explore this issue and related questions in Descartes, Locke, Berkeley and Hume amongst others.
Considering this problem, some recent commentators have
reexamined the texts and decided that Descartes, Arnauld and Locke
amongst others were not holding the representative theory of perception
while other philosophers, such as Malebranche, were. I have explained
one really fine philosophical problem connected
with this issue in the section of the web site on Arnauld. Some questions related to
(a) The basis of the distinction between primary and secondary qualities: see Locke and Berkeley in particular. Jonathan Bennett's Locke, Berkeley, Hume is a good place to start. Peter Alexander's Ideas, Qualities and Corpuscles: Locke and Boyle on the External World is also good. A good book on Hume and skepticism in regard to the senses is Mandelbaum, Philosophy, Science and Sense-Perception.
(b) Optics was a topic of considerable interest to scientists and philosophers such as Descartes, Newton, and Berkeley. One interesting problem with which they concerned themselves was the Molyneaux problem regarding the relation between the senses. See the article on "vision" in the Encyclopedia of Philosophy, as well as Michael J. Morgan's book, Molyneux's question: vision, touch,and the philosophy of perception, Cambridge University Press, Cambridge, 1977.