diff --git a/examples/shader/shader_material_2d.rs b/examples/shader/shader_material_2d.rs index 22bc1732ae713..98257d5954252 100644 --- a/examples/shader/shader_material_2d.rs +++ b/examples/shader/shader_material_2d.rs @@ -4,7 +4,7 @@ use bevy::{ prelude::*, reflect::TypePath, render::render_resource::{AsBindGroup, ShaderRef}, - sprite::{Material2d, Material2dPlugin}, + sprite::{AlphaMode2d, Material2d, Material2dPlugin}, }; /// This example uses a shader source file from the assets subdirectory @@ -57,4 +57,8 @@ impl Material2d for CustomMaterial { fn fragment_shader() -> ShaderRef { SHADER_ASSET_PATH.into() } + + fn alpha_mode(&self) -> AlphaMode2d { + AlphaMode2d::Blend + } }