mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 11:43:49 +00:00
USe correct frustum projections in reflections in separate rt mode
This commit is contained in:
parent
1b2abbeaaa
commit
de48afc00c
2 changed files with 33 additions and 14 deletions
|
|
@ -28,6 +28,7 @@
|
|||
#include "console/consoleTypes.h"
|
||||
#include "core/tAlgorithm.h"
|
||||
#include "math/mMathFn.h"
|
||||
#include "math/mathUtils.h"
|
||||
#include "T3D/gameBase/gameConnection.h"
|
||||
#include "ts/tsShapeInstance.h"
|
||||
#include "gui/3d/guiTSControl.h"
|
||||
|
|
@ -134,12 +135,22 @@ void ReflectionManager::update( F32 timeSlice,
|
|||
// Setup a culler for testing the
|
||||
// visibility of reflectors.
|
||||
Frustum culler;
|
||||
culler.set( false,
|
||||
query.fov,
|
||||
(F32)resolution.x / (F32)resolution.y,
|
||||
query.nearPlane,
|
||||
query.farPlane,
|
||||
query.cameraMatrix );
|
||||
|
||||
S32 stereoTarget = GFX->getCurrentStereoTarget();
|
||||
if (stereoTarget != -1)
|
||||
{
|
||||
MathUtils::makeFovPortFrustum(&culler, false, query.nearPlane, query.farPlane, query.fovPort[stereoTarget]);
|
||||
}
|
||||
else
|
||||
{
|
||||
culler.set(false,
|
||||
query.fov,
|
||||
(F32)resolution.x / (F32)resolution.y,
|
||||
query.nearPlane,
|
||||
query.farPlane,
|
||||
query.cameraMatrix);
|
||||
}
|
||||
|
||||
|
||||
// Manipulate the frustum for tiled screenshots
|
||||
const bool screenShotMode = gScreenShot && gScreenShot->isPending();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue