contour (boundary) highlighting of sprites

contour (boundary) highlighting of sprites
0.0 0


i am trying to highlight sprites throughout contours.
any ideas how to implement it without using an extra sprite .
(one of the method is add a highlighted sprite behind the main sprite - bad idea)
is it possible using a single sprite ?

this must look like the yellow line along the contours. (for details refer to images attached)

highlight.png (56.1 KB)

glow.png (11.7 KB)




i got one thing
i need to apply marching squares algorithm


You could use a pixel shader to identify contour pixels of your sprite. I do that to make them black (in order to
have a better visual segmentation of sprite/background, even if in the end i do that only off-line). Once you have
such functionalty (which, however, will work only with opengl es 2.0 or higher), you can draw a red border, for example, around
your sprite easily or change the original border or add a thicker border.