Re: [csswg-drafts] [css-borders-4] Allow to define individual blur radii for the different sides of box shadows (#9125)

> In practice blurs are accomplished with a triple [box blur](https://en.wikipedia.org/wiki/Box_blur) of an appropriate kernel size (about 1/3 of the spread radius, I think?), because this is a very cheap and reasonable approximation of a gaussian blur.

Thanks for the insights!

> We could do different x and y blurs by just adjusting the kernel size appropriately, I suppose. But adjusting the blur across a single axis would require a totally different approach. If the only use-case is "get slightly better at approximating a physical light source", I'm not sure it would be worthwhile; the shadow still won't be physically accurate.

The main use case are the aforementioned smear effects by providing two different radii for the horizontal and vertical axis. Example:

![Box shadow with two different blur radii for the horizontal and vertical axis](https://github.com/w3c/csswg-drafts/assets/958943/bc336dc0-74ff-4db2-b7f3-b558be2cf735)

And the goal of allowing _four_ different radii is rather to approximate point light shadows.
Physically accurate ones are out of scope of this proposal (but are an interesting idea).

Sebastian

-- 
GitHub Notification of comment by SebastianZ
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9125#issuecomment-1694506925 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Saturday, 26 August 2023 21:41:25 UTC