diff --git a/crates/bevy_pbr/src/render/pbr.wgsl b/crates/bevy_pbr/src/render/pbr.wgsl index 1722ab9d91940..e4d8fe63791d7 100644 --- a/crates/bevy_pbr/src/render/pbr.wgsl +++ b/crates/bevy_pbr/src/render/pbr.wgsl @@ -13,12 +13,15 @@ #else #import bevy_pbr::{ forward_io::{VertexOutput, FragmentOutput}, - pbr_functions, pbr_functions::{apply_pbr_lighting, main_pass_post_lighting_processing}, pbr_types::STANDARD_MATERIAL_FLAGS_UNLIT_BIT, } #endif +#ifdef VISIBILITY_RANGE_DITHER +#import bevy_pbr::pbr_functions::visibility_range_dither; +#endif + #ifdef MESHLET_MESH_MATERIAL_PASS #import bevy_pbr::meshlet_visibility_buffer_resolve::resolve_vertex_output #endif @@ -50,7 +53,7 @@ fn fragment( // If we're in the crossfade section of a visibility range, conditionally // discard the fragment according to the visibility pattern. #ifdef VISIBILITY_RANGE_DITHER - pbr_functions::visibility_range_dither(in.position, in.visibility_range_dither); + visibility_range_dither(in.position, in.visibility_range_dither); #endif #ifdef FORWARD_DECAL