mirror of
https://github.com/bevyengine/bevy
synced 2024-12-30 06:53:13 +00:00
55d126cab9
See commit message.
I noticed I couldn't use `globals.time` when using `Material2d`.
I copied the solution from 8073362039
, 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.
9 lines
196 B
WebGPU Shading Language
9 lines
196 B
WebGPU Shading Language
#define_import_path bevy_sprite::mesh2d_view_bindings
|
|
|
|
#import bevy_sprite::mesh2d_view_types
|
|
|
|
@group(0) @binding(0)
|
|
var<uniform> view: View;
|
|
|
|
@group(0) @binding(1)
|
|
var<uniform> globals: Globals;
|