I'm trying to use the new layerEffect(_:maxSampleOffset:isEnabled:)
.
https://developer.apple.com/documentation/swiftui/view/layereffect(_:maxsampleoffset:isenabled:)
Tho I'm not sure how to define the metal shader function signature. The docs indicate that we should use SwiftUI::Layer
, tho I'm not sure what to import to get access to this layer structure.
[[ stitchable ]] half4 name(float2 position, SwiftUI::Layer layer, args...)
My goal is to create a custom blur effect.
Does anyone have any pointer on how to get started with layer effects?