- Home /
mask one gameObject mesh by another mesh vertex transparency
in flash there is very simple possibility to mask one movieClip by another with trasparency
while in unity you can mask by depth mask http://wiki.unity3d.com/index.php?title=DepthMask
or stencil buffer without transparency
or you can mask by shaders, but we need animation in the masker
also i know about masking by texture rendered by camera, but that's too heavy for mobiles
is there any way to acomplish masking of one quad (or sprite or whatever else you can put texture on) by generated mesh based on transparency of vertices on the masker mesh?
edit: no answer? is nobody interested in 2d masking by dynamic mask with transparency? or it isn't possible? still nobody? (sry for updating this question but i believe it's feature every 2d-game developer needs)
Answer by AVOlight · Oct 28, 2014 at 11:22 PM
You can do this by setting the render queue as explained in the depthmask page,
Conditions:
materials on the mask and masked mesh are the same
the masked meshes have there renenders.materials[i].renderQueue set > 3000
for me in unity 5 b9 the game has to be running to see the effect of the mask,(might be specific to my code)
thx for trying to help, i am already using depth mask, but it's just hard shape, i am looking for soft mask transparency (our designer is pixelpervert)
Your answer
![](https://koobas.hobune.stream/wayback/20220613123312im_/https://answers.unity.com/themes/thub/images/avi.jpg)