Skip to content
Snippets Groups Projects
Commit dd7d612c authored by Ali Can Demiralp's avatar Ali Can Demiralp
Browse files

The eye choice during mono rendering mode is less hacky, and should no longer...

The eye choice during mono rendering mode is less hacky, and should no longer break systems other than AixCAVE.
parent c0648e13
No related branches found
No related tags found
No related merge requests found
......@@ -154,7 +154,7 @@ void FDisplayClusterDeviceBase::CalculateStereoViewOffset(const enum EStereoscop
const float ScaledEyeDist = EyeDist * CurrentWorldToMeters;
const float EyeOffset = ScaledEyeDist / 2.f;
const float PassOffset = (StereoPassType == EStereoscopicPass::eSSP_LEFT_EYE ? -EyeOffset : EyeOffset);
const float PassOffset = ((StereoPassType == EStereoscopicPass::eSSP_LEFT_EYE || GDisplayCluster->GetPrivateClusterMgr()->GetNodeId().Contains("left_eye")) ? -EyeOffset : EyeOffset);
const float PassOffsetSwap = (bEyeSwap == true ? -PassOffset : PassOffset);
// offset eye position along Y (right) axis of camera
......@@ -163,7 +163,7 @@ void FDisplayClusterDeviceBase::CalculateStereoViewOffset(const enum EStereoscop
{
const FString nodeId = GDisplayCluster->GetPrivateClusterMgr()->GetNodeId();
const FQuat eyeQuat = pCamera->GetComponentQuat();
ViewLocation += eyeQuat.RotateVector(FVector(0.0f, nodeId.Contains("LE") ? -EyeOffset : EyeOffset, 0.0f));
ViewLocation += eyeQuat.RotateVector(FVector(0.0f, PassOffsetSwap, 0.0f));
}
const int eyeIdx = (StereoPassType == EStereoscopicPass::eSSP_LEFT_EYE ? 0 : 1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment