twostraws / Inferno

Metal shaders for SwiftUI.
Other
2.47k stars 119 forks source link

variableBlur not working when its content has a big frame #38

Closed LiYanan2004 closed 5 months ago

LiYanan2004 commented 5 months ago

I'm using variableBlur shader on iOS 18 devices with Xcode 16 beta 2. It works fine and the effect renders perfectly.

But I also want to support iOS 17 because you know, iOS 17 actually supports layerEffect, but it renders very differently compared with iOS 18.

Say we have a vertically long view and I apply that effect on this view. The Xcode complains RBLayer: unable to create texture: BGRA8Unorm, [xxxx, xxxx] at runtime.

Not sure if it works when we use Xcode 15 to build it.

twostraws commented 5 months ago

I don't think this is something we're able to fix – this sounds like a limitation of Metal and/or SwiftUI.

LiYanan2004 commented 5 months ago

Okay. Seems like iOS 18 extended this limitation, but when the size goes even larger, it still got error, so thank you for replying. I’ll close the issue.❤️