From 7abd50ec7ef7ecbcefc1d7c80199cd834e81cade Mon Sep 17 00:00:00 2001 From: Robert Swain Date: Tue, 2 Apr 2024 03:10:59 +0200 Subject: [PATCH] Fix CI: shader_material_glsl missing AssetUsages impl --- examples/shader/shader_material_glsl.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/examples/shader/shader_material_glsl.rs b/examples/shader/shader_material_glsl.rs index ee780065e5cc1..999f7736f829b 100644 --- a/examples/shader/shader_material_glsl.rs +++ b/examples/shader/shader_material_glsl.rs @@ -6,6 +6,7 @@ use bevy::{ reflect::TypePath, render::{ mesh::MeshVertexBufferLayoutRef, + render_asset::{AssetUsages, RenderAssetUsages}, render_resource::{ AsBindGroup, RenderPipelineDescriptor, ShaderRef, SpecializedMeshPipelineError, }, @@ -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.