LightShafts icon indicating copy to clipboard operation
LightShafts copied to clipboard

Cut out shader

Open baptistepoligne opened this issue 6 years ago • 2 comments

Hi, Do you know any way to be makin the voumetric fog with a cut out shader ? Since you said it need to write to depth texture and standard cutout doesn't. Thanks ! Baptiste

baptistepoligne avatar Feb 28 '18 16:02 baptistepoligne

Implement a pass with tag "LightMode"="ShadowCaster", in that pass render your geometry in grey scale color using z coordinate, and do alpha testing to discard transparent pixels. This way, when Unity renders depth pass, your material will appear with depth and transparent pixels discarded.

CarlLee avatar Mar 03 '18 06:03 CarlLee

Thank you very much CarlLee !

baptistepoligne avatar Mar 05 '18 09:03 baptistepoligne