Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - Fix animation: shadow and wireframe support #4367

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion crates/bevy_pbr/src/render/light.rs
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ impl SpecializedMeshPipeline for ShadowPipeline {
) -> Result<RenderPipelineDescriptor, SpecializedMeshPipelineError> {
let mut vertex_attributes = vec![Mesh::ATTRIBUTE_POSITION.at_shader_location(0)];

let mut bind_group_layout = vec![self.view_layout.clone(), self.mesh_layout.clone()];
let mut bind_group_layout = vec![self.view_layout.clone()];
let mut shader_defs = Vec::new();

if layout.contains(Mesh::ATTRIBUTE_JOINT_INDEX)
Expand All @@ -271,6 +271,8 @@ impl SpecializedMeshPipeline for ShadowPipeline {
vertex_attributes.push(Mesh::ATTRIBUTE_JOINT_INDEX.at_shader_location(4));
vertex_attributes.push(Mesh::ATTRIBUTE_JOINT_WEIGHT.at_shader_location(5));
bind_group_layout.push(self.skinned_mesh_layout.clone());
} else {
bind_group_layout.push(self.mesh_layout.clone());
}

let vertex_buffer_layout = layout.get_layout(&vertex_attributes)?;
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_pbr/src/render/wireframe.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ struct VertexOutput {
};

#ifdef SKINNED
[[group(2), binding(0)]]
[[group(1), binding(1)]]
var<uniform> joint_matrices: SkinnedMesh;
#import bevy_pbr::skinning
#endif
Expand Down