- Home /
Transparent mask with 3d objetcs
I have a png image that I want to work as a transparent mask, where it will be completely transparent but 3D objects behind it would not be shown.
I added it as a 2D sprite (point - no filter) in my 3D scene and I have a shader already as the material, but it is not working properly. Looks like the pixels are not being "cut correctly" in the borders.
This is the shader:
Shader "Masked/Mask" {
SubShader {
Tags {"Queue" = "Geometry+10" }
ColorMask 0
ZWrite On
Pass {}
}
}
This is the PNG image for masking:
image01-mask.png
(15.5 kB)
compare.png
(20.8 kB)
Comment
Your answer
Follow this Question
Related Questions
(3D) Generating avatar masks automatically from animation 0 Answers
Mask 3D objects inside UI ScrollRect 4 Answers
UI mask with a 3D object 1 Answer
3d Models, How to turn invisible 3 Answers
Adding force to a bullet 3 Answers