Search Unity

URP custom lit shader graph gives me weird black bits filling in the mesh where it should be alpha

Discussion in 'Shader Graph' started by Valynna, Nov 7, 2022.

  1. Valynna

    Valynna

    Joined:
    Apr 1, 2021
    Posts:
    39


    I'm trying to apply a shader to this white + grey object to make a more modular set of walls.

    But for some reason, the URP custom lit shader graph treats the part of the mesh that should be transparent as black.

    Any ideas? I knew how to fix this in the old shader graph, but now I have no clue what to do.
     
  2. The_Storm_Rider

    The_Storm_Rider

    Joined:
    Jan 28, 2020
    Posts:
    66
    It's because you asked to draw alpha part in black by multiplying it to the base color, which result in (0,0,0) when 1-alpah is 0.

    Simply connect the alpha from the texture sample to the alpha block of your master, and remove this multiplication if no necessary.
     
    Valynna likes this.
  3. Valynna

    Valynna

    Joined:
    Apr 1, 2021
    Posts:
    39
    Yes, this is the answser.