Post

Replies

Boosts

Views

Activity

Reply to VisionOS Metal Sample issue with clearColor
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
May ’24