VariableBlurView icon indicating copy to clipboard operation
VariableBlurView copied to clipboard

Pixelation on the bottom part of the gradient

Open nicoreese opened this issue 1 year ago • 2 comments

The very bottom of the blur view has noticeable pixels and a hard cut. I assume this is because the standard blur layer uses a much lower sample rate because if would not be visible under a full blur. Is this something we could change to make it look nicer?

IMG_2907

nicoreese avatar Jun 10 '23 15:06 nicoreese

Update:

Indeed you can do something like

backdropLayer?.setValue(15, forKey: "scale")

to get a much higher quality blur, even at the bottom. You might need to make performance considerations here depending on how large your blur view is but for my usage it's no problem (height of 200pt).

Simulator Screenshot - iPhone 14 Pro - 2023-06-10 at 18 08 18

Might be worth it to include it, if it passes tests and does not have other side effects.

nicoreese avatar Jun 10 '23 16:06 nicoreese

I think 15 is much higher than necessary; I imagine this scale is meant to be set to the screen scale. I found that worked well for my use case at least. image

kylebshr avatar Jul 18 '23 01:07 kylebshr