-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
box shadow #15204
box shadow #15204
Conversation
…hader and rendering.
If you need a reference, there's linebender/vello#665, although idk if it's suitable for games/is fast or not. |
The generated |
No, atm this is very simple it just draws a shadow below any node with the |
I think the approach they are using isn't that different, except it has to fit into their big unified shader. I'm not sure if a unified UI shader would be right for bevy because game UI tends to be much more diverse etc. |
Thank you to everyone involved with the authoring or reviewing of this PR! This work is relatively important and needs release notes! Head over to bevyengine/bevy-website#1721 if you'd like to help out. |
Objective
UI box shadow support
Adds a new component
BoxShadow
:To use
BoxShadow
, add the component to any Bevy UI node and a shadow will be drawn beneath that node.Also adds a resource
BoxShadowSamples
that can be used to adjust the shadow quality.Notes
struct Size { width: Val, height: Val }
type or something.Showcase
cargo run --example box_shadow -- --samples 4
cargo run --example box_shadow -- --samples 10