Fix offset calculation in image::Atlas
This commit is contained in:
parent
ecbee66bd6
commit
bb5f034e08
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue