| Github | https://github.com/calops |
The liquid glass effect is compositor-side (has to be, no way to do it otherwise on wayland unless you want a static or out-of-sync backdrop).
The region definition is client-side.
Also there are some light effect with a fixed light source that I'm not sure would be possible client-side. Can client windows be aware of their own absolute coordinates?
Poisson solving looks promising. Only need to find a way to get rid of these artifacts.
It would give some kind of texture to the glass but the overall shape of the effect wouldn't change. It's exacerbated by the fact that there's a dynamic light source casting highlights and shadows in there (yes I know).
JFA is already what I use as the first step of my heuristic. It produces a smooth distance field, but that's just distances. To derive the vectors from that I need to follow the gradient of that field and that's how you get these Voronoi artifacts in the first place. Even after a bunch of blur passes, it's not smooth enough.
Right, but how 🤔
And yeah, "some kinda center of the shape" is the best way to put it, except it should be a "local" center, as a unique centroid doesn't make sense for complex shapes. Finding these local centers would solve my issue but it sounds like an actual math problem now.
Yeah that was my first attempt as well. It works well for smooth curves, but it generates very sharp ridges on the voronoi boundaries of rectangles.
The current approach you see on the right square is a complex heuristic trying to move away from these artifacts. Basically a multi-scale blend of density gradients, with the interpolation weighted through a distance field (computed with JFA).