Skip to content

Commit 07da9cf

Browse files
committed
[Renderer] frustum culling
1 parent 1c49557 commit 07da9cf

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

include/openminecraft/renderer/common/basics/om_camera.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class OMCamera
4343
auto l = rot * glm::vec4(r, 1.0f);
4444
l /= l.w;
4545

46-
return !(l.x > 1.0 || l.x < -1.0 || l.y > 1.0 || l.y < -1.0);
46+
return !(l.x > 2 || l.x < -1.25 || l.y > 2 || l.y < -1.25 || l.z < 0.0f);
4747
}
4848
void modYaw(float delta);
4949
void modPitch(float delta);

src/openminecraft/application.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ void OMApplication::mainLoop(OMBackend backend)
9898
auto logger = std::make_shared<log::OMLogger>("Test Renderer");
9999
try
100100
{
101-
OMWindowConfig conf = {backend, false, 240, 1024, 768};
101+
OMWindowConfig conf = {backend, false, 240, 854, 480};
102102
// INFO: requires at least OpenGL 3.3 Core Profile or Vulkan 1.2
103103
OMWindow win({util::Version(3, 3, 0, 0), util::Version(1, 2, 0, 0)}, conf,
104104
"/bootassets/openminecraft-renderer/shaders");

0 commit comments

Comments
 (0)