Open dudziakl opened 7 months ago
Do you have any idea what might cause those artifacts? I don't have the hardware to try out your steps myself, but it's not obvious what Cesium for Unity could be doing wrong that would cause that. For the most part, 3D Tiles just become normal game objects with MeshFilter and MeshRenderer components.
I have no idea. I spent two days trying to solve it, and that is all that I found.
I'm inclined to think it's a bug in Unity. We're not doing anything Vulkan specific, as far as I know, so I can't think of any good reason it would work in one renderer and not the other, short of a renderer bug.
As an experiment, maybe try specifying a Material on your tileset. Just choose a simple default one. That will likely break the model's textures, but it will still be interesting to see if it makes the artifacts go away.
Switching the graphics API to OpenGLES3 is not a fix because it causes error spam on the Quest 2 and 3.
Assertion failed: OPENGL NATIVE PLUG-IN ERROR: GL_INVALID_OPERATION: Operation illegal in current state
It doesn't appear to be related to the shader because
it also only starts when the 3D Tileset starts creating/updating the tiles.
When testing on the quest 3 I found the visual issue only shows up when using multiview rendering mode. Using multipass rendering isn't a good solution because it's not as performant.
We've had reports that Unity does not support single-pass instance rendering with shaders built using Shader Graph (which ours are). See here: https://community.cesium.com/t/does-cesium-for-unity-support-hololens/22759/12 If this is the problem you're seeing, there's probably little we can do it to fix it, and you're better off raising it with Unity. Moving away from Shader Graph would require us to develop custom shaders for each render pipeline, which would be a pretty significant burden. Perhaps that user from the forum would be willing to share their HLSL implementation to use as a starting point for a workaround?
The image displayed in VR on the left eye contains artifacts.
The issue was discovered on Quest 3 with Vulcan set Graphic API. The stereo rendering mode of the Oculus Plugin was set to Multiview.
It can be easily reproduced with the Cesium Unity Samples project; however, the issue appears in any project that uses the Cesium Unity plugin.
The issue can be fixed by changing in Project Settings >> Other Settings >> Graphic API to OpenGLES3 instead of Vulcan (remove the Vulcan from the list).![image](https://github.com/CesiumGS/cesium-unity/assets/12583808/abd32507-2d0d-4c33-a111-72cbdd2000ec)
IMPORTANT NOTE It is not an ideal solution because Vulcan is recommended Graphic API as it has better performance than OpenGLES3.