diff options
author | Graham Linden <graham@lindenlab.com> | 2018-06-11 22:39:57 +0100 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2018-06-11 22:39:57 +0100 |
commit | fc8d0de673da0e02915556008a365aca67472eba (patch) | |
tree | dab865b50ca106152cae92174995fb8dbe5935e1 /indra/llinventory/llsettingssky.cpp | |
parent | 0f608cb764856ae8586a9d9631842a782cb70a23 (diff) |
Make cloud rendering use textures defined in sky settings and add code to shaders to lerp between current and next cloud texture.
Diffstat (limited to 'indra/llinventory/llsettingssky.cpp')
-rw-r--r-- | indra/llinventory/llsettingssky.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/indra/llinventory/llsettingssky.cpp b/indra/llinventory/llsettingssky.cpp index 38574c4ef8..8034ce8f7d 100644 --- a/indra/llinventory/llsettingssky.cpp +++ b/indra/llinventory/llsettingssky.cpp @@ -32,6 +32,8 @@ #include "llfasttimer.h" #include "v3colorutil.h" +#pragma optimize("", off) + static const F32 NIGHTTIME_ELEVATION = -8.0f; // degrees static const F32 NIGHTTIME_ELEVATION_SIN = (F32)sinf(NIGHTTIME_ELEVATION * DEG_TO_RAD); static const LLVector3 DUE_EAST = LLVector3::x_axis; @@ -601,7 +603,7 @@ LLSD LLSettingsSky::defaults() dfltsetting[SETTING_SUN_ROTATION] = sunquat.getValue(); dfltsetting[SETTING_BLOOM_TEXTUREID] = IMG_BLOOM1; - dfltsetting[SETTING_CLOUD_TEXTUREID] = DEFAULT_CLOUD_ID; + dfltsetting[SETTING_CLOUD_TEXTUREID] = GetDefaultCloudNoiseTextureId(); dfltsetting[SETTING_MOON_TEXTUREID] = GetDefaultMoonTextureId(); dfltsetting[SETTING_SUN_TEXTUREID] = GetDefaultSunTextureId(); @@ -1063,3 +1065,13 @@ LLUUID LLSettingsSky::GetDefaultMoonTextureId() { return DEFAULT_MOON_ID; } + +LLUUID LLSettingsSky::GetDefaultCloudNoiseTextureId() +{ + return DEFAULT_CLOUD_ID; +} + +void LLSettingsSky::setMoonRotation(const LLQuaternion &val) +{ + setValue(SETTING_MOON_ROTATION, val); +} |