Live data from Hacker News

Making Apple Progressive Blur on the Web

devslovecoffee.com

31–40 of 58 posts

Re: Making Apple Progressive Blur on the Web

#31
I built an webapp for my kids that was supposed to run on a raspberry pi plugged to a 4k tv. Having these blurred tiles that swoosh on the screen looks amazing on my laptop.

Running this on the RP4 was less than 1fps. Turned off the blur it works great, even the animation is great.

Tested blur on a static element, the entire page crawls. These effects looks great, but are performance hogs.

Re: Making Apple Progressive Blur on the Web

#32

> aka for the rest of the world not using swiftUI Fun fact: Apple doesn't let us use CAFilter in SwiftUI. It's a "them" privilege, and if we want it we need to do it ourselves*, just like you * or obfuscate the code and continue in the great game of cat and mouse: https://github.com/aheze/VariableBlurView/blob/main/Sources/...

Walled garden (with barbed wire)

Re: Making Apple Progressive Blur on the Web

#35

I built an webapp for my kids that was supposed to run on a raspberry pi plugged to a 4k tv. Having these blurred tiles that swoosh on the screen looks amazing on my laptop. Running this on the RP4 was less than 1fps. Turned off the blur it works great, even the animation is great. Tested blur on a static element, the entire page crawls. These effects looks great, but are performance hogs.

Yeah, the performance takes a hit and I can see it being unusable on a lot of devices. As I say in the post, “(the blur) just plainly shouldn’t be used anywhere on the web”, at least not in this form.

Re: Making Apple Progressive Blur on the Web

#36
post #20

I suppose implementing effects like this in CSS instead of GPU shaders is the modern version of implementing a 3D spinning cube on an 8-bit home computer. Pushing the hardware to its limits is now too open-ended, so we push specifications to their limits instead.

The css image effects should hopefully be implemented with GPU shaders on most modern platforms.

Re: Making Apple Progressive Blur on the Web

#37

> aka for the rest of the world not using swiftUI Fun fact: Apple doesn't let us use CAFilter in SwiftUI. It's a "them" privilege, and if we want it we need to do it ourselves*, just like you * or obfuscate the code and continue in the great game of cat and mouse: https://github.com/aheze/VariableBlurView/blob/main/Sources/...

Walled garden (with barbed wire)

While it’s not great to provide a UI library but not give developers all of the UI components, theoretically you could implement this yourself — so it’s the least of your concerns: https://boehs.org/node/private-apis

Re: Making Apple Progressive Blur on the Web

#38

I built an webapp for my kids that was supposed to run on a raspberry pi plugged to a 4k tv. Having these blurred tiles that swoosh on the screen looks amazing on my laptop. Running this on the RP4 was less than 1fps. Turned off the blur it works great, even the animation is great. Tested blur on a static element, the entire page crawls. These effects looks great, but are performance hogs.

It used to be the case that some CSS was hardware accelerated in one browser and not in another. I haven't checked in a long time but that would explain the perf difference.

Re: Making Apple Progressive Blur on the Web

#40
I always thought of this so-called “progressive blur” as simply being a Gaussian blur with a kernel gradient mask whose channel range was used as the coefficient for the kernel size for a given pixel.

So where the kernel gradient mask is 1, you multiply this by the desired max radius blur, down to 0, which represents a radius blur of 0.

Edit: Why downvote this? It’s literally how you implement it.

Post reply on HN