Closed Blackclaws closed 1 year ago
Can confirm, I have the same bug on with OpenGL Ubuntu 22.04 (ARFoundation version 5.0.5, Unity 22.2.13). Changing the Graphics API to Vulkan fixes this.
This was closed as "As designed" I am a bit miffed about this, especially about the specific comment:
By design: shader "Unlit/Simulation Background Simple" is doing a full screen blit, and writes depth value "o.depth = 0.0f;", later the sphere does not pass ZTest, Depending on graphics APIs depth buffer can use reversed values, so shader code should account for that. Checkout https://docs.unity3d.com/Manual/SL-PlatformDifferences.html "The Depth (Z) direction in Shaders"
This is just bad. As per the comments own admission, shader code should account for the graphics API used, so should the Simulation Background Simple shader.
I mean the shader I used for the sphere test is a standard Unity built in shader that works perfectly fine on device.
Given that ARCore still uses OpenGL: https://github.com/google-ar/arcore-android-sdk/issues/258 not being able to test my application on the graphics backend that it will finally run on is a big design flaw.
Other AR/XR Simulation/Remote assets (https://assetstore.unity.com/packages/tools/utilities/ar-simulation-173443) have been perfectly capable of working fine in both OpenGL and Vulkan.
OpenGL is also the default graphics backend on Linux and this limitation is not documented anywhere.
Is this issue something that will be addressed in a future update?
Fixed in 5.1.0-pre.4: https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@5.1/changelog/CHANGELOG.html#fixed
Fix for 5.0 will be released in 5.0.6.
Since you originally reported the issue in 5.1-pre.3, I will close this issue as resolved. Feel free to reopen it, if you have follow-up questions.
Unity bug report case number IN-36161 https://unity3d.atlassian.net/servicedesk/customer/portal/2/IN-36161
Describe the bug XR Simulation camera does not show scene objects that aren't part of the simulated environment with OpenGL graphics backend.
To Reproduce Steps to reproduce the behavior:
Expected behavior Scene objects should be visibile
Actual behavior Scene objects are invisible to the XR Simulated camera
Additional Info This does not happen when using the Vulkan backend.
Smartphone (please complete the following information):