Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions jme3-core/src/main/java/com/jme3/renderer/Camera.java
Original file line number Diff line number Diff line change
Expand Up @@ -1344,10 +1344,14 @@ public void onFrustumChange() {
coeffTop[0] = -frustumNear * inverseLength;
coeffTop[1] = frustumTop * inverseLength;
} else {
coeffLeft[0] = 1;
// getLeft() returns up×direction, but the view matrix (fromFrame)
// uses direction×up = -getLeft() as its X axis. Negate the left/right
// coefficients so the frustum plane normals match the view matrix,
// giving correct culling for any camera orientation.
coeffLeft[0] = -1;
coeffLeft[1] = 0;

coeffRight[0] = -1;
coeffRight[0] = 1;
coeffRight[1] = 0;

coeffBottom[0] = 1;
Expand Down
Loading