This theory has been tested by scientists from the Universities of Bristol, St Andrews and Abertay and their findings are published today in Proceedings of the National Academy of Sciences, USA.
Because light comes from above, a uniformly coloured animal would appear lighter on top and darker (in shadow) below. These cues to shape that come from shading are what the brain, and artists, rely on to determine 3D form.
Thayer's clever idea was that by having pigment gradients opposite to those created by illumination, an animal could remove the shape-from-shading cues and thus be harder to spot.
Lead author Professor Innes Cuthill, from the University of Bristol’s School of Biological Sciences, said: "It's a simple idea but, because shadows are much sharper in direct sun than shade, the best countershading should vary strongly with the environment the animal lives in."
Professor Julie Harris, a collaborator at the University of St Andrews, explained: "We used mathematical models of the effects of the type of illumination to generate predictions that we could test with artificial prey."
The prey were caterpillar-sized tubes of paper printed with different gradients of leaf-green shading.
They containing a dead mealworm that birds would happily eat if they spotted the paper cylinder.
Hundreds of these paper caterpillars were attached to bramble bushes in Bristol parks and their 'survival' in the face of bird predation was recorded.
Professor Cuthill added: "The results were as predicted: a sharp transition from dark back to light belly worked best in direct sun; a smoother fuzzy transition worked better in shade and on cloudy days.
"Ours is the first study to show that the match between the type of countershading and the lighting is really important for effective camouflage."
Co-author, Dr George Lovell, from Abertay University, said: "Our inter-disciplinary work nicely supports previous work showing an association between countershading and habitat in hoofed animals such as deer, antelope and cattle."