- Home /
Shadow transparency for custom shader
I have a custom surface shader which uses transparency. Unlike Unitys Standard shader the casted shadows are always fully rendered.
I would like to achieve the same effect like the shadows from the standard shader (green box) Does someone know how to do this?
I've had terrible luck with shader questions, here. I bet posting relevant code is going to up your chance of getting an answer.
Well there isn't really relevant code because surface shaders normally get their shadows from their fallbacks...
You have a custom surface shader but no code that defines it?
Answer by Namey5 · Nov 24, 2017 at 06:11 AM
What you can do (a bit of a hack, but easier than writing a separate shadow caster) is set your shader fallback to "Standard". Now, that alone won't do anything. However, if you switch your material's shader to the Standard shader and set the transparency option to "Fade" you should get transparent shadows. The thing is; when you switch shaders back, the shadows will actually remain the same as those from the Standard shader.
Your answer
![](https://koobas.hobune.stream/wayback/20220612143127im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Directional light's real-time hard shadows not working with Intel HD Graphics 4600 0 Answers
I need my alpha to show only where it is not lit. 1 Answer
Problem with Terrain Shadows on Build 0 Answers
2d lighting system that has shaped shadows. 0 Answers
Lightmapping Static Objects without Receiving Shadows 0 Answers