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

Question Alpha to coverage ?

Discussion in 'Shader Graph' started by GilG, Feb 6, 2020.

  1. GilG

    GilG

    Joined:
    Jan 30, 2017
    Posts:
    27
    Hello,

    Is it possible to implement alpha to coverage in an unlit shader with URP ?
    I saw that we needed to add this :
    AlphaToMask On

    But I'm not sure how to do it with the shader graph.

    Does someone know if that's possible ?
     
  2. o1o101

    o1o101

    Joined:
    Jan 19, 2014
    Posts:
    637
    I don't think it is in ShaderGraph yet but you can just manually add that into your shader and it should work.
     
    GilG likes this.
  3. GilG

    GilG

    Joined:
    Jan 30, 2017
    Posts:
    27
    Hello Deverolirc,

    Yes this is what I thought.
    I created some shader with code just to implement this.
    It still would have been nice to be able to use it as a booleen in shader graph.
    I now have several shader variant thant I need to update every time I update the base shader.

    Maybe I should just create the shaders without shader graph :/
     
  4. tspk91

    tspk91

    Joined:
    Nov 19, 2014
    Posts:
    130
    Amplify shader editor has the option as a simple checkbox. Shadergraph still doesn't.
     
  5. tspk91

    tspk91

    Joined:
    Nov 19, 2014
    Posts:
    130
    Fyi, this was added to URP shaders and Shadergraph in Unity 2022. It's automatically implemented in any alpha cutout shader.