diff options
Diffstat (limited to 'client/src/scene_render.rs')
-rw-r--r-- | client/src/scene_render.rs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/client/src/scene_render.rs b/client/src/scene_render.rs index bc9fc52..7b2f653 100644 --- a/client/src/scene_render.rs +++ b/client/src/scene_render.rs @@ -62,7 +62,7 @@ impl ScenePipeline { }); let pipeline_layout = device.create_pipeline_layout(&PipelineLayoutDescriptor { label: None, - bind_group_layouts: &[&bind_group_layout], + bind_group_layouts: &[&bind_group_layout, &bind_group_layout], push_constant_ranges: &[PushConstantRange { range: 0..(4 * 4 * size_of::<f32>() as u32), stages: ShaderStages::VERTEX, @@ -187,13 +187,14 @@ impl ScenePipeline { * Mat4::from_mat3a(affine.matrix3); let projection = part_projection.to_cols_array().map(|v| v.to_le_bytes()); - rpass.set_bind_group(0, &*part.texture, &[]); + rpass.set_bind_group(0, &*part.tex_albedo, &[]); + rpass.set_bind_group(1, &*part.tex_normal, &[]); rpass.set_pipeline(&self.pipeline); rpass.set_push_constants(ShaderStages::VERTEX, 0, projection.as_flattened()); rpass.set_index_buffer(part.index.slice(..), IndexFormat::Uint16); - rpass.set_vertex_buffer(0, part.position.slice(..)); - rpass.set_vertex_buffer(1, part.normal.slice(..)); - rpass.set_vertex_buffer(2, part.texcoord.slice(..)); + rpass.set_vertex_buffer(0, part.va_position.slice(..)); + rpass.set_vertex_buffer(1, part.va_normal.slice(..)); + rpass.set_vertex_buffer(2, part.va_texcoord.slice(..)); rpass.draw_indexed(0..part.index_count, 0, 0..1); } } |