Search Unity

Question about transparent object cast shadow.

Discussion in 'Shaders' started by liuyu, Apr 26, 2015.

  1. liuyu

    liuyu

    Joined:
    Oct 14, 2014
    Posts:
    28
    An grass ( need alpha test ) using myself shader, it's shadow hasn't alpha test. ( left of the picture)
    But The grass using the standard shader ( Rendering Mode: Transparent ), the shadow is correct, it's alpha test. ( right of the picture)
    Why and how to make myself shader's shadow correct? thank you.
     
  2. ThomasCreate

    ThomasCreate

    Joined:
    Feb 23, 2015
    Posts:
    81
    You need just need to add a fallback to a built-in transparent shader. If that doesn't work for some reason, you can add the parameter "addshadow".
     
  3. liuyu

    liuyu

    Joined:
    Oct 14, 2014
    Posts:
    28
    I want to know how to can make the shadow like the right of picture. Because using myself shader, it isn't correct ( like the left of picture).