- Home /
Question by
cagezero · Oct 28, 2013 at 03:21 PM ·
shadermasktransparentz
Shader That Hides One Sprite But Not Another
The hypothetical scene in question has a background image and two sprites, a circle and a star.
The circle is fully transparent in the center, thus the background image is seen through it. I need to be able to pass the star underneath the circle and have the portions of the star that are currently underneath the circle not be visible.
Hopefully an image is truly worth 1000 words, or in this case 61 ;)
diagram.jpg
(31.8 kB)
Comment
$$anonymous$$ake your transparent shader write to depth I'd guess.... hmm but only for pixels that are in some cutout range. Perhaps that have a none 0 value in rgb
so basically a cutout transparent shader that cuts out on rgb and writes depth