Skip to content

Commit

Permalink
fixup! feat(3d/shadow): move shadow setting updates from qgs3dmapscen…
Browse files Browse the repository at this point in the history
…e into render view
  • Loading branch information
benoitdm-oslandia committed Sep 23, 2024
1 parent 9c2b251 commit 93e0b66
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/3d/framegraph/qgsshadowrenderview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ void QgsShadowRenderView::setupDirectionalLight( const QgsDirectionalLightSettin
const float d = 2.0f * ( mainCamera->position() - mainCamera->viewCenter() ).length();

const QVector3D vertical = QVector3D( 0.0f, d, 0.0f );
const QVector3D lightDirection = QVector3D( light.direction().x(), light.direction().y(), light.direction().z() ).normalized();
const QVector3D lightDirection = QVector3D( static_cast<float>( light.direction().x() ),
static_cast<float>( light.direction().y() ),
static_cast<float>( light.direction().z() ) ).normalized();
QgsShadowRenderView::calculateViewExtent( mainCamera, static_cast<float>( maximumShadowRenderingDistance ), lookingAt.y(),
minX, maxX, minY, maxY, minZ, maxZ );

Expand Down

0 comments on commit 93e0b66

Please sign in to comment.