Skip to content
Permalink
Browse files

[3d] Increase default shadow maximum distance

The previous default value (500) wass too short for good results
with point cloud scenes, and produced a very distinct visual cut off where the
shadows vanish
  • Loading branch information
nyalldawson committed Nov 12, 2020
1 parent 43f2ae7 commit 4d611020da52e3917d0e159888bda27c32deb768
Showing with 3 additions and 3 deletions.
  1. +1 −1 src/3d/qgsshadowsettings.cpp
  2. +1 −1 src/3d/qgsshadowsettings.h
  3. +1 −1 src/app/3d/qgsshadowrenderingsettingswidget.cpp
@@ -45,7 +45,7 @@ void QgsShadowSettings::readXml( const QDomElement &element, const QgsReadWriteC
Q_UNUSED( context );
mRenderShadows = element.attribute( QStringLiteral( "shadow-rendering-enabled" ), QStringLiteral( "0" ) ).toInt();
mSelectedDirectionalLight = element.attribute( QStringLiteral( "selected-directional-light" ), QStringLiteral( "-1" ) ).toInt();
mMaximumShadowRenderingDistance = element.attribute( QStringLiteral( "max-shadow-rendering-distance" ), QStringLiteral( "500" ) ).toInt();
mMaximumShadowRenderingDistance = element.attribute( QStringLiteral( "max-shadow-rendering-distance" ), QStringLiteral( "1500" ) ).toInt();
mShadowBias = element.attribute( QStringLiteral( "shadow-bias" ), QStringLiteral( "0.00001" ) ).toFloat();
mShadowMapResolution = element.attribute( QStringLiteral( "shadow-map-resolution" ), QStringLiteral( "2048" ) ).toInt();
}
@@ -102,7 +102,7 @@ class _3D_EXPORT QgsShadowSettings
private:
bool mRenderShadows = false;
int mSelectedDirectionalLight = 0;
double mMaximumShadowRenderingDistance = 500.0;
double mMaximumShadowRenderingDistance = 1500.0;
double mShadowBias = 0.00001;
int mShadowMapResolution = 2048;
};
@@ -25,7 +25,7 @@ QgsShadowRenderingSettingsWidget::QgsShadowRenderingSettingsWidget( QWidget *par
{
setupUi( this );

shadowRenderinMaximumDistanceSpinBox->setClearValue( 500.00 );
shadowRenderinMaximumDistanceSpinBox->setClearValue( 1500.00 );
shadowBiasSpinBox->setClearValue( 0.000010 );
shadowMapResolutionSpinBox->setClearValue( 2048 );
}

0 comments on commit 4d61102

Please sign in to comment.
You can’t perform that action at this time.