Fix offset calculation in image::Atlas

This commit is contained in:
Héctor Ramón Jiménez 2020-08-27 14:45:08 +02:00
parent ecbee66bd6
commit bb5f034e08

View File

@ -123,7 +123,7 @@ impl Atlas {
Entry::Fragmented { fragments, .. } => {
for fragment in fragments {
let (x, y) = fragment.position;
let offset = (y * padded_width as u32 + x) as usize * 4;
let offset = (y * padded_width as u32 + 4 * x) as usize;
self.upload_allocation(
&buffer,