Is it possible to tell if a character is standing in a shadow (is shadowed)?

perhaps do a ray from the top (or middle of your mesh) AND the bottom. the two rays will at least then let you know that you character is at least 50% shadowed?