Search Unity

Question Shader Graph Unlit Transparent Mat doesn't render over URP Unlit Transparent Mat

Discussion in 'Shader Graph' started by RHShanks, Jun 30, 2020.

  1. RHShanks

    RHShanks

    Joined:
    Jan 24, 2015
    Posts:
    6
    Hi,
    I created a new Shader Graph Unlit Material which only has the Unlit Master node.
    Attributes - Surface: Transparent, Blend: Alpha and Color: Red

    In total, I have 3 materials;
    Mat 1. (Red Color - Case 2) Using the above Shader Graph Unit Material
    Mat 2. (Red Color - Case 1) Using the Default URP Unlit Material set to Transparent and Alpha
    Mat 3. (Black Color - Both Cases) Using the Default URP Unlit Material set to Transparent and Alpha

    Case 1: Using 2 & 3

    As you can see, the sphere is ahead of the cube and is being rendered on top with red color.

    Case 2: Using 1 & 3

    Here, for some reason, the cube is getting rendered on top of the sphere.

    Is this behavior expected? If yes, then what is the resolution?
    Also, wouldn't you expect the Shader Graph Unlit Master node to behave like the default URP Unlit Shader?
     

    Attached Files:

    • Bug1.png
      Bug1.png
      File size:
      77.8 KB
      Views:
      458
    AndreiMarian likes this.
  2. AndreiMarian

    AndreiMarian

    Joined:
    Jun 9, 2015
    Posts:
    77
    Probably same issue here. Shader behaves as if it were opaque.

    Tried clearing the cache at no avail.
     
    Last edited: Jul 7, 2020
  3. melos_han_tani

    melos_han_tani

    Joined:
    Jan 11, 2018
    Posts:
    79
    What SG and Unity version are you on? I'm on 7.4.1 and 2019.4 and I'm able to put an Unlit SG mesh in front of a Unlit URP mesh fine. Is the Priority on the URP shader and the Render Queue on the SG shader correct?
     
  4. AndreiMarian

    AndreiMarian

    Joined:
    Jun 9, 2015
    Posts:
    77
    After some research I noticed that the texture was not imported with alpha for some reason. Strange, as I have a profile that I apply to every texture I import.