Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug URP - Transparent shader not working in WebGL

Discussion in 'Shaders' started by shadowprofile, Nov 17, 2022.

  1. shadowprofile

    shadowprofile

    Joined:
    Nov 15, 2020
    Posts:
    1
    Hello guys,
    I have this generic transparent shader made with shadergraph, in order to avoid weird artifacts due to transparency I edited the shader code and placed this pass at the begining of the shader.

    pass
    {
    ZWrite On
    Colormask 0
    }

    It works wonders in Windows builds, but as soon as I build for WebGL the object instead of being transparent just disappears.
    I've tried the same with built-in pipeline and works fine.
    Does anyone know why this happens, and if there's a workaround for it?

    I've tested this with 2020 LTS, 2021 LTS and latest 2022, same issue all over again.

    Thanks in advance for anyone that can shed some light into this issue.
     
    K_Kuriyama and Tito_Machado_SP like this.