extend that one optimization

This commit is contained in:
MihailRis 2024-11-17 04:31:07 +03:00
parent 3c94061fd3
commit 5f71522653

View File

@ -587,7 +587,8 @@ SortingMeshData BlocksRenderer::renderTranslucent(
// additional powerful optimization
auto size = aabb.size();
if (glm::abs(size.y) < 0.01f && sortingMesh.entries.size() > 1) {
if ((size.y < 0.01f || size.x < 0.01f || size.z < 0.01f) &&
sortingMesh.entries.size() > 1) {
SortingMeshEntry newEntry {
sortingMesh.entries[0].position,
util::Buffer<float>(totalSize)