mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-23 04:30:09 -05:00
Fixed bug in background color for atm. Adding option to enable/disable fade-in effect in DU objects. Updated Ghoul.
This commit is contained in:
@@ -310,6 +310,7 @@ RenderablePlanesCloud::RenderablePlanesCloud(const ghoul::Dictionary& dictionary
|
||||
_renderOption.addOption(1, "Camera Position Normal");
|
||||
_renderOption.addOption(2, "Screen center Position Normal");
|
||||
addProperty(_renderOption);
|
||||
_renderOption.set(1);
|
||||
|
||||
if (dictionary.hasKey(keyUnit)) {
|
||||
std::string unit = dictionary.value<std::string>(keyUnit);
|
||||
@@ -648,7 +649,7 @@ void RenderablePlanesCloud::render(const RenderData& data, RendererTasks&) {
|
||||
|
||||
float fadeInVariable = 1.0f;
|
||||
if (_fadeInThreshold > 0.0) {
|
||||
float distCamera = glm::distance(data.camera.positionVec3(), data.position.dvec3());
|
||||
float distCamera = glm::length(data.camera.positionVec3());
|
||||
double term = std::exp(distCamera / scale - _fadeInThreshold);
|
||||
float func = static_cast<float>(term / (term + 1.0));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user