summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llinventory/llsettingssky.cpp4
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/waterF.glsl5
-rw-r--r--indra/newview/lldrawpoolwater.cpp34
-rw-r--r--indra/newview/llenvironment.cpp8
-rw-r--r--indra/newview/llenvironment.h2
-rw-r--r--indra/newview/llfloatereditextdaycycle.cpp11
-rw-r--r--indra/newview/llfloaterland.cpp7
-rw-r--r--indra/newview/llfloaterregioninfo.cpp1
-rw-r--r--indra/newview/llpanelenvironment.cpp61
-rw-r--r--indra/newview/llpanelenvironment.h6
-rw-r--r--indra/newview/skins/default/xui/en/floater_edit_ext_day_cycle.xml8
-rw-r--r--indra/newview/skins/default/xui/en/panel_region_environment.xml1
12 files changed, 72 insertions, 76 deletions
diff --git a/indra/llinventory/llsettingssky.cpp b/indra/llinventory/llsettingssky.cpp
index fb7f5e5c1c..12b33142e3 100644
--- a/indra/llinventory/llsettingssky.cpp
+++ b/indra/llinventory/llsettingssky.cpp
@@ -139,8 +139,8 @@ const std::string LLSettingsSky::SETTING_SKY_ICE_LEVEL("ice_level");
const LLUUID LLSettingsSky::DEFAULT_ASSET_ID("eb3a7080-831f-9f37-10f0-7b1f9ea4043c");
-static const LLUUID DEFAULT_SUN_ID("cce0f112-878f-4586-a2e2-a8f104bba271"); // dataserver
-static const LLUUID DEFAULT_MOON_ID("d07f6eed-b96a-47cd-b51d-400ad4a1c428"); // dataserver
+static const LLUUID DEFAULT_SUN_ID("0ed03550-9096-3c5a-27d8-c6496bff1064"); // dataserver
+static const LLUUID DEFAULT_MOON_ID("db13b827-7e6a-7ace-bed4-4419ee00984d"); // dataserver
static const LLUUID DEFAULT_CLOUD_ID("1dc1368f-e8fe-f02d-a08d-9d9f11c1af6b");
const std::string LLSettingsSky::SETTING_LEGACY_HAZE("legacy_haze");
diff --git a/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl b/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl
index 9da2548586..2acfe58e82 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl
@@ -67,10 +67,7 @@ vec3 scaleSoftClipFrag(vec3 l);
vec3 BlendNormal(vec3 bump1, vec3 bump2)
{
- //vec3 normal = bump1.xyz * vec3( 2.0, 2.0, 2.0) - vec3(1.0, 1.0, 0.0);
- //vec3 normal2 = bump2.xyz * vec3(-2.0, -2.0, 2.0) + vec3(1.0, 1.0, -1.0);
- //vec3 n = normalize(normal * dot(normal, normal2) - (normal2 * normal.z));
- vec3 n = normalize(mix(bump1, bump2, blend_factor));
+ vec3 n = mix(bump1, bump2, blend_factor);
return n;
}
diff --git a/indra/newview/lldrawpoolwater.cpp b/indra/newview/lldrawpoolwater.cpp
index ee37f36cbd..9820720fb9 100644
--- a/indra/newview/lldrawpoolwater.cpp
+++ b/indra/newview/lldrawpoolwater.cpp
@@ -579,12 +579,34 @@ void LLDrawPoolWater::shade()
}
//bind normal map
- S32 bumpTex = shader->enableTexture(LLViewerShaderMgr::BUMP_MAP);
+ S32 bumpTex = shader->enableTexture(LLViewerShaderMgr::BUMP_MAP);
+ S32 bumpTex2 = shader->enableTexture(LLViewerShaderMgr::BUMP_MAP2);
- if (mWaterNormp[0])
+ LLViewerTexture* tex_a = mWaterNormp[0];
+ LLViewerTexture* tex_b = mWaterNormp[1];
+
+ F32 blend_factor = LLEnvironment::instance().getCurrentWater()->getBlendFactor();
+
+ if (tex_a && (!tex_b || (tex_a == tex_b)))
+ {
+ gGL.getTexUnit(bumpTex)->bind(tex_a);
+ gGL.getTexUnit(bumpTex2)->unbind(LLTexUnit::TT_TEXTURE);
+ blend_factor = 0; // only one tex provided, no blending
+ }
+ else if (tex_b && !tex_a)
+ {
+ gGL.getTexUnit(bumpTex)->bind(tex_b);
+ gGL.getTexUnit(bumpTex2)->unbind(LLTexUnit::TT_TEXTURE);
+ blend_factor = 0; // only one tex provided, no blending
+ }
+ else if (tex_b != tex_a)
{
- gGL.getTexUnit(bumpTex)->bind(mWaterNormp[0]) ;
+ gGL.getTexUnit(bumpTex)->bind(tex_a);
+ gGL.getTexUnit(bumpTex2)->bind(tex_b);
+ }
+ if (mWaterNormp[0])
+ {
if (gSavedSettings.getBOOL("RenderWaterMipNormal"))
{
mWaterNormp[0]->setFilteringOption(LLTexUnit::TFO_ANISOTROPIC);
@@ -597,10 +619,6 @@ void LLDrawPoolWater::shade()
if (mWaterNormp[1])
{
- bumpTex = shader->enableTexture(LLViewerShaderMgr::BUMP_MAP2);
-
- gGL.getTexUnit(bumpTex)->bind(mWaterNormp[1]) ;
-
if (gSavedSettings.getBOOL("RenderWaterMipNormal"))
{
mWaterNormp[1]->setFilteringOption(LLTexUnit::TFO_ANISOTROPIC);
@@ -611,6 +629,8 @@ void LLDrawPoolWater::shade()
}
}
+ shader->uniform1f(LLShaderMgr::BLEND_FACTOR, blend_factor);
+
shader->uniform3fv(LLShaderMgr::WATER_FOGCOLOR, 1, pwater->getWaterFogColor().mV);
shader->uniform1f(LLShaderMgr::WATER_FOGDENSITY, pwater->getWaterFogDensity());
diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp
index 3541eb40fa..d925dd9d49 100644
--- a/indra/newview/llenvironment.cpp
+++ b/indra/newview/llenvironment.cpp
@@ -323,10 +323,10 @@ const F32Seconds LLEnvironment::TRANSITION_DEFAULT(5.0f);
const F32Seconds LLEnvironment::TRANSITION_SLOW(10.0f);
const F32Seconds LLEnvironment::TRANSITION_ALTITUDE(5.0f);
-const LLUUID LLEnvironment::KNOWN_SKY_SUNRISE("7e1489ce-fdc8-2971-c3a4-f1fe0cd70d20");
-const LLUUID LLEnvironment::KNOWN_SKY_MIDDAY("9db06848-8b1f-501d-eeae-ecf487f40dd6");
-const LLUUID LLEnvironment::KNOWN_SKY_SUNSET("95882e1b-7741-f082-d9d6-3a34ec644c66");
-const LLUUID LLEnvironment::KNOWN_SKY_MIDNIGHT("d8e50d02-a15b-17a7-3425-523bc20f67b8");
+const LLUUID LLEnvironment::KNOWN_SKY_SUNRISE("01e41537-ff51-2f1f-8ef7-17e4df760bfb");
+const LLUUID LLEnvironment::KNOWN_SKY_MIDDAY("6c83e853-e7f8-cad7-8ee6-5f31c453721c");
+const LLUUID LLEnvironment::KNOWN_SKY_SUNSET("084e26cd-a900-28e8-08d0-64a9de5c15e2");
+const LLUUID LLEnvironment::KNOWN_SKY_MIDNIGHT("8a01b97a-cb20-c1ea-ac63-f7ea84ad0090");
const S32 LLEnvironment::NO_TRACK(-1);
const S32 LLEnvironment::NO_VERSION(-3); // For viewer sided change, like ENV_LOCAL. -3 since -1 and -2 are taken by parcel initial server/viewer version
diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h
index 1dd7496b02..d9b667cd79 100644
--- a/indra/newview/llenvironment.h
+++ b/indra/newview/llenvironment.h
@@ -447,7 +447,7 @@ private:
void setExperienceEnvironment(LLUUID experience_id, LLSD environment, F32 transition_time);
void setInstanceBackup(bool dobackup);
- void injectSettings(LLUUID experience_id, exerienceBlendValues_t &blends, LLSD injections, LLSettingsBase::Seconds transition, bool blendin);
+ void injectSettings(LLUUID experience_id, exerienceBlendValues_t &blends, LLSD injections, LLSettingsBase::Seconds transition, bool blendin);
void applyInjectedSettings(DayInstance::ptr_t environment, F32Seconds delta);
void applyInjectedValues(LLSettingsBase::ptr_t psetting, LLSD injection);
diff --git a/indra/newview/llfloatereditextdaycycle.cpp b/indra/newview/llfloatereditextdaycycle.cpp
index cb6fd611ec..b27efb56fd 100644
--- a/indra/newview/llfloatereditextdaycycle.cpp
+++ b/indra/newview/llfloatereditextdaycycle.cpp
@@ -354,6 +354,17 @@ void LLFloaterEditExtDayCycle::onOpen(const LLSD& key)
mCurrentTimeLabel->setTextArg("[DSC]", std::string());
}
+ // Adjust Time&Percentage labels' location according to length
+ LLRect label_rect = getChild<LLTextBox>("p0", true)->getRect();
+ F32 slider_width = mFramesSlider->getRect().getWidth();
+ for (int i = 1; i < max_elm; i++)
+ {
+ LLTextBox *pcnt_label = getChild<LLTextBox>("p" + llformat("%d", i), true);
+ LLRect new_rect = pcnt_label->getRect();
+ new_rect.mLeft = label_rect.mLeft + (S32)(slider_width * (F32)i / (F32)(max_elm - 1)) - (S32)(pcnt_label->getTextPixelWidth() / 2);
+ pcnt_label->setRect(new_rect);
+ }
+
// Altitudes&Track labels
LLUIString formatted_label = getString("sky_track_label");
const LLEnvironment::altitude_list_t &altitudes = LLEnvironment::instance().getRegionAltitudes();
diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp
index 380302b51e..eeb1c17f4b 100644
--- a/indra/newview/llfloaterland.cpp
+++ b/indra/newview/llfloaterland.cpp
@@ -148,6 +148,11 @@ public:
LLPanelLandEnvironment(LLSafeHandle<LLParcelSelection>& parcelp);
virtual bool isRegion() const override { return false; }
+ virtual bool isLargeEnough() override
+ {
+ LLParcel *parcelp = mParcel->getParcel();
+ return ((parcelp) ? (parcelp->getArea() >= MINIMUM_PARCEL_SIZE) : false);
+ }
virtual BOOL postBuild() override;
virtual void refresh() override;
@@ -3376,7 +3381,7 @@ bool LLPanelLandEnvironment::canEdit()
LLParcel *parcel = getParcel();
if (!parcel)
return false;
-
+
return LLEnvironment::instance().canAgentUpdateParcelEnvironment(parcel) && mAllowOverride;
}
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index 40e26ba3bd..1e40be5868 100644
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -150,6 +150,7 @@ public:
virtual bool isRegion() const override { return true; }
virtual LLParcel * getParcel() override { return nullptr; }
virtual bool canEdit() override { return LLEnvironment::instance().canAgentUpdateRegionEnvironment(); }
+ virtual bool isLargeEnough() override { return true; } // regions are always large enough.
bool refreshFromRegion(LLViewerRegion* region);
diff --git a/indra/newview/llpanelenvironment.cpp b/indra/newview/llpanelenvironment.cpp
index a150e66085..a324dfb93b 100644
--- a/indra/newview/llpanelenvironment.cpp
+++ b/indra/newview/llpanelenvironment.cpp
@@ -89,6 +89,9 @@ const std::string LLPanelEnvironmentInfo::STR_NO_PARCEL("str_no_parcel");
const std::string LLPanelEnvironmentInfo::STR_CROSS_REGION("str_cross_region");
const std::string LLPanelEnvironmentInfo::STR_LEGACY("str_legacy");
const std::string LLPanelEnvironmentInfo::STR_DISALLOWED("str_disallowed");
+const std::string LLPanelEnvironmentInfo::STR_TOO_SMALL("str_too_small");
+
+const S32 LLPanelEnvironmentInfo::MINIMUM_PARCEL_SIZE(128);
const U32 LLPanelEnvironmentInfo::DIRTY_FLAG_DAYCYCLE(0x01 << 0);
const U32 LLPanelEnvironmentInfo::DIRTY_FLAG_DAYLENGTH(0x01 << 1);
@@ -169,9 +172,6 @@ BOOL LLPanelEnvironmentInfo::postBuild()
mChangeMonitor = LLEnvironment::instance().setEnvironmentChanged([this](LLEnvironment::EnvSelection_t env, S32 version) { onEnvironmentChanged(env, version); });
- // if we ever allow LLEstateInfoModel to work for non-EMs, uncomment this line.
- // mUpdateConnection = LLEstateInfoModel::instance().setUpdateCallback(boost::bind(&LLPanelEnvironmentInfo::refreshFromEstate, this));
-
getChild<LLSettingsDropTarget>(SDT_DROP_TARGET)->setPanel(this);
return TRUE;
@@ -230,32 +230,6 @@ void LLPanelEnvironmentInfo::refresh()
return;
}
-// S32 rdo_selection = 0;
-// if ((!mCurrentEnvironment->mDayCycle) ||
-// ((mCurrentEnvironment->mParcelId == INVALID_PARCEL_ID) && (mCurrentEnvironment->mDayCycle->getAssetId() == LLSettingsDay::GetDefaultAssetId() )))
-// {
-// getChild<LLUICtrl>(EDT_INVNAME)->setValue("");
-// }
-// else if (!mCurrentEnvironment->mDayCycle->getAssetId().isNull())
-// {
-// rdo_selection = 1;
-//
-// LLUUID asset_id = mCurrentEnvironment->mDayCycle->getAssetId();
-//
-// std::string inventoryname = getInventoryNameForAssetId(asset_id);
-//
-// if (inventoryname.empty())
-// inventoryname = "(" + mCurrentEnvironment->mDayCycle->getName() + ")";
-//
-// getChild<LLUICtrl>(EDT_INVNAME)->setValue(inventoryname);
-// }
-// else
-// { // asset id is null so this is a custom environment
-// rdo_selection = 2;
-// getChild<LLUICtrl>(EDT_INVNAME)->setValue("");
-// }
-// getChild<LLRadioGroup>(RDG_ENVIRONMENT_SELECT)->setSelectedIndex(rdo_selection);
-
F32Hours daylength(mCurrentEnvironment->mDayLength);
F32Hours dayoffset(mCurrentEnvironment->mDayOffset);
@@ -264,8 +238,6 @@ void LLPanelEnvironmentInfo::refresh()
getChild<LLSliderCtrl>(SLD_DAYLENGTH)->setValue(daylength.value());
getChild<LLSliderCtrl>(SLD_DAYOFFSET)->setValue(dayoffset.value());
-// getChild<LLSliderCtrl>(SLD_DAYLENGTH)->setEnabled(canEdit() && (rdo_selection != 0) && !mCurrentEnvironment->mIsLegacy);
-// getChild<LLSliderCtrl>(SLD_DAYOFFSET)->setEnabled(canEdit() && (rdo_selection != 0) && !mCurrentEnvironment->mIsLegacy);
udpateApparentTimeOfDay();
@@ -297,12 +269,9 @@ void LLPanelEnvironmentInfo::refresh()
void LLPanelEnvironmentInfo::refreshFromEstate()
{
- /*TODO: Unfortunately only estate manager may get information from the LLEstateInfoModel.
- * The proletariat is not allowed to know what options are set for an estate. We should fix this.*/
LLViewerRegion *pRegion = gAgent.getRegion();
bool oldAO = mAllowOverride;
- //mAllowOverride = (!isRegion()) || LLEstateInfoModel::instance().getAllowEnvironmentOverride();
mAllowOverride = (isRegion() && LLEstateInfoModel::instance().getAllowEnvironmentOverride()) || pRegion->getAllowEnvironmentOverride();
if (oldAO != mAllowOverride)
refresh();
@@ -415,6 +384,7 @@ bool LLPanelEnvironmentInfo::setControlsEnabled(bool enabled)
{
bool is_unavailable(false);
bool is_legacy = (mCurrentEnvironment) ? mCurrentEnvironment->mIsLegacy : true;
+ bool is_bigenough = isLargeEnough();
if (mNoEnvironment || (!LLEnvironment::instance().isExtendedEnvironmentEnabled() && !isRegion()))
{
@@ -436,13 +406,18 @@ bool LLPanelEnvironmentInfo::setControlsEnabled(bool enabled)
is_unavailable = true;
getChild<LLTextBox>(TXT_DISABLED)->setText(getString(STR_DISALLOWED));
}
+ else if (!is_bigenough)
+ {
+ is_unavailable = true;
+ getChild<LLTextBox>(TXT_DISABLED)->setText(getString(STR_TOO_SMALL));
+ }
if (is_unavailable)
{
getChild<LLUICtrl>(PNL_SETTINGS)->setVisible(false);
getChild<LLUICtrl>(PNL_BUTTONS)->setVisible(false);
getChild<LLUICtrl>(PNL_DISABLED)->setVisible(true);
- getChild<LLUICtrl>(PNL_ENVIRONMENT_ALTITUDES)->setVisible(FALSE);
+ getChild<LLUICtrl>(PNL_ENVIRONMENT_ALTITUDES)->setVisible(false);
updateEditFloater(mCurrentEnvironment, false);
@@ -470,22 +445,6 @@ bool LLPanelEnvironmentInfo::setControlsEnabled(bool enabled)
return true;
}
-void LLPanelEnvironmentInfo::setApplyProgress(bool started)
-{
-// LLLoadingIndicator* indicator = getChild<LLLoadingIndicator>("progress_indicator");
-//
-// indicator->setVisible(started);
-//
-// if (started)
-// {
-// indicator->start();
-// }
-// else
-// {
-// indicator->stop();
-// }
-}
-
void LLPanelEnvironmentInfo::setDirtyFlag(U32 flag)
{
mDirtyFlag |= flag;
diff --git a/indra/newview/llpanelenvironment.h b/indra/newview/llpanelenvironment.h
index 6690386b92..dd3a309780 100644
--- a/indra/newview/llpanelenvironment.h
+++ b/indra/newview/llpanelenvironment.h
@@ -89,6 +89,9 @@ protected:
static const std::string STR_CROSS_REGION;
static const std::string STR_LEGACY;
static const std::string STR_DISALLOWED;
+ static const std::string STR_TOO_SMALL;
+
+ static const S32 MINIMUM_PARCEL_SIZE;
static const U32 DIRTY_FLAG_DAYCYCLE;
static const U32 DIRTY_FLAG_DAYLENGTH;
@@ -98,7 +101,6 @@ protected:
static const U32 DIRTY_FLAG_MASK;
bool setControlsEnabled(bool enabled);
- void setApplyProgress(bool started);
void setDirtyFlag(U32 flag);
void clearDirtyFlag(U32 flag);
bool getIsDirty() const { return (mDirtyFlag != 0); }
@@ -126,7 +128,7 @@ protected:
void onEnvironmentReceived(S32 parcel_id, LLEnvironment::EnvironmentInfo::ptr_t envifo);
static void _onEnvironmentReceived(LLHandle<LLPanel> that_h, S32 parcel_id, LLEnvironment::EnvironmentInfo::ptr_t envifo);
-
+ virtual bool isLargeEnough() = 0;
virtual void refreshFromSource() = 0;
std::string getInventoryNameForAssetId(LLUUID asset_id);
diff --git a/indra/newview/skins/default/xui/en/floater_edit_ext_day_cycle.xml b/indra/newview/skins/default/xui/en/floater_edit_ext_day_cycle.xml
index a6868d7f90..1aea1391d8 100644
--- a/indra/newview/skins/default/xui/en/floater_edit_ext_day_cycle.xml
+++ b/indra/newview/skins/default/xui/en/floater_edit_ext_day_cycle.xml
@@ -191,7 +191,7 @@
follows="left|top|right"
height="15"
layout="topleft"
- left_pad="39"
+ left_pad="37"
name="p1"
top_delta="0"
value="25%[DSC]"
@@ -200,7 +200,7 @@
follows="left|top|right"
height="15"
layout="topleft"
- left_pad="39"
+ left_pad="42"
name="p2"
top_delta="0"
value="50%[DSC]"
@@ -209,7 +209,7 @@
follows="left|top|right"
height="15"
layout="topleft"
- left_pad="39"
+ left_pad="42"
name="p3"
top_delta="0"
value="75%[DSC]"
@@ -218,7 +218,7 @@
follows="left|top|right"
height="15"
layout="topleft"
- left_pad="39"
+ left_pad="42"
name="p4"
top_delta="0"
value="100%[DSC]"
diff --git a/indra/newview/skins/default/xui/en/panel_region_environment.xml b/indra/newview/skins/default/xui/en/panel_region_environment.xml
index 7b4164268f..eac444c971 100644
--- a/indra/newview/skins/default/xui/en/panel_region_environment.xml
+++ b/indra/newview/skins/default/xui/en/panel_region_environment.xml
@@ -17,6 +17,7 @@
<string name="str_cross_region">Environmental settings are not available across region boundries.</string>
<string name="str_legacy">Environmental settings are not available on this region.</string>
<string name="str_disallowed">The estate manager does not allow changing parcel environments in this region.</string>
+ <string name="str_too_small">The parcel must be at least 128 square meeters to support an environment.</string>
<string name="str_empty">(empty)</string>
<layout_stack
width="530"