Fixed issue with how texture arrays were uploaded with write_texture. (#24)

This commit is contained in:
John 2021-07-14 00:37:02 -04:00 committed by Carter Anderson
parent be8d67d0b0
commit 7bbeb11ed7

View file

@ -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,
);