Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

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).