Determining Cover for Ranged Attacks
Attacker’s Burden: For ranged attacks, the attacker has to prove that he has a clear shot. That proof consists of one corner in his space that has clear lines to every corner of the target’s space.
Choose a Corner: The attacker chooses one corner of a square he occupies, and draws imaginary lines from that corner to every corner of any one square the defender occupies. If none of those lines are blocked by a solid object or an enemy creature, the attacker has a clear shot. The defender doesn’t have cover. (A line that runs parallel right along a wall isn’t blocked.)
Cover: If you can’t find a clear shot, the target has cover. No matter which corner in your space you choose, one or two lines from that corner to every corner in the defender’s space are blocked.
Superior Cover: The defender has superior cover if no matter which corner in your space you choose and no matter which square of the target’s space you choose, three or four lines are blocked. If four lines are blocked from every corner, you can’t target the defender.
Published in Dungeon Master's Guide, page(s) 43, Rules Compendium, page(s) 219.