Skip to content

Commit

Permalink
fix separator plane selection breaking
Browse files Browse the repository at this point in the history
because of missing quantization on the plane distances
  • Loading branch information
douira committed Nov 8, 2023
1 parent 3e83520 commit 9eef8fb
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,9 @@ public void appendQuad(ModelQuadView quadView, ChunkVertexEncoder.Vertex[] verti
quadList.add(new TQuad(facing, accGroup.normal, center, extents));
}

var firstVertex = vertices[0];
if (accGroup.addPlaneMember(firstVertex.x, firstVertex.y, firstVertex.z)) {
// use the center here because it's quantized while the vertices themselves
// aren't. If they were to be mixed this would cause issues in the sorting.
if (accGroup.addPlaneMember(centerX, centerY, centerZ)) {
this.facePlaneCount++;
}
}
Expand Down

0 comments on commit 9eef8fb

Please sign in to comment.