Hi all, I would like to create a system to replace parts of one sprite with parts of another sprite based on a mask-like texture. A system similar to the face generation in the game Papers, Please.
I found a forum where the developer briefly explains how he achieved it: Papers, Please [Available 8/8]
How would I go about doing so?
Some time ago i’ve written a simple CPU based alpha blend method which allows you to “merge” two textures into one based on the alpha channel of the “top” texture. However it should be clear this shouldn’t be used frequently. It can be used to setup / compose textures in start.
The textures need to have the same resolution so the different textures should fit on top of each other.
Why not just use multiple sprites/sprie renderers? 2D games generally don’t tend to have any performance issues you would have to worry about - and even if you’d want to achieve perfect performance, Sprites can be very easily batch rendered when they’re on the same atlas.