diff options
author | Tomi Korpipää <tomi.korpipaa@digia.com> | 2014-02-21 06:54:20 +0200 |
---|---|---|
committer | Tomi Korpipää <tomi.korpipaa@digia.com> | 2014-02-21 06:55:17 +0200 |
commit | 0d36c08c2d3ac71eb7fb307307ae6d0c5f32c0d7 (patch) | |
tree | 0038cb339164e49aca3b31b70af908530edee61d /src/datavisualization/engine | |
parent | d0b840d3c95d6a5a29fbef13842cf1346db07651 (diff) |
Fixed surface shadow wrong direction bug
Task-number: QTRD-2887
Change-Id: I37938a86fe4b414cd969fda819d096dc885fa48f
Change-Id: I37938a86fe4b414cd969fda819d096dc885fa48f
Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
Diffstat (limited to 'src/datavisualization/engine')
-rw-r--r-- | src/datavisualization/engine/surface3drenderer.cpp | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/datavisualization/engine/surface3drenderer.cpp b/src/datavisualization/engine/surface3drenderer.cpp index f4b35803..492f4174 100644 --- a/src/datavisualization/engine/surface3drenderer.cpp +++ b/src/datavisualization/engine/surface3drenderer.cpp @@ -1082,20 +1082,12 @@ void Surface3DRenderer::drawScene(GLuint defaultFboHandle) // Get the depth view matrix // It may be possible to hack lightPos here if we want to make some tweaks to shadow QVector3D depthLightPos = activeCamera->d_ptr->calculatePositionRelativeToCamera( - zeroVector, 0.0f, 3.5f / m_autoScaleAdjustment); + zeroVector, 0.0f, 4.0f / m_autoScaleAdjustment); depthViewMatrix.lookAt(depthLightPos, zeroVector, upVector); // Set the depth projection matrix -#ifndef USE_WIDER_SHADOWS - // Use this for perspective shadows depthProjectionMatrix.perspective(10.0f, (GLfloat)m_primarySubViewport.width() / (GLfloat)m_primarySubViewport.height(), 3.0f, 100.0f); -#else - // Use these for orthographic shadows - depthProjectionMatrix.ortho(-2.0f * 2.0f, 2.0f * 2.0f, - -2.0f, 2.0f, - 0.0f, 100.0f); -#endif depthProjectionViewMatrix = depthProjectionMatrix * depthViewMatrix; glDisable(GL_CULL_FACE); |