diff --git a/engine/src/renderer/core/3d/bbox/core_bbox.cpp b/engine/src/renderer/core/3d/bbox/core_bbox.cpp index 9d3a35f..3d0b8da 100644 --- a/engine/src/renderer/core/3d/bbox/core_bbox.cpp +++ b/engine/src/renderer/core/3d/bbox/core_bbox.cpp @@ -195,7 +195,7 @@ CoreBBoxFrustum CoreBBox::isInFrustum(const Plane* frustumPlanes, for (u8 y = 0; y < 8 && (boxIn == 0 || boxOut == 0); y++) { boxCalcTemp = model * _vertices[y]; - auto isOut = frustumPlanes[i].distanceTo(boxCalcTemp) < margin; + auto isOut = frustumPlanes[i].distanceTo(boxCalcTemp) <= margin; if (isOut) boxOut++; diff --git a/engine/src/renderer/core/3d/bbox/render_bbox.cpp b/engine/src/renderer/core/3d/bbox/render_bbox.cpp index af8a4be..78dff30 100644 --- a/engine/src/renderer/core/3d/bbox/render_bbox.cpp +++ b/engine/src/renderer/core/3d/bbox/render_bbox.cpp @@ -38,6 +38,7 @@ RenderBBox::RenderBBox(Vec4* t_vertices) : CoreBBox(t_vertices) {} */ CoreBBoxFrustum RenderBBox::clipIsInFrustum(const Plane* frustumPlanes, const M4x4& model) const { + return isInFrustum(frustumPlanes, model); auto result = isInFrustum(frustumPlanes, model); if (result != PARTIALLY_IN_FRUSTUM) { diff --git a/engine/src/renderer/core/3d/clipper/ee_clip_algorithm.cpp b/engine/src/renderer/core/3d/clipper/ee_clip_algorithm.cpp index 6eb5c9e..46cdebd 100644 --- a/engine/src/renderer/core/3d/clipper/ee_clip_algorithm.cpp +++ b/engine/src/renderer/core/3d/clipper/ee_clip_algorithm.cpp @@ -19,8 +19,6 @@ EEClipAlgorithm::~EEClipAlgorithm() { delete[] tempVertices; } float EEClipAlgorithm::clipMargin = -10.0F; void EEClipAlgorithm::init(const RendererSettings& settings) { - // halfWidth = settings.getWidth() / 2; - // halfHeight = settings.getHeight() / 2; halfWidth = 0.5F; halfHeight = 0.5F; near = settings.getNear() - (-clipMargin);