I believe this is fixed in the VisionOS Beta 2.
Post
Replies
Boosts
Views
Activity
Hey everyone, I found a better workaround for this issue. After debugging it further with a GPU Frame capture, it came to my attention that the compositor will create a segmentation mask for safety reason based on the depth of the rendered content. The mask will cut off roughly at the edges where the depth goes from 0.0 to a non-zero value, creating the jaggies seen on the screenshot above.
The solution to this problem was to simply set the depth clear value to a very small non-zero value:
depthStateDescriptor.depthCompareFunction = .greater // Back to normal
renderPassDescriptor.depthAttachment.clearDepth = Double.ulpOfOne // slightly-higher-than-zero depth value by default
Hope this helps other people.
The
It seems that a (not ideal) workaround is to do the following:
renderPassDescriptor.depthAttachment.clearDepth = 1.0 // instead of 0.0
and
depthStateDescriptor.depthCompareFunction = .always // instead of MTLCompareFunction.greater