Skip to content

Commit

Permalink
small fix to frustsum
Browse files Browse the repository at this point in the history
  • Loading branch information
JulioJPinto committed May 26, 2024
1 parent 402a65e commit bade6d2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions engine/src/frustsum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ Frustsum::Frustsum(const Camera& cam, float ratio, bool on) {
glm::vec3 front = glm::normalize(cam.lookAt - cam.position);
float fovRadians = glm::radians(static_cast<float>(cam.fov));

float halfVSide = cam.far * tanf(fovRadians * 0.5f);
float halfHSide = halfVSide * aspect;
float halfHSide = cam.far * tanf(fovRadians * 0.5f);
float halfVSide = halfHSide * aspect;

glm::vec3 frontMultFar = cam.far * front;

// Near and far planes
Expand Down
2 changes: 1 addition & 1 deletion imgui.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ Collapsed=0
[Window][Models]
Pos=770,16
Size=297,183
Collapsed=1
Collapsed=0

0 comments on commit bade6d2

Please sign in to comment.