@@ -8,10 +8,7 @@ use crate::{
8
8
} ;
9
9
use bevy_asset:: Handle ;
10
10
use bevy_core_pipeline:: core_3d:: Transparent3d ;
11
- use bevy_ecs:: {
12
- prelude:: * ,
13
- system:: { lifetimeless:: * , SystemParamItem } ,
14
- } ;
11
+ use bevy_ecs:: prelude:: * ;
15
12
use bevy_math:: { Mat4 , UVec3 , UVec4 , Vec2 , Vec3 , Vec3Swizzles , Vec4 , Vec4Swizzles } ;
16
13
use bevy_render:: {
17
14
camera:: Camera ,
@@ -20,13 +17,12 @@ use bevy_render::{
20
17
render_asset:: RenderAssets ,
21
18
render_graph:: { Node , NodeRunError , RenderGraphContext , SlotInfo , SlotType } ,
22
19
render_phase:: {
23
- CachedRenderPipelinePhaseItem , DrawFunctionId , DrawFunctions , PhaseItem , RenderCommand ,
24
- RenderCommandResult , RenderPhase , TrackedRenderPass ,
20
+ CachedRenderPipelinePhaseItem , DrawFunctionId , DrawFunctions , PhaseItem , RenderPhase ,
25
21
} ,
26
22
render_resource:: * ,
27
23
renderer:: { RenderContext , RenderDevice , RenderQueue } ,
28
24
texture:: * ,
29
- view:: { ComputedVisibility , ExtractedView , ViewUniformOffset , ViewUniforms , VisibleEntities } ,
25
+ view:: { ComputedVisibility , ExtractedView , VisibleEntities } ,
30
26
Extract ,
31
27
} ;
32
28
use bevy_transform:: { components:: GlobalTransform , prelude:: Transform } ;
@@ -579,7 +575,6 @@ impl GlobalLightMeta {
579
575
#[ derive( Resource , Default ) ]
580
576
pub struct LightMeta {
581
577
pub view_gpu_lights : DynamicUniformBuffer < GpuLights > ,
582
- pub shadow_view_bind_group : Option < BindGroup > ,
583
578
}
584
579
585
580
#[ derive( Component ) ]
@@ -1549,25 +1544,6 @@ pub fn prepare_clusters(
1549
1544
}
1550
1545
}
1551
1546
1552
- pub fn queue_shadow_view_bind_group < M : Material > (
1553
- render_device : Res < RenderDevice > ,
1554
- prepass_pipeline : Res < PrepassPipeline < M > > ,
1555
- mut light_meta : ResMut < LightMeta > ,
1556
- view_uniforms : Res < ViewUniforms > ,
1557
- ) {
1558
- if let Some ( view_binding) = view_uniforms. uniforms . binding ( ) {
1559
- light_meta. shadow_view_bind_group =
1560
- Some ( render_device. create_bind_group ( & BindGroupDescriptor {
1561
- entries : & [ BindGroupEntry {
1562
- binding : 0 ,
1563
- resource : view_binding,
1564
- } ] ,
1565
- label : Some ( "shadow_view_bind_group" ) ,
1566
- layout : & prepass_pipeline. view_layout ,
1567
- } ) ) ;
1568
- }
1569
- }
1570
-
1571
1547
#[ allow( clippy:: too_many_arguments) ]
1572
1548
pub fn queue_shadows < M : Material > (
1573
1549
shadow_draw_functions : Res < DrawFunctions < Shadow > > ,
@@ -1772,31 +1748,3 @@ impl Node for ShadowPassNode {
1772
1748
Ok ( ( ) )
1773
1749
}
1774
1750
}
1775
-
1776
- pub struct SetShadowViewBindGroup < const I : usize > ;
1777
- impl < const I : usize > RenderCommand < Shadow > for SetShadowViewBindGroup < I > {
1778
- type Param = SRes < LightMeta > ;
1779
- type ViewWorldQuery = Read < ViewUniformOffset > ;
1780
- type ItemWorldQuery = ( ) ;
1781
-
1782
- #[ inline]
1783
- fn render < ' w > (
1784
- _item : & Shadow ,
1785
- view_uniform_offset : & ' _ ViewUniformOffset ,
1786
- _entity : ( ) ,
1787
- light_meta : SystemParamItem < ' w , ' _ , Self :: Param > ,
1788
- pass : & mut TrackedRenderPass < ' w > ,
1789
- ) -> RenderCommandResult {
1790
- pass. set_bind_group (
1791
- I ,
1792
- light_meta
1793
- . into_inner ( )
1794
- . shadow_view_bind_group
1795
- . as_ref ( )
1796
- . unwrap ( ) ,
1797
- & [ view_uniform_offset. offset ] ,
1798
- ) ;
1799
-
1800
- RenderCommandResult :: Success
1801
- }
1802
- }
0 commit comments