Skip to content

Commit

Permalink
World of Warcraft: Fix ADT liquid texcoords
Browse files Browse the repository at this point in the history
In order to get texcoord 0...1 we need to divide by size - 1.

Addresses part of #655.
  • Loading branch information
magcius committed Apr 15, 2024
1 parent 8d09bc7 commit 0bd6165
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rust/src/wow/adt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -727,8 +727,8 @@ impl LiquidData {
vertices.push(x_pos);
vertices.push(y_pos);
vertices.push(z_pos);
vertices.push(y as f32 / height as f32);
vertices.push(x as f32 / width as f32);
vertices.push(y as f32 / (height - 1) as f32);
vertices.push(x as f32 / (width - 1) as f32);
extents.update(x_pos, y_pos, z_pos);
}
}
Expand Down

0 comments on commit 0bd6165

Please sign in to comment.