Skip to content

Commit

Permalink
Fix CI: shader_material_glsl missing AssetUsages impl
Browse files Browse the repository at this point in the history
  • Loading branch information
superdump committed Apr 2, 2024
1 parent dab44e9 commit 7abd50e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions examples/shader/shader_material_glsl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use bevy::{
reflect::TypePath,
render::{
mesh::MeshVertexBufferLayoutRef,
render_asset::{AssetUsages, RenderAssetUsages},
render_resource::{
AsBindGroup, RenderPipelineDescriptor, ShaderRef, SpecializedMeshPipelineError,
},
Expand Down Expand Up @@ -56,6 +57,12 @@ struct CustomMaterial {
alpha_mode: AlphaMode,
}

impl AssetUsages for CustomMaterial {
fn asset_usage(&self) -> RenderAssetUsages {
RenderAssetUsages::MAIN_WORLD | RenderAssetUsages::RENDER_WORLD
}
}

/// The Material trait is very configurable, but comes with sensible defaults for all methods.
/// You only need to implement functions for features that need non-default behavior. See the Material api docs for details!
/// When using the GLSL shading language for your shader, the specialize method must be overridden.
Expand Down

0 comments on commit 7abd50e

Please sign in to comment.