Right, I've tried searching for this but as you might be able to tell from the title, I didn't really know how to word it anyway...
In some games such as rts games, when a unit is hidden or half hidden behind another object, such as a tree of building, the player will be able to see a translucent coloured version of that unit where it is hidden.
I was wondering how it would be possible to figure out which parts of the units sprite have actually been covered, and how to then use this information to then draw the translucent coloured version of the sprite.
If possible could the answers given relate to c++ and sfml? If not other answers will still be appreciated.
Sorry if my language is unclear its the first time I've asked a question on this site.