-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Dynamic UI Materials #20895
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
base: main
Are you sure you want to change the base?
Dynamic UI Materials #20895
Conversation
Co-authored-by: Sludge <[email protected]>
Co-authored-by: Sludge <[email protected]>
It looks like your PR is a breaking change, but you didn't provide a migration guide. Please review the instructions for writing migration guides, then expand or revise the content in the migration guides directory to reflect your changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like how this introduces a difference with Material
and Material2d
. Also, I'm not sure of the potential side effects of adding 'static to the trait bound.
i think the best solution is to give them the same change but that seems more suited for separate PRs |
Hi! I'm definitely interested in supporting this use case, and indeed it was one of my original motivations for #14856 which was the work that inspired #19667. In the case of 3d materials, I discovered that adding the |
okie dokie, that's fine, since bevy is modular I'm able to use this version instead of |
Objective
background: shader(...)
to CSS stylesheets that style Bevy UI. This requires dynamic shadersSolution
vertex_shader
andfragment_shader
functions get a&self
parameter, and the code now calls those with the self and understands that the shader may varyTesting
Showcase
Migration
Users would just need to add a
&self
to their UI materials