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

mipmap levels can be 0 and they should be interpreted as 1 #11767

Merged
merged 10 commits into from
Feb 11, 2024
2 changes: 1 addition & 1 deletion crates/bevy_render/src/texture/dds.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ pub fn dds_buffer_to_image(
depth_or_array_layers,
}
.physical_size(texture_format);
image.texture_descriptor.mip_level_count = dds.get_num_mipmap_levels();
image.texture_descriptor.mip_level_count = std::cmp::max(dds.get_num_mipmap_levels(),1);
image.texture_descriptor.format = texture_format;
image.texture_descriptor.dimension = if dds.get_depth() > 1 {
TextureDimension::D3
Expand Down
Loading