Can we create custom SurroundingsEffect in visionOS?

SwiftUI in visionOS has a modifier called preferredSurroundingsEffect that takes a SurroundingsEffect.

From what I can tell, there is only a single effect available: .systemDark.

ImmersiveSpace(id: "MyView") {
    MyView()
        .preferredSurroundingsEffect(.systemDark)
}

I'd like to create another effect to tint the color of passthrough video if possible.

Does anyone know how to create custom SurroundingsEffects?

Answered by Vision Pro Engineer in 790253022

There are a few new options available in visionOS 2.0 -https://developer.apple.com/documentation/swiftui/surroundingseffect

Hi! It's not yet possible to create custom surrounding effects, but please open a Feedback for this feature if you'd like to see it.

Accepted Answer

There are a few new options available in visionOS 2.0 -https://developer.apple.com/documentation/swiftui/surroundingseffect

Can we create custom SurroundingsEffect in visionOS?
 
 
Q