Keylight attenuation implemented.

This commit is contained in:
Nissim Hadar 2017-10-05 18:25:02 -07:00
parent f261477aa2
commit 3afab3c1d3
2 changed files with 10 additions and 4 deletions

View file

@ -336,10 +336,14 @@ void ZoneEntityRenderer::updateHazeFromEntity(const TypedEntityPointer& entity)
const auto& haze = editHaze();
uint32_t hazeMode = entity->getHazeMode();
haze->setHazeActive((hazeMode == HAZE_MODE_RANGE_ONLY) || (hazeMode == HAZE_MODE_RANGE_ALTITUDE));
const uint32_t hazeMode = entity->getHazeMode();
const bool isHazeActive = ((hazeMode == HAZE_MODE_RANGE_ONLY) || (hazeMode == HAZE_MODE_RANGE_ALTITUDE));
haze->setHazeActive(isHazeActive);
haze->setAltitudeBased(hazeMode == HAZE_MODE_RANGE_ALTITUDE);
// Directional light attenuation is set whenever haze is active
haze->setDirectionaLightAttenuationActive(isHazeActive);
haze->setHazeRangeFactor(model::convertHazeRangeToHazeRangeFactor(_hazeProperties.getHazeRange()));
xColor hazeBlendInColor = _hazeProperties.getHazeBlendInColor();
haze->setHazeColor(glm::vec3(hazeBlendInColor.red / 255.0, hazeBlendInColor.green / 255.0, hazeBlendInColor.blue / 255.0));

View file

@ -597,8 +597,10 @@
</fieldset>
<fieldset class="zone-group zone-section haze-section property gen fstuple">
<div class="tuple">
<div><label>KeyLight Range Att.<span class="unit">m</span></label><input type="number" id="property-zone-haze-keylight-range" min="5" max="10000" step="5"></div>
<div><label>KeyLight Altitude Att.<span class="unit">m</span></label><input type="number" id="property-zone-haze-keylight-altitude" min="-1000" max="5000" step="1"></div>
<div><label>KeyLight Attenuation Range<span class="unit">m</span></label><input type="number" id="property-zone-haze-keylight-range"
min="5" max="1000000" step="5"></div>
<div><label>Altitude<span class="unit">m</span></label><input type="number" id="property-zone-haze-keylight-altitude"
min="-1000" max="50000" step="10"></div>
</div>
</fieldset>
</fieldset>