I’m trying to get the part of that grey area that overlaps with the red sprite. I’m doing this in shader graph.
What I’m trying to do is have these sprites be masked in by the render texture which captures a layer dedicated to masks.
It’s for a blood effect, so if a guy dies they’ll leave a mask behind and the render texture will capture that. The sprites using the material will use that render texture to reveal overlapping parts of itself.
I know there’s sprite mask components, but they either reveal or don’t, they don’t have alpha.
I have already done the masking thing with render textures but it was for a texture that completely overlapped the render texture.
The reason I’m trying to have it work with sprites now is because my game is top down and I want blood to be able to splat onto walls and props. For that I need the blood to obey sorting order rules.
(the texture mentioned before was for the ground, so things are always on top of it)
So basically I thought I’d have these objects have a duplicate version of their sprite but only blood. This would be masked in by the render texture. This is only for unmoving objects.
Im not sure if this is possible, in my brain it seems like it should be but I’m a bit of a shader noob.