mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-25 21:48:57 -05:00
Added checking to avoiding compile the globebrowsing shaders with accurate normals support when no height information is available. (#1422)
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user