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

ShaderGraph not rendering Transparency correctly on 2D sprites

Discussion in '2D' started by BrassChuckle, Jan 10, 2021.

  1. BrassChuckle

    BrassChuckle

    Joined:
    Jan 9, 2021
    Posts:
    2
    Hello, I've just started tinkering with Shadergraph and the Universal render pipeline, but I can't seem to get the transparency on sprites to work properly. When I use the default sprite material the transparency around the character comes out fine, but when I use the shadergraph material I can't seem to get rid of this weird blocky stuff that appears around the sample character.

    Here's the set up.
    Unity_Shadergraph_transparency_not_working.PNG


    Here's the Shadergraph sprite vs the regular sprite that was just drag and dropped into the scene.
    Unity_ShadergraphSprite_vs_NormalSprite.PNG

    I've tried following the Unity tutorial on this and am getting the same result, a few things have changed since the most recent Unity tuts on this but everything seems mostly the same...
    I don't know what I missed. Anyone out there have an answer?
     
  2. raarc

    raarc

    Joined:
    Jun 15, 2020
    Posts:
    535
    you are sending the alphachanel rgb(a)4 into the color 3 node

    you need to plug the A(1) node into the alpha(1) node
     
    BrassChuckle likes this.
  3. BrassChuckle

    BrassChuckle

    Joined:
    Jan 9, 2021
    Posts:
    2
    You are my saviour, it worked!!! Thanks.
     
    raarc likes this.