In the transition effect, I’d like to add the ability to mask out a sprite using the sampled reference sprite. As of right now, it’s good for scene transitions bc it either draws the reference pixel transparent or a color based on how dark the reference pixel is. So let’s say you have an enemy and when he dies, you want him to burn away to transparent (using a cloud texture to sample) or swipe to transparent (using a linear ramp texture to sample), to achieve the effect, when drawing the enemy sprite, you need access and to not only the enemy sprite, but the reference sprite as well, which is normal when dealing with masking effects.
So my thought was, since you can’t pass in a custom sampler image (binding another image to texture slot 1 or 2), another option would be since the texture is already bound, all I would need is the texture coordinates if the sampler sprite is part of the same sprite sheet. lol ya, I would never make the user manually input the rectangle that’s why I was wondering if it was possible to aquire a predetermined rectangle of another sprite on the sheet so the user doesn’t have to. Another option would be to use the reference location by sampling the sprites neighbor by using vTex.x + uvWidth and have the reference the same size as the sampled sprite. But again, don’t want to do that because I don’t want a bunch things a user has to think about when using an effect.
It’s not super important, was just curious if there was a something in place that I could grab the reference rectangle from. Otherwise i won’t add it since it’s not really essential and I’ll just start working on the next effect/addon. Thanks Ashley