File tree Expand file tree Collapse file tree 17 files changed +96
-94
lines changed
crates/bevy_core_pipeline/src
experimental/mip_generation Expand file tree Collapse file tree 17 files changed +96
-94
lines changed Original file line number Diff line number Diff line change @@ -54,9 +54,9 @@ impl Plugin for AutoExposurePlugin {
54
54
app. register_type :: < AutoExposure > ( ) ;
55
55
app. add_plugins ( ExtractComponentPlugin :: < AutoExposure > :: default ( ) ) ;
56
56
57
- let Some ( render_app) = app. get_sub_app_mut ( RenderApp ) else {
58
- return ;
59
- } ;
57
+ let render_app = app
58
+ . get_sub_app_mut ( RenderApp )
59
+ . expect ( "RenderPlugin has not been added" ) ;
60
60
61
61
render_app
62
62
. init_resource :: < SpecializedComputePipelines < AutoExposurePipeline > > ( )
@@ -77,9 +77,9 @@ impl Plugin for AutoExposurePlugin {
77
77
}
78
78
79
79
fn finish ( & self , app : & mut App ) {
80
- let Some ( render_app) = app. get_sub_app_mut ( RenderApp ) else {
81
- return ;
82
- } ;
80
+ let render_app = app
81
+ . get_sub_app_mut ( RenderApp )
82
+ . expect ( "RenderPlugin has not been added" ) ;
83
83
84
84
render_app. init_resource :: < AutoExposurePipeline > ( ) ;
85
85
render_app. init_resource :: < AutoExposureResources > ( ) ;
Original file line number Diff line number Diff line change @@ -19,15 +19,16 @@ impl Plugin for BlitPlugin {
19
19
fn build ( & self , app : & mut App ) {
20
20
embedded_asset ! ( app, "blit.wgsl" ) ;
21
21
22
- if let Some ( render_app) = app. get_sub_app_mut ( RenderApp ) {
23
- render_app. allow_ambiguous_resource :: < SpecializedRenderPipelines < BlitPipeline > > ( ) ;
24
- }
22
+ let render_app = app
23
+ . get_sub_app_mut ( RenderApp )
24
+ . expect ( "RenderPlugin has not been added" ) ;
25
+ render_app. allow_ambiguous_resource :: < SpecializedRenderPipelines < BlitPipeline > > ( ) ;
25
26
}
26
27
27
28
fn finish ( & self , app : & mut App ) {
28
- let Some ( render_app) = app. get_sub_app_mut ( RenderApp ) else {
29
- return ;
30
- } ;
29
+ let render_app = app
30
+ . get_sub_app_mut ( RenderApp )
31
+ . expect ( "RenderPlugin has not been added" ) ;
31
32
render_app
32
33
. init_resource :: < BlitPipeline > ( )
33
34
. init_resource :: < SpecializedRenderPipelines < BlitPipeline > > ( ) ;
Original file line number Diff line number Diff line change @@ -53,9 +53,9 @@ impl Plugin for BloomPlugin {
53
53
UniformComponentPlugin :: < BloomUniforms > :: default ( ) ,
54
54
) ) ;
55
55
56
- let Some ( render_app) = app. get_sub_app_mut ( RenderApp ) else {
57
- return ;
58
- } ;
56
+ let render_app = app
57
+ . get_sub_app_mut ( RenderApp )
58
+ . expect ( "RenderPlugin has not been added" ) ;
59
59
render_app
60
60
. init_resource :: < SpecializedRenderPipelines < BloomDownsamplingPipeline > > ( )
61
61
. init_resource :: < SpecializedRenderPipelines < BloomUpsamplingPipeline > > ( )
@@ -83,9 +83,9 @@ impl Plugin for BloomPlugin {
83
83
}
84
84
85
85
fn finish ( & self , app : & mut App ) {
86
- let Some ( render_app) = app. get_sub_app_mut ( RenderApp ) else {
87
- return ;
88
- } ;
86
+ let render_app = app
87
+ . get_sub_app_mut ( RenderApp )
88
+ . expect ( "RenderPlugin has not been added" ) ;
89
89
render_app
90
90
. init_resource :: < BloomDownsamplingPipeline > ( )
91
91
. init_resource :: < BloomUpsamplingPipeline > ( ) ;
Original file line number Diff line number Diff line change @@ -80,9 +80,9 @@ impl Plugin for Core2dPlugin {
80
80
app. register_type :: < Camera2d > ( )
81
81
. add_plugins ( ExtractComponentPlugin :: < Camera2d > :: default ( ) ) ;
82
82
83
- let Some ( render_app) = app. get_sub_app_mut ( RenderApp ) else {
84
- return ;
85
- } ;
83
+ let render_app = app
84
+ . get_sub_app_mut ( RenderApp )
85
+ . expect ( "RenderPlugin has not been added" ) ;
86
86
render_app
87
87
. init_resource :: < DrawFunctions < Opaque2d > > ( )
88
88
. init_resource :: < DrawFunctions < AlphaMask2d > > ( )
Original file line number Diff line number Diff line change @@ -142,9 +142,9 @@ impl Plugin for Core3dPlugin {
142
142
. add_plugins ( ( SkyboxPlugin , ExtractComponentPlugin :: < Camera3d > :: default ( ) ) )
143
143
. add_systems ( PostUpdate , check_msaa) ;
144
144
145
- let Some ( render_app) = app. get_sub_app_mut ( RenderApp ) else {
146
- return ;
147
- } ;
145
+ let render_app = app
146
+ . get_sub_app_mut ( RenderApp )
147
+ . expect ( "RenderPlugin has not been added" ) ;
148
148
render_app
149
149
. init_resource :: < DrawFunctions < Opaque3d > > ( )
150
150
. init_resource :: < DrawFunctions < AlphaMask3d > > ( )
Original file line number Diff line number Diff line change @@ -28,19 +28,19 @@ pub struct CopyDeferredLightingIdPlugin;
28
28
impl Plugin for CopyDeferredLightingIdPlugin {
29
29
fn build ( & self , app : & mut App ) {
30
30
embedded_asset ! ( app, "copy_deferred_lighting_id.wgsl" ) ;
31
- let Some ( render_app) = app. get_sub_app_mut ( RenderApp ) else {
32
- return ;
33
- } ;
31
+ let render_app = app
32
+ . get_sub_app_mut ( RenderApp )
33
+ . expect ( "RenderPlugin has not been added" ) ;
34
34
render_app. add_systems (
35
35
Render ,
36
36
( prepare_deferred_lighting_id_textures. in_set ( RenderSystems :: PrepareResources ) , ) ,
37
37
) ;
38
38
}
39
39
40
40
fn finish ( & self , app : & mut App ) {
41
- let Some ( render_app) = app. get_sub_app_mut ( RenderApp ) else {
42
- return ;
43
- } ;
41
+ let render_app = app
42
+ . get_sub_app_mut ( RenderApp )
43
+ . expect ( "RenderPlugin has not been added" ) ;
44
44
45
45
render_app. init_resource :: < CopyDeferredLightingIdPipeline > ( ) ;
46
46
}
Original file line number Diff line number Diff line change @@ -212,9 +212,9 @@ impl Plugin for DepthOfFieldPlugin {
212
212
213
213
app. add_plugins ( SyncComponentPlugin :: < DepthOfField > :: default ( ) ) ;
214
214
215
- let Some ( render_app) = app. get_sub_app_mut ( RenderApp ) else {
216
- return ;
217
- } ;
215
+ let render_app = app
216
+ . get_sub_app_mut ( RenderApp )
217
+ . expect ( "RenderPlugin has not been added" ) ;
218
218
219
219
render_app
220
220
. init_resource :: < SpecializedRenderPipelines < DepthOfFieldPipeline > > ( )
@@ -250,9 +250,9 @@ impl Plugin for DepthOfFieldPlugin {
250
250
}
251
251
252
252
fn finish ( & self , app : & mut App ) {
253
- let Some ( render_app) = app. get_sub_app_mut ( RenderApp ) else {
254
- return ;
255
- } ;
253
+ let render_app = app
254
+ . get_sub_app_mut ( RenderApp )
255
+ . expect ( "RenderPlugin has not been added" ) ;
256
256
257
257
render_app. init_resource :: < DepthOfFieldGlobalBindGroupLayout > ( ) ;
258
258
}
Original file line number Diff line number Diff line change @@ -75,9 +75,9 @@ impl Plugin for MipGenerationPlugin {
75
75
Shader :: from_wgsl
76
76
) ;
77
77
78
- let Some ( render_app) = app. get_sub_app_mut ( RenderApp ) else {
79
- return ;
80
- } ;
78
+ let render_app = app
79
+ . get_sub_app_mut ( RenderApp )
80
+ . expect ( "RenderPlugin has not been added" ) ;
81
81
82
82
render_app
83
83
. init_resource :: < SpecializedComputePipelines < DownsampleDepthPipeline > > ( )
@@ -119,9 +119,9 @@ impl Plugin for MipGenerationPlugin {
119
119
}
120
120
121
121
fn finish ( & self , app : & mut App ) {
122
- let Some ( render_app) = app. get_sub_app_mut ( RenderApp ) else {
123
- return ;
124
- } ;
122
+ let render_app = app
123
+ . get_sub_app_mut ( RenderApp )
124
+ . expect ( "RenderPlugin has not been added" ) ;
125
125
render_app. init_resource :: < DepthPyramidDummyTexture > ( ) ;
126
126
}
127
127
}
Original file line number Diff line number Diff line change @@ -84,9 +84,9 @@ impl Plugin for CorePipelinePlugin {
84
84
}
85
85
86
86
fn finish ( & self , app : & mut App ) {
87
- let Some ( render_app) = app. get_sub_app_mut ( RenderApp ) else {
88
- return ;
89
- } ;
87
+ let render_app = app
88
+ . get_sub_app_mut ( RenderApp )
89
+ . expect ( "RenderPlugin has not been added" ) ;
90
90
render_app. init_resource :: < FullscreenShader > ( ) ;
91
91
}
92
92
}
Original file line number Diff line number Diff line change @@ -137,9 +137,9 @@ impl Plugin for MotionBlurPlugin {
137
137
UniformComponentPlugin :: < MotionBlurUniform > :: default ( ) ,
138
138
) ) ;
139
139
140
- let Some ( render_app) = app. get_sub_app_mut ( RenderApp ) else {
141
- return ;
142
- } ;
140
+ let render_app = app
141
+ . get_sub_app_mut ( RenderApp )
142
+ . expect ( "RenderPlugin has not been added" ) ;
143
143
144
144
render_app
145
145
. init_resource :: < SpecializedRenderPipelines < pipeline:: MotionBlurPipeline > > ( )
@@ -164,9 +164,9 @@ impl Plugin for MotionBlurPlugin {
164
164
}
165
165
166
166
fn finish ( & self , app : & mut App ) {
167
- let Some ( render_app) = app. get_sub_app_mut ( RenderApp ) else {
168
- return ;
169
- } ;
167
+ let render_app = app
168
+ . get_sub_app_mut ( RenderApp )
169
+ . expect ( "RenderPlugin has not been added" ) ;
170
170
171
171
render_app. init_resource :: < pipeline:: MotionBlurPipeline > ( ) ;
172
172
}
You can’t perform that action at this time.
0 commit comments