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. Join us on March 30, 2023, between 5 am & 1 pm EST, in the Performance Profiling Dev Blitz Day 2023 - Q&A forum and Discord where you can connect with our teams behind the Memory and CPU Profilers.
    Dismiss Notice

Bug Blocky artifacts on Quest 2 when using transparent materials

Discussion in 'Universal Render Pipeline' started by StaggartCreations, Nov 4, 2020.

  1. StaggartCreations


    Feb 18, 2015
    When using Multiview rendering on Android (GLES 3.0), there's a glaring issue with transparent materials. With multi-pass rendering this isn't the case. Though Multiview is required for shaders that use the depth texture, otherwise it flickers and lags behind the headset movement.

    In URP 7.4.1 (2019.3.7) this occurs, where artifacts show on pixels that are drawn over the transparent material:

    When looking up, the materials appears to clip from back to front (a line perpendicular to the viewing direction)

    In URP 8.0.1 (2020.1) largely the same occurs, but the material also clips when looking down

    In URP 10 (2020.2) the result is the same...

    Note: No transparent materials are visible unless the Post processing checkbox is enabled!

    - Post processing+Multiview+MSAA = Visible materials with blocky artifacts and clipping
    - Multiview+MSAA=Invisible transparent materials
    - Multiview=Correct rendering

    This is what the scene looks like in the editor. The material uses the URP Lit shader set to Transparent.

    This is pretty alarming behavior and poses an issues for water shaders. What gives?
    Last edited: Nov 4, 2020
  2. ThomasZeng


    Unity Technologies

    Jun 24, 2019
    Hey @StaggartCreations,

    Thanks for reporting the issue.
    About the transparent object not rendering in Multiview+MSAA, you might be running into this issue.
    Have you tried submitting a bug report with a repro case? If so, do you mind to post the case number here?

  3. StaggartCreations


    Feb 18, 2015
    It does seem similar, so I think a bug report would amount to the same thing. Though, glad to see there's an explanation, so I can keep my sanity!

    For anyone interested, I ran a number of test builds and mapped their result. Fortunately it is possible to have transparent materials on Quest, but either post processing or MSAA has to be sacrificed.

    Attached Files:

    DigitalIPete2 and ThomasZeng like this.
  4. DigitalIPete2


    Aug 28, 2013

    Very useful - Thanks.

    Using Unity 20019.4.19.f1 - URP 7.53

    I bought 3 water packages to work on Quest 2, (including yours) but alas none seem to fully work on the device. River Auto Material sort of works but only in one eye (left) the right eye loses sync with the alpha channel (or something) and the result is a flickery image in the right eye. Very distracting on Quest (VR). The digital glitches mentioned above also don't help. In Multiview the mesh/shaders don't render making it impossible to use.

    I'm going to use your table above and move the project to 2020.2 to see if that helps, fingers crossed.
    Last edited: Feb 22, 2021
  5. StaggartCreations


    Feb 18, 2015
    I found Multiview is essentially required when looking to use water shaders, otherwise the depth texture rendered by Unity appears to lag behind the headset movement. Water shaders need the depth texture for depth-based effects such as color absorption and shoreline foam.

    But in any event, MSAA and transparent materials simply won't work together on Quest
    DigitalIPete2 likes this.
  6. JeffWTD


    Dec 17, 2012
    Sorry to reply to an old thread but thought it might help others.

    Another factor here is having the "Opaque Texture" option enabled or disabled in the URP render asset.

    From my own testing, if Opaque Texture is disabled, MSAA will work as expected with transparent textures even with Post Processing off and without any artifacts.

    Guessing it wouldn't help Staggart since they probably need it for the water effects but a lot of applications probably don't need the Opaque texture. It's pretty resource intensive to have it enabled for things like standalone VR anyway.

    Hope this can help someone in the future!
  7. StaggartCreations


    Feb 18, 2015
    Good find! It's very likely I had the Opaque Texture option enabled, since it's being utilized for a refraction effect. So that's a spot of hope :)