File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
jme3-core/src/main/java/com/jme3/renderer Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ jna = "net.java.dev.jna:jna:5.10.0"
2323jnaerator-runtime = " com.nativelibs4java:jnaerator-runtime:0.12"
2424junit4 = " junit:junit:4.13.2"
2525lwjgl2 = " org.jmonkeyengine:lwjgl:2.9.5"
26- lwjgl3-awt = " org.lwjglx :lwjgl3-awt:0.2.3 "
26+ lwjgl3-awt = " org.jmonkeyengine :lwjgl3-awt:0.2.4 "
2727
2828lwjgl3-base = { module = " org.lwjgl:lwjgl" , version.ref = " lwjgl3" }
2929lwjgl3-glfw = { module = " org.lwjgl:lwjgl-glfw" , version.ref = " lwjgl3" }
Original file line number Diff line number Diff line change @@ -1344,10 +1344,14 @@ public void onFrustumChange() {
13441344 coeffTop [0 ] = -frustumNear * inverseLength ;
13451345 coeffTop [1 ] = frustumTop * inverseLength ;
13461346 } else {
1347- coeffLeft [0 ] = 1 ;
1347+ // getLeft() returns up×direction, but the view matrix (fromFrame)
1348+ // uses direction×up = -getLeft() as its X axis. Negate the left/right
1349+ // coefficients so the frustum plane normals match the view matrix,
1350+ // giving correct culling for any camera orientation.
1351+ coeffLeft [0 ] = -1 ;
13481352 coeffLeft [1 ] = 0 ;
13491353
1350- coeffRight [0 ] = - 1 ;
1354+ coeffRight [0 ] = 1 ;
13511355 coeffRight [1 ] = 0 ;
13521356
13531357 coeffBottom [0 ] = 1 ;
You can’t perform that action at this time.
0 commit comments