-
-
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
[Merged by Bors] - Add globals struct to mesh2d #6222
[Merged by Bors] - Add globals struct to mesh2d #6222
Conversation
- When using `Material2d` for shaders, allow accessing the `globals` struct. This work is based on commit 8073362, whichs adds the struct to the 3D counterpart. - Copy the struct from `bevy_pbr` as-is into `bevy_sprite`. Update the bind group layout and the bind group creation to match. - Binds the `globals` struct as a uniform in group 0 binding 1 for the mesh 2D view. Signed-off-by: Torstein Grindvik <torstein.grindvik@nordicsemi.no>
Yep, that was an omission on my part. I think just copying it is fine for now. I'll have a look at this in a few hours. |
Note: I searched for uses of |
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.
LGTM, I haven't tested it locally, but if CI passes I think it should be fine.
bors r+ |
See commit message. I noticed I couldn't use `globals.time` when using `Material2d`. I copied the solution from 8073362 , and now `Material2d` works for me. Perhaps some of these struct definitions could be shared in the future, but for now I've just copy pasted it (it looked like the `View` struct was done that way). Ping @IceSentry , I saw a comment on the linked commit that you intended to do this work at some point in the future.
Pull request successfully merged into main. Build succeeded: |
See commit message. I noticed I couldn't use `globals.time` when using `Material2d`. I copied the solution from 8073362 , and now `Material2d` works for me. Perhaps some of these struct definitions could be shared in the future, but for now I've just copy pasted it (it looked like the `View` struct was done that way). Ping @IceSentry , I saw a comment on the linked commit that you intended to do this work at some point in the future.
See commit message. I noticed I couldn't use `globals.time` when using `Material2d`. I copied the solution from 8073362 , and now `Material2d` works for me. Perhaps some of these struct definitions could be shared in the future, but for now I've just copy pasted it (it looked like the `View` struct was done that way). Ping @IceSentry , I saw a comment on the linked commit that you intended to do this work at some point in the future.
See commit message. I noticed I couldn't use `globals.time` when using `Material2d`. I copied the solution from 8073362 , and now `Material2d` works for me. Perhaps some of these struct definitions could be shared in the future, but for now I've just copy pasted it (it looked like the `View` struct was done that way). Ping @IceSentry , I saw a comment on the linked commit that you intended to do this work at some point in the future.
See commit message. I noticed I couldn't use `globals.time` when using `Material2d`. I copied the solution from 8073362 , and now `Material2d` works for me. Perhaps some of these struct definitions could be shared in the future, but for now I've just copy pasted it (it looked like the `View` struct was done that way). Ping @IceSentry , I saw a comment on the linked commit that you intended to do this work at some point in the future.
See commit message.
I noticed I couldn't use
globals.time
when usingMaterial2d
.I copied the solution from 8073362 , and now
Material2d
works for me.Perhaps some of these struct definitions could be shared in the future, but for now I've just copy pasted it (it looked like the
View
struct was done that way).Ping @IceSentry , I saw a comment on the linked commit that you intended to do this work at some point in the future.