Skip to content

Commit

Permalink
Convert max position coordinate to float in vertex scale calculation (C…
Browse files Browse the repository at this point in the history
…affeineMC#2684)

Fixes CaffeineMC#2678

Co-authored-by: MrMangoHands <mrmangohands@pm.me>
  • Loading branch information
mrmangohands and mrmangohands authored Aug 17, 2024
1 parent 345b2c3 commit 2d2ee7a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const uint TEXTURE_BITS = 15u;
const uint TEXTURE_MAX_COORD = 1u << TEXTURE_BITS;
const uint TEXTURE_MAX_VALUE = TEXTURE_MAX_COORD - 1u;

const float VERTEX_SCALE = 32.0 / POSITION_MAX_COORD;
const float VERTEX_SCALE = 32.0 / float(POSITION_MAX_COORD);
const float VERTEX_OFFSET = -8.0;

// The amount of inset the texture coordinates from the edges of the texture, to avoid texture bleeding
Expand Down

0 comments on commit 2d2ee7a

Please sign in to comment.