by chrismorgan · 2y ago · 0 comments
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.)