06-20-2023 12:12 AM
Hello!
I am using URP, Unity 2021.3.14, OpenXR Plug-In and Passthrough. Any transparent materials will have Passthrough (on Underlay) shine through, even if it should be blocked by a solid object. It makes everything transparent look grey because of the Passthrough Not using any transparency is not really an option for me. Did anyone encounter this issue and/or has a solution for it?
06-23-2023 05:17 PM
I have a similar problem to yours. Commenting and thumbs up for the visibility.
https://communityforums.atmeta.com/t5/Unity-VR-Development/Bug-report-Half-transparent-materials-lea...
09-05-2023 01:36 AM
Hi
Any solution?
Thanks
11-03-2023 01:41 PM
I am having the same problem. Is there any solution to this? I'm using Unity URP, with Unity version 2022.3.10f1
11-12-2023 01:06 AM
Hey. I had a similar issue when using the Selective Passthrough shader.
I fixed my problem by opening the shader code and setting Z Write to on. I found that when it was off none of my transparent materials rendered over the passthrough at all.
11-12-2023 01:07 AM
Could you try opening the shader and where it says ZWrite set it to on instead of off?
11-13-2023 01:06 PM
Hmm, thank you for the suggestion @BogomilPetrov - that is good to know for Selective Passthrough but unfortunately that doesn't seem to help with Background Passthrough. ☹️ I went through all the Meta-provided passthrough shaders and made sure ZWrite was set to 'On', but got the same result. I also turned on ZWrite for my own UI shader (it's a custom UI overlay shader) but that didn't do anything to help either. Any UI that has transparency has passthrough rendered through it, regardless of whether or not there is an opaque object behind the UI. ☹️
11-14-2023 09:25 AM - edited 11-14-2023 09:25 AM
I should note that this bug also exists with Meta's own shaders/materials. For example, the "stylized hand" shader (the "OculusHand" material) included with the SDK suffers from this issue. If you have a passthrough scene with a solid 3D model, and you hold your semi-transparent "stylized hand" on top of the 3D model, you'll see passthrough rendered through the semi-transparent hands even though there is a solid 3D model behind the hands.
11-14-2023 10:05 AM - edited 11-14-2023 10:16 AM
Per the suggestion of @markeahogan, setting the blend mode to
Blend SrcAlpha OneMinusSrcAlpha, OneMinusDstAlpha One
fixed the passthrough transparent rendering bug for my own transparent materials. If the issue still exists for any default Unity transparent materials though, then Meta should see what they can do to fix it, or at the very least write some documentation about the problem. I had to duplicate and modify their 'OculusHand' shader in order to edit the blend mode and properly render their 'stylized hand' models with no passthrough rendering bug.