From 2d2ee7ade040a9905d6e771c6be9d6da177e918b Mon Sep 17 00:00:00 2001 From: MrMangoHands Date: Fri, 16 Aug 2024 17:30:19 -0700 Subject: [PATCH] Convert max position coordinate to float in vertex scale calculation (#2684) Fixes #2678 Co-authored-by: MrMangoHands --- .../resources/assets/sodium/shaders/include/chunk_vertex.glsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/main/resources/assets/sodium/shaders/include/chunk_vertex.glsl b/common/src/main/resources/assets/sodium/shaders/include/chunk_vertex.glsl index b6a1ae4deb..c594aa23f2 100644 --- a/common/src/main/resources/assets/sodium/shaders/include/chunk_vertex.glsl +++ b/common/src/main/resources/assets/sodium/shaders/include/chunk_vertex.glsl @@ -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