If I import a USDZ model with blendMode set to alpha, occlusion does not work on iPhone with iOS 18. How should transparent materials and occlusion be properly used in the new RealityKit? Additionally, new artifacts have appeared when working with transparent objects overlapping each other. The transparency results do not blend but rather parts of the model just not rendering.
Hey @Cektant,
Thank you for clarifying, I see the difference now!
Please file a bug report for the issue demonstrated in your video using Feedback Assistant, I have no workaround to suggest for that issue.
The following change was also noticed
In iOS 16, 17:
materialPlane = UnlitMaterial(color: .init(white: 1.0, alpha: 0.0))
created a fully transparent material.
In iOS 18, with this approach, the material becomes fully opaque and white. To fix this, I added:
materialPlane?.blending = .transparent(opacity: 0.0)
The difference in rendering behavior across different iOS versions is absolutely obvious; something has changed in the post-processing of the alpha value.
This change was intentional and is listed in the visionOS 2 Release Notes (see id 118210191, it applies to all platforms, despite only appearing in the visionOS 2 Release Notes). It is expected that you would have to set the blending mode in iOS 18.
Best regards,
Greg