I have a huge sphere where the camera stays inside the sphere and turn on front face culling on my ShaderGraphMaterial applied on that sphere, so that I can place other 3D stuff inside. However when it comes to attachment, the object occlusion never works as I am expecting. Specifically my attachments are occluded by my sphere (some are not so the behavior is not deterministic.
Then I suspect it was the issue of depth testing so I started using ModelSortGroup to reorder the rending sequence. However it doesn't work. As I was searching through the internet, this post's comments shows that ModelSortGroup simply doesn't work on attachments.
So I wonder how should I tackle this issue now? To let my attachments appear inside my sphere.
OS/Sys: VisionOS 2.3/XCode 16.3
Hey @milanowth,
You might be encountering a framework issue but without a sample code project that replicates this I can't say for sure. If you do file a bug report for this issue please leave a comment with the feedback number.
I was able to add an attachment to the Presenting an artist’s scene sample code and within the Immersive Environment App visionOS template. Could you take a look at these examples and attempt to reproduce your issue there? The sphere model has been authored so that its faces face toward the center of the sphere instead of outward, maybe you could author your sphere similarly?
You are correct that there's no supported way for you to specify the model sort group order on attachments with the APIs currently available. If you'd like us to consider adding the necessary functionality, please file an enhancement request using Feedback Assistant. Once you file the request, please post the FB number here.
If you're not familiar with how to file enhancement requests, take a look at Bug Reporting: How and Why?
Hope this helps,
Michael