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.

Question Transparent textures VR URP - Alpha to Coverage

Discussion in 'Shader Graph' started by jansen83, Dec 3, 2022.

  1. jansen83

    jansen83

    Joined:
    Oct 17, 2022
    Posts:
    3
    I started building a vr game in the URP v.2021.3.14f1.
    I noticed that transparent textures with aplha clipping are pixelated (with SMAA and FXAA).




    and with blending mode alpha, they are not pixelated, but they overlap


    I found these 2 articles that can solve the problem, but I couldn't figure it out. I think it's because of the new version I'm using. When I copy the shader it doesn't work
    https://bgolus.medium.com/anti-aliased-alpha-test-the-esoteric-alpha-to-coverage-8b177335ae4f

    and here I am missing the options in the shader graph, Blend mode Custom and Alpha To Coverage https://www.patreon.com/posts/alpha-to-or-anti-33042721

    Is there a possibility to include Alpha to Coverage in the URP v.2021.3.14f1?
     
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    11,926
    The shader from my article is for the built in renderer, and predates the URP by a few years.

    The second link is using Amplify Shader Editor, not Unity's Shader Graph.

    The URP can support Alpha to Coverage, but Shader Graph itself does not. You'd need to write a custom vertex fragment shader that's written to work for the URP, or buy ASE which supports the URP and should let you follow that second tutorial to get A2C working.
     
  3. jansen83

    jansen83

    Joined:
    Oct 17, 2022
    Posts:
    3
    ok thanks, i will test it with amplify shader editor
     
  4. jansen83

    jansen83

    Joined:
    Oct 17, 2022
    Posts:
    3
    unfortunately it didn't work, does anyone know a way to render transparent textures in UV and the URP without pixels?