I added a UI canvas and to the scene. Its settings are as follows:
When my particles move in front of the UI, the following phenomenon will occur:
What is the cause of it? And how can I solve it?
I added a UI canvas and to the scene. Its settings are as follows:
When my particles move in front of the UI, the following phenomenon will occur:
What is the cause of it? And how can I solve it?
The root cause is the fact that RealityKit (used for bounded/unbounded MR apps) doesn’t support disabling writing to the depth buffer or altering the depth test settings (in shader graphs, the Depth Test/Depth Write settings), which means that particles will always write depth information (for pixels that pass the alpha clip threshold, if any–and anything that uses alpha clipping can’t also use transparency), which means that they will occlude geometry behind them. Feel free to suggest support for depth write/test settings in RealityKit materials to Apple via their Feedback Assistant.
At the moment, the only way around this is to use the VisionOS Sorting Group component to enforce a sort order between the UI renderers and the particle renderer.
hi,there
I added a model to the scene that uses the UPR transparent shader, and it have the same problem above.
hi,there.
I have tried other methods to solve this problem, which is to add the child-objects of the UI canvas to the visionos sorting group, but the final effect does not seem to be normal.
Is this a known issue? Is there any way to solve this problem?
Sincerely hope to get some suggestions from you.
I would like to know to if there is a way to solve this. Like you we have tried a variety of solutions, shaders, sorting groups, etc. And we haven’t been able to find a solid solution that covers everything. Sorting groups helped in one area, but just broke other things. We have removed the sorting groups and changed some of our base shaders to use clipping instead of transparency, but we just end up back at the start with vfx clipping out UI.
Adding UI to sorting groups just seems to break the depth on elements on the UI and you end up with what looks like z-fighting. I think what ever is affecting the order in sorting groups is ignoring/conflicting the rendering order on the canvas based on hierarchy.
@AndrzejUnity do you know if there is an existing feedback item for the depth write/test support that we can signal boost with Apple?
No, we don’t have a feedback item open for it at the moment. However, you can definitely say that we agree that it should be supported.