@@ -31,8 +31,8 @@ use bevy_render::{
31
31
BindGroupLayoutEntry , BindingResource , BindingType , BlendState , BufferBindingType ,
32
32
ColorTargetState , ColorWrites , CompareFunction , DepthBiasState , DepthStencilState ,
33
33
DynamicUniformBuffer , FragmentState , FrontFace , GpuArrayBufferIndex , MultisampleState ,
34
- PipelineCache , PolygonMode , PrimitiveState , RenderPipelineDescriptor , Shader , ShaderDefVal ,
35
- ShaderRef , ShaderStages , ShaderType , SpecializedMeshPipeline , SpecializedMeshPipelineError ,
34
+ PipelineCache , PolygonMode , PrimitiveState , RenderPipelineDescriptor , Shader , ShaderRef ,
35
+ ShaderStages , ShaderType , SpecializedMeshPipeline , SpecializedMeshPipelineError ,
36
36
SpecializedMeshPipelines , StencilFaceState , StencilState , TextureSampleType ,
37
37
TextureViewDimension , VertexState ,
38
38
} ,
@@ -226,7 +226,6 @@ pub struct PrepassPipeline<M: Material> {
226
226
pub view_layout_motion_vectors : BindGroupLayout ,
227
227
pub view_layout_no_motion_vectors : BindGroupLayout ,
228
228
pub mesh_layouts : MeshLayouts ,
229
- pub mesh_buffer_batch_size : Option < u32 > ,
230
229
pub material_layout : BindGroupLayout ,
231
230
pub material_vertex_shader : Option < Handle < Shader > > ,
232
231
pub material_fragment_shader : Option < Handle < Shader > > ,
@@ -314,7 +313,6 @@ impl<M: Material> FromWorld for PrepassPipeline<M> {
314
313
view_layout_motion_vectors,
315
314
view_layout_no_motion_vectors,
316
315
mesh_layouts : mesh_pipeline. mesh_layouts . clone ( ) ,
317
- mesh_buffer_batch_size : mesh_pipeline. per_object_buffer_batch_size ,
318
316
material_vertex_shader : match M :: prepass_vertex_shader ( ) {
319
317
ShaderRef :: Default => None ,
320
318
ShaderRef :: Handle ( handle) => Some ( handle) ,
@@ -354,13 +352,6 @@ where
354
352
let mut shader_defs = Vec :: new ( ) ;
355
353
let mut vertex_attributes = Vec :: new ( ) ;
356
354
357
- if let Some ( batch_size) = self . mesh_buffer_batch_size {
358
- shader_defs. push ( ShaderDefVal :: UInt (
359
- "PER_OBJECT_BUFFER_BATCH_SIZE" . into ( ) ,
360
- batch_size,
361
- ) ) ;
362
- }
363
-
364
355
// NOTE: Eventually, it would be nice to only add this when the shaders are overloaded by the Material.
365
356
// The main limitation right now is that bind group order is hardcoded in shaders.
366
357
bind_group_layouts. insert ( 1 , self . material_layout . clone ( ) ) ;
0 commit comments