Skip to content

Commit

Permalink
A newly created 3d map now defaults to a single directional light
Browse files Browse the repository at this point in the history
instead of a point light source

These are a better default lighting, because they are simpler to
configure and will lead to more of the scene being immediately lit
by default.
  • Loading branch information
nyalldawson committed Oct 22, 2020
1 parent c5fe9fa commit 350bc60
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/app/qgisapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13049,9 +13049,8 @@ void QgisApp::new3DMapCanvas()
flatTerrain->setExtent( fullExtent );
map->setTerrainGenerator( flatTerrain );

QgsPointLightSettings defaultPointLight;
defaultPointLight.setConstantAttenuation( 0 );
map->setPointLights( QList<QgsPointLightSettings>() << defaultPointLight );
// new scenes default to a single directional light
map->setDirectionalLights( QList<QgsDirectionalLightSettings>() << QgsDirectionalLightSettings() );
map->setOutputDpi( QgsApplication::desktop()->logicalDpiX() );

dock->setMapSettings( map );
Expand Down

0 comments on commit 350bc60

Please sign in to comment.