mirror of
https://github.com/bevyengine/bevy
synced 2025-02-16 14:08:32 +00:00
ktx2: Fix Rgb8 -> Rgba8Unorm conversion (#9555)
# Objective - Fixes #9552 ## Solution - Only n_pixels bytes of data was being copied instead of 1 byte per component, i.e. n_pixels * 4 --- ## Changelog - Fixed: loading of Rgb8 ktx2 files.
This commit is contained in:
parent
228e7aa618
commit
b88ff154f2
1 changed files with 1 additions and 1 deletions
|
@ -139,7 +139,7 @@ pub fn ktx2_buffer_to_image(
|
|||
rgba[i * 4 + 2] = level_data[offset + 2];
|
||||
offset += 3;
|
||||
}
|
||||
transcoded[level].extend_from_slice(&rgba[0..n_pixels]);
|
||||
transcoded[level].extend_from_slice(&rgba[0..n_pixels * 4]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue