WillPower3309 / swayfx

SwayFX: Sway, but with eye candy!
MIT License
1.29k stars 48 forks source link

Make shadows adaptive #148

Open ErikReider opened 1 year ago

ErikReider commented 1 year ago

By adding adaptive shadows, we'd be able to correctly apply shadows to obscure shaped surfaces like this eww bar (screenshot from Bytes rice on the Discord server):

image

This could probably be done by drawing the surface texture with an increased scale, color matched to the desired color and blurred correctly while ignoring the transparent areas. I'm not sure if this even works so take this with a massive grain of salt. We could check how the CSS box-shadow works which also adapts to the content