by burnedtoast · 2y ago · 0 comments
So when QA say that the shadow is too weak, you have to tell your designer this and they have to come up with something different, or you have to increase elevation to compensate, or fall back to a pre-rendered 9-patch, or something else... As i said, annoying :\
In this screenshot all the views have the exact same spec: 8dp elevation.
It would be surprising for the key light to be so close to the screen (rather than nearer infinity), given that the design document linked elsewhere seems to expect consistency at particular elevations.
https://m2.material.io/design/environment/light-shadows.html
Notice how there are actually two shadows that must be combined. The point light source shadow rendering depends on the object position on screen.
(I’m using roughly SVG’s terminology: fePointLight has x, y and z, which can be approximately infinitely far away but it’ll only be approximately so, and feDistantLight, which has azimuth and elevation, and projects from infinity.)