1
1
use crate :: {
2
- LightMeta , NotShadowCaster , NotShadowReceiver , ShadowPipeline , ViewLightsUniformOffset ,
3
- ViewShadowBindings ,
2
+ GpuLights , LightMeta , NotShadowCaster , NotShadowReceiver , ShadowPipeline ,
3
+ ViewLightsUniformOffset , ViewShadowBindings ,
4
4
} ;
5
5
use bevy_app:: Plugin ;
6
6
use bevy_asset:: { Assets , Handle , HandleUntyped } ;
@@ -18,7 +18,7 @@ use bevy_render2::{
18
18
render_resource:: * ,
19
19
renderer:: { RenderDevice , RenderQueue } ,
20
20
texture:: { BevyDefault , GpuImage , Image , TextureFormatPixelInfo } ,
21
- view:: { ComputedVisibility , ViewUniformOffset , ViewUniforms } ,
21
+ view:: { ComputedVisibility , ViewUniform , ViewUniformOffset , ViewUniforms } ,
22
22
RenderApp , RenderStage ,
23
23
} ;
24
24
use bevy_transform:: components:: GlobalTransform ;
@@ -180,9 +180,7 @@ impl FromWorld for MeshPipeline {
180
180
ty : BindingType :: Buffer {
181
181
ty : BufferBindingType :: Uniform ,
182
182
has_dynamic_offset : true ,
183
- // TODO: change this to ViewUniform::std140_size_static once crevice fixes this!
184
- // Context: https://github.com/LPGhatguy/crevice/issues/29
185
- min_binding_size : BufferSize :: new ( 144 ) ,
183
+ min_binding_size : BufferSize :: new ( ViewUniform :: std140_size_static ( ) as u64 ) ,
186
184
} ,
187
185
count : None ,
188
186
} ,
@@ -193,9 +191,7 @@ impl FromWorld for MeshPipeline {
193
191
ty : BindingType :: Buffer {
194
192
ty : BufferBindingType :: Uniform ,
195
193
has_dynamic_offset : true ,
196
- // TODO: change this to GpuLights::std140_size_static once crevice fixes this!
197
- // Context: https://github.com/LPGhatguy/crevice/issues/29
198
- min_binding_size : BufferSize :: new ( 1424 ) ,
194
+ min_binding_size : BufferSize :: new ( GpuLights :: std140_size_static ( ) as u64 ) ,
199
195
} ,
200
196
count : None ,
201
197
} ,
@@ -252,9 +248,7 @@ impl FromWorld for MeshPipeline {
252
248
ty : BindingType :: Buffer {
253
249
ty : BufferBindingType :: Uniform ,
254
250
has_dynamic_offset : true ,
255
- // TODO: change this to MeshUniform::std140_size_static once crevice fixes this!
256
- // Context: https://github.com/LPGhatguy/crevice/issues/29
257
- min_binding_size : BufferSize :: new ( 144 ) ,
251
+ min_binding_size : BufferSize :: new ( MeshUniform :: std140_size_static ( ) as u64 ) ,
258
252
} ,
259
253
count : None ,
260
254
} ] ,
0 commit comments