Skip to content

Commit

Permalink
Fix materials iteration
Browse files Browse the repository at this point in the history
  • Loading branch information
EtaLoop committed Oct 29, 2024
1 parent dc48f96 commit 2306698
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/viewer/re_space_view_spatial/src/mesh_loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ impl LoadedMesh {
// Overwriting albedo_factor of CpuMesh if specified in the Asset3D
if let Some(albedo_factor) = albedo_factor {
for instance in &cpu_model.instances {
cpu_model.meshes[instance.mesh].materials[0].albedo_factor = albedo_factor.0.into();
for material in &mut cpu_model.meshes[instance.mesh].materials {
material.albedo_factor = albedo_factor.0.into();
}
}
}

Expand Down

0 comments on commit 2306698

Please sign in to comment.