News for hackers. Stuff that matters.
Re:Liquid Glass in the Browser: Refraction with CSS and SVG by msy on Monday September 08, 2025 @08:54PM (#45176118)
Impressive but also impressive in that scrolling down through the examples makes my fully-loaded M4-Max Macbook Pro judder. I hate to imaging the performance of a full UI leveraging this stuff. Apple can do it in the UI because they can optimize the hell out of it.
Re:Liquid Glass in the Browser: Refraction with CSS and SVG by kubeio on Monday September 08, 2025 @09:22PM (#45176289)
Haha, I’m the author of the post.

I planned to fix the performance issues before posting here (since I knew HN would be quick to point that out), but somebody posted it first. You’re absolutely right — it’s pretty slow right now and needs optimization.

And it’s not just the refraction/displacement map: plenty of other parts, like visualisations, aren’t optimized yet either.

Re:Liquid Glass in the Browser: Refraction with CSS and SVG by jonahx on Tuesday September 09, 2025 @12:24AM (#45177380)
Performance aside, this is really well done.
Re:Liquid Glass in the Browser: Refraction with CSS and SVG by keepamovin on Tuesday September 09, 2025 @04:33AM (#45179192)
lol this demo is SO cool. you have NOTHING to be anything but proud and happy of. you did excellently and this UI is the perfect realization of this idea. Well done!

It ran perfectly smoothly with no perf hit in 2020 mba m1. there are no issues with this.

Re:Liquid Glass in the Browser: Refraction with CSS and SVG by rafark on Tuesday September 09, 2025 @12:57PM (#45184859)
> You’re absolutely right — it’s pretty slow right now and needs optimization.

Man the ptsd that AIs have given us from sentences like this.

Re:Liquid Glass in the Browser: Refraction with CSS and SVG by kubeio on Monday September 08, 2025 @11:55PM (#45177212)
I did a quick performance fix, should be a bit better, at least on Chrome.

(Safari stills seems to be a bit slow to render SVGs)

Anyway, I did not expect this blog post to be on HN, so still things to improve on it.

Re:Liquid Glass in the Browser: Refraction with CSS and SVG by crent on Tuesday September 09, 2025 @09:55AM (#45181956)
It's very very smooth for me now. Impressive. Thank you for sharing!
Re:Liquid Glass in the Browser: Refraction with CSS and SVG by StrangeDoctor on Monday September 08, 2025 @09:21PM (#45176284)
Yeah this site does not scroll like butter as it were.

But I don’t think css can leverage the gpu in most (any?) cases. Apple has almost certainly baked something into the silicon to help handle the ui.

Re:Liquid Glass in the Browser: Refraction with CSS and SVG by CognitiveLens on Monday September 08, 2025 @10:21PM (#45176658)
Most browsers will engage the GPU for compositing layers if they think the layers can be separated - https://www.smashingmagazine.com/2016/12/gpu-animation-doing...
Re:Liquid Glass in the Browser: Refraction with CSS and SVG by StrangeDoctor on Tuesday September 09, 2025 @08:51AM (#45181255)
Interesting, thank you!
Re:Liquid Glass in the Browser: Refraction with CSS and SVG by spicybright on Monday September 08, 2025 @09:04PM (#45176179)
Same, very laggy on my machine. The spectacular border effects also didn't work for me.