I’m applying a dithering effect to my object when the camera gets close, and use the alpha clip threshold to make those dithered pixels transparent. This causes the shadows to appear dithered as well whenever the object is dithered. Is it possible to keep the original shadow (not dithered) of the object?
For reference, I’m using a PBR graph, a surface of “Opaque”, and a blend of “Alpha”.
With shader graph? Not really. Not with out some other errors. Shader Graph doesn’t yet let you detect between shadowcaster pass and normal rendering pass, so you can’t modify the shader’s behavior for each.
There is a solution though. Use two mesh renderers. You can set one to no shadows (the one with your shader) and one set to shadows only using a default shader.
In my other thread in the Shader Graph forum, someone from Unity supplied a solution with a custom node that checks “#ifdef UNITY_PASS_SHADOWCASTER”, which works for this issue in Shader Graph.
@bgolus I have a dithering transparency shader that will make a screen-door effect on a opaque object.
The reason is that I want to create a fading cealing when player enters a building.
However, the shader will not allow shadows behind the object to be rendered (picture attached). Besides that, I can’t dither the “received shadows” on the object with dithering.
What solution do you think would be most appropriate for this?