Improved Mars illumination.

This commit is contained in:
Jonathas Costa
2019-07-24 15:52:27 -04:00
parent 4360246863
commit 77bc2d4e6d
3 changed files with 13 additions and 1 deletions

View File

@@ -266,6 +266,7 @@ RenderableAtmosphere::RenderableAtmosphere(const ghoul::Dictionary& dictionary)
, _mieHeightScale(0.f)
, _miePhaseConstant(0.f)
, _sunRadianceIntensity(5.f)
, _mieScattExtPropCoefProp(1.f)
, _mieExtinctionCoeff(glm::vec3(0.f))
, _rayleighScatteringCoeff(glm::vec3(0.f))
, _ozoneExtinctionCoeff(glm::vec3(0.f))
@@ -409,6 +410,12 @@ RenderableAtmosphere::RenderableAtmosphere(const ghoul::Dictionary& dictionary)
SunIntensityInfo.identifier
);
}
if (atmosphereDictionary.hasKey(MieScatteringExtinctionPropCoeffInfo.identifier)) {
_mieScattExtPropCoefProp = atmosphereDictionary.value<float>(
MieScatteringExtinctionPropCoeffInfo.identifier
);
}
if (!atmosphereDictionary.getValue(
GroundRadianceEmittioninfo.identifier,
@@ -634,8 +641,10 @@ RenderableAtmosphere::RenderableAtmosphere(const ghoul::Dictionary& dictionary)
_mieScatteringCoeffZP.onChange(updateAtmosphere);
addProperty(_mieScatteringCoeffZP);
_mieScatteringExtinctionPropCoefficientP =
_mieScatteringExtinctionPropCoefficientP =
_mieScattExtPropCoefProp != 1.f ? _mieScattExtPropCoefProp :
_mieScatteringCoeff.x / _mieExtinctionCoeff.x;
_mieScatteringExtinctionPropCoefficientP.onChange(updateAtmosphere);
addProperty(_mieScatteringExtinctionPropCoefficientP);