From e4b035d0cd3eaa76fd82643c17e3631c67387a54 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Thu, 5 Oct 2017 15:40:48 -0700 Subject: Skys settings object active. --- indra/newview/llenvadapters.cpp | 55 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 indra/newview/llenvadapters.cpp (limited to 'indra/newview/llenvadapters.cpp') diff --git a/indra/newview/llenvadapters.cpp b/indra/newview/llenvadapters.cpp new file mode 100644 index 0000000000..8bed0737dd --- /dev/null +++ b/indra/newview/llenvadapters.cpp @@ -0,0 +1,55 @@ +/** + * @file llenvadapters.cpp + * @brief Declaration of classes managing WindLight and water settings. + * + * $LicenseInfo:firstyear=2009&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2011, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" +#include "llenvadapters.h" + +#include "llsettingssky.h" +//========================================================================= + +LLSkySettingsAdapter::LLSkySettingsAdapter(): + mWLGamma(1.0f, LLSettingsSky::SETTING_GAMMA), + 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"), + mDensityMult(1.0f, LLSettingsSky::SETTING_DENSITY_MULTIPLIER, 1000), + mHazeHorizon(1.0f, LLSettingsSky::SETTING_HAZE_HORIZON), + mMaxAlt(4000.0f, LLSettingsSky::SETTING_MAX_Y), + // 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), + mCloudScale(0.42f, LLSettingsSky::SETTING_CLOUD_SCALE) +{ + +} -- cgit v1.2.3 From cc22ffc6d799544e8f2a9dfed6813081d908c88d Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Fri, 13 Oct 2017 17:17:49 -0700 Subject: Watter settings active and start of new joystick button type. --- indra/newview/llenvadapters.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'indra/newview/llenvadapters.cpp') diff --git a/indra/newview/llenvadapters.cpp b/indra/newview/llenvadapters.cpp index 8bed0737dd..34fd862655 100644 --- a/indra/newview/llenvadapters.cpp +++ b/indra/newview/llenvadapters.cpp @@ -28,6 +28,7 @@ #include "llenvadapters.h" #include "llsettingssky.h" +#include "llsettingswater.h" //========================================================================= LLSkySettingsAdapter::LLSkySettingsAdapter(): @@ -53,3 +54,20 @@ LLSkySettingsAdapter::LLSkySettingsAdapter(): { } + +LLWatterSettingsAdapter::LLWatterSettingsAdapter(): + mFogColor(LLColor4((22.f / 255.f), (43.f / 255.f), (54.f / 255.f), (0.0f)), LLSettingsWater::SETTING_FOG_COLOR, "WaterFogColor"), + mFogDensity(4, LLSettingsWater::SETTING_FOG_DENSITY, 2), + mUnderWaterFogMod(0.25, LLSettingsWater::SETTING_FOG_MOD), + mNormalScale(LLVector3(2.f, 2.f, 2.f), LLSettingsWater::SETTING_NORMAL_SCALE), + mFresnelScale(0.5f, LLSettingsWater::SETTING_FRESNEL_SCALE), + mFresnelOffset(0.4f, LLSettingsWater::SETTING_FRESNEL_OFFSET), + mScaleAbove(0.025f, LLSettingsWater::SETTING_SCALE_ABOVE), + mScaleBelow(0.2f, LLSettingsWater::SETTING_SCALE_BELOW), + mBlurMultiplier(0.1f, LLSettingsWater::SETTING_BLUR_MULTIPILER), + mWave1Dir(LLVector2(0.5f, 0.5f), LLSettingsWater::SETTING_WAVE1_DIR), + mWave2Dir(LLVector2(0.5f, 0.5f), LLSettingsWater::SETTING_WAVE2_DIR) + +{ + +} -- cgit v1.2.3 From 72270213f5eebd019b10bdd6ec15020ba3d2ecf5 Mon Sep 17 00:00:00 2001 From: "Graham Linden graham@lindenlab.com" Date: Wed, 28 Feb 2018 21:46:30 +0000 Subject: Add 3p package for adv atmospherics to autobuild. Mark legacy atmospherics code with ifdefs. Fix up legacy uplift to include new atmospherics settings. --- indra/newview/llenvadapters.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'indra/newview/llenvadapters.cpp') 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) { -- cgit v1.2.3 From acdead96cd194040f586c5a6e976beca7bb999c4 Mon Sep 17 00:00:00 2001 From: "Graham Linden graham@lindenlab.com" Date: Fri, 2 Mar 2018 23:29:28 +0000 Subject: Replace ifdefs with comments marking legacy atmo params. --- indra/newview/llenvadapters.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'indra/newview/llenvadapters.cpp') diff --git a/indra/newview/llenvadapters.cpp b/indra/newview/llenvadapters.cpp index 85da9e853d..57c7a75d52 100644 --- a/indra/newview/llenvadapters.cpp +++ b/indra/newview/llenvadapters.cpp @@ -34,7 +34,7 @@ LLSkySettingsAdapter::LLSkySettingsAdapter(): mWLGamma(1.0f, LLSettingsSky::SETTING_GAMMA), -#if SUPPORT_LEGACY_ATMOSPHERICS +// 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"), mBlueDensity(LLColor4(0.25f, 0.25f, 0.25f, 1.0f), LLSettingsSky::SETTING_BLUE_DENSITY, "WLBlueDensity"), @@ -43,7 +43,6 @@ LLSkySettingsAdapter::LLSkySettingsAdapter(): mDensityMult(1.0f, LLSettingsSky::SETTING_DENSITY_MULTIPLIER, 1000), 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), -- cgit v1.2.3 From 62a0d579b5eb23ea306ade07afba76f7cba685c7 Mon Sep 17 00:00:00 2001 From: "Graham Linden graham@lindenlab.com" Date: Wed, 7 Mar 2018 18:37:09 +0000 Subject: Move legacy atmospherics code outside of llvosky (begin teasing apart). --- indra/newview/llenvadapters.cpp | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'indra/newview/llenvadapters.cpp') diff --git a/indra/newview/llenvadapters.cpp b/indra/newview/llenvadapters.cpp index 57c7a75d52..fdbcf68fa4 100644 --- a/indra/newview/llenvadapters.cpp +++ b/indra/newview/llenvadapters.cpp @@ -33,16 +33,6 @@ LLSkySettingsAdapter::LLSkySettingsAdapter(): mWLGamma(1.0f, LLSettingsSky::SETTING_GAMMA), - -// 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"), - 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), - mDistanceMult(1.0f, LLSettingsSky::SETTING_DISTANCE_MULTIPLIER), - mMaxAlt(4000.0f, LLSettingsSky::SETTING_MAX_Y), // Lighting mLightnorm(LLColor4(0.f, 0.707f, -0.707f, 1.f), LLSettingsSky::SETTING_LIGHT_NORMAL), -- cgit v1.2.3