Cannot get 'globals.time' working within a shader bound to a 'Material2d' #7143
-
I basically try to make this import inside my shader:
and the shader is bound to a
Now, as soon as I try to use the variable
Does someone has an idea why it works with the standard material, as in this example, but not in 2D ? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
When using 2d you need to use the 2d imports. So in your case that would be |
Beta Was this translation helpful? Give feedback.
-
in 2d, you shouldn't use the try with
|
Beta Was this translation helpful? Give feedback.
When using 2d you need to use the 2d imports. So in your case that would be
#import bevy_sprite::mesh2d_types
and#import bevy_sprite::mesh2d_view_bindings