Commit f7b69cf
fix: correct parallel projection frustum plane normals for left/right (jMonkeyEngine#2640)
getLeft() returns up×direction but fromFrame() uses direction×up as the
view matrix X axis. These are negatives of each other. The hardcoded
parallel projection coefficients (1 for left, -1 for right) built plane
normals from getLeft(), causing them to point opposite to the view matrix.
This made frustum culling reject visible geometry for any camera with a
non-standard orientation (e.g. looking along +Z) or asymmetric frustum
values in parallel projection mode.
Fix: negate the left/right coefficients so plane normals align with the
view matrix's X axis.
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent 8cdd545 commit f7b69cf
1 file changed
+6
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1344 | 1344 | | |
1345 | 1345 | | |
1346 | 1346 | | |
1347 | | - | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
1348 | 1352 | | |
1349 | 1353 | | |
1350 | | - | |
| 1354 | + | |
1351 | 1355 | | |
1352 | 1356 | | |
1353 | 1357 | | |
| |||
0 commit comments