Hide a shadow behind a transparent object
Hi,
I have a quad object with this shader :
Shader "Custom/InvisibleMask" { SubShader { Tags { "Queue" = "Transparent+1" } Pass { Blend Zero One } } }
And then I have a regular sphere with a normal shader with a Render Queue of Transparent+2. That way I can hide objects behind the quad. Problem is that the shadow of my sphere is not hidden. How can I hide it as well ?
As you can see in this image, the quad is hiding the sphere but not the shadow :
Answer by unity_mbvRDNtK48vb2w · Aug 19, 2021 at 05:24 PM
Did you ever find a solution for this? I'm having this same issue!
mesh renderers have an cast shadows option, you can disable it like this (maybe, haven't tried)
meshRenderer.CastShadows = CastShadows.Off;
through script, or just select off in the dropdown menu in the inspector
Your answer
Follow this Question
Related Questions
How can I ToonLitOutline shader transparent? 0 Answers
Magicavoxel .fbx, no Shadow? 0 Answers
Leaves disappear in game mode 0 Answers