Feature/globe shading (#363)

* Perform Oren Nayar diffuse shading on globes.

* Remove unused propertyowner

* Enable accurate normals for globes

* Use property for accurate normals.

* Correctly calculate height when scale is changed.

* Auto update line endings to LF in main.cpp and openspaceengine.cpp

* Clean up and comment

* Convert shader indentation to spaces (Wooooops..).

* Line endings

* Line endings and small fixes

* Line endings

* Clean up
This commit is contained in:
Kalle Bladin
2017-07-14 16:33:03 +02:00
committed by GitHub
parent 2f52ceb2f9
commit 4ecb98f06f
21 changed files with 908 additions and 697 deletions
@@ -91,17 +91,22 @@ LayerShaderManager::LayerShaderPreprocessingData
preprocessingData.layeredTextureInfo[i] = layeredTextureInfo;
}
const auto& generalProps = globe.generalProperties();
const auto& debugProps = globe.debugProperties();
const RenderableGlobe::GeneralProperties& generalProps = globe.generalProperties();
const RenderableGlobe::DebugProperties& debugProps = globe.debugProperties();
auto& pairs = preprocessingData.keyValuePairs;
pairs.emplace_back("useAccurateNormals",
std::to_string(generalProps.useAccurateNormals)
);
pairs.emplace_back("useAtmosphere", std::to_string(generalProps.atmosphereEnabled));
pairs.emplace_back("performShading", std::to_string(generalProps.performShading));
pairs.emplace_back("showChunkEdges", std::to_string(debugProps.showChunkEdges));
pairs.emplace_back("showHeightResolution",
std::to_string(debugProps.showHeightResolution));
std::to_string(debugProps.showHeightResolution)
);
pairs.emplace_back("showHeightIntensities",
std::to_string(debugProps.showHeightIntensities));
std::to_string(debugProps.showHeightIntensities)
);
pairs.emplace_back("defaultHeight", std::to_string(Chunk::DEFAULT_HEIGHT));
pairs.emplace_back("tilePaddingStart",