Thursday 7 March 2013

Mask sprite under background

Mask sprite under background

I'm study how to mask (hide) Kid when pass behind a pillar or climb from under the floor, i have see some documentation about "Alpha Mapping and pixel shader" bur its a little complicated for me now.

I have adopt another "simple" solution, draw the mask in front of the background after draw sprites, is simple but not elegant.

DRAW ORDER
-> background animation
-> sprites
-> foreground mask



Kid behind a pillar

Example of mask "pillar"

Background
Foreground



No comments:

Post a Comment