diff --git a/assets/cubyz/shaders/chunks/chunk_vertex.vs b/assets/cubyz/shaders/chunks/chunk_vertex.vs index a42dbf04..1a70c56c 100644 --- a/assets/cubyz/shaders/chunks/chunk_vertex.vs +++ b/assets/cubyz/shaders/chunks/chunk_vertex.vs @@ -121,8 +121,8 @@ int convertNormal(int normal, mat3 permutationMatrix, vec3 mirrorVector) { } void main() { - int faceID = gl_VertexID/4; - int vertexID = gl_VertexID%4; + int faceID = gl_VertexID >> 2; + int vertexID = gl_VertexID & 3; int encodedPositionAndNormalsAndPermutation = faceData[faceID].encodedPositionAndNormalsAndPermutation; int blockAndModel = faceData[faceID].blockAndModel; int fullLight = faceData[faceID].light[vertexID];