Skip to content

Commit

Permalink
Fixed issue with how texture arrays were uploaded with write_texture. (
Browse files Browse the repository at this point in the history
  • Loading branch information
StarArawn authored and cart committed Jul 24, 2021
1 parent 55d0454 commit c7844ca
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pipelined/bevy_render2/src/texture/image.rs
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,11 @@ impl RenderAsset for Image {
)
.unwrap(),
),
rows_per_image: None,
rows_per_image: if image.texture_descriptor.size.depth_or_array_layers > 1 {
std::num::NonZeroU32::new(image.texture_descriptor.size.height)
} else {
None
},
},
image.texture_descriptor.size,
);
Expand Down

0 comments on commit c7844ca

Please sign in to comment.