diff --git a/crates/bevy_pbr/src/render/pbr.wgsl b/crates/bevy_pbr/src/render/pbr.wgsl index 0cdf896a00945..b4e6ca7b1142b 100644 --- a/crates/bevy_pbr/src/render/pbr.wgsl +++ b/crates/bevy_pbr/src/render/pbr.wgsl @@ -5,21 +5,25 @@ decal::clustered::apply_decal_base_color, } + + #ifdef PREPASS_PIPELINE #import bevy_pbr::{ prepass_io::{VertexOutput, FragmentOutput}, - pbr_functions, pbr_deferred_functions::deferred_output, } #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 @@ -51,7 +55,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