1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
/**
* @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"
#include "llsettingswater.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)
{
}
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)
{
}
|