Screen pixel-based masking of textures
Hello,
I have gotten an idea for a game, but the idea slammed into my lack of ability on a technical level to tackle this issue. It would be a 2d game, so nothing crazy in terms of performance is needed. Essentially I want to have ability for sprite to display a different texture depending if the screen region would be masked or not. So if the pixel(x,y) would display texture1(a,b) if it is masked, it should pull texture2(a,b). The mask needs to be updated constantly as well. Another solution would be to draw two layers on top of each other and have screen pixel-based transparency mask on top of one.
Is anyone aware of engine, or library with such capability? I've been looking, but couldn't find any. I don't want to dig directly into renderer just yet.
Posted Feb 22, 2026, 3:56 PM UTC