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. Dismiss Notice

URP Shaders not using transparency while baking

Discussion in 'Universal Render Pipeline' started by ivo-alves, May 1, 2020.

  1. ivo-alves

    ivo-alves

    Joined:
    Sep 2, 2014
    Posts:
    4
    Hi all,

    I've notice that some URP shaders (and shader graph generated shaders) do not always take transparency into account when the lightmap is being generated.

    The Lit and SimpleLit shaders seem to be ok but the BakedLit casts the entire geometry shadow.

    The light is set as baked only mode, and i'm using subtractive lightning mode in the lightning settings. The shader graph is just a pbr master node with a texture sample.



    We can set the material to SimpleLit just for the purpose of baking but it doesn't seem a very friendly workflow.

    Does anyone else have this issue?
     

    Attached Files:

  2. ivo-alves

    ivo-alves

    Joined:
    Sep 2, 2014
    Posts:
    4
    By the way this was using 2019.3 and URP 7.3.1
     
  3. alexvector

    alexvector

    Joined:
    Oct 9, 2019
    Posts:
    26
    I have noticed the same issue. Foliage shadows appear opaque when using a ShaderGraph shader.
     
  4. gfbeach

    gfbeach

    Joined:
    May 19, 2015
    Posts:
    9
    I found this thread while researching this same issue. It mentions HDRP but it worked for me in URP as well: https://forum.unity.com/threads/sha...ction-outline-shader-and-lightmapping.712925/

    The GI system is looking for very specifically-named properties when calculating transparency for shadow baking, so make sure you're conforming to said naming conventions: _MainTex for your primary texture, _Color for color, and _Cutoff for Alpha Clip.