There is a flickering and slight dimming occurring specifically on skysphere, at initial load of the scene, when using Attachment. This is observed in the simulator and on the real device.
Since we cannot upload a video illustrating the undesirable behaviour, I have to describe how to setup the project for you to observe it.
To replicate the issue, follow these steps:
- Create a new visionOS app using Xcode template, see image.
- Configure the project to launch directly into an immersive space (set
Preferred Default Scene Session Role
toImmersive Space Application Session Role
in Info.plist), see image. - Replace all swift files with those you will find in the attached texts.
- Add the skysphere image asset
Skydome_8k
found at this Apple Sample App Presenting an artist’s scene. - Launch the app in debug mode via Xcode and onto the AVP device or simulator
- Continuously open and dismiss the skysphere by pressing on buttons
Open Skysphere
andClose
. - Observe the skysphere flicker and dim upon display of the skysphere.
The current workaround is commented in file ThreeSixtySkysphereRealityView
at lines 65, 70, 71, and 72. Uncomment these lines, and the flickering and dimming do not occur.
- Are we using attachments wrongly?
- Is this behavior known and documented?
- Or, is there really a bug in visionOS?