3 ms·
https://pasteboard.co/AUrdZZe5KxoO.png https://pasteboard.co/AUrdZZe5KxoO.png In this screenshot all the views have the exact same spec: 8dp elevation.
by burnedtoast 3y ago
https://pasteboard.co/AUrdZZe5KxoO.png https://pasteboard.co/AUrdZZe5KxoO.png
In this screenshot all the views have the exact same spec: 8dp elevation.
- ghusbands 3y agoDo you see this in all apps or just custom/particular ones? Can you control where the key light is at all? 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.
- burnedtoast 3y agoIt's the behavior for all apps and I don't think it can be customized. There are some APIs to affect the spot shadow color and ambient shadow color (from API 28), but no way to affect this offset / light source position AFAIK.
- chrismorgan 3y agoOK, now I’m interested in whether there’s any x-axis cast (which would indicate a nearby point light source) or not (which would be simulating the physical impossibility of a light source both nearby and infinitely far away), and whether it’s rendering with actual perspective (without which it’s a cheap hack and physically impossible, but the difference is probably humanly indistinguishable, and honestly the whole thing is just a bit weird anyway given the orthographic top-down projection of the content, so maybe I shouldn’t even talk about the physical impossibility above).
- burnedtoast 3y agoYes the same goes for X-axis as well. Here's a screenshot showing that: https://pasteboard.co/O5H4djIUMoG6.png https://pasteboard.co/O5H4djIUMoG6.png
- chrismorgan 3y agoCool, thanks. I guess https://graphicdesign.stackexchange.com/questions/80644/where-are-the-light-sources-located-in-material-design https://graphicdesign.stackexchange.com/questions/80644/wher... must be obsolete, then (from the linked video: “We built a system that enforces that the light comes in at 45 degree angles; that helps keep the shadows consistent from the top to the bottom of the screen”). Wonder why they did that. Seems like the source is approximately above (50%, 0), though I can’t be bothered working out if that 0 is exactly the top of the screen.