Hi! I've got a fun effect I'm trying to achieve. I want to mask out a mesh so that it only renders what's underneath the shape of my sprite.
Basically, I've got a sphere with two materials: one black, one green (the green one having no depth test). I only want to render the green parts of this sphere, where my little lump of pixels covers it. (It's worth noting that my "sprite" isn't a Sprite3D - it's a quad mesh with a shader on it that takes a texture. Otherwise, the transparency around the sprite would not work with this effect.)
I followed this tutorial to get this far:
But I think I'm seeing the limitations in terms of what I want to use it for. I'm seeing now that the black sphere is simply covering the green, and lowering the alpha/not drawing the black sphere makes the green completely take over.
So what I'm looking for is a way to not draw any black pixels. I want to see the world behind it. Perhaps a shader that can check where the sprite is overlapping and only draw that. I'm not sure if my current method is close to this or needs to be scrapped entirely, but any advice is greatly appreciated. Thanks!