Remix.run Logo
mbforbes 2 days ago

Really nicely done! It's always surprising to me how often computer graphics isn't "one weird trick" and more like "5 layered tricks." Doing it with cross-browser compat is an additional challenge.

Do you have a sense of which aspects are the most resource-intensive? Naively I would guess it's the backdrop-filter.

kris-kay 2 days ago | parent | next [-]

Yes, same! I didn't expect it to need so many tricks to implement. Your intuition is correct, the most resource-intensive part is the blur bit of the backdrop-filter. The higher the blur value, the more neighbouring pixels need to be "consulted" before rendering. Another resource-intensive aspect is continuous repaint as you scroll or as a video background changes the look of the glass.

whycome 2 days ago | parent | prev [-]

And sometimes it's 5 layered tricks just to "center" something.

kris-kay 2 days ago | parent [-]

Not anymore! We live in the golden age of display: grid; + place-items: center;