Skip to content

Commit af57c99

Browse files
committed
GPU Display: compute reasonable zFar to make sure other TPC side is always visible
1 parent 99927de commit af57c99

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

GPU/GPUTracking/display/GPUDisplay.cxx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1830,7 +1830,8 @@ int GPUDisplay::DrawGLScene_internal(bool mixAnimation, float mAnimateTime)
18301830
#endif
18311831

18321832
{
1833-
const hmm_mat4 proj = HMM_Perspective(mFOV, (GLfloat)mScreenwidth / (GLfloat)mScreenheight, 0.1f, 1000.0f);
1833+
const float zFar = ((param().par.ContinuousTracking ? (mMaxClusterZ / GL_SCALE_FACTOR) : 8.f) + 50.f) * 2.f;
1834+
const hmm_mat4 proj = HMM_Perspective(mFOV, (GLfloat)mScreenwidth / (GLfloat)mScreenheight, 0.1f, zFar);
18341835
#ifndef GPUCA_DISPLAY_OPENGL_CORE
18351836
CHKERR(glMatrixMode(GL_PROJECTION));
18361837
CHKERR(glLoadMatrixf(&proj.Elements[0][0]));

0 commit comments

Comments
 (0)