diff options
author | Tomi Korpipää <tomi.korpipaa@digia.com> | 2013-08-14 11:17:49 +0300 |
---|---|---|
committer | Tomi Korpipää <tomi.korpipaa@digia.com> | 2013-08-14 11:21:23 +0300 |
commit | 36a1a28f4adf3b7a937d7d5501511adffec398ab (patch) | |
tree | 37f9675890897b0c6da3177c1726ab6e04a51488 /src | |
parent | 18785c5e4a02d7c9da2f3f469c7aca6fbe644f10 (diff) |
Q3DBars: Shadow fix
Task-number: QTRD-2191
Fixed the issue with shadows appearing "through the floor"
Change-Id: I214bcc4e393549d42e7b118be5e2848ab68b506c
Change-Id: I214bcc4e393549d42e7b118be5e2848ab68b506c
Reviewed-by: Mika Salmela <mika.salmela@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/datavis3d/engine/bars3drenderer.cpp | 4 | ||||
-rw-r--r-- | src/datavis3d/global/datavis3dglobal_p.h | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/datavis3d/engine/bars3drenderer.cpp b/src/datavis3d/engine/bars3drenderer.cpp index 33874050..930cb9f5 100644 --- a/src/datavis3d/engine/bars3drenderer.cpp +++ b/src/datavis3d/engine/bars3drenderer.cpp @@ -589,7 +589,9 @@ void Bars3dRenderer::drawScene(CameraHelper *camera, // Get the depth view matrix // It may be possible to hack lightPos here if we want to make some tweaks to shadow - depthViewMatrix.lookAt(lightPos, QVector3D(0.0f, -m_yAdjustment, zComp), + QVector3D depthLightPos = lightPos; + depthLightPos.setY(lightPos.y() - 0.5f); + depthViewMatrix.lookAt(depthLightPos, QVector3D(0.0f, -m_yAdjustment, zComp), QVector3D(0.0f, 1.0f, 0.0f)); // TODO: Why does depthViewMatrix.column(3).y() goes to zero when we're directly above? That causes the scene to be not drawn from above -> must be fixed //qDebug() << lightPos << depthViewMatrix << depthViewMatrix.column(3); diff --git a/src/datavis3d/global/datavis3dglobal_p.h b/src/datavis3d/global/datavis3dglobal_p.h index 7b6a4392..e6c40a78 100644 --- a/src/datavis3d/global/datavis3dglobal_p.h +++ b/src/datavis3d/global/datavis3dglobal_p.h @@ -37,9 +37,6 @@ //#define ROTATE_ZOOM_SELECTION -// Uncomment this if you want to try hardcoded QML2 -integration h4x0r version of the engine -//#define USE_QML2_VERSION - QT_DATAVIS3D_BEGIN_NAMESPACE // Constants used in several files |