all good, it’s not necessarily your fault. i struggle to understand without images of the code or reference images sometimes. please do share more code and images if possible.
with the code you shared, if you put a one minus between the alpha of the mask, and the multiply. it should work as you describe. unless i’m mistaken.
in ANY case, there should be NO light blue rendered to the screen, as that texture only is used as a mask.
so then (as alan watts says)
if there’s light blue on the screen, it means you are rendering something else, and that’s potentially causing issues.
is that another material?
the yellow outline on the screenshot with the rainbow makes me think its another material/object.
sidenote:
i hope that light blue thing comes from a render target. you have not shared any context for your issue, but it reminds me to worms or lemmings, maybe you want to make the environ destructible.
i think you might be able to optimize.
blue means you are using RGB, and Alpha. that’s 4 channels.
where you only need the alpha, so you can use a RT of only red for example (float16 for example).
and use the red channel instead of alpha.
that will make the texture 3 times smaller, and 3 times faster to render and move.