Search Unity

Question Cutout/transparent standard shader but cast shadows

Discussion in 'Shader Graph' started by fendercodes, Aug 27, 2019.

  1. fendercodes

    fendercodes

    Joined:
    Feb 4, 2019
    Posts:
    192
    I'd like my skinned mesh material to contains textures with some transparent sections.

    I want the model itself to be transparent at those places, but any shadows cast by this object on to the ground should act as if it was totally opaque.

    Any tips? I am currently using the Standard shader with Cutout mode.

    Screenshot (9).png
     
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,352
    Not possible with Shader Graph. You’d need to manually edit the generated shader code to not do the clip() in the shadow caster pass, or use two meshes on your character. Set your visible character to be non-shadow casting, and then use a default shader on the other and set it to shadow casting only.
     
  3. fendercodes

    fendercodes

    Joined:
    Feb 4, 2019
    Posts:
    192
    @bgolus Two meshes did the trick. Nice a simple, thanks for the tip.