bevy/crates/bevy_sprite/src/mesh2d/mesh2d_view_bindings.wgsl
Torstein Grindvik 55d126cab9 Add globals struct to mesh2d (#6222)
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.
2022-10-10 19:23:43 +00:00

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;