Added checking to avoiding compile the globebrowsing shaders with accurate normals support when no height information is available. (#1422)

This commit is contained in:
Jonathas Costa
2020-12-05 17:23:25 -05:00
committed by GitHub
parent 9a683bb29a
commit 3d1bd9122e
@@ -1695,9 +1695,13 @@ void RenderableGlobe::recompileShaders() {
std::vector<std::pair<std::string, std::string>>& pairs =
preprocessingData.keyValuePairs;
const bool hasHeightLayer = !_layerManager.layerGroup(
layergroupid::HeightLayers
).activeLayers().empty();
pairs.emplace_back("useAccurateNormals",
std::to_string(_generalProperties.useAccurateNormals)
std::to_string(_generalProperties.useAccurateNormals && hasHeightLayer)
);
pairs.emplace_back(
"performShading",