Suppose I have a character sprite and I want to apply some animating effect that overlay its color, how would I do it? What I desire is something along this line: (From final fantasy tactics)
It is a sprite overlay with animating gray effect and white color for black line.
However, in XNA, pixel shader support only shading of all sprite in the scene. If I am to pixel shade only specific sprite I want, I have to either apply stencil buffer which makes the system more complicated when I have multiple, separated effects for each sprite ( I have to determine stencil buffer clipping for each effects ). Another forum suggest using seperate sprite batch for each sprite drawn (call Begin / End for each sprite) and create my own sorting routine, but I found out that this batching method will really consume alot of GPU performance.
On the other hand, If I have 2D texture filled prerendered overlay effect, then I apply it onto the character sprite for some blending effect, the Sprite batch will not clip out the overlay effect and limit it only to character shapde but will pass it onto the background too.
Therefore, any suggestion to tackle this problem?