mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-12 14:29:42 -05:00
Don't crash when enableing the shadow component on a planet that doesn't have a ring system (closes #3404)
This commit is contained in:
@@ -1457,7 +1457,7 @@ void RenderableGlobe::renderChunkGlobally(const Chunk& chunk, const RenderData&
|
||||
_shadowMappingProperties.zFightingPercentage
|
||||
);
|
||||
}
|
||||
else if (_shadowMappingProperties.shadowMapping) {
|
||||
else if (_shadowMappingProperties.shadowMapping && _shadowComponent) {
|
||||
shadowMapUnit.activate();
|
||||
// JCC: Avoiding a to recompiling the shaders or having more than one
|
||||
// set of shaders for this step.
|
||||
@@ -1771,7 +1771,7 @@ void RenderableGlobe::recompileShaders() {
|
||||
pairs.emplace_back("useEclipseHardShadows", std::to_string(_eclipseHardShadows));
|
||||
pairs.emplace_back(
|
||||
"enableShadowMapping",
|
||||
std::to_string(_shadowMappingProperties.shadowMapping)
|
||||
std::to_string(_shadowMappingProperties.shadowMapping && _shadowComponent)
|
||||
);
|
||||
pairs.emplace_back("showChunkEdges", std::to_string(_debugProperties.showChunkEdges));
|
||||
pairs.emplace_back("showHeightResolution", "0");
|
||||
|
||||
Reference in New Issue
Block a user