forked from bevyengine/bevy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Provide GlobalsUniform in UiMaterial shaders (bevyengine#10739)
`GlobalsUniform` provides the current time to shaders, which is useful for animations. `UiMaterial` is an abstraction that makes it easier to write custom shaders for UI elements. This PR makes it possible to use the `GlobalsUniform` in `UiMaterial` shaders. The `GlobalsUniform` is bound to `@group(0) @binding(1)`. It is accessible in shaders with: ```wgsl @group(0) @binding(1) var<uniform> globals: Globals; ``` --- Added `GlobalsUniform` in `UiMaterial` shaders Should I modify the existing ui_material example to showcase this?
- Loading branch information
Showing
3 changed files
with
36 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters