From c03e3c1fbf145f49c68c0b50b82e4039f8289fd0 Mon Sep 17 00:00:00 2001 From: Moritz Zwerger Date: Fri, 10 Nov 2023 22:02:17 +0100 Subject: [PATCH] fix frustum culling --- .../bixilon/minosoft/gui/rendering/camera/frustum/Frustum.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/de/bixilon/minosoft/gui/rendering/camera/frustum/Frustum.kt b/src/main/java/de/bixilon/minosoft/gui/rendering/camera/frustum/Frustum.kt index 9eb09f706..1e2497ad4 100644 --- a/src/main/java/de/bixilon/minosoft/gui/rendering/camera/frustum/Frustum.kt +++ b/src/main/java/de/bixilon/minosoft/gui/rendering/camera/frustum/Frustum.kt @@ -186,8 +186,8 @@ class Frustum( fun containsAABB(aabb: AABB): Boolean { val offset = camera.offset.offset return containsRegion( - (aabb.min.x - offset.x).toFloat(), (aabb.min.y - offset.x).toFloat(), (aabb.min.z - offset.x).toFloat(), - (aabb.max.x - offset.x).toFloat(), (aabb.max.x - offset.x).toFloat(), (aabb.max.x - offset.x).toFloat(), + (aabb.min.x - offset.x).toFloat(), (aabb.min.y - offset.y).toFloat(), (aabb.min.z - offset.z).toFloat(), + (aabb.max.x - offset.x).toFloat(), (aabb.max.y - offset.y).toFloat(), (aabb.max.z - offset.z).toFloat(), ) }