What to do
You will, in all likelihood, perceive the above picture as a 3-dimensional scene, where a greenish cylinder stands on a checkered plane; light comes from top left.
Ask yourself: Which square is brighter, the one denoted by "A" or "B"? If you're like me, "B" looks brighter.
Now click the "Draw cover" checkbox, or press the key “c”. A yellow cover will pop up, which isolates the two squares from their context, and now they are equal! And that is, in fact, true: These two squares have identical luminance (identical number of photons coming out from them). But our eyes are no exposure meters, they take context into account.
There's more to play around: You can press “Animate” (or the space bar), and square A will move and reveal its true luminance out of the “shadow”. To convince yourself that this is no computer trick, maybe it helps to press “b”, so the board is no longer drawn. If you find the letters are obscuring your judgement, you can switch them off as well.
When interpreted as a 3-dimensional scene, our visual system immediately estimates a lighting vector and uses this to judge the property of the material, irrespective of shadow. When I asked “which is brighter”, you were actually (and sensibly) judging the material: Is it a light or dark square in that checkerboard position, whatever the lighting.
Adelson EH (1993) Perceptual organization and the judgment of brightness. Science 262:2042–2044
Adelson EH (2000) Lightness Perception and Lightness Illusions. In The New Cognitive Neurosciences, 2nd ed., M. Gazzaniga, ed. Cambridge, MA: MIT Press, pp. 339–351