Fix offset
calculation in image::Atlas
This commit is contained in:
parent
ecbee66bd6
commit
bb5f034e08
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user