diff options
author | Graham Linden graham@lindenlab.com <Graham Linden graham@lindenlab.com> | 2018-02-28 21:46:30 +0000 |
---|---|---|
committer | Graham Linden graham@lindenlab.com <Graham Linden graham@lindenlab.com> | 2018-02-28 21:46:30 +0000 |
commit | 72270213f5eebd019b10bdd6ec15020ba3d2ecf5 (patch) | |
tree | be92c250563eedb720940b32cf42e328a49ea6b6 | |
parent | 31017934581437836e847d8fcb5a76489f3baf50 (diff) |
Add 3p package for adv atmospherics to autobuild.
Mark legacy atmospherics code with ifdefs.
Fix up legacy uplift to include new atmospherics settings.
49 files changed, 2440 insertions, 345 deletions
diff --git a/autobuild.xml b/autobuild.xml index d387dfba72..68fae7c26d 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -59,21 +59,57 @@ <string>libatmosphere</string> <key>platforms</key> <map> + <key>darwin</key> + <map> + <key>archive</key> + <map> + <key>hash</key> + <string>3950f04d10efd9596093e45f2a265ce1</string> + <key>url</key> + <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/14058/88070/libatmosphere-1.0.0.100-darwin-512856.tar.bz2</string> + </map> + <key>name</key> + <string>windows64</string> + </map> + <key>darwin64</key> + <map> + <key>archive</key> + <map> + <key>hash</key> + <string>9901421858f72005b1afeacc6d0480bf</string> + <key>url</key> + <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/14057/88064/libatmosphere-1.0.0.100-darwin64-512856.tar.bz2</string> + </map> + <key>name</key> + <string>windows64</string> + </map> + <key>windows</key> + <map> + <key>archive</key> + <map> + <key>hash</key> + <string>61532e0f9ec8212964df6944a92a71b4</string> + <key>url</key> + <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/14060/88090/libatmosphere-1.0.0.100-windows-512856.tar.bz2</string> + </map> + <key>name</key> + <string>windows64</string> + </map> <key>windows64</key> <map> <key>archive</key> <map> <key>hash</key> - <string>b6fa628aafcdd006d17e799825fbeb91</string> + <string>6b80692f7fc15ce9348eeee03efb1e24</string> <key>url</key> - <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/13879/86217/libatmosphere-1.0.0.100-windows64-512753.tar.bz2</string> + <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/14059/88084/libatmosphere-1.0.0.100-windows64-512856.tar.bz2</string> </map> <key>name</key> <string>windows64</string> </map> </map> <key>version</key> - <string>1.0.0.512753</string> + <string>1.0.0.512856</string> </map> <key>apr_suite</key> <map> diff --git a/indra/llinventory/llsettingsdaycycle.cpp b/indra/llinventory/llsettingsdaycycle.cpp index a689dd3710..409fcf28e3 100644 --- a/indra/llinventory/llsettingsdaycycle.cpp +++ b/indra/llinventory/llsettingsdaycycle.cpp @@ -268,10 +268,27 @@ LLSD LLSettingsDay::defaults() LLSD dfltsetting; dfltsetting[SETTING_NAME] = "_default_"; - dfltsetting[SETTING_TRACKS] = LLSDArray( - LLSDArray(LLSDMap(SETTING_KEYKFRAME, LLSD::Real(0.0f))(SETTING_KEYNAME, "_default_")) - (LLSDMap(SETTING_KEYKFRAME, LLSD::Real(0.0f))(SETTING_KEYNAME, "_default_"))); - dfltsetting[SETTING_FRAMES] = LLSD::emptyMap(); + + LLSD waterTrack; + waterTrack[SETTING_KEYKFRAME] = 0.0f; + waterTrack[SETTING_KEYNAME] = "_default_"; + + LLSD skyTrack; + skyTrack[SETTING_KEYKFRAME] = 0.0f; + skyTrack[SETTING_KEYNAME] = "_default_"; + + LLSD tracks; + tracks.append(LLSDArray(waterTrack)); + tracks.append(LLSDArray(skyTrack)); + + dfltsetting[SETTING_TRACKS] = tracks; + + LLSD frames(LLSD::emptyMap()); + + frames["water:_defaults_"] = LLSettingsWater::defaults(); + frames["sky:_defaults_"] = LLSettingsSky::defaults(); + + dfltsetting[SETTING_FRAMES] = frames; return dfltsetting; } @@ -281,6 +298,8 @@ void LLSettingsDay::blend(const LLSettingsBase::ptr_t &other, F64 mix) LL_ERRS("DAYCYCLE") << "Day cycles are not blendable!" << LL_ENDL; } +#pragma optimize("", off) + namespace { bool validateDayCycleTrack(LLSD &value) @@ -298,6 +317,8 @@ namespace S32 index = 0; while (index < (*track).size()) { + LLSD& elem = (*track)[index]; + ++framecount; if (index >= LLSettingsDay::FRAME_MAX) { @@ -305,40 +326,46 @@ namespace continue; } - if (!(*track)[index].has(LLSettingsDay::SETTING_KEYKFRAME) || - !(*track)[index][LLSettingsDay::SETTING_KEYKFRAME].isReal()) + if (!elem.has(LLSettingsDay::SETTING_KEYKFRAME)) + { + (*track).erase(index); + continue; + } + + if (!elem[LLSettingsDay::SETTING_KEYKFRAME].isReal()) { (*track).erase(index); continue; } - if (!(*track)[index].has(LLSettingsDay::SETTING_KEYNAME) && - !(*track)[index].has(LLSettingsDay::SETTING_KEYID)) + if (!elem.has(LLSettingsDay::SETTING_KEYNAME) && + !elem.has(LLSettingsDay::SETTING_KEYID)) { (*track).erase(index); continue; } - F32 frame = (*track)[index][LLSettingsDay::SETTING_KEYKFRAME].asReal(); + F32 frame = elem[LLSettingsDay::SETTING_KEYKFRAME].asReal(); if ((frame < 0.0) || (frame > 1.0)) { frame = llclamp(frame, 0.0f, 1.0f); - (*track)[index][LLSettingsDay::SETTING_KEYKFRAME] = frame; + elem[LLSettingsDay::SETTING_KEYKFRAME] = frame; } ++index; } } - framecount -= value[0].size(); + int waterTracks = value[0].size(); + int skyTracks = framecount - waterTracks; - if (value[0].size() < 1) + if (waterTracks < 1) { LL_WARNS("SETTINGS") << "Missing water track" << LL_ENDL; return false; } - if (framecount < 1) + if (skyTracks < 1) { LL_WARNS("SETTINGS") << "Missing sky tracks" << LL_ENDL; return false; @@ -404,6 +431,7 @@ namespace } } +#pragma optimize("", on) LLSettingsDay::validation_list_t LLSettingsDay::getValidationList() const { return LLSettingsDay::validationList(); diff --git a/indra/llinventory/llsettingssky.cpp b/indra/llinventory/llsettingssky.cpp index ff3f5224dd..c2d92fdd38 100644 --- a/indra/llinventory/llsettingssky.cpp +++ b/indra/llinventory/llsettingssky.cpp @@ -54,9 +54,14 @@ const F32 LLSettingsSky::NIGHTTIME_ELEVATION_COS((F32)sin(NIGHTTIME_ELEVATION*DE //========================================================================= const std::string LLSettingsSky::SETTING_AMBIENT("ambient"); -const std::string LLSettingsSky::SETTING_BLOOM_TEXTUREID("bloom_id"); const std::string LLSettingsSky::SETTING_BLUE_DENSITY("blue_density"); const std::string LLSettingsSky::SETTING_BLUE_HORIZON("blue_horizon"); +const std::string LLSettingsSky::SETTING_DENSITY_MULTIPLIER("density_multiplier"); +const std::string LLSettingsSky::SETTING_DISTANCE_MULTIPLIER("distance_multiplier"); +const std::string LLSettingsSky::SETTING_HAZE_DENSITY("haze_density"); +const std::string LLSettingsSky::SETTING_HAZE_HORIZON("haze_horizon"); + +const std::string LLSettingsSky::SETTING_BLOOM_TEXTUREID("bloom_id"); const std::string LLSettingsSky::SETTING_CLOUD_COLOR("cloud_color"); const std::string LLSettingsSky::SETTING_CLOUD_POS_DENSITY1("cloud_pos_density1"); const std::string LLSettingsSky::SETTING_CLOUD_POS_DENSITY2("cloud_pos_density2"); @@ -64,14 +69,12 @@ const std::string LLSettingsSky::SETTING_CLOUD_SCALE("cloud_scale"); const std::string LLSettingsSky::SETTING_CLOUD_SCROLL_RATE("cloud_scroll_rate"); const std::string LLSettingsSky::SETTING_CLOUD_SHADOW("cloud_shadow"); const std::string LLSettingsSky::SETTING_CLOUD_TEXTUREID("cloud_id"); -const std::string LLSettingsSky::SETTING_DENSITY_MULTIPLIER("density_multiplier"); -const std::string LLSettingsSky::SETTING_DISTANCE_MULTIPLIER("distance_multiplier"); + const std::string LLSettingsSky::SETTING_DOME_OFFSET("dome_offset"); const std::string LLSettingsSky::SETTING_DOME_RADIUS("dome_radius"); const std::string LLSettingsSky::SETTING_GAMMA("gamma"); const std::string LLSettingsSky::SETTING_GLOW("glow"); -const std::string LLSettingsSky::SETTING_HAZE_DENSITY("haze_density"); -const std::string LLSettingsSky::SETTING_HAZE_HORIZON("haze_horizon"); + const std::string LLSettingsSky::SETTING_LIGHT_NORMAL("lightnorm"); const std::string LLSettingsSky::SETTING_MAX_Y("max_y"); const std::string LLSettingsSky::SETTING_MOON_ROTATION("moon_rotation"); @@ -246,12 +249,12 @@ LLSettingsSky::validation_list_t LLSettingsSky::validationList() // copy constructor for LLSDArray. Directly binding the LLSDArray as // a parameter without first wrapping it in a pure LLSD object will result // in deeply nested arrays like this [[[[[[[[[[v1,v2,v3]]]]]]]]]] - + +#if SUPPORT_LEGACY_ATMOSPHERICS validation.push_back(Validator(SETTING_AMBIENT, true, LLSD::TypeArray, boost::bind(&Validator::verifyVectorMinMax, _1, LLSD(LLSDArray(0.0f)(0.0f)(0.0f)("*")), LLSD(LLSDArray(3.0f)(3.0f)(3.0f)("*"))))); - validation.push_back(Validator(SETTING_BLOOM_TEXTUREID, true, LLSD::TypeUUID)); validation.push_back(Validator(SETTING_BLUE_DENSITY, true, LLSD::TypeArray, boost::bind(&Validator::verifyVectorMinMax, _1, LLSD(LLSDArray(0.0f)(0.0f)(0.0f)("*")), @@ -260,6 +263,18 @@ LLSettingsSky::validation_list_t LLSettingsSky::validationList() boost::bind(&Validator::verifyVectorMinMax, _1, LLSD(LLSDArray(0.0f)(0.0f)(0.0f)("*")), LLSD(LLSDArray(2.0f)(2.0f)(2.0f)("*"))))); + validation.push_back(Validator(SETTING_DENSITY_MULTIPLIER, true, LLSD::TypeReal, + boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(0.0009f))))); + validation.push_back(Validator(SETTING_DISTANCE_MULTIPLIER, true, LLSD::TypeReal, + boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(100.0f))))); + validation.push_back(Validator(SETTING_HAZE_DENSITY, true, LLSD::TypeReal, + boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(4.0f))))); + validation.push_back(Validator(SETTING_HAZE_HORIZON, true, LLSD::TypeReal, + boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(1.0f))))); + +#endif + + validation.push_back(Validator(SETTING_BLOOM_TEXTUREID, true, LLSD::TypeUUID)); validation.push_back(Validator(SETTING_CLOUD_COLOR, true, LLSD::TypeArray, boost::bind(&Validator::verifyVectorMinMax, _1, LLSD(LLSDArray(0.0f)(0.0f)(0.0f)("*")), @@ -281,10 +296,7 @@ LLSettingsSky::validation_list_t LLSettingsSky::validationList() validation.push_back(Validator(SETTING_CLOUD_SHADOW, true, LLSD::TypeReal, boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(1.0f))))); validation.push_back(Validator(SETTING_CLOUD_TEXTUREID, false, LLSD::TypeUUID)); - validation.push_back(Validator(SETTING_DENSITY_MULTIPLIER, true, LLSD::TypeReal, - boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(0.0009f))))); - validation.push_back(Validator(SETTING_DISTANCE_MULTIPLIER, true, LLSD::TypeReal, - boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(100.0f))))); + validation.push_back(Validator(SETTING_DOME_OFFSET, false, LLSD::TypeReal, boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(1.0f))))); validation.push_back(Validator(SETTING_DOME_RADIUS, false, LLSD::TypeReal, @@ -295,10 +307,7 @@ LLSettingsSky::validation_list_t LLSettingsSky::validationList() boost::bind(&Validator::verifyVectorMinMax, _1, LLSD(LLSDArray(0.2f)("*")(-2.5f)("*")), LLSD(LLSDArray(20.0f)("*")(0.0f)("*"))))); - validation.push_back(Validator(SETTING_HAZE_DENSITY, true, LLSD::TypeReal, - boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(4.0f))))); - validation.push_back(Validator(SETTING_HAZE_HORIZON, true, LLSD::TypeReal, - boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(1.0f))))); + validation.push_back(Validator(SETTING_LIGHT_NORMAL, false, LLSD::TypeArray, boost::bind(&Validator::verifyVectorNormalized, _1, 3))); validation.push_back(Validator(SETTING_MAX_Y, true, LLSD::TypeReal, @@ -330,6 +339,51 @@ LLSettingsSky::validation_list_t LLSettingsSky::validationList() return validation; } +LLSD LLSettingsSky::rayleighConfigDefault() +{ + LLSD dflt_rayleigh; + dflt_rayleigh[SETTING_DENSITY_PROFILE_WIDTH] = 0.0f; // 0 -> the entire atmosphere + dflt_rayleigh[SETTING_DENSITY_PROFILE_EXP_TERM] = 1.0f; + dflt_rayleigh[SETTING_DENSITY_PROFILE_EXP_SCALE_FACTOR] = -1.0f / 8000.0f; + dflt_rayleigh[SETTING_DENSITY_PROFILE_LINEAR_TERM] = 0.0f; + dflt_rayleigh[SETTING_DENSITY_PROFILE_CONSTANT_TERM] = 0.0f; + return dflt_rayleigh; +} + +LLSD LLSettingsSky::absorptionConfigDefault() +{ +// absorption (ozone) has two linear ramping zones + LLSD dflt_absorption_layer_a; + dflt_absorption_layer_a[SETTING_DENSITY_PROFILE_WIDTH] = 25000.0f; // 0 -> the entire atmosphere + dflt_absorption_layer_a[SETTING_DENSITY_PROFILE_EXP_TERM] = 0.0f; + dflt_absorption_layer_a[SETTING_DENSITY_PROFILE_EXP_SCALE_FACTOR] = 0.0f; + dflt_absorption_layer_a[SETTING_DENSITY_PROFILE_LINEAR_TERM] = -1.0f / 25000.0f; + dflt_absorption_layer_a[SETTING_DENSITY_PROFILE_CONSTANT_TERM] = -2.0f / 3.0f; + + LLSD dflt_absorption_layer_b; + dflt_absorption_layer_b[SETTING_DENSITY_PROFILE_WIDTH] = 0.0f; // 0 -> remainder of the atmosphere + dflt_absorption_layer_b[SETTING_DENSITY_PROFILE_EXP_TERM] = 0.0f; + dflt_absorption_layer_b[SETTING_DENSITY_PROFILE_EXP_SCALE_FACTOR] = 0.0f; + dflt_absorption_layer_b[SETTING_DENSITY_PROFILE_LINEAR_TERM] = -1.0f / 15000.0f; + dflt_absorption_layer_b[SETTING_DENSITY_PROFILE_CONSTANT_TERM] = 8.0f / 3.0f; + + LLSD dflt_absorption; + dflt_absorption.append(dflt_absorption_layer_a); + dflt_absorption.append(dflt_absorption_layer_b); + return dflt_absorption; +} + +LLSD LLSettingsSky::mieConfigDefault() +{ + LLSD dflt_mie; + dflt_mie[SETTING_DENSITY_PROFILE_WIDTH] = 0.0f; // 0 -> the entire atmosphere + dflt_mie[SETTING_DENSITY_PROFILE_EXP_TERM] = 1.0f; + dflt_mie[SETTING_DENSITY_PROFILE_EXP_SCALE_FACTOR] = -1.0f / 1200.0f; + dflt_mie[SETTING_DENSITY_PROFILE_LINEAR_TERM] = 0.0f; + dflt_mie[SETTING_DENSITY_PROFILE_CONSTANT_TERM] = 0.0f; + dflt_mie[SETTING_MIE_ANISOTROPY_FACTOR] = 0.9f; + return dflt_mie; +} LLSD LLSettingsSky::defaults() { @@ -341,23 +395,28 @@ LLSD LLSettingsSky::defaults() LLQuaternion moonquat = ~sunquat; // Magic constants copied form dfltsetting.xml +#if SUPPORT_LEGACY_ATMOSPHERICS dfltsetting[SETTING_AMBIENT] = LLColor4::white.getValue(); dfltsetting[SETTING_BLUE_DENSITY] = LLColor4(0.2447, 0.4487, 0.7599, 0.0).getValue(); dfltsetting[SETTING_BLUE_HORIZON] = LLColor4(0.4954, 0.4954, 0.6399, 0.0).getValue(); + dfltsetting[SETTING_DENSITY_MULTIPLIER] = LLSD::Real(0.0001); + dfltsetting[SETTING_DISTANCE_MULTIPLIER] = LLSD::Real(0.8000); + dfltsetting[SETTING_HAZE_DENSITY] = LLSD::Real(0.6999); + dfltsetting[SETTING_HAZE_HORIZON] = LLSD::Real(0.1899); +#endif + dfltsetting[SETTING_CLOUD_COLOR] = LLColor4(0.4099, 0.4099, 0.4099, 0.0).getValue(); dfltsetting[SETTING_CLOUD_POS_DENSITY1] = LLColor4(1.0000, 0.5260, 1.0000, 0.0).getValue(); dfltsetting[SETTING_CLOUD_POS_DENSITY2] = LLColor4(1.0000, 0.5260, 1.0000, 0.0).getValue(); dfltsetting[SETTING_CLOUD_SCALE] = LLSD::Real(0.4199); dfltsetting[SETTING_CLOUD_SCROLL_RATE] = LLSDArray(10.1999)(10.0109); dfltsetting[SETTING_CLOUD_SHADOW] = LLSD::Real(0.2699); - dfltsetting[SETTING_DENSITY_MULTIPLIER] = LLSD::Real(0.0001); - dfltsetting[SETTING_DISTANCE_MULTIPLIER] = LLSD::Real(0.8000); + dfltsetting[SETTING_DOME_OFFSET] = LLSD::Real(0.96f); dfltsetting[SETTING_DOME_RADIUS] = LLSD::Real(15000.f); dfltsetting[SETTING_GAMMA] = LLSD::Real(1.0); dfltsetting[SETTING_GLOW] = LLColor4(5.000, 0.0010, -0.4799, 1.0).getValue(); - dfltsetting[SETTING_HAZE_DENSITY] = LLSD::Real(0.6999); - dfltsetting[SETTING_HAZE_HORIZON] = LLSD::Real(0.1899); + dfltsetting[SETTING_LIGHT_NORMAL] = LLVector3(0.0000, 0.9126, -0.4086).getValue(); dfltsetting[SETTING_MAX_Y] = LLSD::Real(1605); dfltsetting[SETTING_MOON_ROTATION] = moonquat.getValue(); @@ -377,46 +436,9 @@ LLSD LLSettingsSky::defaults() dfltsetting[SETTING_SKY_BOTTOM_RADIUS] = 6360.0f; dfltsetting[SETTING_SKY_TOP_RADIUS] = 6420.0f; dfltsetting[SETTING_SUN_ARC_RADIANS] = 0.00935f / 2.0f; - - LLSD dflt_rayleigh; - dflt_rayleigh[SETTING_DENSITY_PROFILE_WIDTH] = 0.0f; // 0 -> the entire atmosphere - dflt_rayleigh[SETTING_DENSITY_PROFILE_EXP_TERM] = 1.0f; - dflt_rayleigh[SETTING_DENSITY_PROFILE_EXP_SCALE_FACTOR] = -1.0f / 8000.0f; - dflt_rayleigh[SETTING_DENSITY_PROFILE_LINEAR_TERM] = 0.0f; - dflt_rayleigh[SETTING_DENSITY_PROFILE_CONSTANT_TERM] = 0.0f; - - dfltsetting[SETTING_RAYLEIGH_CONFIG] = dflt_rayleigh; - - LLSD dflt_mie; - dflt_mie[SETTING_DENSITY_PROFILE_WIDTH] = 0.0f; // 0 -> the entire atmosphere - dflt_mie[SETTING_DENSITY_PROFILE_EXP_TERM] = 1.0f; - dflt_mie[SETTING_DENSITY_PROFILE_EXP_SCALE_FACTOR] = -1.0f / 1200.0f; - dflt_mie[SETTING_DENSITY_PROFILE_LINEAR_TERM] = 0.0f; - dflt_mie[SETTING_DENSITY_PROFILE_CONSTANT_TERM] = 0.0f; - dflt_mie[SETTING_MIE_ANISOTROPY_FACTOR] = 0.9f; - - dfltsetting[SETTING_MIE_CONFIG] = dflt_mie; - - // absorption (ozone) has two linear ramping zones - LLSD dflt_absorption_a; - dflt_absorption_a[SETTING_DENSITY_PROFILE_WIDTH] = 25000.0f; // 0 -> the entire atmosphere - dflt_absorption_a[SETTING_DENSITY_PROFILE_EXP_TERM] = 0.0f; - dflt_absorption_a[SETTING_DENSITY_PROFILE_EXP_SCALE_FACTOR] = 0.0f; - dflt_absorption_a[SETTING_DENSITY_PROFILE_LINEAR_TERM] = -1.0f / 25000.0f; - dflt_absorption_a[SETTING_DENSITY_PROFILE_CONSTANT_TERM] = -2.0f / 3.0f; - - LLSD dflt_absorption_b; - dflt_absorption_b[SETTING_DENSITY_PROFILE_WIDTH] = 0.0f; // 0 -> remainder of the atmosphere - dflt_absorption_b[SETTING_DENSITY_PROFILE_EXP_TERM] = 0.0f; - dflt_absorption_b[SETTING_DENSITY_PROFILE_EXP_SCALE_FACTOR] = 0.0f; - dflt_absorption_b[SETTING_DENSITY_PROFILE_LINEAR_TERM] = -1.0f / 15000.0f; - dflt_absorption_b[SETTING_DENSITY_PROFILE_CONSTANT_TERM] = 8.0f / 3.0f; - - LLSD wtf; - wtf.append(dflt_absorption_a); - wtf.append(dflt_absorption_b); - - dfltsetting[SETTING_ABSORPTION_CONFIG] = wtf; + dfltsetting[SETTING_RAYLEIGH_CONFIG] = rayleighConfigDefault(); + dfltsetting[SETTING_MIE_CONFIG] = mieConfigDefault(); + dfltsetting[SETTING_ABSORPTION_CONFIG] = absorptionConfigDefault(); return dfltsetting; } @@ -560,6 +582,9 @@ LLSD LLSettingsSky::translateLegacySettings(LLSD legacy) { LLSD newsettings(defaults()); +// AdvancedAtmospherics TODO +// These need to be translated into density profile info in the new settings format... +#if SUPPORT_LEGACY_ATMOSPHERICS if (legacy.has(SETTING_AMBIENT)) { newsettings[SETTING_AMBIENT] = LLColor3(legacy[SETTING_AMBIENT]).getValue(); @@ -572,6 +597,39 @@ LLSD LLSettingsSky::translateLegacySettings(LLSD legacy) { newsettings[SETTING_BLUE_HORIZON] = LLColor3(legacy[SETTING_BLUE_HORIZON]).getValue(); } + if (legacy.has(SETTING_DENSITY_MULTIPLIER)) + { + newsettings[SETTING_DENSITY_MULTIPLIER] = LLSD::Real(legacy[SETTING_DENSITY_MULTIPLIER][0].asReal()); + } + if (legacy.has(SETTING_DISTANCE_MULTIPLIER)) + { + newsettings[SETTING_DISTANCE_MULTIPLIER] = LLSD::Real(legacy[SETTING_DISTANCE_MULTIPLIER][0].asReal()); + } + if (legacy.has(SETTING_HAZE_DENSITY)) + { + newsettings[SETTING_HAZE_DENSITY] = LLSD::Real(legacy[SETTING_HAZE_DENSITY][0].asReal()); + } + if (legacy.has(SETTING_HAZE_HORIZON)) + { + newsettings[SETTING_HAZE_HORIZON] = LLSD::Real(legacy[SETTING_HAZE_HORIZON][0].asReal()); + } +#endif + + if (!legacy.has(SETTING_RAYLEIGH_CONFIG)) + { + newsettings[SETTING_RAYLEIGH_CONFIG] = rayleighConfigDefault(); + } + + if (!legacy.has(SETTING_ABSORPTION_CONFIG)) + { + newsettings[SETTING_ABSORPTION_CONFIG] = absorptionConfigDefault(); + } + + if (!legacy.has(SETTING_MIE_CONFIG)) + { + newsettings[SETTING_MIE_CONFIG] = mieConfigDefault(); + } + if (legacy.has(SETTING_CLOUD_COLOR)) { newsettings[SETTING_CLOUD_COLOR] = LLColor3(legacy[SETTING_CLOUD_COLOR]).getValue(); @@ -607,14 +665,8 @@ LLSD LLSettingsSky::translateLegacySettings(LLSD legacy) { newsettings[SETTING_CLOUD_SHADOW] = LLSD::Real(legacy[SETTING_CLOUD_SHADOW][0].asReal()); } - if (legacy.has(SETTING_DENSITY_MULTIPLIER)) - { - newsettings[SETTING_DENSITY_MULTIPLIER] = LLSD::Real(legacy[SETTING_DENSITY_MULTIPLIER][0].asReal()); - } - if (legacy.has(SETTING_DISTANCE_MULTIPLIER)) - { - newsettings[SETTING_DISTANCE_MULTIPLIER] = LLSD::Real(legacy[SETTING_DISTANCE_MULTIPLIER][0].asReal()); - } + + if (legacy.has(SETTING_GAMMA)) { newsettings[SETTING_GAMMA] = legacy[SETTING_GAMMA][0].asReal(); @@ -623,14 +675,7 @@ LLSD LLSettingsSky::translateLegacySettings(LLSD legacy) { newsettings[SETTING_GLOW] = LLColor3(legacy[SETTING_GLOW]).getValue(); } - if (legacy.has(SETTING_HAZE_DENSITY)) - { - newsettings[SETTING_HAZE_DENSITY] = LLSD::Real(legacy[SETTING_HAZE_DENSITY][0].asReal()); - } - if (legacy.has(SETTING_HAZE_HORIZON)) - { - newsettings[SETTING_HAZE_HORIZON] = LLSD::Real(legacy[SETTING_HAZE_HORIZON][0].asReal()); - } + if (legacy.has(SETTING_LIGHT_NORMAL)) { newsettings[SETTING_LIGHT_NORMAL] = LLVector3(legacy[SETTING_LIGHT_NORMAL]).getValue(); @@ -648,6 +693,44 @@ LLSD LLSettingsSky::translateLegacySettings(LLSD legacy) newsettings[SETTING_SUNLIGHT_COLOR] = LLColor4(legacy[SETTING_SUNLIGHT_COLOR]).getValue(); } + if (legacy.has(SETTING_PLANET_RADIUS)) + { + newsettings[SETTING_PLANET_RADIUS] = LLSD::Real(legacy[SETTING_PLANET_RADIUS].asReal()); + } + else + { + newsettings[SETTING_PLANET_RADIUS] = 6360.0f; + } + + if (legacy.has(SETTING_SKY_BOTTOM_RADIUS)) + { + newsettings[SETTING_SKY_BOTTOM_RADIUS] = LLSD::Real(legacy[SETTING_SKY_BOTTOM_RADIUS].asReal()); + } + else + { + newsettings[SETTING_SKY_BOTTOM_RADIUS] = 6360.0f; + } + + if (legacy.has(SETTING_SKY_TOP_RADIUS)) + { + newsettings[SETTING_SKY_TOP_RADIUS] = LLSD::Real(legacy[SETTING_SKY_TOP_RADIUS].asReal()); + } + else + { + newsettings[SETTING_SKY_TOP_RADIUS] = 6420.0f; + } + + if (legacy.has(SETTING_SUN_ARC_RADIANS)) + { + newsettings[SETTING_SUN_ARC_RADIANS] = LLSD::Real(legacy[SETTING_SUN_ARC_RADIANS].asReal()); + } + else + { + newsettings[SETTING_SUN_ARC_RADIANS] = 0.00935f / 2.0f; + } + + + if (legacy.has(SETTING_LEGACY_EAST_ANGLE) && legacy.has(SETTING_LEGACY_SUN_ANGLE)) { // convert the east and sun angles into a quaternion. F32 azimuth = legacy[SETTING_LEGACY_EAST_ANGLE].asReal(); @@ -716,6 +799,8 @@ void LLSettingsSky::calculateHeavnlyBodyPositions() void LLSettingsSky::calculateLightSettings() { + +#if SUPPORT_LEGACY_ATMOSPHERICS LLColor3 vary_HazeColor; LLColor3 vary_SunlightColor; LLColor3 vary_AmbientColor; @@ -804,6 +889,8 @@ void LLSettingsSky::calculateLightSettings() mFadeColor = mTotalAmbient + (mSunDiffuse + mMoonDiffuse) * 0.5f; mFadeColor.setAlpha(0); +#endif + } diff --git a/indra/llinventory/llsettingssky.h b/indra/llinventory/llsettingssky.h index 1d860016fb..3c5e271d39 100644 --- a/indra/llinventory/llsettingssky.h +++ b/indra/llinventory/llsettingssky.h @@ -31,13 +31,20 @@ #include "llsettingsbase.h" #include "v4coloru.h" +#define SUPPORT_LEGACY_ATMOSPHERICS 1 + class LLSettingsSky: public LLSettingsBase { public: + static const std::string SETTING_AMBIENT; - static const std::string SETTING_BLOOM_TEXTUREID; static const std::string SETTING_BLUE_DENSITY; static const std::string SETTING_BLUE_HORIZON; + static const std::string SETTING_DENSITY_MULTIPLIER; + static const std::string SETTING_DISTANCE_MULTIPLIER; + static const std::string SETTING_HAZE_DENSITY; + static const std::string SETTING_HAZE_HORIZON; + static const std::string SETTING_BLOOM_TEXTUREID; static const std::string SETTING_CLOUD_COLOR; static const std::string SETTING_CLOUD_POS_DENSITY1; static const std::string SETTING_CLOUD_POS_DENSITY2; @@ -45,14 +52,10 @@ public: static const std::string SETTING_CLOUD_SCROLL_RATE; static const std::string SETTING_CLOUD_SHADOW; static const std::string SETTING_CLOUD_TEXTUREID; - static const std::string SETTING_DENSITY_MULTIPLIER; - static const std::string SETTING_DISTANCE_MULTIPLIER; static const std::string SETTING_DOME_OFFSET; static const std::string SETTING_DOME_RADIUS; static const std::string SETTING_GAMMA; - static const std::string SETTING_GLOW; - static const std::string SETTING_HAZE_DENSITY; - static const std::string SETTING_HAZE_HORIZON; + static const std::string SETTING_GLOW; static const std::string SETTING_LIGHT_NORMAL; static const std::string SETTING_MAX_Y; static const std::string SETTING_MOON_ROTATION; @@ -96,7 +99,13 @@ public: static LLSD defaults(); + LLUUID getBloomTextureId() const + { + return mSettings[SETTING_BLOOM_TEXTUREID].asUUID(); + } + //--------------------------------------------------------------------- +#if SUPPORT_LEGACY_ATMOSPHERICS LLColor3 getAmbientColor() const { return LLColor3(mSettings[SETTING_AMBIENT]); @@ -107,11 +116,6 @@ public: setValue(SETTING_AMBIENT, val); } - LLUUID getBloomTextureId() const - { - return mSettings[SETTING_BLOOM_TEXTUREID].asUUID(); - } - LLColor3 getBlueDensity() const { return LLColor3(mSettings[SETTING_BLUE_DENSITY]); @@ -132,6 +136,47 @@ public: setValue(SETTING_BLUE_HORIZON, val); } + F32 getDensityMultiplier() const + { + return mSettings[SETTING_DENSITY_MULTIPLIER].asReal(); + } + + void setDensityMultiplier(F32 val) + { + setValue(SETTING_DENSITY_MULTIPLIER, val); + } + + F32 getDistanceMultiplier() const + { + return mSettings[SETTING_DISTANCE_MULTIPLIER].asReal(); + } + + void setDistanceMultiplier(F32 val) + { + setValue(SETTING_DISTANCE_MULTIPLIER, val); + } + + F32 getHazeDensity() const + { + return mSettings[SETTING_HAZE_DENSITY].asReal(); + } + + void setHazeDensity(F32 val) + { + setValue(SETTING_HAZE_DENSITY, val); + } + + F32 getHazeHorizon() const + { + return mSettings[SETTING_HAZE_HORIZON].asReal(); + } + + void setHazeHorizon(F32 val) + { + setValue(SETTING_HAZE_HORIZON, val); + } +#endif + LLColor3 getCloudColor() const { return LLColor3(mSettings[SETTING_CLOUD_COLOR]); @@ -209,26 +254,7 @@ public: setValue(SETTING_CLOUD_SHADOW, val); } - F32 getDensityMultiplier() const - { - return mSettings[SETTING_DENSITY_MULTIPLIER].asReal(); - } - - void setDensityMultiplier(F32 val) - { - setValue(SETTING_DENSITY_MULTIPLIER, val); - } - - F32 getDistanceMultiplier() const - { - return mSettings[SETTING_DISTANCE_MULTIPLIER].asReal(); - } - - void setDistanceMultiplier(F32 val) - { - setValue(SETTING_DISTANCE_MULTIPLIER, val); - } - + F32 getDomeOffset() const { return DOME_OFFSET; @@ -262,26 +288,6 @@ public: setValue(SETTING_GLOW, val); } - F32 getHazeDensity() const - { - return mSettings[SETTING_HAZE_DENSITY].asReal(); - } - - void setHazeDensity(F32 val) - { - setValue(SETTING_HAZE_DENSITY, val); - } - - F32 getHazeHorizon() const - { - return mSettings[SETTING_HAZE_HORIZON].asReal(); - } - - void setHazeHorizon(F32 val) - { - setValue(SETTING_HAZE_HORIZON, val); - } - LLVector3 getLightNormal() const { return LLVector3(mSettings[SETTING_LIGHT_NORMAL]); @@ -450,6 +456,10 @@ private: static validation_list_t absorptionValidationList(); static validation_list_t mieValidationList(); + static LLSD rayleighConfigDefault(); + static LLSD absorptionConfigDefault(); + static LLSD mieConfigDefault(); + static const F32 NIGHTTIME_ELEVATION; static const F32 NIGHTTIME_ELEVATION_COS; diff --git a/indra/newview/app_settings/shaders/class3/windlight/advancedAtmoF.glsl b/indra/newview/app_settings/shaders/class3/windlight/advancedAtmoF.glsl index c71eaf4b13..d27363a60c 100644 --- a/indra/newview/app_settings/shaders/class3/windlight/advancedAtmoF.glsl +++ b/indra/newview/app_settings/shaders/class3/windlight/advancedAtmoF.glsl @@ -33,9 +33,7 @@ in vec3 view_dir; uniform vec3 cameraPosLocal; uniform vec3 sun_direction; -uniform vec2 sun_size; -uniform sampler2D cloud_noise_texture; uniform sampler2D transmittance_texture; uniform sampler3D scattering_texture; uniform sampler3D mie_scattering_texture; diff --git a/indra/newview/app_settings/shaders/class3/windlight/skyF.glsl b/indra/newview/app_settings/shaders/class3/windlight/skyF.glsl index e2a2367626..c71eaf4b13 100644 --- a/indra/newview/app_settings/shaders/class3/windlight/skyF.glsl +++ b/indra/newview/app_settings/shaders/class3/windlight/skyF.glsl @@ -1,5 +1,5 @@ /** - * @file WLSkyF.glsl + * @file advancedAtmoF.glsl * * $LicenseInfo:firstyear=2005&license=viewerlgpl$ * Second Life Viewer Source Code @@ -29,37 +29,43 @@ out vec4 frag_color; #define frag_color gl_FragColor #endif -///////////////////////////////////////////////////////////////////////// -// The fragment shader for the sky -///////////////////////////////////////////////////////////////////////// +in vec3 view_dir; -VARYING vec4 vary_HazeColor; +uniform vec3 cameraPosLocal; +uniform vec3 sun_direction; +uniform vec2 sun_size; uniform sampler2D cloud_noise_texture; -uniform vec4 gamma; +uniform sampler2D transmittance_texture; +uniform sampler3D scattering_texture; +uniform sampler3D mie_scattering_texture; -/// Soft clips the light with a gamma correction -vec3 scaleSoftClip(vec3 light) { - //soft clip effect: - light = 1. - clamp(light, vec3(0.), vec3(1.)); - light = 1. - pow(light, gamma.xxx); - - return light; -} +vec3 GetSolarLuminance(); +vec3 GetSkyLuminance(vec3 camPos, vec3 view_dir, float shadow_length, vec3 sun_dir, out vec3 transmittance); +vec3 GetSkyLuminanceToPoint(vec3 camPos, vec3 pos, float shadow_length, vec3 sun_dir, out vec3 transmittance); +vec3 GetSunAndSkyIlluminance(vec3 pos, vec3 norm, vec3 sun_dir, out vec3 sky_irradiance); void main() { - // Potential Fill-rate optimization. Add cloud calculation - // back in and output alpha of 0 (so that alpha culling kills - // the fragment) if the sky wouldn't show up because the clouds - // are fully opaque. + vec3 view_direction = normalize(view_dir); + + vec3 camPos = cameraPosLocal; + vec3 transmittance; + vec3 radiance = GetSkyLuminance(camPos, view_direction, 0.0f, sun_direction, transmittance); - vec4 color; - color = vary_HazeColor; - color *= 2.; + radiance *= transmittance; - /// Gamma correct for WL (soft clip effect). - frag_color.rgb = scaleSoftClip(color.rgb); - frag_color.a = 1.0; + // If the view ray intersects the Sun, add the Sun radiance. + if (dot(view_direction, sun_direction) >= sun_size.y) + { + radiance = radiance + transmittance * GetSolarLuminance(); + } + + vec3 color = vec3(1.0) - exp(-radiance); + color = pow(color, vec3(1.0 / 2.2)); + + frag_color.rgb = color; + + frag_color.a = 1.0; } diff --git a/indra/newview/app_settings/shaders/class3/windlight/skyV.glsl b/indra/newview/app_settings/shaders/class3/windlight/skyV.glsl index 3788ddaf2d..52a7595379 100644 --- a/indra/newview/app_settings/shaders/class3/windlight/skyV.glsl +++ b/indra/newview/app_settings/shaders/class3/windlight/skyV.glsl @@ -1,5 +1,5 @@ /** - * @file WLSkyV.glsl + * @file advancedAtmoV.glsl * * $LicenseInfo:firstyear=2005&license=viewerlgpl$ * Second Life Viewer Source Code @@ -27,130 +27,17 @@ uniform mat4 modelview_projection_matrix; ATTRIBUTE vec3 position; -// SKY //////////////////////////////////////////////////////////////////////// -// The vertex shader for creating the atmospheric sky -/////////////////////////////////////////////////////////////////////////////// - -// Output parameters -VARYING vec4 vary_HazeColor; - // Inputs uniform vec3 camPosLocal; -uniform vec4 lightnorm; -uniform vec4 sunlight_color; -uniform vec4 ambient; -uniform vec4 blue_horizon; -uniform vec4 blue_density; -uniform float haze_horizon; -uniform float haze_density; - -uniform float cloud_shadow; -uniform float density_multiplier; -uniform float max_y; - -uniform vec4 glow; - -uniform vec4 cloud_color; +out vec3 view_dir; void main() { - // World / view / projection gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0); - // Get relative position - vec3 P = position.xyz - camPosLocal.xyz + vec3(0,50,0); - //vec3 P = position.xyz + vec3(0,50,0); - - // Set altitude - if (P.y > 0.) - { - P *= (max_y / P.y); - } - else - { - P *= (-32000. / P.y); - } - - // Can normalize then - vec3 Pn = normalize(P); - float Plen = length(P); - - // Initialize temp variables - vec4 temp1 = vec4(0.); - vec4 temp2 = vec4(0.); - vec4 blue_weight; - vec4 haze_weight; - vec4 sunlight = sunlight_color; - vec4 light_atten; - - // Sunlight attenuation effect (hue and brightness) due to atmosphere - // this is used later for sunlight modulation at various altitudes - light_atten = (blue_density + vec4(haze_density * 0.25)) * (density_multiplier * max_y); - - // Calculate relative weights - temp1 = blue_density + haze_density; - blue_weight = blue_density / temp1; - haze_weight = haze_density / temp1; - - // Compute sunlight from P & lightnorm (for long rays like sky) - temp2.y = max(0., max(0., Pn.y) * 1.0 + lightnorm.y ); - temp2.y = 1. / temp2.y; - sunlight *= exp( - light_atten * temp2.y); - - // Distance - temp2.z = Plen * density_multiplier; - - // Transparency (-> temp1) - // ATI Bugfix -- can't store temp1*temp2.z in a variable because the ati - // compiler gets confused. - temp1 = exp(-temp1 * temp2.z); - - - // Compute haze glow - temp2.x = dot(Pn, lightnorm.xyz); - temp2.x = 1. - temp2.x; - // temp2.x is 0 at the sun and increases away from sun - temp2.x = max(temp2.x, .001); - // Set a minimum "angle" (smaller glow.y allows tighter, brighter hotspot) - temp2.x *= glow.x; - // Higher glow.x gives dimmer glow (because next step is 1 / "angle") - temp2.x = pow(temp2.x, glow.z); - // glow.z should be negative, so we're doing a sort of (1 / "angle") function - - // Add "minimum anti-solar illumination" - temp2.x += .25; - - - // Haze color above cloud - vary_HazeColor = ( blue_horizon * blue_weight * (sunlight + ambient) - + (haze_horizon * haze_weight) * (sunlight * temp2.x + ambient) - ); - - - // Increase ambient when there are more clouds - vec4 tmpAmbient = ambient; - tmpAmbient += (1. - tmpAmbient) * cloud_shadow * 0.5; - - // Dim sunlight by cloud shadow percentage - sunlight *= (1. - cloud_shadow); - - // Haze color below cloud - vec4 additiveColorBelowCloud = ( blue_horizon * blue_weight * (sunlight + tmpAmbient) - + (haze_horizon * haze_weight) * (sunlight * temp2.x + tmpAmbient) - ); - - // Final atmosphere additive - vary_HazeColor *= (1. - temp1); - - // Attenuate cloud color by atmosphere - temp1 = sqrt(temp1); //less atmos opacity (more transparency) below clouds - - // At horizon, blend high altitude sky color towards the darker color below the clouds - vary_HazeColor += (additiveColorBelowCloud - vary_HazeColor) * (1. - sqrt(temp1)); - - // won't compile on mac without this being set - //vary_AtmosAttenuation = vec3(0.0,0.0,0.0); + // this will be normalized in the frag shader... + view_dir = position.xyz - camPosLocal.xyz; } diff --git a/indra/newview/app_settings/windlight/skies/A%2D12AM.xml b/indra/newview/app_settings/windlight/skies/A%2D12AM.xml index 0aba31214a..93ef76d73c 100644 --- a/indra/newview/app_settings/windlight/skies/A%2D12AM.xml +++ b/indra/newview/app_settings/windlight/skies/A%2D12AM.xml @@ -137,5 +137,61 @@ <real>0.65999996662139893</real> <real>0.2199999988079071</real> </array> + <key>planet_radius</key> + <real>6360.0</real> + <key>sky_min_radius</key> + <real>6360.0</real> + <key>sky_max_radius</key> + <real>6420.0</real> + <key>rayleigh_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>absorption_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>mie_config</key> + <map> + <key>anisotropy</key> + <real>0.5f</real> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> </map> </llsd> diff --git a/indra/newview/app_settings/windlight/skies/A%2D12PM.xml b/indra/newview/app_settings/windlight/skies/A%2D12PM.xml index 119b3e1418..87b2f09e30 100644 --- a/indra/newview/app_settings/windlight/skies/A%2D12PM.xml +++ b/indra/newview/app_settings/windlight/skies/A%2D12PM.xml @@ -137,5 +137,61 @@ <real>0.89999997615814209</real> <real>0.29999998211860657</real> </array> + <key>planet_radius</key> + <real>6360.0</real> + <key>sky_min_radius</key> + <real>6360.0</real> + <key>sky_max_radius</key> + <real>6420.0</real> + <key>rayleigh_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>absorption_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>mie_config</key> + <map> + <key>anisotropy</key> + <real>0.5f</real> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> </map> </llsd> diff --git a/indra/newview/app_settings/windlight/skies/A%2D3AM.xml b/indra/newview/app_settings/windlight/skies/A%2D3AM.xml index f790d3d961..cf1ce5faf2 100644 --- a/indra/newview/app_settings/windlight/skies/A%2D3AM.xml +++ b/indra/newview/app_settings/windlight/skies/A%2D3AM.xml @@ -137,5 +137,61 @@ <real>1.1399999856948853</real> <real>0.37999999523162842</real> </array> + <key>planet_radius</key> + <real>6360.0</real> + <key>sky_min_radius</key> + <real>6360.0</real> + <key>sky_max_radius</key> + <real>6420.0</real> + <key>rayleigh_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>absorption_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>mie_config</key> + <map> + <key>anisotropy</key> + <real>0.5f</real> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> </map> </llsd> diff --git a/indra/newview/app_settings/windlight/skies/A%2D3PM.xml b/indra/newview/app_settings/windlight/skies/A%2D3PM.xml index ec9706773e..3d94ea0d38 100644 --- a/indra/newview/app_settings/windlight/skies/A%2D3PM.xml +++ b/indra/newview/app_settings/windlight/skies/A%2D3PM.xml @@ -137,5 +137,61 @@ <real>0.89999997615813498</real> <real>0.29999998211860301</real> </array> + <key>planet_radius</key> + <real>6360.0</real> + <key>sky_min_radius</key> + <real>6360.0</real> + <key>sky_max_radius</key> + <real>6420.0</real> + <key>rayleigh_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>absorption_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>mie_config</key> + <map> + <key>anisotropy</key> + <real>0.5f</real> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> </map> </llsd> diff --git a/indra/newview/app_settings/windlight/skies/A%2D6AM.xml b/indra/newview/app_settings/windlight/skies/A%2D6AM.xml index bbc7aeec59..3932f67f29 100644 --- a/indra/newview/app_settings/windlight/skies/A%2D6AM.xml +++ b/indra/newview/app_settings/windlight/skies/A%2D6AM.xml @@ -137,5 +137,61 @@ <real>2.369999885559082</real> <real>0.78999996185302734</real> </array> + <key>planet_radius</key> + <real>6360.0</real> + <key>sky_min_radius</key> + <real>6360.0</real> + <key>sky_max_radius</key> + <real>6420.0</real> + <key>rayleigh_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>absorption_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>mie_config</key> + <map> + <key>anisotropy</key> + <real>0.5f</real> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> </map> </llsd> diff --git a/indra/newview/app_settings/windlight/skies/A%2D6PM.xml b/indra/newview/app_settings/windlight/skies/A%2D6PM.xml index ebf08e1a3f..a597a1245a 100644 --- a/indra/newview/app_settings/windlight/skies/A%2D6PM.xml +++ b/indra/newview/app_settings/windlight/skies/A%2D6PM.xml @@ -137,6 +137,62 @@ <real>2.8385701179504395</real> <real>1</real> </array> + <key>planet_radius</key> + <real>6360.0</real> + <key>sky_min_radius</key> + <real>6360.0</real> + <key>sky_max_radius</key> + <real>6420.0</real> + <key>rayleigh_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>absorption_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>mie_config</key> + <map> + <key>anisotropy</key> + <real>0.5f</real> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> </map> </llsd> diff --git a/indra/newview/app_settings/windlight/skies/A%2D9AM.xml b/indra/newview/app_settings/windlight/skies/A%2D9AM.xml index 413e3a27d9..76f08de1b5 100644 --- a/indra/newview/app_settings/windlight/skies/A%2D9AM.xml +++ b/indra/newview/app_settings/windlight/skies/A%2D9AM.xml @@ -137,5 +137,61 @@ <real>0.89999995470046912</real> <real>0.29999997496605069</real> </array> + <key>planet_radius</key> + <real>6360.0</real> + <key>sky_min_radius</key> + <real>6360.0</real> + <key>sky_max_radius</key> + <real>6420.0</real> + <key>rayleigh_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>absorption_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>mie_config</key> + <map> + <key>anisotropy</key> + <real>0.5f</real> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> </map> </llsd> diff --git a/indra/newview/app_settings/windlight/skies/A%2D9PM.xml b/indra/newview/app_settings/windlight/skies/A%2D9PM.xml index 292f6713b7..771bb564a4 100644 --- a/indra/newview/app_settings/windlight/skies/A%2D9PM.xml +++ b/indra/newview/app_settings/windlight/skies/A%2D9PM.xml @@ -137,5 +137,61 @@ <real>0.66003586768772493</real> <real>0.22001197576412324</real> </array> + <key>planet_radius</key> + <real>6360.0</real> + <key>sky_min_radius</key> + <real>6360.0</real> + <key>sky_max_radius</key> + <real>6420.0</real> + <key>rayleigh_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>absorption_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>mie_config</key> + <map> + <key>anisotropy</key> + <real>0.5f</real> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> </map> </llsd> diff --git a/indra/newview/app_settings/windlight/skies/Barcelona.xml b/indra/newview/app_settings/windlight/skies/Barcelona.xml index ea9cab8fbb..4cc92e9005 100644 --- a/indra/newview/app_settings/windlight/skies/Barcelona.xml +++ b/indra/newview/app_settings/windlight/skies/Barcelona.xml @@ -137,5 +137,61 @@ <real>1.1699999570846558</real> <real>0.38999998569488525</real> </array> + <key>planet_radius</key> + <real>6360.0</real> + <key>sky_min_radius</key> + <real>6360.0</real> + <key>sky_max_radius</key> + <real>6420.0</real> + <key>rayleigh_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>absorption_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>mie_config</key> + <map> + <key>anisotropy</key> + <real>0.5f</real> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> </map> </llsd> diff --git a/indra/newview/app_settings/windlight/skies/Blizzard.xml b/indra/newview/app_settings/windlight/skies/Blizzard.xml index d17d2790a8..84a923d008 100644 --- a/indra/newview/app_settings/windlight/skies/Blizzard.xml +++ b/indra/newview/app_settings/windlight/skies/Blizzard.xml @@ -137,5 +137,61 @@ <real>3</real> <real>1</real> </array> + <key>planet_radius</key> + <real>6360.0</real> + <key>sky_min_radius</key> + <real>6360.0</real> + <key>sky_max_radius</key> + <real>6420.0</real> + <key>rayleigh_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>absorption_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>mie_config</key> + <map> + <key>anisotropy</key> + <real>0.5f</real> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> </map> </llsd> diff --git a/indra/newview/app_settings/windlight/skies/Blue%20Midday.xml b/indra/newview/app_settings/windlight/skies/Blue%20Midday.xml index 570f059961..8cb31d879a 100644 --- a/indra/newview/app_settings/windlight/skies/Blue%20Midday.xml +++ b/indra/newview/app_settings/windlight/skies/Blue%20Midday.xml @@ -137,5 +137,61 @@ <real>1.2300000190734863</real> <real>0.40999999642372131</real> </array> + <key>planet_radius</key> + <real>6360.0</real> + <key>sky_min_radius</key> + <real>6360.0</real> + <key>sky_max_radius</key> + <real>6420.0</real> + <key>rayleigh_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>absorption_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>mie_config</key> + <map> + <key>anisotropy</key> + <real>0.5f</real> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> </map> </llsd> diff --git a/indra/newview/app_settings/windlight/skies/Coastal%20Afternoon.xml b/indra/newview/app_settings/windlight/skies/Coastal%20Afternoon.xml index 4925b29eea..17f5a60209 100644 --- a/indra/newview/app_settings/windlight/skies/Coastal%20Afternoon.xml +++ b/indra/newview/app_settings/windlight/skies/Coastal%20Afternoon.xml @@ -137,5 +137,61 @@ <real>3</real> <real>1</real> </array> + <key>planet_radius</key> + <real>6360.0</real> + <key>sky_min_radius</key> + <real>6360.0</real> + <key>sky_max_radius</key> + <real>6420.0</real> + <key>rayleigh_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>absorption_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>mie_config</key> + <map> + <key>anisotropy</key> + <real>0.5f</real> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> </map> </llsd> diff --git a/indra/newview/app_settings/windlight/skies/Coastal%20Sunset.xml b/indra/newview/app_settings/windlight/skies/Coastal%20Sunset.xml index f4736cf4c6..4f80a3366c 100644 --- a/indra/newview/app_settings/windlight/skies/Coastal%20Sunset.xml +++ b/indra/newview/app_settings/windlight/skies/Coastal%20Sunset.xml @@ -137,5 +137,61 @@ <real>3</real> <real>1</real> </array> + <key>planet_radius</key> + <real>6360.0</real> + <key>sky_min_radius</key> + <real>6360.0</real> + <key>sky_max_radius</key> + <real>6420.0</real> + <key>rayleigh_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>absorption_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>mie_config</key> + <map> + <key>anisotropy</key> + <real>0.5f</real> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> </map> </llsd> diff --git a/indra/newview/app_settings/windlight/skies/Default.xml b/indra/newview/app_settings/windlight/skies/Default.xml index 13a2c75046..381c7fb49d 100644 --- a/indra/newview/app_settings/windlight/skies/Default.xml +++ b/indra/newview/app_settings/windlight/skies/Default.xml @@ -137,5 +137,61 @@ <real>0.89999997615814209</real> <real>0.29999998211860657</real> </array> + <key>planet_radius</key> + <real>6360.0</real> + <key>sky_min_radius</key> + <real>6360.0</real> + <key>sky_max_radius</key> + <real>6420.0</real> + <key>rayleigh_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>absorption_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>mie_config</key> + <map> + <key>anisotropy</key> + <real>0.5f</real> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> </map> </llsd> diff --git a/indra/newview/app_settings/windlight/skies/Desert%20Sunset.xml b/indra/newview/app_settings/windlight/skies/Desert%20Sunset.xml index b2a611163d..39d84a5ced 100644 --- a/indra/newview/app_settings/windlight/skies/Desert%20Sunset.xml +++ b/indra/newview/app_settings/windlight/skies/Desert%20Sunset.xml @@ -137,5 +137,61 @@ <real>2.8385701179504395</real> <real>1</real> </array> + <key>planet_radius</key> + <real>6360.0</real> + <key>sky_min_radius</key> + <real>6360.0</real> + <key>sky_max_radius</key> + <real>6420.0</real> + <key>rayleigh_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>absorption_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>mie_config</key> + <map> + <key>anisotropy</key> + <real>0.5f</real> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> </map> </llsd> diff --git a/indra/newview/app_settings/windlight/skies/Fine%20Day.xml b/indra/newview/app_settings/windlight/skies/Fine%20Day.xml index e053815be1..b15e7c6236 100644 --- a/indra/newview/app_settings/windlight/skies/Fine%20Day.xml +++ b/indra/newview/app_settings/windlight/skies/Fine%20Day.xml @@ -137,5 +137,61 @@ <real>0.59999996423721313</real> <real>2.25</real> </array> + <key>planet_radius</key> + <real>6360.0</real> + <key>sky_min_radius</key> + <real>6360.0</real> + <key>sky_max_radius</key> + <real>6420.0</real> + <key>rayleigh_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>absorption_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>mie_config</key> + <map> + <key>anisotropy</key> + <real>0.5f</real> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> </map> </llsd> diff --git a/indra/newview/app_settings/windlight/skies/Fluffy%20Big%20Clouds.xml b/indra/newview/app_settings/windlight/skies/Fluffy%20Big%20Clouds.xml index 8576ec125c..95dd872736 100644 --- a/indra/newview/app_settings/windlight/skies/Fluffy%20Big%20Clouds.xml +++ b/indra/newview/app_settings/windlight/skies/Fluffy%20Big%20Clouds.xml @@ -137,5 +137,61 @@ <real>1.0199999809265137</real> <real>1.7999999523162842</real> </array> + <key>planet_radius</key> + <real>6360.0</real> + <key>sky_min_radius</key> + <real>6360.0</real> + <key>sky_max_radius</key> + <real>6420.0</real> + <key>rayleigh_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>absorption_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>mie_config</key> + <map> + <key>anisotropy</key> + <real>0.5f</real> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> </map> </llsd> diff --git a/indra/newview/app_settings/windlight/skies/Foggy.xml b/indra/newview/app_settings/windlight/skies/Foggy.xml index cb7395d589..313c922a4e 100644 --- a/indra/newview/app_settings/windlight/skies/Foggy.xml +++ b/indra/newview/app_settings/windlight/skies/Foggy.xml @@ -137,5 +137,61 @@ <real>0.53999996185302734</real> <real>0.17999999225139618</real> </array> + <key>planet_radius</key> + <real>6360.0</real> + <key>sky_min_radius</key> + <real>6360.0</real> + <key>sky_max_radius</key> + <real>6420.0</real> + <key>rayleigh_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>absorption_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>mie_config</key> + <map> + <key>anisotropy</key> + <real>0.5f</real> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> </map> </llsd> diff --git a/indra/newview/app_settings/windlight/skies/Funky%20Funky%20Funky.xml b/indra/newview/app_settings/windlight/skies/Funky%20Funky%20Funky.xml index 32be0d25e6..f627575d31 100644 --- a/indra/newview/app_settings/windlight/skies/Funky%20Funky%20Funky.xml +++ b/indra/newview/app_settings/windlight/skies/Funky%20Funky%20Funky.xml @@ -137,5 +137,61 @@ <real>2.8385701179504395</real> <real>1</real> </array> + <key>planet_radius</key> + <real>6360.0</real> + <key>sky_min_radius</key> + <real>6360.0</real> + <key>sky_max_radius</key> + <real>6420.0</real> + <key>rayleigh_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>absorption_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>mie_config</key> + <map> + <key>anisotropy</key> + <real>0.5f</real> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> </map> </llsd> diff --git a/indra/newview/app_settings/windlight/skies/Funky%20Funky.xml b/indra/newview/app_settings/windlight/skies/Funky%20Funky.xml index ae16b2d135..245fec5999 100644 --- a/indra/newview/app_settings/windlight/skies/Funky%20Funky.xml +++ b/indra/newview/app_settings/windlight/skies/Funky%20Funky.xml @@ -137,5 +137,61 @@ <real>2.2200000286102295</real> <real>0.74000000953674316</real> </array> + <key>planet_radius</key> + <real>6360.0</real> + <key>sky_min_radius</key> + <real>6360.0</real> + <key>sky_max_radius</key> + <real>6420.0</real> + <key>rayleigh_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>absorption_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>mie_config</key> + <map> + <key>anisotropy</key> + <real>0.5f</real> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> </map> </llsd> diff --git a/indra/newview/app_settings/windlight/skies/Gelatto.xml b/indra/newview/app_settings/windlight/skies/Gelatto.xml index 66b3d317b8..69f758d4f5 100644 --- a/indra/newview/app_settings/windlight/skies/Gelatto.xml +++ b/indra/newview/app_settings/windlight/skies/Gelatto.xml @@ -137,5 +137,61 @@ <real>0.37800011038780212</real> <real>0.80999994277954102</real> </array> + <key>planet_radius</key> + <real>6360.0</real> + <key>sky_min_radius</key> + <real>6360.0</real> + <key>sky_max_radius</key> + <real>6420.0</real> + <key>rayleigh_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>absorption_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>mie_config</key> + <map> + <key>anisotropy</key> + <real>0.5f</real> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> </map> </llsd> diff --git a/indra/newview/app_settings/windlight/skies/Ghost.xml b/indra/newview/app_settings/windlight/skies/Ghost.xml index 447202ed51..2707cae7f9 100644 --- a/indra/newview/app_settings/windlight/skies/Ghost.xml +++ b/indra/newview/app_settings/windlight/skies/Ghost.xml @@ -137,5 +137,61 @@ <real>0.33000001311302185</real> <real>1</real> </array> + <key>planet_radius</key> + <real>6360.0</real> + <key>sky_min_radius</key> + <real>6360.0</real> + <key>sky_max_radius</key> + <real>6420.0</real> + <key>rayleigh_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>absorption_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>mie_config</key> + <map> + <key>anisotropy</key> + <real>0.5f</real> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> </map> </llsd> diff --git a/indra/newview/app_settings/windlight/skies/Incongruent%20Truths.xml b/indra/newview/app_settings/windlight/skies/Incongruent%20Truths.xml index 098844e16e..d5f2305e84 100644 --- a/indra/newview/app_settings/windlight/skies/Incongruent%20Truths.xml +++ b/indra/newview/app_settings/windlight/skies/Incongruent%20Truths.xml @@ -137,5 +137,61 @@ <real>1.170000433921814</real> <real>0.75</real> </array> + <key>planet_radius</key> + <real>6360.0</real> + <key>sky_min_radius</key> + <real>6360.0</real> + <key>sky_max_radius</key> + <real>6420.0</real> + <key>rayleigh_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>absorption_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>mie_config</key> + <map> + <key>anisotropy</key> + <real>0.5f</real> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> </map> </llsd> diff --git a/indra/newview/app_settings/windlight/skies/Midday%201.xml b/indra/newview/app_settings/windlight/skies/Midday%201.xml index 13a2c75046..381c7fb49d 100644 --- a/indra/newview/app_settings/windlight/skies/Midday%201.xml +++ b/indra/newview/app_settings/windlight/skies/Midday%201.xml @@ -137,5 +137,61 @@ <real>0.89999997615814209</real> <real>0.29999998211860657</real> </array> + <key>planet_radius</key> + <real>6360.0</real> + <key>sky_min_radius</key> + <real>6360.0</real> + <key>sky_max_radius</key> + <real>6420.0</real> + <key>rayleigh_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>absorption_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>mie_config</key> + <map> + <key>anisotropy</key> + <real>0.5f</real> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> </map> </llsd> diff --git a/indra/newview/app_settings/windlight/skies/Midday%202.xml b/indra/newview/app_settings/windlight/skies/Midday%202.xml index 04f2ba85ee..91d70c2228 100644 --- a/indra/newview/app_settings/windlight/skies/Midday%202.xml +++ b/indra/newview/app_settings/windlight/skies/Midday%202.xml @@ -137,5 +137,61 @@ <real>0.80999994277954102</real> <real>0.26999998092651367</real> </array> + <key>planet_radius</key> + <real>6360.0</real> + <key>sky_min_radius</key> + <real>6360.0</real> + <key>sky_max_radius</key> + <real>6420.0</real> + <key>rayleigh_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>absorption_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>mie_config</key> + <map> + <key>anisotropy</key> + <real>0.5f</real> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> </map> </llsd> diff --git a/indra/newview/app_settings/windlight/skies/Midday%203.xml b/indra/newview/app_settings/windlight/skies/Midday%203.xml index a23dcab60b..816a4da670 100644 --- a/indra/newview/app_settings/windlight/skies/Midday%203.xml +++ b/indra/newview/app_settings/windlight/skies/Midday%203.xml @@ -137,5 +137,61 @@ <real>1.2599999904632568</real> <real>1</real> </array> + <key>planet_radius</key> + <real>6360.0</real> + <key>sky_min_radius</key> + <real>6360.0</real> + <key>sky_max_radius</key> + <real>6420.0</real> + <key>rayleigh_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>absorption_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>mie_config</key> + <map> + <key>anisotropy</key> + <real>0.5f</real> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> </map> </llsd> diff --git a/indra/newview/app_settings/windlight/skies/Midday%204.xml b/indra/newview/app_settings/windlight/skies/Midday%204.xml index 255e314e0f..df64ed371c 100644 --- a/indra/newview/app_settings/windlight/skies/Midday%204.xml +++ b/indra/newview/app_settings/windlight/skies/Midday%204.xml @@ -137,5 +137,61 @@ <real>1.2599999904632568</real> <real>0.41999998688697815</real> </array> + <key>planet_radius</key> + <real>6360.0</real> + <key>sky_min_radius</key> + <real>6360.0</real> + <key>sky_max_radius</key> + <real>6420.0</real> + <key>rayleigh_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>absorption_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>mie_config</key> + <map> + <key>anisotropy</key> + <real>0.5f</real> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> </map> </llsd> diff --git a/indra/newview/app_settings/windlight/skies/Midday.xml b/indra/newview/app_settings/windlight/skies/Midday.xml index 119b3e1418..87b2f09e30 100644 --- a/indra/newview/app_settings/windlight/skies/Midday.xml +++ b/indra/newview/app_settings/windlight/skies/Midday.xml @@ -137,5 +137,61 @@ <real>0.89999997615814209</real> <real>0.29999998211860657</real> </array> + <key>planet_radius</key> + <real>6360.0</real> + <key>sky_min_radius</key> + <real>6360.0</real> + <key>sky_max_radius</key> + <real>6420.0</real> + <key>rayleigh_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>absorption_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>mie_config</key> + <map> + <key>anisotropy</key> + <real>0.5f</real> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> </map> </llsd> diff --git a/indra/newview/app_settings/windlight/skies/Midnight.xml b/indra/newview/app_settings/windlight/skies/Midnight.xml index 0aba31214a..00cfc64420 100644 --- a/indra/newview/app_settings/windlight/skies/Midnight.xml +++ b/indra/newview/app_settings/windlight/skies/Midnight.xml @@ -137,5 +137,61 @@ <real>0.65999996662139893</real> <real>0.2199999988079071</real> </array> + <key>planet_radius</key> + <real>6360.0</real> + <key>sky_min_radius</key> + <real>6360.0</real> + <key>sky_max_radius</key> + <real>6420.0</real> + <key>rayleigh_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>absorption_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>mie_config</key> + <map> + <key>anisotropy</key> + <real>0.5f</real> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> </map> </llsd> diff --git a/indra/newview/app_settings/windlight/skies/Night.xml b/indra/newview/app_settings/windlight/skies/Night.xml index c4938949ce..c56177e821 100644 --- a/indra/newview/app_settings/windlight/skies/Night.xml +++ b/indra/newview/app_settings/windlight/skies/Night.xml @@ -137,5 +137,61 @@ <real>0.65999994893325931</real> <real>0.22000000284673543</real> </array> + <key>planet_radius</key> + <real>6360.0</real> + <key>sky_min_radius</key> + <real>6360.0</real> + <key>sky_max_radius</key> + <real>6420.0</real> + <key>rayleigh_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>absorption_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>mie_config</key> + <map> + <key>anisotropy</key> + <real>0.5f</real> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> </map> </llsd> diff --git a/indra/newview/app_settings/windlight/skies/Pirate.xml b/indra/newview/app_settings/windlight/skies/Pirate.xml index dcb9c27ba4..1f5c18dd65 100644 --- a/indra/newview/app_settings/windlight/skies/Pirate.xml +++ b/indra/newview/app_settings/windlight/skies/Pirate.xml @@ -137,5 +137,61 @@ <real>2.8385701179504395</real> <real>1</real> </array> + <key>planet_radius</key> + <real>6360.0</real> + <key>sky_min_radius</key> + <real>6360.0</real> + <key>sky_max_radius</key> + <real>6420.0</real> + <key>rayleigh_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>absorption_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>mie_config</key> + <map> + <key>anisotropy</key> + <real>0.5f</real> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> </map> </llsd> diff --git a/indra/newview/app_settings/windlight/skies/Purple.xml b/indra/newview/app_settings/windlight/skies/Purple.xml index 0e9ac3f36e..3d937660ad 100644 --- a/indra/newview/app_settings/windlight/skies/Purple.xml +++ b/indra/newview/app_settings/windlight/skies/Purple.xml @@ -137,5 +137,61 @@ <real>2.8385701179504395</real> <real>1</real> </array> + <key>planet_radius</key> + <real>6360.0</real> + <key>sky_min_radius</key> + <real>6360.0</real> + <key>sky_max_radius</key> + <real>6420.0</real> + <key>rayleigh_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>absorption_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>mie_config</key> + <map> + <key>anisotropy</key> + <real>0.5f</real> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> </map> </llsd> diff --git a/indra/newview/app_settings/windlight/skies/Sailor%27s%20Delight.xml b/indra/newview/app_settings/windlight/skies/Sailor%27s%20Delight.xml index 70df6b0e60..b3a631f482 100644 --- a/indra/newview/app_settings/windlight/skies/Sailor%27s%20Delight.xml +++ b/indra/newview/app_settings/windlight/skies/Sailor%27s%20Delight.xml @@ -137,5 +137,61 @@ <real>1.0777359008789062</real> <real>0.56000000238418579</real> </array> + <key>planet_radius</key> + <real>6360.0</real> + <key>sky_min_radius</key> + <real>6360.0</real> + <key>sky_max_radius</key> + <real>6420.0</real> + <key>rayleigh_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>absorption_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>mie_config</key> + <map> + <key>anisotropy</key> + <real>0.5f</real> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> </map> </llsd> diff --git a/indra/newview/app_settings/windlight/skies/Sheer%20Surreality.xml b/indra/newview/app_settings/windlight/skies/Sheer%20Surreality.xml index 4c44a1bdb2..252ba58a9a 100644 --- a/indra/newview/app_settings/windlight/skies/Sheer%20Surreality.xml +++ b/indra/newview/app_settings/windlight/skies/Sheer%20Surreality.xml @@ -137,5 +137,61 @@ <real>0.53999996185302734</real> <real>1.5899999141693115</real> </array> + <key>planet_radius</key> + <real>6360.0</real> + <key>sky_min_radius</key> + <real>6360.0</real> + <key>sky_max_radius</key> + <real>6420.0</real> + <key>rayleigh_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>absorption_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>mie_config</key> + <map> + <key>anisotropy</key> + <real>0.5f</real> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> </map> </llsd> diff --git a/indra/newview/app_settings/windlight/skies/Sunrise.xml b/indra/newview/app_settings/windlight/skies/Sunrise.xml index bbc7aeec59..3932f67f29 100644 --- a/indra/newview/app_settings/windlight/skies/Sunrise.xml +++ b/indra/newview/app_settings/windlight/skies/Sunrise.xml @@ -137,5 +137,61 @@ <real>2.369999885559082</real> <real>0.78999996185302734</real> </array> + <key>planet_radius</key> + <real>6360.0</real> + <key>sky_min_radius</key> + <real>6360.0</real> + <key>sky_max_radius</key> + <real>6420.0</real> + <key>rayleigh_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>absorption_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>mie_config</key> + <map> + <key>anisotropy</key> + <real>0.5f</real> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> </map> </llsd> diff --git a/indra/newview/app_settings/windlight/skies/Sunset.xml b/indra/newview/app_settings/windlight/skies/Sunset.xml index ebf08e1a3f..a597a1245a 100644 --- a/indra/newview/app_settings/windlight/skies/Sunset.xml +++ b/indra/newview/app_settings/windlight/skies/Sunset.xml @@ -137,6 +137,62 @@ <real>2.8385701179504395</real> <real>1</real> </array> + <key>planet_radius</key> + <real>6360.0</real> + <key>sky_min_radius</key> + <real>6360.0</real> + <key>sky_max_radius</key> + <real>6420.0</real> + <key>rayleigh_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>absorption_config</key> + <map> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> + <key>mie_config</key> + <map> + <key>anisotropy</key> + <real>0.5f</real> + <key>density</key> + <map> + <key>width</key> + <real>0.0</real> + <key>exp_term</key> + <real>1.0</real> + <key>exp_scale</key> + <real>-0.00001</real> + <key>linear_term</key> + <real>0.0</real> + <key>constant_term</key> + <real>1.0</real> + </map> + </map> </map> </llsd> diff --git a/indra/newview/llenvadapters.cpp b/indra/newview/llenvadapters.cpp index 34fd862655..85da9e853d 100644 --- a/indra/newview/llenvadapters.cpp +++ b/indra/newview/llenvadapters.cpp @@ -33,23 +33,28 @@ LLSkySettingsAdapter::LLSkySettingsAdapter(): mWLGamma(1.0f, LLSettingsSky::SETTING_GAMMA), + +#if SUPPORT_LEGACY_ATMOSPHERICS + mAmbient(LLColor4(0.5f, 0.75f, 1.0f, 1.19f), LLSettingsSky::SETTING_AMBIENT, "WLAmbient"), mBlueHorizon(LLColor4(0.25f, 0.25f, 1.0f, 1.0f), LLSettingsSky::SETTING_BLUE_HORIZON, "WLBlueHorizon"), - mHazeDensity(1.0f, LLSettingsSky::SETTING_HAZE_DENSITY), mBlueDensity(LLColor4(0.25f, 0.25f, 0.25f, 1.0f), LLSettingsSky::SETTING_BLUE_DENSITY, "WLBlueDensity"), + mHazeDensity(1.0f, LLSettingsSky::SETTING_HAZE_DENSITY), + mHazeHorizon(1.0f, LLSettingsSky::SETTING_HAZE_HORIZON), mDensityMult(1.0f, LLSettingsSky::SETTING_DENSITY_MULTIPLIER, 1000), - mHazeHorizon(1.0f, LLSettingsSky::SETTING_HAZE_HORIZON), + mDistanceMult(1.0f, LLSettingsSky::SETTING_DISTANCE_MULTIPLIER), mMaxAlt(4000.0f, LLSettingsSky::SETTING_MAX_Y), +#endif + // Lighting mLightnorm(LLColor4(0.f, 0.707f, -0.707f, 1.f), LLSettingsSky::SETTING_LIGHT_NORMAL), mSunlight(LLColor4(0.5f, 0.5f, 0.5f, 1.0f), LLSettingsSky::SETTING_SUNLIGHT_COLOR, "WLSunlight"), - mAmbient(LLColor4(0.5f, 0.75f, 1.0f, 1.19f), LLSettingsSky::SETTING_AMBIENT, "WLAmbient"), + mGlow(LLColor4(18.0f, 0.0f, -0.01f, 1.0f), LLSettingsSky::SETTING_GLOW), // Clouds mCloudColor(LLColor4(0.5f, 0.5f, 0.5f, 1.0f), LLSettingsSky::SETTING_CLOUD_COLOR, "WLCloudColor"), mCloudMain(LLColor4(0.5f, 0.5f, 0.125f, 1.0f), LLSettingsSky::SETTING_CLOUD_POS_DENSITY1), mCloudCoverage(0.0f, LLSettingsSky::SETTING_CLOUD_SHADOW), - mCloudDetail(LLColor4(0.0f, 0.0f, 0.0f, 1.0f), LLSettingsSky::SETTING_CLOUD_POS_DENSITY2), - mDistanceMult(1.0f, LLSettingsSky::SETTING_DISTANCE_MULTIPLIER), + mCloudDetail(LLColor4(0.0f, 0.0f, 0.0f, 1.0f), LLSettingsSky::SETTING_CLOUD_POS_DENSITY2), mCloudScale(0.42f, LLSettingsSky::SETTING_CLOUD_SCALE) { diff --git a/indra/newview/llenvadapters.h b/indra/newview/llenvadapters.h index 8b93bbbe9f..c48311863e 100644 --- a/indra/newview/llenvadapters.h +++ b/indra/newview/llenvadapters.h @@ -31,6 +31,7 @@ #include "v3color.h" #include "v4math.h" #include "llsettingsbase.h" +#include "llsettingssky.h" class WLColorControl { @@ -364,25 +365,27 @@ public: WLFloatControl mWLGamma; /// Atmospherics +#if SUPPORT_LEGACY_ATMOSPHERICS + WLColorControl mAmbient; WLColorControl mBlueHorizon; WLFloatControl mHazeDensity; WLColorControl mBlueDensity; WLFloatControl mDensityMult; + WLFloatControl mDistanceMult; WLFloatControl mHazeHorizon; WLFloatControl mMaxAlt; +#endif /// Lighting WLColorControl mLightnorm; - WLColorControl mSunlight; - WLColorControl mAmbient; + WLColorControl mSunlight; WLColorControl mGlow; /// Clouds WLColorControl mCloudColor; WLColorControl mCloudMain; WLFloatControl mCloudCoverage; - WLColorControl mCloudDetail; - WLFloatControl mDistanceMult; + WLColorControl mCloudDetail; WLFloatControl mCloudScale; }; diff --git a/indra/newview/llfloatereditsky.cpp b/indra/newview/llfloatereditsky.cpp index 1574e73caa..c2b7bb17da 100644 --- a/indra/newview/llfloatereditsky.cpp +++ b/indra/newview/llfloatereditsky.cpp @@ -152,20 +152,21 @@ void LLFloaterEditSky::initCallbacks(void) LLRegionInfoModel::instance().setUpdateCallback(boost::bind(&LLFloaterEditSky::onRegionInfoUpdate, this)); //------------------------------------------------------------------------- +#if SUPPORT_LEGACY_ATMOSPHERICS + // ambient + getChild<LLUICtrl>("WLAmbient")->setCommitCallback(boost::bind(&LLFloaterEditSky::onColorControlMoved, this, _1, &mSkyAdapter->mAmbient)); - // blue horizon + // blue horizon/density getChild<LLUICtrl>("WLBlueHorizon")->setCommitCallback(boost::bind(&LLFloaterEditSky::onColorControlMoved, this, _1, &mSkyAdapter->mBlueHorizon)); + getChild<LLUICtrl>("WLBlueDensity")->setCommitCallback(boost::bind(&LLFloaterEditSky::onColorControlMoved, this, _1, &mSkyAdapter->mBlueDensity)); // haze density, horizon, mult, and altitude getChild<LLUICtrl>("WLHazeDensity")->setCommitCallback(boost::bind(&LLFloaterEditSky::onFloatControlMoved, this, _1, &mSkyAdapter->mHazeDensity)); getChild<LLUICtrl>("WLHazeHorizon")->setCommitCallback(boost::bind(&LLFloaterEditSky::onFloatControlMoved, this, _1, &mSkyAdapter->mHazeHorizon)); getChild<LLUICtrl>("WLDensityMult")->setCommitCallback(boost::bind(&LLFloaterEditSky::onFloatControlMoved, this, _1, &mSkyAdapter->mDensityMult)); + getChild<LLUICtrl>("WLDistanceMult")->setCommitCallback(boost::bind(&LLFloaterEditSky::onFloatControlMoved, this, _1, &mSkyAdapter->mDistanceMult)); getChild<LLUICtrl>("WLMaxAltitude")->setCommitCallback(boost::bind(&LLFloaterEditSky::onFloatControlMoved, this, _1, &mSkyAdapter->mMaxAlt)); - - // blue density - getChild<LLUICtrl>("WLBlueDensity")->setCommitCallback(boost::bind(&LLFloaterEditSky::onColorControlMoved, this, _1, &mSkyAdapter->mBlueDensity)); - - // Lighting +#endif // sunlight getChild<LLUICtrl>("WLSunlight")->setCommitCallback(boost::bind(&LLFloaterEditSky::onColorControlMoved, this, _1, &mSkyAdapter->mSunlight)); @@ -174,9 +175,6 @@ void LLFloaterEditSky::initCallbacks(void) getChild<LLUICtrl>("WLGlowR")->setCommitCallback(boost::bind(&LLFloaterEditSky::onGlowRMoved, this, _1, &mSkyAdapter->mGlow)); getChild<LLUICtrl>("WLGlowB")->setCommitCallback(boost::bind(&LLFloaterEditSky::onGlowBMoved, this, _1, &mSkyAdapter->mGlow)); - // ambient - getChild<LLUICtrl>("WLAmbient")->setCommitCallback(boost::bind(&LLFloaterEditSky::onColorControlMoved, this, _1, &mSkyAdapter->mAmbient)); - // time of day // getChild<LLUICtrl>("WLSunPos")->setCommitCallback(boost::bind(&LLFloaterEditSky::onSunMoved, this, _1, &mSkyAdapter->mLightnorm)); // multi-slider // getChild<LLTimeCtrl>("WLDayTime")->setCommitCallback(boost::bind(&LLFloaterEditSky::onTimeChanged, this)); // time ctrl @@ -204,7 +202,7 @@ void LLFloaterEditSky::initCallbacks(void) getChild<LLUICtrl>("WLCloudScale")->setCommitCallback(boost::bind(&LLFloaterEditSky::onFloatControlMoved, this, _1, &mSkyAdapter->mCloudScale)); getChild<LLUICtrl>("WLCloudScrollX")->setCommitCallback(boost::bind(&LLFloaterEditSky::onCloudScrollXMoved, this, _1)); getChild<LLUICtrl>("WLCloudScrollY")->setCommitCallback(boost::bind(&LLFloaterEditSky::onCloudScrollYMoved, this, _1)); - getChild<LLUICtrl>("WLDistanceMult")->setCommitCallback(boost::bind(&LLFloaterEditSky::onFloatControlMoved, this, _1, &mSkyAdapter->mDistanceMult)); + // Dome getChild<LLUICtrl>("WLGamma")->setCommitCallback(boost::bind(&LLFloaterEditSky::onFloatControlMoved, this, _1, &mSkyAdapter->mWLGamma)); @@ -223,9 +221,16 @@ void LLFloaterEditSky::syncControls() mSkyPresetNameEditor->setText(name); mSkyPresetCombo->setValue(name); - // blue horizon +#if SUPPORT_LEGACY_ATMOSPHERICS + // ambient + mSkyAdapter->mAmbient.setColor3( psky->getAmbientColor() ); + setColorSwatch("WLAmbient", mSkyAdapter->mAmbient, WL_SUN_AMBIENT_SLIDER_SCALE); + + // blue horizon / density mSkyAdapter->mBlueHorizon.setColor3( psky->getBlueHorizon() ); setColorSwatch("WLBlueHorizon", mSkyAdapter->mBlueHorizon, WL_BLUE_HORIZON_DENSITY_SCALE); + mSkyAdapter->mBlueDensity.setColor3( psky->getBlueDensity() ); + setColorSwatch("WLBlueDensity", mSkyAdapter->mBlueDensity, WL_BLUE_HORIZON_DENSITY_SCALE); // haze density, horizon, mult, and altitude mSkyAdapter->mHazeDensity = psky->getHazeDensity(); @@ -235,11 +240,10 @@ void LLFloaterEditSky::syncControls() mSkyAdapter->mDensityMult = psky->getDensityMultiplier(); childSetValue("WLDensityMult", ((F32) mSkyAdapter->mDensityMult) * mSkyAdapter->mDensityMult.getMult()); mSkyAdapter->mMaxAlt = psky->getMaxY(); + mSkyAdapter->mDistanceMult = psky->getDistanceMultiplier(); + childSetValue("WLDistanceMult", (F32) mSkyAdapter->mDistanceMult); childSetValue("WLMaxAltitude", (F32) mSkyAdapter->mMaxAlt); - - // blue density - mSkyAdapter->mBlueDensity.setColor3( psky->getBlueDensity() ); - setColorSwatch("WLBlueDensity", mSkyAdapter->mBlueDensity, WL_BLUE_HORIZON_DENSITY_SCALE); +#endif // Lighting @@ -252,9 +256,7 @@ void LLFloaterEditSky::syncControls() childSetValue("WLGlowR", 2 - mSkyAdapter->mGlow.getRed() / 20.0f); childSetValue("WLGlowB", -mSkyAdapter->mGlow.getBlue() / 5.0f); - // ambient - mSkyAdapter->mAmbient.setColor3( psky->getAmbientColor() ); - setColorSwatch("WLAmbient", mSkyAdapter->mAmbient, WL_SUN_AMBIENT_SLIDER_SCALE); + // LLSettingsSky::azimalt_t azal = psky->getSunRotationAzAl(); // @@ -304,9 +306,6 @@ void LLFloaterEditSky::syncControls() childSetValue("WLCloudScrollX", scroll_rate[0] - 10.0f); childSetValue("WLCloudScrollY", scroll_rate[1] - 10.0f); - mSkyAdapter->mDistanceMult = psky->getDistanceMultiplier(); - childSetValue("WLDistanceMult", (F32) mSkyAdapter->mDistanceMult); - // Tweak extras mSkyAdapter->mWLGamma = psky->getGamma(); diff --git a/indra/newview/llsettingsvo.cpp b/indra/newview/llsettingsvo.cpp index db68b39f75..84930ee425 100644 --- a/indra/newview/llsettingsvo.cpp +++ b/indra/newview/llsettingsvo.cpp @@ -150,25 +150,27 @@ LLSD LLSettingsVOSky::convertToLegacy(const LLSettingsSky::ptr_t &psky) LLSD legacy(LLSD::emptyMap()); LLSD settings = psky->getSettings(); +// These will need to be inferred from new settings' density profiles +#if SUPPORT_LEGACY_ATMOSPHERICS legacy[SETTING_AMBIENT] = ensureArray4(settings[SETTING_AMBIENT], 1.0f); legacy[SETTING_BLUE_DENSITY] = ensureArray4(settings[SETTING_BLUE_DENSITY], 1.0); legacy[SETTING_BLUE_HORIZON] = ensureArray4(settings[SETTING_BLUE_HORIZON], 1.0); + legacy[SETTING_DENSITY_MULTIPLIER] = LLSDArray(settings[SETTING_DENSITY_MULTIPLIER].asReal())(0.0f)(0.0f)(1.0f); + legacy[SETTING_DISTANCE_MULTIPLIER] = LLSDArray(settings[SETTING_DISTANCE_MULTIPLIER].asReal())(0.0f)(0.0f)(1.0f); + legacy[SETTING_HAZE_DENSITY] = LLSDArray(settings[SETTING_HAZE_DENSITY])(0.0f)(0.0f)(1.0f); + legacy[SETTING_HAZE_HORIZON] = LLSDArray(settings[SETTING_HAZE_HORIZON])(0.0f)(0.0f)(1.0f); +#endif + legacy[SETTING_CLOUD_COLOR] = ensureArray4(settings[SETTING_CLOUD_COLOR], 1.0); legacy[SETTING_CLOUD_POS_DENSITY1] = ensureArray4(settings[SETTING_CLOUD_POS_DENSITY1], 1.0); legacy[SETTING_CLOUD_POS_DENSITY2] = ensureArray4(settings[SETTING_CLOUD_POS_DENSITY2], 1.0); - legacy[SETTING_CLOUD_SCALE] = LLSDArray(settings[SETTING_CLOUD_SCALE])(LLSD::Real(0.0))(LLSD::Real(0.0))(LLSD::Real(1.0)); - + legacy[SETTING_CLOUD_SCALE] = LLSDArray(settings[SETTING_CLOUD_SCALE])(LLSD::Real(0.0))(LLSD::Real(0.0))(LLSD::Real(1.0)); legacy[SETTING_CLOUD_SCROLL_RATE] = settings[SETTING_CLOUD_SCROLL_RATE]; legacy[SETTING_LEGACY_ENABLE_CLOUD_SCROLL] = LLSDArray(LLSD::Boolean(!is_approx_zero(settings[SETTING_CLOUD_SCROLL_RATE][0].asReal()))) - (LLSD::Boolean(!is_approx_zero(settings[SETTING_CLOUD_SCROLL_RATE][1].asReal()))); - - legacy[SETTING_CLOUD_SHADOW] = LLSDArray(settings[SETTING_CLOUD_SHADOW].asReal())(0.0f)(0.0f)(1.0f); - legacy[SETTING_DENSITY_MULTIPLIER] = LLSDArray(settings[SETTING_DENSITY_MULTIPLIER].asReal())(0.0f)(0.0f)(1.0f); - legacy[SETTING_DISTANCE_MULTIPLIER] = LLSDArray(settings[SETTING_DISTANCE_MULTIPLIER].asReal())(0.0f)(0.0f)(1.0f); + (LLSD::Boolean(!is_approx_zero(settings[SETTING_CLOUD_SCROLL_RATE][1].asReal()))); + legacy[SETTING_CLOUD_SHADOW] = LLSDArray(settings[SETTING_CLOUD_SHADOW].asReal())(0.0f)(0.0f)(1.0f); legacy[SETTING_GAMMA] = LLSDArray(settings[SETTING_GAMMA])(0.0f)(0.0f)(1.0f); legacy[SETTING_GLOW] = ensureArray4(settings[SETTING_GLOW], 1.0); - legacy[SETTING_HAZE_DENSITY] = LLSDArray(settings[SETTING_HAZE_DENSITY])(0.0f)(0.0f)(1.0f); - legacy[SETTING_HAZE_HORIZON] = LLSDArray(settings[SETTING_HAZE_HORIZON])(0.0f)(0.0f)(1.0f); legacy[SETTING_LIGHT_NORMAL] = ensureArray4(psky->getLightDirection().getValue(), 0.0f); legacy[SETTING_MAX_Y] = LLSDArray(settings[SETTING_MAX_Y])(0.0f)(0.0f)(1.0f); legacy[SETTING_STAR_BRIGHTNESS] = settings[SETTING_STAR_BRIGHTNESS]; @@ -218,21 +220,26 @@ LLSettingsSky::parammapping_t LLSettingsVOSky::getParameterMap() const if (param_map.empty()) { +#if SUPPORT_LEGACY_ATMOSPHERICS param_map[SETTING_AMBIENT] = LLShaderMgr::AMBIENT; param_map[SETTING_BLUE_DENSITY] = LLShaderMgr::BLUE_DENSITY; param_map[SETTING_BLUE_HORIZON] = LLShaderMgr::BLUE_HORIZON; - param_map[SETTING_CLOUD_COLOR] = LLShaderMgr::CLOUD_COLOR; + param_map[SETTING_HAZE_DENSITY] = LLShaderMgr::HAZE_DENSITY; + param_map[SETTING_HAZE_HORIZON] = LLShaderMgr::HAZE_HORIZON; + param_map[SETTING_DENSITY_MULTIPLIER] = LLShaderMgr::DENSITY_MULTIPLIER; + param_map[SETTING_DISTANCE_MULTIPLIER] = LLShaderMgr::DISTANCE_MULTIPLIER; +#endif + param_map[SETTING_CLOUD_COLOR] = LLShaderMgr::CLOUD_COLOR; param_map[SETTING_CLOUD_POS_DENSITY2] = LLShaderMgr::CLOUD_POS_DENSITY2; param_map[SETTING_CLOUD_SCALE] = LLShaderMgr::CLOUD_SCALE; - param_map[SETTING_CLOUD_SHADOW] = LLShaderMgr::CLOUD_SHADOW; - param_map[SETTING_DENSITY_MULTIPLIER] = LLShaderMgr::DENSITY_MULTIPLIER; - param_map[SETTING_DISTANCE_MULTIPLIER] = LLShaderMgr::DISTANCE_MULTIPLIER; - param_map[SETTING_GLOW] = LLShaderMgr::GLOW; - param_map[SETTING_HAZE_DENSITY] = LLShaderMgr::HAZE_DENSITY; - param_map[SETTING_HAZE_HORIZON] = LLShaderMgr::HAZE_HORIZON; + param_map[SETTING_CLOUD_SHADOW] = LLShaderMgr::CLOUD_SHADOW; + param_map[SETTING_GLOW] = LLShaderMgr::GLOW; param_map[SETTING_MAX_Y] = LLShaderMgr::MAX_Y; param_map[SETTING_SUNLIGHT_COLOR] = LLShaderMgr::SUNLIGHT_COLOR; + +// AdvancedAtmospherics TODO +// Provide mappings for new shader params here } return param_map; diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp index ad68408836..c1ba7b1efd 100644 --- a/indra/newview/llvosky.cpp +++ b/indra/newview/llvosky.cpp @@ -397,6 +397,7 @@ void LLVOSky::init() calcAtmospherics(); +#if SUPPORT_LEGACY_ATMOSPHERICS // Initialize the cached normalized direction vectors for (S32 side = 0; side < 6; ++side) { @@ -412,6 +413,7 @@ void LLVOSky::init() mSkyTex[i].create(1.0f); mShinyTex[i].create(1.0f); } +#endif initCubeMap(); mInitialized = true; @@ -494,6 +496,7 @@ void LLVOSky::restoreGL() } +#if SUPPORT_LEGACY_ATMOSPHERICS void LLVOSky::initSkyTextureDirs(const S32 side, const S32 tile) { S32 tile_x = tile % NUM_TILES_X; @@ -816,6 +819,7 @@ LLColor3 LLVOSky::calcSkyColorWLFrag(LLVector3 & Pn, LLColor3 & vary_HazeColor, return res; } + LLColor3 LLVOSky::createDiffuseFromWL(LLColor3 diffuse, LLColor3 ambient, LLColor3 sundiffuse, LLColor3 sunambient) { return componentMult(diffuse, sundiffuse) * 4.0f + @@ -826,7 +830,7 @@ LLColor3 LLVOSky::createAmbientFromWL(LLColor3 ambient, LLColor3 sundiffuse, LLC { return (componentMult(ambient, sundiffuse) + sunambient) * 0.8f; } - +#endif void LLVOSky::calcAtmospherics(void) { @@ -878,6 +882,7 @@ BOOL LLVOSky::updateSky() return TRUE; } +#if SUPPORT_LEGACY_ATMOSPHERICS static S32 next_frame = 0; const S32 total_no_tiles = 6 * NUM_TILES; const S32 cycle_frame_no = total_no_tiles + 1; @@ -927,6 +932,7 @@ BOOL LLVOSky::updateSky() if (mForceUpdate) { updateFog(LLViewerCamera::getInstance()->getFar()); + for (int side = 0; side < 6; side++) { for (int tile = 0; tile < NUM_TILES; tile++) @@ -995,6 +1001,8 @@ BOOL LLVOSky::updateSky() { gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, TRUE); } +#endif + return TRUE; } @@ -1856,6 +1864,8 @@ void LLVOSky::updateReflectionGeometry(LLDrawable *drawable, F32 H, void LLVOSky::updateFog(const F32 distance) { + +#if SUPPORT_LEGACY_ATMOSPHERICS if (!gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_FOG)) { if (!LLGLSLShader::sNoFixedFunction) @@ -2000,6 +2010,9 @@ void LLVOSky::updateFog(const F32 distance) glHint(GL_FOG_HINT, GL_NICEST); } stop_glerror(); + +#endif + } diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h index 9123381c3d..4f6bc55bbe 100644 --- a/indra/newview/llvosky.h +++ b/indra/newview/llvosky.h @@ -34,7 +34,7 @@ #include "llviewerobject.h" #include "llframetimer.h" #include "v3colorutil.h" - +#include "llsettingssky.h" ////////////////////////////////// // @@ -382,6 +382,8 @@ class LLVOSky : public LLStaticViewerObject public: void calcAtmospherics(void); + +#if SUPPORT_LEGACY_ATMOSPHERICS LLColor3 createDiffuseFromWL(LLColor3 diffuse, LLColor3 ambient, LLColor3 sundiffuse, LLColor3 sunambient); LLColor3 createAmbientFromWL(LLColor3 ambient, LLColor3 sundiffuse, LLColor3 sunambient); @@ -392,8 +394,17 @@ public: LLColor3 calcSkyColorWLFrag(LLVector3 & Pn, LLColor3 & vary_HazeColor, LLColor3 & vary_CloudColorSun, LLColor3 & vary_CloudColorAmbient, F32 & vary_CloudDensity, LLVector2 vary_HorizontalProjection[2]); + LLColor4 calcSkyColorInDir(const LLVector3& dir, bool isShiny = false); + + LLColor3 calcRadianceAtPoint(const LLVector3& pos) const + { + F32 radiance = mBrightnessScaleGuess * mSun.getIntensity(); + return LLColor3(radiance, radiance, radiance); + } + void initSkyTextureDirs(const S32 side, const S32 tile); + void createSkyTexture(const S32 side, const S32 tile); +#endif -public: enum { FACE_SIDE0, @@ -429,17 +440,6 @@ public: /*virtual*/ LLDrawable* createDrawable(LLPipeline *pipeline); /*virtual*/ BOOL updateGeometry(LLDrawable *drawable); - void initSkyTextureDirs(const S32 side, const S32 tile); - void createSkyTexture(const S32 side, const S32 tile); - - LLColor4 calcSkyColorInDir(const LLVector3& dir, bool isShiny = false); - - LLColor3 calcRadianceAtPoint(const LLVector3& pos) const - { - F32 radiance = mBrightnessScaleGuess * mSun.getIntensity(); - return LLColor3(radiance, radiance, radiance); - } - const LLHeavenBody& getSun() const { return mSun; } const LLHeavenBody& getMoon() const { return mMoon; } |