summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/app_settings')
-rw-r--r--indra/newview/app_settings/high_graphics.xml39
-rw-r--r--indra/newview/app_settings/low_graphics.xml39
-rw-r--r--indra/newview/app_settings/mid_graphics.xml39
-rw-r--r--indra/newview/app_settings/shaders/class1/avatar/avatarF.glsl7
-rw-r--r--indra/newview/app_settings/shaders/class1/avatar/avatarSkinV.glsl7
-rw-r--r--indra/newview/app_settings/shaders/class1/avatar/avatarV.glsl22
-rw-r--r--indra/newview/app_settings/shaders/class1/avatar/eyeballF.glsl7
-rw-r--r--indra/newview/app_settings/shaders/class1/avatar/eyeballV.glsl19
-rw-r--r--indra/newview/app_settings/shaders/class1/avatar/pickAvatarF.glsl7
-rw-r--r--indra/newview/app_settings/shaders/class1/avatar/pickAvatarV.glsl10
-rw-r--r--indra/newview/app_settings/shaders/class1/effects/glowExtractF.glsl28
-rw-r--r--indra/newview/app_settings/shaders/class1/effects/glowExtractV.glsl14
-rw-r--r--indra/newview/app_settings/shaders/class1/effects/glowF.glsl31
-rw-r--r--indra/newview/app_settings/shaders/class1/effects/glowV.glsl22
-rw-r--r--indra/newview/app_settings/shaders/class1/environment/terrainF.glsl16
-rw-r--r--indra/newview/app_settings/shaders/class1/environment/terrainV.glsl13
-rw-r--r--indra/newview/app_settings/shaders/class1/environment/terrainWaterF.glsl23
-rw-r--r--indra/newview/app_settings/shaders/class1/environment/underWaterF.glsl45
-rw-r--r--indra/newview/app_settings/shaders/class1/environment/waterF.glsl96
-rw-r--r--indra/newview/app_settings/shaders/class1/environment/waterFogF.glsl20
-rw-r--r--indra/newview/app_settings/shaders/class1/environment/waterV.glsl90
-rw-r--r--indra/newview/app_settings/shaders/class1/interface/highlightF.glsl7
-rw-r--r--indra/newview/app_settings/shaders/class1/interface/highlightV.glsl15
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightF.glsl30
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightFullbrightF.glsl15
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyF.glsl15
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterF.glsl15
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightFuncSpecularV.glsl46
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightFuncV.glsl34
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightShinyF.glsl17
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightShinyWaterF.glsl17
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightSpecularV.glsl26
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightV.glsl89
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightWaterF.glsl15
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/sumLightsSpecularV.glsl35
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/sumLightsV.glsl29
-rwxr-xr-xindra/newview/app_settings/shaders/class1/objects/fullbrightF.glsl13
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/fullbrightShinyF.glsl13
-rwxr-xr-xindra/newview/app_settings/shaders/class1/objects/fullbrightShinyV.glsl29
-rwxr-xr-xindra/newview/app_settings/shaders/class1/objects/fullbrightV.glsl23
-rwxr-xr-xindra/newview/app_settings/shaders/class1/objects/fullbrightWaterF.glsl13
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/shinyF.glsl16
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/shinyV.glsl25
-rwxr-xr-xindra/newview/app_settings/shaders/class1/objects/shinyWaterF.glsl13
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/simpleF.glsl7
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/simpleV.glsl22
-rwxr-xr-xindra/newview/app_settings/shaders/class1/objects/simpleWaterF.glsl13
-rw-r--r--indra/newview/app_settings/shaders/class1/windlight/atmosphericsF.glsl13
-rw-r--r--indra/newview/app_settings/shaders/class1/windlight/atmosphericsHelpersV.glsl34
-rw-r--r--indra/newview/app_settings/shaders/class1/windlight/atmosphericsV.glsl15
-rw-r--r--indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsF.glsl13
-rw-r--r--indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsV.glsl19
-rw-r--r--indra/newview/app_settings/shaders/class1/windlight/gammaF.glsl19
-rw-r--r--indra/newview/app_settings/shaders/class1/windlight/transportF.glsl26
-rw-r--r--indra/newview/app_settings/shaders/class2/avatar/eyeballV.glsl21
-rw-r--r--indra/newview/app_settings/shaders/class2/effects/blurF.glsl31
-rw-r--r--indra/newview/app_settings/shaders/class2/effects/blurV.glsl35
-rw-r--r--indra/newview/app_settings/shaders/class2/effects/colorFilterF.glsl31
-rw-r--r--indra/newview/app_settings/shaders/class2/effects/drawQuadV.glsl14
-rw-r--r--indra/newview/app_settings/shaders/class2/effects/extractF.glsl22
-rw-r--r--indra/newview/app_settings/shaders/class2/effects/nightVisionF.glsl42
-rw-r--r--indra/newview/app_settings/shaders/class2/effects/simpleF.glsl14
-rw-r--r--indra/newview/app_settings/shaders/class2/environment/terrainF.glsl38
-rw-r--r--indra/newview/app_settings/shaders/class2/environment/terrainV.glsl52
-rwxr-xr-xindra/newview/app_settings/shaders/class2/environment/terrainWaterF.glsl39
-rw-r--r--indra/newview/app_settings/shaders/class2/environment/underWaterF.glsl88
-rw-r--r--indra/newview/app_settings/shaders/class2/environment/waterF.glsl223
-rw-r--r--indra/newview/app_settings/shaders/class2/environment/waterFogF.glsl54
-rw-r--r--indra/newview/app_settings/shaders/class2/lighting/lightF.glsl41
-rw-r--r--indra/newview/app_settings/shaders/class2/lighting/lightFullbrightF.glsl23
-rw-r--r--indra/newview/app_settings/shaders/class2/lighting/lightFullbrightShinyF.glsl30
-rw-r--r--indra/newview/app_settings/shaders/class2/lighting/lightFullbrightWaterF.glsl21
-rw-r--r--indra/newview/app_settings/shaders/class2/lighting/lightShinyF.glsl29
-rw-r--r--indra/newview/app_settings/shaders/class2/lighting/lightShinyWaterF.glsl27
-rw-r--r--indra/newview/app_settings/shaders/class2/lighting/lightSpecularV.glsl16
-rw-r--r--indra/newview/app_settings/shaders/class2/lighting/lightV.glsl128
-rw-r--r--indra/newview/app_settings/shaders/class2/lighting/lightWaterF.glsl21
-rw-r--r--indra/newview/app_settings/shaders/class2/lighting/sumLightsSpecularV.glsl41
-rw-r--r--indra/newview/app_settings/shaders/class2/lighting/sumLightsV.glsl34
-rwxr-xr-xindra/newview/app_settings/shaders/class2/objects/shinyV.glsl31
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/atmosphericsF.glsl24
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/atmosphericsHelpersV.glsl41
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl137
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsF.glsl34
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsV.glsl60
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/cloudsF.glsl76
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl163
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/gammaF.glsl24
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/skyF.glsl41
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/skyV.glsl138
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/transportF.glsl35
-rw-r--r--indra/newview/app_settings/shaders/class3/avatar/avatarV.glsl112
-rw-r--r--indra/newview/app_settings/shaders/class3/lighting/sumLightsSpecularV.glsl44
-rw-r--r--indra/newview/app_settings/shaders/class3/lighting/sumLightsV.glsl41
-rw-r--r--indra/newview/app_settings/shaders/shader_heirarchy.txt176
-rw-r--r--indra/newview/app_settings/ultra_graphics.xml39
-rw-r--r--indra/newview/app_settings/windlight/clouds2.tgabin0 -> 262935 bytes
-rw-r--r--indra/newview/app_settings/windlight/days/Default.xml36
-rw-r--r--indra/newview/app_settings/windlight/postprocesseffects.xml2
-rw-r--r--indra/newview/app_settings/windlight/skies/A%2D12AM.xml141
-rw-r--r--indra/newview/app_settings/windlight/skies/A%2D12PM.xml141
-rw-r--r--indra/newview/app_settings/windlight/skies/A%2D3AM.xml141
-rw-r--r--indra/newview/app_settings/windlight/skies/A%2D3PM.xml141
-rw-r--r--indra/newview/app_settings/windlight/skies/A%2D6AM.xml141
-rw-r--r--indra/newview/app_settings/windlight/skies/A%2D6PM.xml141
-rw-r--r--indra/newview/app_settings/windlight/skies/A%2D9AM.xml141
-rw-r--r--indra/newview/app_settings/windlight/skies/A%2D9PM.xml141
-rw-r--r--indra/newview/app_settings/windlight/skies/Barcelona.xml141
-rw-r--r--indra/newview/app_settings/windlight/skies/Blizzard.xml141
-rw-r--r--indra/newview/app_settings/windlight/skies/Blue%20Midday.xml141
-rw-r--r--indra/newview/app_settings/windlight/skies/Coastal%20Afternoon.xml141
-rw-r--r--indra/newview/app_settings/windlight/skies/Coastal%20Sunset.xml141
-rw-r--r--indra/newview/app_settings/windlight/skies/Default.xml141
-rw-r--r--indra/newview/app_settings/windlight/skies/Desert%20Sunset.xml141
-rw-r--r--indra/newview/app_settings/windlight/skies/Fine%20Day.xml141
-rw-r--r--indra/newview/app_settings/windlight/skies/Fluffy%20Big%20Clouds.xml141
-rw-r--r--indra/newview/app_settings/windlight/skies/Foggy.xml141
-rw-r--r--indra/newview/app_settings/windlight/skies/Funky%20Funky%20Funky.xml141
-rw-r--r--indra/newview/app_settings/windlight/skies/Funky%20Funky.xml141
-rw-r--r--indra/newview/app_settings/windlight/skies/Gelatto.xml141
-rw-r--r--indra/newview/app_settings/windlight/skies/Ghost.xml141
-rw-r--r--indra/newview/app_settings/windlight/skies/Incongruent%20Truths.xml141
-rw-r--r--indra/newview/app_settings/windlight/skies/Midday%201.xml141
-rw-r--r--indra/newview/app_settings/windlight/skies/Midday%202.xml141
-rw-r--r--indra/newview/app_settings/windlight/skies/Midday%203.xml141
-rw-r--r--indra/newview/app_settings/windlight/skies/Midday%204.xml141
-rw-r--r--indra/newview/app_settings/windlight/skies/Night.xml141
-rw-r--r--indra/newview/app_settings/windlight/skies/Pirate.xml141
-rw-r--r--indra/newview/app_settings/windlight/skies/Purple.xml141
-rw-r--r--indra/newview/app_settings/windlight/skies/Sailor%27s%20Delight.xml141
-rw-r--r--indra/newview/app_settings/windlight/skies/Sheer%20Surreality.xml141
-rw-r--r--indra/newview/app_settings/windlight/water/Default.xml43
-rw-r--r--indra/newview/app_settings/windlight/water/Glassy.xml43
-rw-r--r--indra/newview/app_settings/windlight/water/Murky.xml43
-rw-r--r--indra/newview/app_settings/windlight/water/Pond.xml43
-rw-r--r--indra/newview/app_settings/windlight/water/SNAKE%21%21%21.xml43
-rw-r--r--indra/newview/app_settings/windlight/water/Second%20Plague.xml43
-rw-r--r--indra/newview/app_settings/windlight/water/Valdez.xml43
138 files changed, 7961 insertions, 546 deletions
diff --git a/indra/newview/app_settings/high_graphics.xml b/indra/newview/app_settings/high_graphics.xml
new file mode 100644
index 0000000000..6368f7099e
--- /dev/null
+++ b/indra/newview/app_settings/high_graphics.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<settings version = "101">
+ <!--NO SHADERS-->
+ <RenderAvatarCloth value="FALSE"/>
+ <!--Default for now-->
+ <RenderAvatarLODFactor value="1.0"/>
+ <!--NO SHADERS-->
+ <RenderAvatarVP value="TRUE"/>
+ <!--Short Range-->
+ <RenderFarClip value="128"/>
+ <!--Default for now-->
+ <RenderFlexTimeFactor value="1"/>
+ <!--256... but they don't use this-->
+ <RenderGlowResolutionPow value="9"/>
+ <!--Sun/Moon only-->
+ <RenderLightingDetail value="1"/>
+ <!--Low number-->
+ <RenderMaxPartCount value="4096"/>
+ <!--bump okay-->
+ <RenderObjectBump value="TRUE"/>
+ <!--NO SHADERS-->
+ <RenderReflectionDetail value="2"/>
+ <!--Simple-->
+ <RenderTerrainDetail value="1"/>
+ <!--Default for now-->
+ <RenderTerrainLODFactor value="2"/>
+ <!--Default for now-->
+ <RenderTreeLODFactor value="0.5"/>
+ <!--Try Impostors-->
+ <RenderUseImpostors value="TRUE"/>
+ <!--Default for now-->
+ <RenderVolumeLODFactor value="1.125"/>
+ <!--NO SHADERS-->
+ <RenderWaterReflections value="FALSE"/>
+ <!--NO SHADERS-->
+ <VertexShaderEnable value="TRUE"/>
+ <!--NO SHADERS-->
+ <WindLightUseAtmosShaders value="TRUE"/>
+</settings>
diff --git a/indra/newview/app_settings/low_graphics.xml b/indra/newview/app_settings/low_graphics.xml
new file mode 100644
index 0000000000..3f67a70d7a
--- /dev/null
+++ b/indra/newview/app_settings/low_graphics.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<settings version = "101">
+ <!--NO SHADERS-->
+ <RenderAvatarCloth value="FALSE"/>
+ <!--Default for now-->
+ <RenderAvatarLODFactor value="0.5"/>
+ <!--NO SHADERS-->
+ <RenderAvatarVP value="FALSE"/>
+ <!--Short Range-->
+ <RenderFarClip value="64"/>
+ <!--Default for now-->
+ <RenderFlexTimeFactor value="0.5"/>
+ <!--256... but they don't use this-->
+ <RenderGlowResolutionPow value="8"/>
+ <!--Sun/Moon only-->
+ <RenderLightingDetail value="0"/>
+ <!--Low number-->
+ <RenderMaxPartCount value="1024"/>
+ <!--bump okay-->
+ <RenderObjectBump value="FALSE"/>
+ <!--NO SHADERS-->
+ <RenderReflectionDetail value="0"/>
+ <!--Simple-->
+ <RenderTerrainDetail value="0"/>
+ <!--Default for now-->
+ <RenderTerrainLODFactor value="1.0"/>
+ <!--Default for now-->
+ <RenderTreeLODFactor value="0.5"/>
+ <!--Try Impostors-->
+ <RenderUseImpostors value="TRUE"/>
+ <!--Default for now-->
+ <RenderVolumeLODFactor value="1.125"/>
+ <!--NO SHADERS-->
+ <RenderWaterReflections value="FALSE"/>
+ <!--NO SHADERS-->
+ <VertexShaderEnable value="FALSE"/>
+ <!--NO SHADERS-->
+ <WindLightUseAtmosShaders value="FALSE"/>
+</settings>
diff --git a/indra/newview/app_settings/mid_graphics.xml b/indra/newview/app_settings/mid_graphics.xml
new file mode 100644
index 0000000000..12da77da40
--- /dev/null
+++ b/indra/newview/app_settings/mid_graphics.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<settings version = "101">
+ <!--NO SHADERS-->
+ <RenderAvatarCloth value="FALSE"/>
+ <!--Default for now-->
+ <RenderAvatarLODFactor value="0.5"/>
+ <!--NO SHADERS-->
+ <RenderAvatarVP value="TRUE"/>
+ <!--Short Range-->
+ <RenderFarClip value="96"/>
+ <!--Default for now-->
+ <RenderFlexTimeFactor value="1"/>
+ <!--256... but they don't use this-->
+ <RenderGlowResolutionPow value="8"/>
+ <!--Sun/Moon only-->
+ <RenderLightingDetail value="1"/>
+ <!--Low number-->
+ <RenderMaxPartCount value="2048"/>
+ <!--bump okay-->
+ <RenderObjectBump value="TRUE"/>
+ <!--NO SHADERS-->
+ <RenderReflectionDetail value="0"/>
+ <!--Simple-->
+ <RenderTerrainDetail value="1"/>
+ <!--Default for now-->
+ <RenderTerrainLODFactor value="1.0"/>
+ <!--Default for now-->
+ <RenderTreeLODFactor value="0.5"/>
+ <!--Try Impostors-->
+ <RenderUseImpostors value="TRUE"/>
+ <!--Default for now-->
+ <RenderVolumeLODFactor value="1.125"/>
+ <!--NO SHADERS-->
+ <RenderWaterReflections value="FALSE"/>
+ <!--NO SHADERS-->
+ <VertexShaderEnable value="TRUE"/>
+ <!--NO SHADERS-->
+ <WindLightUseAtmosShaders value="FALSE"/>
+</settings>
diff --git a/indra/newview/app_settings/shaders/class1/avatar/avatarF.glsl b/indra/newview/app_settings/shaders/class1/avatar/avatarF.glsl
index 5731add4d5..b6cc7f7712 100644
--- a/indra/newview/app_settings/shaders/class1/avatar/avatarF.glsl
+++ b/indra/newview/app_settings/shaders/class1/avatar/avatarF.glsl
@@ -1,3 +1,10 @@
+/**
+ * @file avatarF.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
void default_lighting();
void main()
diff --git a/indra/newview/app_settings/shaders/class1/avatar/avatarSkinV.glsl b/indra/newview/app_settings/shaders/class1/avatar/avatarSkinV.glsl
index 1fcc001911..292dbfdab4 100644
--- a/indra/newview/app_settings/shaders/class1/avatar/avatarSkinV.glsl
+++ b/indra/newview/app_settings/shaders/class1/avatar/avatarSkinV.glsl
@@ -1,4 +1,9 @@
-vec4 calcLighting(vec3 pos, vec3 norm, vec4 color);
+/**
+ * @file avatarSkinV.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
attribute vec4 weight; //1
diff --git a/indra/newview/app_settings/shaders/class1/avatar/avatarV.glsl b/indra/newview/app_settings/shaders/class1/avatar/avatarV.glsl
index 50f9b0192e..ee3410d732 100644
--- a/indra/newview/app_settings/shaders/class1/avatar/avatarV.glsl
+++ b/indra/newview/app_settings/shaders/class1/avatar/avatarV.glsl
@@ -1,9 +1,13 @@
-void default_scatter(vec3 viewVec, vec3 lightDir);
+/**
+ * @file avatarV.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
mat4 getSkinnedTransform();
-vec2 getScatterCoord(vec3 viewVec, vec3 lightDir);
-
-attribute vec4 materialColor;
+void calcAtmospherics(vec3 inPositionEye);
void main()
{
@@ -24,12 +28,16 @@ void main()
norm = normalize(norm);
gl_Position = gl_ProjectionMatrix * pos;
-
+
//gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
- default_scatter(pos.xyz, gl_LightSource[0].position.xyz);
+ gl_FogFragCoord = length(pos.xyz);
- vec4 color = calcLighting(pos.xyz, norm, materialColor, gl_Color);
+ calcAtmospherics(pos.xyz);
+
+ vec4 color = calcLighting(pos.xyz, norm, gl_Color, vec4(0,0,0,0));
gl_FrontColor = color;
}
+
+
diff --git a/indra/newview/app_settings/shaders/class1/avatar/eyeballF.glsl b/indra/newview/app_settings/shaders/class1/avatar/eyeballF.glsl
index 5731add4d5..4d93c19441 100644
--- a/indra/newview/app_settings/shaders/class1/avatar/eyeballF.glsl
+++ b/indra/newview/app_settings/shaders/class1/avatar/eyeballF.glsl
@@ -1,3 +1,10 @@
+/**
+ * @file eyeballF.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
void default_lighting();
void main()
diff --git a/indra/newview/app_settings/shaders/class1/avatar/eyeballV.glsl b/indra/newview/app_settings/shaders/class1/avatar/eyeballV.glsl
index d436b4e00a..b3c988a924 100644
--- a/indra/newview/app_settings/shaders/class1/avatar/eyeballV.glsl
+++ b/indra/newview/app_settings/shaders/class1/avatar/eyeballV.glsl
@@ -1,7 +1,12 @@
-vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec3 baseCol);
-void default_scatter(vec3 viewVec, vec3 lightDir);
+/**
+ * @file eyeballV.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
-attribute vec4 materialColor;
+vec4 calcLightingSpecular(vec3 pos, vec3 norm, vec4 color, inout vec4 specularColor, vec4 baseCol);
+void calcAtmospherics(vec3 inPositionEye);
void main()
{
@@ -12,9 +17,11 @@ void main()
vec3 pos = (gl_ModelViewMatrix * gl_Vertex).xyz;
vec3 norm = normalize(gl_NormalMatrix * gl_Normal);
- vec4 color = calcLighting(pos, norm, materialColor, gl_Color.rgb);
- default_scatter(pos, gl_LightSource[0].position.xyz);
-
+ calcAtmospherics(pos.xyz);
+
+ vec4 specular = vec4(1.0);
+ vec4 color = calcLightingSpecular(pos, norm, gl_Color, specular, vec4(0.0));
gl_FrontColor = color;
+
}
diff --git a/indra/newview/app_settings/shaders/class1/avatar/pickAvatarF.glsl b/indra/newview/app_settings/shaders/class1/avatar/pickAvatarF.glsl
index b311afb59c..2019300418 100644
--- a/indra/newview/app_settings/shaders/class1/avatar/pickAvatarF.glsl
+++ b/indra/newview/app_settings/shaders/class1/avatar/pickAvatarF.glsl
@@ -1,3 +1,10 @@
+/**
+ * @file pickAvatarF.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
uniform sampler2D diffuseMap;
void main()
diff --git a/indra/newview/app_settings/shaders/class1/avatar/pickAvatarV.glsl b/indra/newview/app_settings/shaders/class1/avatar/pickAvatarV.glsl
index b6dcbe1693..12d8f9d2f9 100644
--- a/indra/newview/app_settings/shaders/class1/avatar/pickAvatarV.glsl
+++ b/indra/newview/app_settings/shaders/class1/avatar/pickAvatarV.glsl
@@ -1,4 +1,10 @@
-vec4 calcLighting(vec3 pos, vec3 norm, vec4 color);
+/**
+ * @file pickAvatarV.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
mat4 getSkinnedTransform();
void main()
@@ -14,4 +20,4 @@ void main()
gl_FrontColor = gl_Color;
gl_TexCoord[0] = gl_MultiTexCoord0;
gl_Position = gl_ProjectionMatrix * pos;
-} \ No newline at end of file
+}
diff --git a/indra/newview/app_settings/shaders/class1/effects/glowExtractF.glsl b/indra/newview/app_settings/shaders/class1/effects/glowExtractF.glsl
new file mode 100644
index 0000000000..dbdfe1174c
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/effects/glowExtractF.glsl
@@ -0,0 +1,28 @@
+/**
+ * @file glowExtractF.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+#extension GL_ARB_texture_rectangle : enable
+
+uniform sampler2DRect diffuseMap;
+uniform float minLuminance;
+uniform float maxExtractAlpha;
+uniform vec3 lumWeights;
+uniform vec3 warmthWeights;
+uniform float warmthAmount;
+
+void main()
+{
+ vec4 col = texture2DRect(diffuseMap, gl_TexCoord[0].xy);
+
+ /// CALCULATING LUMINANCE (Using NTSC lum weights)
+ /// http://en.wikipedia.org/wiki/Luma_%28video%29
+ float lum = smoothstep(minLuminance, 1.0, dot(col.rgb, lumWeights ) );
+ float warmth = smoothstep(minLuminance, 1.0, max(col.r * warmthWeights.r, max(col.g * warmthWeights.g, col.b * warmthWeights.b)) );
+
+ gl_FragColor.rgb = col.rgb;
+ gl_FragColor.a = max(col.a, mix(lum, warmth, warmthAmount) * maxExtractAlpha);
+}
diff --git a/indra/newview/app_settings/shaders/class1/effects/glowExtractV.glsl b/indra/newview/app_settings/shaders/class1/effects/glowExtractV.glsl
new file mode 100644
index 0000000000..61dfd2f126
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/effects/glowExtractV.glsl
@@ -0,0 +1,14 @@
+/**
+ * @file glowExtractV.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+
+void main()
+{
+ gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
+
+ gl_TexCoord[0].xy = gl_MultiTexCoord0.xy;
+}
diff --git a/indra/newview/app_settings/shaders/class1/effects/glowF.glsl b/indra/newview/app_settings/shaders/class1/effects/glowF.glsl
new file mode 100644
index 0000000000..21c7ad765f
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/effects/glowF.glsl
@@ -0,0 +1,31 @@
+/**
+ * @file glowF.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+uniform sampler2D diffuseMap;
+uniform float glowStrength;
+
+void main()
+{
+
+ vec4 col = vec4(0.0, 0.0, 0.0, 0.0);
+
+ // ATI compiler falls down on array initialization.
+ float kern[8];
+ kern[0] = 0.25; kern[1] = 0.5; kern[2] = 0.8; kern[3] = 1.0;
+ kern[4] = 1.0; kern[5] = 0.8; kern[6] = 0.5; kern[7] = 0.25;
+
+ col += kern[0] * texture2D(diffuseMap, gl_TexCoord[0].xy);
+ col += kern[1] * texture2D(diffuseMap, gl_TexCoord[1].xy);
+ col += kern[2] * texture2D(diffuseMap, gl_TexCoord[2].xy);
+ col += kern[3] * texture2D(diffuseMap, gl_TexCoord[3].xy);
+ col += kern[4] * texture2D(diffuseMap, gl_TexCoord[0].zw);
+ col += kern[5] * texture2D(diffuseMap, gl_TexCoord[1].zw);
+ col += kern[6] * texture2D(diffuseMap, gl_TexCoord[2].zw);
+ col += kern[7] * texture2D(diffuseMap, gl_TexCoord[3].zw);
+
+ gl_FragColor = vec4(col.rgb * glowStrength, col.a);
+}
diff --git a/indra/newview/app_settings/shaders/class1/effects/glowV.glsl b/indra/newview/app_settings/shaders/class1/effects/glowV.glsl
new file mode 100644
index 0000000000..13ce7c7854
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/effects/glowV.glsl
@@ -0,0 +1,22 @@
+/**
+ * @file glowV.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+uniform vec2 glowDelta;
+
+void main()
+{
+ gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
+
+ gl_TexCoord[0].xy = gl_MultiTexCoord0.xy + glowDelta*(-3.5);
+ gl_TexCoord[1].xy = gl_MultiTexCoord0.xy + glowDelta*(-2.5);
+ gl_TexCoord[2].xy = gl_MultiTexCoord0.xy + glowDelta*(-1.5);
+ gl_TexCoord[3].xy = gl_MultiTexCoord0.xy + glowDelta*(-0.5);
+ gl_TexCoord[0].zw = gl_MultiTexCoord0.xy + glowDelta*(0.5);
+ gl_TexCoord[1].zw = gl_MultiTexCoord0.xy + glowDelta*(1.5);
+ gl_TexCoord[2].zw = gl_MultiTexCoord0.xy + glowDelta*(2.5);
+ gl_TexCoord[3].zw = gl_MultiTexCoord0.xy + glowDelta*(3.5);
+}
diff --git a/indra/newview/app_settings/shaders/class1/environment/terrainF.glsl b/indra/newview/app_settings/shaders/class1/environment/terrainF.glsl
index fde370155d..2278c6916d 100644
--- a/indra/newview/app_settings/shaders/class1/environment/terrainF.glsl
+++ b/indra/newview/app_settings/shaders/class1/environment/terrainF.glsl
@@ -1,9 +1,13 @@
-void terrain_lighting(inout vec3 color);
-
-uniform sampler2D detail0; //0
-uniform sampler2D detail1; //2
-uniform sampler2D alphaRamp; //1
+/**
+ * @file terrainF.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+uniform sampler2D detail0;
+uniform sampler2D detail1;
+uniform sampler2D alphaRamp;
void main()
{
@@ -12,8 +16,6 @@ void main()
texture2D(detail0, gl_TexCoord[0].xy).rgb,
a);
- terrain_lighting(color);
-
gl_FragColor.rgb = color;
gl_FragColor.a = texture2D(alphaRamp, gl_TexCoord[3].xy).a;
}
diff --git a/indra/newview/app_settings/shaders/class1/environment/terrainV.glsl b/indra/newview/app_settings/shaders/class1/environment/terrainV.glsl
index 3153a80e93..112d669819 100644
--- a/indra/newview/app_settings/shaders/class1/environment/terrainV.glsl
+++ b/indra/newview/app_settings/shaders/class1/environment/terrainV.glsl
@@ -1,7 +1,11 @@
-vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
-void default_scatter(vec3 viewVec, vec3 lightDir);
+/**
+ * @file terrainV.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
-attribute vec4 materialColor;
+vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
vec4 texgen_object(vec4 vpos, vec4 tc, mat4 mat, vec4 tp0, vec4 tp1)
{
@@ -25,7 +29,7 @@ void main()
vec4 pos = gl_ModelViewMatrix * gl_Vertex;
vec3 norm = normalize(gl_NormalMatrix * gl_Normal);
- vec4 color = calcLighting(pos.xyz, norm, materialColor, gl_Color);
+ vec4 color = calcLighting(pos.xyz, norm, vec4(1,1,1,1), gl_Color);
gl_FrontColor = color;
@@ -33,5 +37,4 @@ void main()
gl_TexCoord[1] = gl_TextureMatrix[1]*gl_MultiTexCoord1;
gl_TexCoord[2] = texgen_object(gl_Vertex,gl_MultiTexCoord2,gl_TextureMatrix[2],gl_ObjectPlaneS[2],gl_ObjectPlaneT[2]);
gl_TexCoord[3] = gl_TextureMatrix[3]*gl_MultiTexCoord3;
- default_scatter(pos.xyz, gl_LightSource[0].position.xyz);
}
diff --git a/indra/newview/app_settings/shaders/class1/environment/terrainWaterF.glsl b/indra/newview/app_settings/shaders/class1/environment/terrainWaterF.glsl
new file mode 100644
index 0000000000..e2f68e8826
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/environment/terrainWaterF.glsl
@@ -0,0 +1,23 @@
+/**
+ * @file terrainWaterF.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+// this class1 shader is just a copy of terrainF
+
+uniform sampler2D detail0;
+uniform sampler2D detail1;
+uniform sampler2D alphaRamp;
+
+void main()
+{
+ float a = texture2D(alphaRamp, gl_TexCoord[1].xy).a;
+ vec3 color = mix(texture2D(detail1, gl_TexCoord[2].xy).rgb,
+ texture2D(detail0, gl_TexCoord[0].xy).rgb,
+ a);
+
+ gl_FragColor.rgb = color;
+ gl_FragColor.a = texture2D(alphaRamp, gl_TexCoord[3].xy).a;
+}
diff --git a/indra/newview/app_settings/shaders/class1/environment/underWaterF.glsl b/indra/newview/app_settings/shaders/class1/environment/underWaterF.glsl
new file mode 100644
index 0000000000..f1740a4dcd
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/environment/underWaterF.glsl
@@ -0,0 +1,45 @@
+/**
+ * @file underWaterF.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+uniform sampler2D diffuseMap;
+uniform sampler2D bumpMap;
+uniform sampler2D screenTex;
+
+uniform float refScale;
+uniform vec4 waterFogColor;
+
+//bigWave is (refCoord.w, view.w);
+varying vec4 refCoord;
+varying vec4 littleWave;
+varying vec4 view;
+
+void main()
+{
+ vec4 color;
+
+ //get bigwave normal
+ vec3 wavef = texture2D(bumpMap, vec2(refCoord.w, view.w)).xyz*2.0;
+
+ //get detail normals
+ vec3 dcol = texture2D(bumpMap, littleWave.xy).rgb*0.75;
+ dcol += texture2D(bumpMap, littleWave.zw).rgb*1.25;
+
+ //interpolate between big waves and little waves (big waves in deep water)
+ wavef = (wavef+dcol)*0.5;
+
+ //crunch normal to range [-1,1]
+ wavef -= vec3(1,1,1);
+
+ //figure out distortion vector (ripply)
+ vec2 distort = (refCoord.xy/refCoord.z) * 0.5 + 0.5;
+ distort = distort+wavef.xy*refScale;
+
+ vec4 fb = texture2D(screenTex, distort);
+
+ gl_FragColor.rgb = mix(waterFogColor.rgb, fb.rgb, waterFogColor.a * 0.001 + 0.999);
+ gl_FragColor.a = fb.a;
+}
diff --git a/indra/newview/app_settings/shaders/class1/environment/waterF.glsl b/indra/newview/app_settings/shaders/class1/environment/waterF.glsl
index f8b8031ce6..1c14381df9 100644
--- a/indra/newview/app_settings/shaders/class1/environment/waterF.glsl
+++ b/indra/newview/app_settings/shaders/class1/environment/waterF.glsl
@@ -1,22 +1,94 @@
-void water_lighting(inout vec3 diff);
+/**
+ * @file waterF.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+vec3 scaleSoftClip(vec3 inColor);
+vec3 atmosTransport(vec3 inColor);
-uniform samplerCube environmentMap;
uniform sampler2D diffuseMap;
-uniform sampler2D bumpMap;
+uniform sampler2D bumpMap;
+uniform sampler2D screenTex;
+uniform sampler2D refTex;
+
+uniform float sunAngle;
+uniform float sunAngle2;
+uniform float scaledAngle;
+uniform vec3 lightDir;
+uniform vec3 specular;
+uniform float lightExp;
+uniform float refScale;
+uniform float kd;
+uniform vec2 screenRes;
+uniform vec3 normScale;
+uniform float fresnelScale;
+uniform float fresnelOffset;
+uniform float blurMultiplier;
+uniform vec4 fogCol;
-varying vec4 specular;
+//bigWave is (refCoord.w, view.w);
+varying vec4 refCoord;
+varying vec4 littleWave;
+varying vec4 view;
void main()
{
- vec4 depth = texture2D(diffuseMap, gl_TexCoord[0].xy);
- vec4 diff = texture2D(bumpMap, gl_TexCoord[1].xy);
- vec3 ref = textureCube(environmentMap, gl_TexCoord[2].xyz).rgb;
+ vec3 viewVec = view.xyz;
+ vec4 color;
+
+ float dist = length(viewVec.xy);
+
+ //normalize view vector
+ viewVec = normalize(viewVec);
+
+ //get wave normals
+ vec3 wavef = texture2D(bumpMap, vec2(refCoord.w, view.w)).xyz*2.0;
+
+ //get detail normals
+ vec3 dcol = texture2D(bumpMap, littleWave.xy).rgb*0.75;
+ dcol += texture2D(bumpMap, littleWave.zw).rgb*1.25;
+
+ //interpolate between big waves and little waves (big waves in deep water)
+ wavef = (wavef + dcol) * 0.5;
+
+ //crunch normal to range [-1,1]
+ wavef -= vec3(1,1,1);
+ wavef = normalize(wavef);
+
+ //get base fresnel components
- diff.rgb *= depth.rgb;
+ float df = dot(viewVec,wavef) * fresnelScale + fresnelOffset;
+
+ vec2 distort = (refCoord.xy/refCoord.z) * 0.5 + 0.5;
+
+ float dist2 = dist;
+ dist = max(dist, 5.0);
+
+ //get reflected color
+ vec2 refdistort = wavef.xy*dot(normScale, vec3(0.333));
+ vec2 refvec = distort+refdistort/dist;
+ vec4 refcol = texture2D(refTex, refvec);
+
+ //get specular component
+ float spec = clamp(dot(lightDir, (reflect(viewVec,wavef))),0.0,1.0);
+
+ //harden specular
+ spec = pow(spec, lightExp);
+
+ //figure out distortion vector (ripply)
+ vec2 distort2 = distort+wavef.xy*refScale/max(dist*df, 1.0);
- vec3 col = mix(diff.rgb, ref, specular.a)+specular.rgb*diff.rgb;
+ vec4 fb = texture2D(screenTex, distort2);
+
+ //mix with reflection
+ color.rgb = mix(mix(fogCol.rgb, fb.rgb, fogCol.a), refcol.rgb, df);
+ color.rgb += spec * specular;
- water_lighting(col.rgb);
- gl_FragColor.rgb = col.rgb;
- gl_FragColor.a = (gl_Color.a+depth.a)*0.5;
+ color.rgb = atmosTransport(color.rgb);
+ color.rgb = scaleSoftClip(color.rgb);
+ color.a = spec * sunAngle2;
+
+ gl_FragColor = color;
}
diff --git a/indra/newview/app_settings/shaders/class1/environment/waterFogF.glsl b/indra/newview/app_settings/shaders/class1/environment/waterFogF.glsl
new file mode 100644
index 0000000000..59e44fa871
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/environment/waterFogF.glsl
@@ -0,0 +1,20 @@
+/**
+ * @file waterFogF.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+vec4 applyWaterFog(vec4 color)
+{
+ // GL_EXP2 Fog
+ float fog = exp(-gl_Fog.density * gl_Fog.density * gl_FogFragCoord * gl_FogFragCoord);
+ // GL_EXP Fog
+ // float fog = exp(-gl_Fog.density * gl_FogFragCoord);
+ // GL_LINEAR Fog
+ // float fog = (gl_Fog.end - gl_FogFragCoord) * gl_Fog.scale;
+ fog = clamp(fog, 0.0, 1.0);
+ color.rgb = mix(gl_Fog.color.rgb, color.rgb, fog);
+ return color;
+}
+
diff --git a/indra/newview/app_settings/shaders/class1/environment/waterV.glsl b/indra/newview/app_settings/shaders/class1/environment/waterV.glsl
index 873a6fcb34..d332798103 100644
--- a/indra/newview/app_settings/shaders/class1/environment/waterV.glsl
+++ b/indra/newview/app_settings/shaders/class1/environment/waterV.glsl
@@ -1,41 +1,73 @@
-void default_scatter(vec3 viewVec, vec3 lightDir);
-vec4 calcLightingSpecular(vec3 pos, vec3 norm, vec4 color, inout vec4 specularColor, vec3 baseCol);
-vec2 getScatterCoord(vec3 viewVec, vec3 lightDir);
+/**
+ * @file waterV.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
-varying vec4 specular;
+void calcAtmospherics(vec3 inPositionEye);
-vec4 texgen_object(vec4 vpos, vec4 tc, mat4 mat, vec4 tp0, vec4 tp1)
+uniform vec2 d1;
+uniform vec2 d2;
+uniform float time;
+uniform vec3 eyeVec;
+uniform float waterHeight;
+
+varying vec4 refCoord;
+varying vec4 littleWave;
+varying vec4 view;
+
+float wave(vec2 v, float t, float f, vec2 d, float s)
{
- vec4 tcoord;
-
- tcoord.x = dot(vpos, tp0);
- tcoord.y = dot(vpos, tp1);
- tcoord.z = tc.z;
- tcoord.w = tc.w;
-
- tcoord = mat * tcoord;
-
- return tcoord;
+ return (dot(d, v)*f + t*s)*f;
}
void main()
{
//transform vertex
- gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
- gl_TexCoord[0] = gl_MultiTexCoord0;
- gl_TexCoord[1] = texgen_object(gl_Vertex, gl_MultiTexCoord1, gl_TextureMatrix[1], gl_ObjectPlaneS[1],gl_ObjectPlaneT[1]);
+ vec4 position = gl_Vertex;
+ mat4 modelViewProj = gl_ModelViewProjectionMatrix;
- vec3 pos = (gl_ModelViewMatrix * gl_Vertex).xyz;
- vec3 norm = normalize(gl_NormalMatrix * gl_Normal);
- vec4 spec = gl_Color;
- gl_FrontColor.rgb = calcLightingSpecular(pos, norm, gl_Color, spec, vec3(0.0, 0.0, 0.0)).rgb;
- gl_FrontColor.a = gl_Color.a;
- specular = spec;
- specular.a = gl_Color.a*0.5;
- vec3 ref = reflect(pos,norm);
+ vec4 oPosition;
+
+ //get view vector
+ vec3 oEyeVec;
+ oEyeVec.xyz = position.xyz-eyeVec;
+
+ float d = length(oEyeVec.xy);
+ float ld = min(d, 2560.0);
- gl_TexCoord[2] = gl_TextureMatrix[2]*vec4(ref,1);
+ position.xy = eyeVec.xy + oEyeVec.xy/d*ld;
+ view.xyz = oEyeVec;
+
+ d = clamp(ld/1536.0-0.5, 0.0, 1.0);
+ d *= d;
- default_scatter(pos.xyz, gl_LightSource[0].position.xyz);
+ oPosition = position;
+ oPosition.z = mix(oPosition.z, max(eyeVec.z*0.75, 0.0), d);
+ oPosition = modelViewProj * oPosition;
+ refCoord.xyz = oPosition.xyz + vec3(0,0,0.2);
+
+ //get wave position parameter (create sweeping horizontal waves)
+ vec3 v = position.xyz;
+ v.x += (cos(v.x*0.08/*+time*0.01*/)+sin(v.y*0.02))*6.0;
+
+ //push position for further horizon effect.
+ position.xyz = oEyeVec.xyz*(waterHeight/oEyeVec.z);
+ position.w = 1.0;
+ position = position*gl_ModelViewMatrix;
+
+ calcAtmospherics((gl_ModelViewMatrix * gl_Vertex).xyz);
+
+
+ //pass wave parameters to pixel shader
+ vec2 bigWave = (v.xy) * vec2(0.04,0.04) + d1 * time * 0.055;
+ //get two normal map (detail map) texture coordinates
+ littleWave.xy = (v.xy) * vec2(0.6, 1.2) + d2 * time * 0.05;
+ // littleWave.zw = (v.xy) * vec2(0.07, 0.15) - d1 * time * 0.043;
+ littleWave.zw = (v.xy) * vec2(0.3, 0.6) + d1 * time * 0.1;
+ view.w = bigWave.y;
+ refCoord.w = bigWave.x;
+
+ gl_Position = oPosition;
}
-
diff --git a/indra/newview/app_settings/shaders/class1/interface/highlightF.glsl b/indra/newview/app_settings/shaders/class1/interface/highlightF.glsl
index 1e342fb51b..328c41652d 100644
--- a/indra/newview/app_settings/shaders/class1/interface/highlightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/interface/highlightF.glsl
@@ -1,3 +1,10 @@
+/**
+ * @file highlightF.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
uniform sampler2D diffuseMap;
void main()
diff --git a/indra/newview/app_settings/shaders/class1/interface/highlightV.glsl b/indra/newview/app_settings/shaders/class1/interface/highlightV.glsl
index bb6707b2a9..a9ea6e856a 100644
--- a/indra/newview/app_settings/shaders/class1/interface/highlightV.glsl
+++ b/indra/newview/app_settings/shaders/class1/interface/highlightV.glsl
@@ -1,9 +1,14 @@
-attribute vec4 materialColor;
+/**
+ * @file highlightV.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
void main()
{
//transform vertex
- gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
+ gl_Position = ftransform();
vec3 pos = (gl_ModelViewMatrix * gl_Vertex).xyz;
pos = normalize(pos);
float d = dot(pos, normalize(gl_NormalMatrix * gl_Normal));
@@ -11,10 +16,10 @@ void main()
d = 1.0 - d;
d *= d;
- d = min(d, materialColor.a*2.0);
+ d = min(d, gl_Color.a*2.0);
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
- gl_FrontColor.rgb = materialColor.rgb;
- gl_FrontColor.a = max(d, materialColor.a);
+ gl_FrontColor.rgb = gl_Color.rgb;
+ gl_FrontColor.a = max(d, gl_Color.a);
}
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightF.glsl
index c169fceb88..9ab986be6d 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightF.glsl
@@ -1,31 +1,15 @@
-void applyScatter(inout vec3 color);
+/**
+ * @file lightF.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
uniform sampler2D diffuseMap;
void default_lighting()
{
- vec4 color = gl_Color * texture2D(diffuseMap, gl_TexCoord[0].xy);
- //applyScatter(color.rgb);
+ color = gl_Color * texture2D(diffuseMap, gl_TexCoord[0].xy);
gl_FragColor = color;
}
-void alpha_lighting()
-{
- default_lighting();
-}
-
-void water_lighting(inout vec3 diff)
-{
- applyScatter(diff);
-}
-
-void terrain_lighting(inout vec3 color)
-{
- color.rgb *= gl_Color.rgb;
- applyScatter(color);
-}
-
-vec4 getLightColor()
-{
- return gl_Color;
-} \ No newline at end of file
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightF.glsl
new file mode 100644
index 0000000000..b12cca9126
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightF.glsl
@@ -0,0 +1,15 @@
+/**
+ * @file lightFullbrightF.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+
+uniform sampler2D diffuseMap;
+
+void fullbright_lighting()
+{
+ gl_FragColor = texture2D(diffuseMap, gl_TexCoord[0].xy);
+}
+
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyF.glsl
new file mode 100644
index 0000000000..bc795a7513
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyF.glsl
@@ -0,0 +1,15 @@
+/**
+ * @file lightFullbrightShinyF.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+
+uniform sampler2D diffuseMap;
+uniform samplerCube environmentMap;
+
+void fullbright_shiny_lighting()
+{
+ gl_FragColor = texture2D(diffuseMap, gl_TexCoord[0].xy);
+}
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterF.glsl
new file mode 100644
index 0000000000..b13088fb19
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterF.glsl
@@ -0,0 +1,15 @@
+/**
+ * @file lightFullbrightWaterF.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+
+uniform sampler2D diffuseMap;
+
+void fullbright_lighting_water()
+{
+ gl_FragColor = texture2D(diffuseMap, gl_TexCoord[0].xy);
+}
+
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFuncSpecularV.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFuncSpecularV.glsl
new file mode 100644
index 0000000000..bbbd9f3dfe
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightFuncSpecularV.glsl
@@ -0,0 +1,46 @@
+/**
+ * @file lightFuncSpecularV.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+float calcDirectionalLight(vec3 n, vec3 l)
+{
+ float a = max(dot(n,l),0.0);
+ return a;
+}
+
+float calcDirectionalSpecular(vec3 view, vec3 n, vec3 l)
+{
+ return pow(max(dot(reflect(view, n),l), 0.0),8.0);
+}
+
+float calcDirectionalLightSpecular(inout vec4 specular, vec3 view, vec3 n, vec3 l, vec3 lightCol, float da)
+{
+
+ specular.rgb += calcDirectionalSpecular(view,n,l)*lightCol*da;
+ return max(dot(n,l),0.0);
+}
+
+vec3 calcPointLightSpecular(inout vec4 specular, vec3 view, vec3 v, vec3 n, vec3 l, float r, float pw, vec3 lightCol)
+{
+ //get light vector
+ vec3 lv = l-v;
+
+ //get distance
+ float d = length(lv);
+
+ //normalize light vector
+ lv *= 1.0/d;
+
+ //distance attenuation
+ float da = clamp(1.0/(r * d), 0.0, 1.0);
+
+ //angular attenuation
+
+ da *= calcDirectionalLightSpecular(specular, view, n, lv, lightCol, da);
+
+ return da*lightCol;
+}
+
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFuncV.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFuncV.glsl
new file mode 100644
index 0000000000..3e8fdfb3e4
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightFuncV.glsl
@@ -0,0 +1,34 @@
+/**
+ * @file lightFuncV.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+
+float calcDirectionalLight(vec3 n, vec3 l)
+{
+ float a = max(dot(n,l),0.0);
+ return a;
+}
+
+float calcPointLight(vec3 v, vec3 n, vec4 lp, float la)
+{
+ //get light vector
+ vec3 lv = lp.xyz-v;
+
+ //get distance
+ float d = length(lv);
+
+ //normalize light vector
+ lv *= 1.0/d;
+
+ //distance attenuation
+ float da = clamp(1.0/(la * d), 0.0, 1.0);
+
+ //angular attenuation
+ da *= calcDirectionalLight(n, lv);
+
+ return da;
+}
+
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightShinyF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightShinyF.glsl
new file mode 100644
index 0000000000..c6f7f8b81b
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightShinyF.glsl
@@ -0,0 +1,17 @@
+/**
+ * @file lightShinyF.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+
+uniform sampler2D diffuseMap;
+uniform samplerCube environmentMap;
+
+void shiny_lighting()
+{
+ color = gl_Color * texture2D(diffuseMap, gl_TexCoord[0].xy);
+ gl_FragColor = color;
+}
+
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightShinyWaterF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightShinyWaterF.glsl
new file mode 100644
index 0000000000..75f61ccdf1
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightShinyWaterF.glsl
@@ -0,0 +1,17 @@
+/**
+ * @file lightShinyWaterF.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+
+uniform sampler2D diffuseMap;
+uniform samplerCube environmentMap;
+
+void shiny_lighting_water()
+{
+ color = gl_Color * texture2D(diffuseMap, gl_TexCoord[0].xy);
+ gl_FragColor = color;
+}
+
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightSpecularV.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightSpecularV.glsl
new file mode 100644
index 0000000000..853212923c
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightSpecularV.glsl
@@ -0,0 +1,26 @@
+/**
+ * @file lightV.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+float calcDirectionalLight(vec3 n, vec3 l);
+
+// Same as non-specular lighting in lightV.glsl
+vec4 calcLightingSpecular(vec3 pos, vec3 norm, vec4 color, inout vec4 specularColor, vec4 baseCol)
+{
+ specularColor.rgb = vec3(0.0, 0.0, 0.0);
+ vec4 col;
+ col.a = color.a;
+
+ col.rgb = gl_LightModel.ambient.rgb + baseCol.rgb;
+
+ col.rgb += gl_LightSource[0].diffuse.rgb*calcDirectionalLight(norm, gl_LightSource[0].position.xyz);
+ col.rgb += gl_LightSource[1].diffuse.rgb*calcDirectionalLight(norm, gl_LightSource[1].position.xyz);
+
+ col.rgb = min(col.rgb*color.rgb, 1.0);
+
+ return col;
+}
+
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightV.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightV.glsl
index e3816318a1..8c2813a859 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightV.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightV.glsl
@@ -1,66 +1,11 @@
+/**
+ * @file lightV.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
-float calcDirectionalLight(vec3 n, vec3 l)
-{
- float a = max(dot(n,l),0.0);
- return a;
-}
-
-float calcPointLight(vec3 v, vec3 n, vec3 l, float r, float pw)
-{
- //get light vector
- vec3 lv = l-v;
-
- //get distance
- float d = length(lv);
-
- //normalize light vector
- lv *= 1.0/d;
-
- //distance attenuation
- float da = max((r-d)/r, 0.0);
-
- //da = pow(da, pw);
-
- //angular attenuation
- da *= calcDirectionalLight(n, lv);
-
- return da;
-}
-
-float calcDirectionalSpecular(vec3 view, vec3 n, vec3 l)
-{
- float a = max(dot(n,l),0.0);
- return a;
-}
-
-float calcDirectionalLightSpecular(inout vec4 specular, vec3 view, vec3 n, vec3 l, vec3 lightCol, float da)
-{
-
- specular.rgb += calcDirectionalSpecular(view,n,l)*lightCol*da;
- return calcDirectionalLight(n,l);
-}
-
-vec3 calcPointLightSpecular(inout vec4 specular, vec3 view, vec3 v, vec3 n, vec3 l, float r, float pw, vec3 lightCol)
-{
- //get light vector
- vec3 lv = l-v;
-
- //get distance
- float d = length(lv);
-
- //normalize light vector
- lv *= 1.0/d;
-
- //distance attenuation
- float da = clamp((r-d)/r, 0.0, 1.0);
-
- //da = pow(da, pw);
-
- //angular attenuation
- da *= calcDirectionalLightSpecular(specular, view, n, lv, lightCol, da);
-
- return da*lightCol;
-}
+float calcDirectionalLight(vec3 n, vec3 l);
vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseLight)
{
@@ -77,23 +22,3 @@ vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseLight)
return col;
}
-vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec3 baseLight)
-{
- return calcLighting(pos, norm, color, vec4(baseLight, 1.0));
-}
-
-vec4 calcLighting(vec3 pos, vec3 norm, vec4 color)
-{
- return calcLighting(pos, norm, color, vec3(0.0,0.0,0.0));
-}
-
-vec4 calcLightingSpecular(vec3 pos, vec3 norm, vec4 color, inout vec4 specularColor, vec4 baseCol)
-{
- specularColor.rgb = vec3(0.0, 0.0, 0.0);
- return calcLighting(pos, norm, color, baseCol);
-}
-
-vec4 calcLightingSpecular(vec3 pos, vec3 norm, vec4 color, inout vec4 specularColor, vec3 baseCol)
-{
- return calcLightingSpecular(pos, norm, color, specularColor, vec4(baseCol, 1.0));
-}
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightWaterF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightWaterF.glsl
new file mode 100644
index 0000000000..81dff1ef39
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightWaterF.glsl
@@ -0,0 +1,15 @@
+/**
+ * @file lightWaterF.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+uniform sampler2D diffuseMap;
+
+void default_lighting_water()
+{
+ vec4 color = gl_Color * texture2D(diffuseMap, gl_TexCoord[0].xy);
+ gl_FragColor = color;
+}
+
diff --git a/indra/newview/app_settings/shaders/class1/lighting/sumLightsSpecularV.glsl b/indra/newview/app_settings/shaders/class1/lighting/sumLightsSpecularV.glsl
new file mode 100644
index 0000000000..218585fb86
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/lighting/sumLightsSpecularV.glsl
@@ -0,0 +1,35 @@
+/**
+ * @file sumLightsSpecularV.glsl
+ *
+ * Copyright (c) 2005-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+float calcDirectionalLightSpecular(inout vec4 specular, vec3 view, vec3 n, vec3 l, vec3 lightCol, float da);
+vec3 atmosAmbient(vec3 light);
+vec3 atmosAffectDirectionalLight(float lightIntensity);
+vec3 atmosGetDiffuseSunlightColor();
+vec3 scaleDownLight(vec3 light);
+
+vec4 sumLightsSpecular(vec3 pos, vec3 norm, vec4 color, inout vec4 specularColor, vec4 baseCol)
+{
+ vec4 col;
+ col.a = color.a;
+
+
+ vec3 view = normalize(pos);
+
+ /// collect all the specular values from each calcXXXLightSpecular() function
+ vec4 specularSum = vec4(0.0);
+
+ col.rgb = gl_LightSource[1].diffuse.rgb * calcDirectionalLightSpecular(specularColor, view, norm, gl_LightSource[1].position.xyz, gl_LightSource[1].diffuse.rgb, 1.0);
+ col.rgb = scaleDownLight(col.rgb);
+ col.rgb += atmosAmbient(baseCol.rgb);
+ col.rgb += atmosAffectDirectionalLight(calcDirectionalLightSpecular(specularSum, view, norm, gl_LightSource[0].position.xyz,atmosGetDiffuseSunlightColor() * baseCol.a, 1.0));
+
+ col.rgb = min(col.rgb * color.rgb, 1.0);
+ specularColor.rgb = min(specularColor.rgb * specularSum.rgb, 1.0);
+
+ col.rgb += specularColor.rgb;
+
+ return col;
+}
diff --git a/indra/newview/app_settings/shaders/class1/lighting/sumLightsV.glsl b/indra/newview/app_settings/shaders/class1/lighting/sumLightsV.glsl
new file mode 100644
index 0000000000..e5361033ef
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/lighting/sumLightsV.glsl
@@ -0,0 +1,29 @@
+/**
+ * @file sumLightsV.glsl
+ *
+ * Copyright (c) 2005-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+float calcDirectionalLight(vec3 n, vec3 l);
+
+vec3 atmosAmbient(vec3 light);
+vec3 atmosAffectDirectionalLight(float lightIntensity);
+vec3 scaleDownLight(vec3 light);
+
+vec4 sumLights(vec3 pos, vec3 norm, vec4 color, vec4 baseLight)
+{
+ vec4 col;
+ col.a = color.a;
+
+ col.rgb = gl_LightSource[1].diffuse.rgb * calcDirectionalLight(norm, gl_LightSource[1].position.xyz);
+ col.rgb = scaleDownLight(col.rgb);
+ col.rgb += atmosAmbient(baseLight.rgb);
+ col.rgb += atmosAffectDirectionalLight(calcDirectionalLight(norm, gl_LightSource[0].position.xyz));
+
+ col.rgb = min(col.rgb*color.rgb, 1.0);
+
+ return col;
+}
+
+
diff --git a/indra/newview/app_settings/shaders/class1/objects/fullbrightF.glsl b/indra/newview/app_settings/shaders/class1/objects/fullbrightF.glsl
new file mode 100755
index 0000000000..1b0ffb911a
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/objects/fullbrightF.glsl
@@ -0,0 +1,13 @@
+/**
+ * @file fullbrightF.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+void fullbright_lighting();
+
+void main()
+{
+ fullbright_lighting();
+}
diff --git a/indra/newview/app_settings/shaders/class1/objects/fullbrightShinyF.glsl b/indra/newview/app_settings/shaders/class1/objects/fullbrightShinyF.glsl
new file mode 100644
index 0000000000..936c228b4e
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/objects/fullbrightShinyF.glsl
@@ -0,0 +1,13 @@
+/**
+ * @file fullbrightShinyF.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+void fullbright_shiny_lighting();
+
+void main()
+{
+ fullbright_shiny_lighting();
+}
diff --git a/indra/newview/app_settings/shaders/class1/objects/fullbrightShinyV.glsl b/indra/newview/app_settings/shaders/class1/objects/fullbrightShinyV.glsl
new file mode 100755
index 0000000000..ba2aa024dc
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/objects/fullbrightShinyV.glsl
@@ -0,0 +1,29 @@
+/**
+ * @file fullbrightShinyV.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+void calcAtmospherics(vec3 inPositionEye);
+
+uniform vec4 origin;
+
+void main()
+{
+ //transform vertex
+ gl_Position = ftransform();
+
+ vec4 pos = (gl_ModelViewMatrix * gl_Vertex);
+ vec3 norm = normalize(gl_NormalMatrix * gl_Normal);
+ vec3 ref = reflect(pos.xyz, -norm);
+
+ gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
+ gl_TexCoord[1] = gl_TextureMatrix[1]*vec4(ref,1.0);
+
+ calcAtmospherics(pos.xyz);
+
+ gl_FrontColor = gl_Color;
+
+ gl_FogFragCoord = pos.z;
+}
diff --git a/indra/newview/app_settings/shaders/class1/objects/fullbrightV.glsl b/indra/newview/app_settings/shaders/class1/objects/fullbrightV.glsl
new file mode 100755
index 0000000000..e64ccb844d
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/objects/fullbrightV.glsl
@@ -0,0 +1,23 @@
+/**
+ * @file fullbrightV.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+void calcAtmospherics(vec3 inPositionEye);
+
+void main()
+{
+ //transform vertex
+ gl_Position = ftransform();
+ gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
+
+ vec4 pos = (gl_ModelViewMatrix * gl_Vertex);
+
+ calcAtmospherics(pos.xyz);
+
+ gl_FrontColor = gl_Color;
+
+ gl_FogFragCoord = pos.z;
+}
diff --git a/indra/newview/app_settings/shaders/class1/objects/fullbrightWaterF.glsl b/indra/newview/app_settings/shaders/class1/objects/fullbrightWaterF.glsl
new file mode 100755
index 0000000000..fd855aa910
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/objects/fullbrightWaterF.glsl
@@ -0,0 +1,13 @@
+/**
+ * @file fullbrightWaterF.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+void fullbright_lighting_water();
+
+void main()
+{
+ fullbright_lighting_water();
+}
diff --git a/indra/newview/app_settings/shaders/class1/objects/shinyF.glsl b/indra/newview/app_settings/shaders/class1/objects/shinyF.glsl
index 694213219e..bdb0b05f97 100644
--- a/indra/newview/app_settings/shaders/class1/objects/shinyF.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/shinyF.glsl
@@ -1,13 +1,13 @@
-void applyScatter(inout vec3 col);
+/**
+ * @file shinyF.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
-uniform samplerCube environmentMap;
+void shiny_lighting();
void main()
{
- vec3 ref = textureCube(environmentMap, gl_TexCoord[0].xyz).rgb;
-
- applyScatter(ref);
-
- gl_FragColor.rgb = ref;
- gl_FragColor.a = gl_Color.a;
+ shiny_lighting();
}
diff --git a/indra/newview/app_settings/shaders/class1/objects/shinyV.glsl b/indra/newview/app_settings/shaders/class1/objects/shinyV.glsl
index 16fba0154b..c2e1ddf734 100644
--- a/indra/newview/app_settings/shaders/class1/objects/shinyV.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/shinyV.glsl
@@ -1,27 +1,30 @@
-void default_scatter(vec3 viewVec, vec3 lightDir);
+/**
+ * @file shinyV.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+void calcAtmospherics(vec3 inPositionEye);
uniform vec4 origin;
void main()
{
//transform vertex
- gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
+ gl_Position = ftransform(); //gl_ModelViewProjectionMatrix * gl_Vertex;
- vec3 pos = (gl_ModelViewMatrix * gl_Vertex).xyz;
+ vec4 pos = (gl_ModelViewMatrix * gl_Vertex);
vec3 norm = normalize(gl_NormalMatrix * gl_Normal);
+
+ calcAtmospherics(pos.xyz);
gl_FrontColor = gl_Color;
- vec3 ref = reflect(pos, norm);
-
- vec3 d = pos - origin.xyz;
- float dist = dot(normalize(d), ref);
- vec3 e = d + (ref * max(origin.w-dist, 0.0));
-
- ref = e - origin.xyz;
+ vec3 ref = reflect(pos.xyz, -norm);
gl_TexCoord[0] = gl_TextureMatrix[0]*vec4(ref,1.0);
- default_scatter(pos.xyz, gl_LightSource[0].position.xyz);
+ gl_FogFragCoord = pos.z;
}
diff --git a/indra/newview/app_settings/shaders/class1/objects/shinyWaterF.glsl b/indra/newview/app_settings/shaders/class1/objects/shinyWaterF.glsl
new file mode 100755
index 0000000000..0a2a5f624b
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/objects/shinyWaterF.glsl
@@ -0,0 +1,13 @@
+/**
+ * @file shinyWaterF.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+void shiny_lighting_water();
+
+void main()
+{
+ shiny_lighting_water();
+}
diff --git a/indra/newview/app_settings/shaders/class1/objects/simpleF.glsl b/indra/newview/app_settings/shaders/class1/objects/simpleF.glsl
index ce5ab12b74..7dacca4fe1 100644
--- a/indra/newview/app_settings/shaders/class1/objects/simpleF.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/simpleF.glsl
@@ -1,3 +1,10 @@
+/**
+ * @file simpleF.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
void default_lighting();
void main()
diff --git a/indra/newview/app_settings/shaders/class1/objects/simpleV.glsl b/indra/newview/app_settings/shaders/class1/objects/simpleV.glsl
index 2aa3521931..0df89c8fc3 100644
--- a/indra/newview/app_settings/shaders/class1/objects/simpleV.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/simpleV.glsl
@@ -1,20 +1,26 @@
-vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
-void default_scatter(vec3 viewVec, vec3 lightDir);
+/**
+ * @file simpleV.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
-attribute vec4 materialColor;
+vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
+void calcAtmospherics(vec3 inPositionEye);
void main()
{
//transform vertex
- gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
+ gl_Position = ftransform(); //gl_ModelViewProjectionMatrix * gl_Vertex;
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
- vec3 pos = (gl_ModelViewMatrix * gl_Vertex).xyz;
- vec3 norm = normalize(gl_NormalMatrix * gl_Normal);
+ vec4 pos = (gl_ModelViewMatrix * gl_Vertex);
- default_scatter(pos, gl_LightSource[0].position.xyz);
+ vec3 norm = normalize(gl_NormalMatrix * gl_Normal);
+
+ calcAtmospherics(pos.xyz);
- vec4 color = calcLighting(pos, norm, materialColor, gl_Color);
+ vec4 color = calcLighting(pos.xyz, norm, gl_Color, vec4(0.));
gl_FrontColor = color;
gl_FogFragCoord = pos.z;
diff --git a/indra/newview/app_settings/shaders/class1/objects/simpleWaterF.glsl b/indra/newview/app_settings/shaders/class1/objects/simpleWaterF.glsl
new file mode 100755
index 0000000000..e066b3d02f
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/objects/simpleWaterF.glsl
@@ -0,0 +1,13 @@
+/**
+ * @file simpleWaterF.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+void default_lighting_water();
+
+void main()
+{
+ default_lighting_water();
+}
diff --git a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsF.glsl b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsF.glsl
new file mode 100644
index 0000000000..248c322011
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsF.glsl
@@ -0,0 +1,13 @@
+/**
+ * @file atmosphericsF.glsl
+ *
+ * Copyright (c) 2005-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+vec3 atmosLighting(vec3 light)
+{
+ /* stub function for fallback compatibility on class1 hardware */
+ return light;
+}
+
diff --git a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsHelpersV.glsl b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsHelpersV.glsl
new file mode 100644
index 0000000000..c2c39e2e10
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsHelpersV.glsl
@@ -0,0 +1,34 @@
+/**
+ * @file atmosphericsHelpersV.glsl
+ *
+ * Copyright (c) 2005-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+vec3 atmosAmbient(vec3 light)
+{
+ return gl_LightModel.ambient.rgb + light;
+}
+
+vec3 atmosAffectDirectionalLight(float lightIntensity)
+{
+ return gl_LightSource[0].diffuse.rgb * lightIntensity;
+}
+
+vec3 atmosGetDiffuseSunlightColor()
+{
+ return gl_LightSource[0].diffuse.rgb;
+}
+
+vec3 scaleDownLight(vec3 light)
+{
+ /* stub function for fallback compatibility on class1 hardware */
+ return light;
+}
+
+vec3 scaleUpLight(vec3 light)
+{
+ /* stub function for fallback compatibility on class1 hardware */
+ return light;
+}
+
diff --git a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsV.glsl b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsV.glsl
new file mode 100644
index 0000000000..551b643403
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsV.glsl
@@ -0,0 +1,15 @@
+/**
+ * @file atmosphericsV.glsl
+ *
+ * Copyright (c) 2005-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+void setPositionEye(vec3 v);
+
+void calcAtmospherics(vec3 inPositionEye)
+{
+ /* stub function for fallback compatibility on class1 hardware */
+ setPositionEye(inPositionEye);
+}
+
diff --git a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsF.glsl b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsF.glsl
new file mode 100644
index 0000000000..c001a4070b
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsF.glsl
@@ -0,0 +1,13 @@
+/**
+ * @file atmosphericVarsF.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+varying vec3 vary_PositionEye;
+
+vec3 getPositionEye()
+{
+ return vary_PositionEye;
+}
diff --git a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsV.glsl b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsV.glsl
new file mode 100644
index 0000000000..1b263b0854
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsV.glsl
@@ -0,0 +1,19 @@
+/**
+ * @file atmosphericVarsV.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+varying vec3 vary_PositionEye;
+
+
+vec3 getPositionEye()
+{
+ return vary_PositionEye;
+}
+
+void setPositionEye(vec3 v)
+{
+ vary_PositionEye = v;
+}
diff --git a/indra/newview/app_settings/shaders/class1/windlight/gammaF.glsl b/indra/newview/app_settings/shaders/class1/windlight/gammaF.glsl
new file mode 100644
index 0000000000..c1ffda1596
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/windlight/gammaF.glsl
@@ -0,0 +1,19 @@
+/**
+ * @file gammaF.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+uniform vec4 gamma;
+
+/// Soft clips the light with a gamma correction
+vec3 scaleSoftClip(vec3 light) {
+ // For compatibility with lower cards. Do nothing.
+ return light;
+}
+
+vec3 fullbrightScaleSoftClip(vec3 light) {
+ return scaleSoftClip(light);
+}
+
diff --git a/indra/newview/app_settings/shaders/class1/windlight/transportF.glsl b/indra/newview/app_settings/shaders/class1/windlight/transportF.glsl
new file mode 100644
index 0000000000..7097906fdd
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/windlight/transportF.glsl
@@ -0,0 +1,26 @@
+/**
+ * @file transportF.glsl
+ *
+ * Copyright (c) 2005-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+vec3 atmosTransport(vec3 light)
+{
+ /* stub function for fallback compatibility on class1 hardware */
+ return light;
+}
+
+vec3 fullbrightAtmosTransport(vec3 light)
+{
+ /* stub function for fallback compatibility on class1 hardware */
+ return light;
+}
+
+
+vec3 fullbrightShinyAtmosTransport(vec3 light)
+{
+ /* stub function for fallback compatibility on class1 hardware */
+ return light;
+}
+
diff --git a/indra/newview/app_settings/shaders/class2/avatar/eyeballV.glsl b/indra/newview/app_settings/shaders/class2/avatar/eyeballV.glsl
index 7957eddb31..3dd62d2d14 100644
--- a/indra/newview/app_settings/shaders/class2/avatar/eyeballV.glsl
+++ b/indra/newview/app_settings/shaders/class2/avatar/eyeballV.glsl
@@ -1,8 +1,12 @@
-vec4 calcLightingSpecular(vec3 pos, vec3 norm, vec4 color, inout vec4 specularColor, vec3 baseCol);
-void default_scatter(vec3 viewVec, vec3 lightDir);
+/**
+ * @file eyeballV.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
-attribute vec4 materialColor;
-attribute vec4 specularColor;
+vec4 calcLightingSpecular(vec3 pos, vec3 norm, vec4 color, inout vec4 specularColor, vec4 baseCol);
+void calcAtmospherics(vec3 inPositionEye);
void main()
{
@@ -12,12 +16,15 @@ void main()
vec3 pos = (gl_ModelViewMatrix * gl_Vertex).xyz;
vec3 norm = normalize(gl_NormalMatrix * gl_Normal);
+
+ calcAtmospherics(pos.xyz);
- default_scatter(pos.xyz, gl_LightSource[0].position.xyz);
- vec4 specular = specularColor;
- vec4 color = calcLightingSpecular(pos, norm, materialColor, specular, gl_Color.rgb);
+ // vec4 specular = specularColor;
+ vec4 specular = vec4(1.0);
+ vec4 color = calcLightingSpecular(pos, norm, gl_Color, specular, vec4(0.0));
gl_FrontColor = color;
gl_FogFragCoord = pos.z;
+
}
diff --git a/indra/newview/app_settings/shaders/class2/effects/blurF.glsl b/indra/newview/app_settings/shaders/class2/effects/blurF.glsl
new file mode 100644
index 0000000000..94433202af
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class2/effects/blurF.glsl
@@ -0,0 +1,31 @@
+/**
+ * @file blurf.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+uniform sampler2DRect RenderTexture;
+uniform float bloomStrength;
+
+varying vec4 gl_TexCoord[gl_MaxTextureCoords];
+void main(void)
+{
+ float blurWeights[7];
+ blurWeights[0] = 0.05;
+ blurWeights[1] = 0.1;
+ blurWeights[2] = 0.2;
+ blurWeights[3] = 0.3;
+ blurWeights[4] = 0.2;
+ blurWeights[5] = 0.1;
+ blurWeights[6] = 0.05;
+
+ vec3 color = vec3(0,0,0);
+ for (int i = 0; i < 7; i++){
+ color += vec3(texture2DRect(RenderTexture, gl_TexCoord[i].st)) * blurWeights[i];
+ }
+
+ color *= bloomStrength;
+
+ gl_FragColor = vec4(color, 1.0);
+}
diff --git a/indra/newview/app_settings/shaders/class2/effects/blurV.glsl b/indra/newview/app_settings/shaders/class2/effects/blurV.glsl
new file mode 100644
index 0000000000..ba65b16cc1
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class2/effects/blurV.glsl
@@ -0,0 +1,35 @@
+/**
+ * @file blurV.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+uniform vec2 texelSize;
+uniform vec2 blurDirection;
+uniform float blurWidth;
+
+void main(void)
+{
+ // Transform vertex
+ gl_Position = ftransform();
+
+ vec2 blurDelta = texelSize * blurDirection * vec2(blurWidth, blurWidth);
+ vec2 s = gl_MultiTexCoord0.st - (blurDelta * 3.0);
+
+ // for (int i = 0; i < 7; i++) {
+ // gl_TexCoord[i].st = s + (i * blurDelta);
+ // }
+
+ // MANUALLY UNROLL
+ gl_TexCoord[0].st = s;
+ gl_TexCoord[1].st = s + blurDelta;
+ gl_TexCoord[2].st = s + (2. * blurDelta);
+ gl_TexCoord[3].st = s + (3. * blurDelta);
+ gl_TexCoord[4].st = s + (4. * blurDelta);
+ gl_TexCoord[5].st = s + (5. * blurDelta);
+ gl_TexCoord[6].st = s + (6. * blurDelta);
+
+ // gl_TexCoord[0].st = s;
+ // gl_TexCoord[1].st = blurDelta;
+}
diff --git a/indra/newview/app_settings/shaders/class2/effects/colorFilterF.glsl b/indra/newview/app_settings/shaders/class2/effects/colorFilterF.glsl
new file mode 100644
index 0000000000..623ef7a81a
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class2/effects/colorFilterF.glsl
@@ -0,0 +1,31 @@
+/**
+ * @file colorFilterF.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+uniform sampler2DRect RenderTexture;
+uniform float brightness;
+uniform float contrast;
+uniform vec3 contrastBase;
+uniform float saturation;
+uniform vec3 lumWeights;
+
+const float gamma = 2.0;
+
+void main(void)
+{
+ vec3 color = vec3(texture2DRect(RenderTexture, gl_TexCoord[0].st));
+
+ /// Modulate brightness
+ color *= brightness;
+
+ /// Modulate contrast
+ color = mix(contrastBase, color, contrast);
+
+ /// Modulate saturation
+ color = mix(vec3(dot(color, lumWeights)), color, saturation);
+
+ gl_FragColor = vec4(color, 1.0);
+}
diff --git a/indra/newview/app_settings/shaders/class2/effects/drawQuadV.glsl b/indra/newview/app_settings/shaders/class2/effects/drawQuadV.glsl
new file mode 100644
index 0000000000..29c2a0948c
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class2/effects/drawQuadV.glsl
@@ -0,0 +1,14 @@
+/**
+ * @file drawQuadV.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+void main(void)
+{
+ //transform vertex
+ gl_Position = ftransform();
+ gl_TexCoord[0] = gl_MultiTexCoord0;
+ gl_TexCoord[1] = gl_MultiTexCoord1;
+}
diff --git a/indra/newview/app_settings/shaders/class2/effects/extractF.glsl b/indra/newview/app_settings/shaders/class2/effects/extractF.glsl
new file mode 100644
index 0000000000..a1583b13eb
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class2/effects/extractF.glsl
@@ -0,0 +1,22 @@
+/**
+ * @file extractF.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+uniform sampler2DRect RenderTexture;
+uniform float extractLow;
+uniform float extractHigh;
+uniform vec3 lumWeights;
+
+void main(void)
+{
+ /// Get scene color
+ vec3 color = vec3(texture2DRect(RenderTexture, gl_TexCoord[0].st));
+
+ /// Extract luminance and scale up by night vision brightness
+ float lum = smoothstep(extractLow, extractHigh, dot(color, lumWeights));
+
+ gl_FragColor = vec4(vec3(lum), 1.0);
+}
diff --git a/indra/newview/app_settings/shaders/class2/effects/nightVisionF.glsl b/indra/newview/app_settings/shaders/class2/effects/nightVisionF.glsl
new file mode 100644
index 0000000000..271d5cf8d6
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class2/effects/nightVisionF.glsl
@@ -0,0 +1,42 @@
+/**
+ * @file nightVisionF.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+uniform sampler2DRect RenderTexture;
+uniform sampler2D NoiseTexture;
+uniform float brightMult;
+uniform float noiseStrength;
+
+float luminance(vec3 color)
+{
+ /// CALCULATING LUMINANCE (Using NTSC lum weights)
+ /// http://en.wikipedia.org/wiki/Luma_%28video%29
+ return dot(color, vec3(0.299, 0.587, 0.114));
+}
+
+void main(void)
+{
+ /// Get scene color
+ vec3 color = vec3(texture2DRect(RenderTexture, gl_TexCoord[0].st));
+
+ /// Extract luminance and scale up by night vision brightness
+ float lum = luminance(color) * brightMult;
+
+ /// Convert into night vision color space
+ /// Newer NVG colors (crisper and more saturated)
+ vec3 outColor = (lum * vec3(0.91, 1.21, 0.9)) + vec3(-0.07, 0.1, -0.12);
+
+ /// Add noise
+ float noiseValue = texture2D(NoiseTexture, gl_TexCoord[1].st).r;
+ noiseValue = (noiseValue - 0.5) * noiseStrength;
+
+ /// Older NVG colors (more muted)
+ // vec3 outColor = (lum * vec3(0.82, 0.75, 0.83)) + vec3(0.05, 0.32, -0.11);
+
+ outColor += noiseValue;
+
+ gl_FragColor = vec4(outColor, 1.0);
+}
diff --git a/indra/newview/app_settings/shaders/class2/effects/simpleF.glsl b/indra/newview/app_settings/shaders/class2/effects/simpleF.glsl
new file mode 100644
index 0000000000..e55d278b81
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class2/effects/simpleF.glsl
@@ -0,0 +1,14 @@
+/**
+ * @file simpleF.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+uniform sampler2DRect RenderTexture;
+
+void main(void)
+{
+ vec3 color = vec3(texture2DRect(RenderTexture, gl_TexCoord[0].st));
+ gl_FragColor = vec4(1.0 - color, 1.0);
+}
diff --git a/indra/newview/app_settings/shaders/class2/environment/terrainF.glsl b/indra/newview/app_settings/shaders/class2/environment/terrainF.glsl
new file mode 100644
index 0000000000..4253bc21c3
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class2/environment/terrainF.glsl
@@ -0,0 +1,38 @@
+/**
+ * @file terrainF.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+uniform sampler2D detail_0;
+uniform sampler2D detail_1;
+uniform sampler2D detail_2;
+uniform sampler2D detail_3;
+uniform sampler2D alpha_ramp;
+
+vec3 atmosLighting(vec3 light);
+
+vec3 scaleSoftClip(vec3 color);
+
+void main()
+{
+ /// Note: This should duplicate the blending functionality currently used for the terrain rendering.
+
+ /// TODO Confirm tex coords and bind them appropriately in vert shader.
+ vec4 color0 = texture2D(detail_0, gl_TexCoord[0].xy);
+ vec4 color1 = texture2D(detail_1, gl_TexCoord[0].xy);
+ vec4 color2 = texture2D(detail_2, gl_TexCoord[0].xy);
+ vec4 color3 = texture2D(detail_3, gl_TexCoord[0].xy);
+
+ float alpha1 = texture2D(alpha_ramp, gl_TexCoord[0].zw).a;
+ float alpha2 = texture2D(alpha_ramp,gl_TexCoord[1].xy).a;
+ float alphaFinal = texture2D(alpha_ramp, gl_TexCoord[1].zw).a;
+ vec4 outColor = mix( mix(color3, color2, alpha2), mix(color1, color0, alpha1), alphaFinal );
+
+ /// Add WL Components
+ outColor.rgb = atmosLighting(outColor.rgb * gl_Color.rgb);
+
+ gl_FragColor = vec4(scaleSoftClip(outColor.rgb), 1.0);
+}
+
diff --git a/indra/newview/app_settings/shaders/class2/environment/terrainV.glsl b/indra/newview/app_settings/shaders/class2/environment/terrainV.glsl
new file mode 100644
index 0000000000..119d55a2cd
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class2/environment/terrainV.glsl
@@ -0,0 +1,52 @@
+/**
+ * @file terrainV.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+void calcAtmospherics(vec3 inPositionEye);
+
+vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
+
+vec4 texgen_object(vec4 vpos, vec4 tc, mat4 mat, vec4 tp0, vec4 tp1)
+{
+ vec4 tcoord;
+
+ tcoord.x = dot(vpos, tp0);
+ tcoord.y = dot(vpos, tp1);
+ tcoord.z = tc.z;
+ tcoord.w = tc.w;
+
+ tcoord = mat * tcoord;
+
+ return tcoord;
+}
+
+void main()
+{
+ //transform vertex
+ gl_Position = ftransform();
+
+ vec4 pos = gl_ModelViewMatrix * gl_Vertex;
+ vec3 norm = normalize(gl_NormalMatrix * gl_Normal);
+
+ /// Potentially better without it for water.
+ pos /= pos.w;
+
+ calcAtmospherics((gl_ModelViewMatrix * gl_Vertex).xyz);
+
+ vec4 color = calcLighting(pos.xyz, norm, gl_Color, vec4(0));
+
+ gl_FrontColor = color;
+
+ // Transform and pass tex coords
+ gl_TexCoord[0].xy = texgen_object(gl_Vertex, gl_MultiTexCoord0, gl_TextureMatrix[0], gl_ObjectPlaneS[0], gl_ObjectPlaneT[0]).xy;
+
+ vec4 t = gl_MultiTexCoord1;
+
+ gl_TexCoord[0].zw = t.xy;
+ gl_TexCoord[1].xy = t.xy-vec2(2.0, 0.0);
+ gl_TexCoord[1].zw = t.xy-vec2(1.0, 0.0);
+}
+
diff --git a/indra/newview/app_settings/shaders/class2/environment/terrainWaterF.glsl b/indra/newview/app_settings/shaders/class2/environment/terrainWaterF.glsl
new file mode 100755
index 0000000000..3a98970f8c
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class2/environment/terrainWaterF.glsl
@@ -0,0 +1,39 @@
+/**
+ * @file terrainWaterF.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+uniform sampler2D detail_0;
+uniform sampler2D detail_1;
+uniform sampler2D detail_2;
+uniform sampler2D detail_3;
+uniform sampler2D alpha_ramp;
+
+vec3 atmosLighting(vec3 light);
+
+vec4 applyWaterFog(vec4 color);
+
+void main()
+{
+ /// Note: This should duplicate the blending functionality currently used for the terrain rendering.
+
+ /// TODO Confirm tex coords and bind them appropriately in vert shader.
+ vec4 color0 = texture2D(detail_0, gl_TexCoord[0].xy);
+ vec4 color1 = texture2D(detail_1, gl_TexCoord[0].xy);
+ vec4 color2 = texture2D(detail_2, gl_TexCoord[0].xy);
+ vec4 color3 = texture2D(detail_3, gl_TexCoord[0].xy);
+
+ float alpha1 = texture2D(alpha_ramp, gl_TexCoord[0].zw).a;
+ float alpha2 = texture2D(alpha_ramp,gl_TexCoord[1].xy).a;
+ float alphaFinal = texture2D(alpha_ramp, gl_TexCoord[1].zw).a;
+ vec4 outColor = mix( mix(color3, color2, alpha2), mix(color1, color0, alpha1), alphaFinal );
+
+ /// Add WL Components
+ outColor.rgb = atmosLighting(outColor.rgb * gl_Color.rgb);
+
+ outColor = applyWaterFog(outColor);
+ gl_FragColor = outColor;
+}
+
diff --git a/indra/newview/app_settings/shaders/class2/environment/underWaterF.glsl b/indra/newview/app_settings/shaders/class2/environment/underWaterF.glsl
new file mode 100644
index 0000000000..1998fea227
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class2/environment/underWaterF.glsl
@@ -0,0 +1,88 @@
+/**
+ * @file underWaterF.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+uniform sampler2D diffuseMap;
+uniform sampler2D bumpMap;
+uniform sampler2D screenTex;
+uniform sampler2D refTex;
+uniform sampler2D screenDepth;
+
+uniform vec4 fogCol;
+uniform vec3 lightDir;
+uniform vec3 specular;
+uniform float lightExp;
+uniform vec2 fbScale;
+uniform float refScale;
+uniform float znear;
+uniform float zfar;
+uniform float kd;
+uniform vec4 waterPlane;
+uniform vec3 eyeVec;
+uniform vec4 waterFogColor;
+uniform float waterFogDensity;
+uniform float waterFogKS;
+uniform vec2 screenRes;
+
+//bigWave is (refCoord.w, view.w);
+varying vec4 refCoord;
+varying vec4 littleWave;
+varying vec4 view;
+
+vec4 applyWaterFog(vec4 color, vec3 viewVec)
+{
+ //normalize view vector
+ vec3 view = normalize(viewVec);
+ float es = -view.z;
+
+ //find intersection point with water plane and eye vector
+
+ //get eye depth
+ float e0 = max(-waterPlane.w, 0.0);
+
+ //get object depth
+ float depth = length(viewVec);
+
+ //get "thickness" of water
+ float l = max(depth, 0.1);
+
+ float kd = waterFogDensity;
+ float ks = waterFogKS;
+ vec4 kc = waterFogColor;
+
+ float F = 0.98;
+
+ float t1 = -kd * pow(F, ks * e0);
+ float t2 = kd + ks * es;
+ float t3 = pow(F, t2*l) - 1.0;
+
+ float L = min(t1/t2*t3, 1.0);
+
+ float D = pow(0.98, l*kd);
+ //return vec4(1.0, 0.0, 1.0, 1.0);
+ return color * D + kc * L;
+ //depth /= 10.0;
+ //return vec4(depth,depth,depth,0.0);
+}
+
+void main()
+{
+ vec4 color;
+
+ //get detail normals
+ vec3 wave1 = texture2D(bumpMap, vec2(refCoord.w, view.w)).xyz*2.0-1.0;
+ vec3 wave2 = texture2D(bumpMap, littleWave.xy).xyz*2.0-1.0;
+ vec3 wave3 = texture2D(bumpMap, littleWave.zw).xyz*2.0-1.0;
+ vec3 wavef = normalize(wave1+wave2+wave3);
+
+ //figure out distortion vector (ripply)
+ vec2 distort = (refCoord.xy/refCoord.z) * 0.5 + 0.5;
+ distort = distort+wavef.xy*refScale;
+
+ vec4 fb = texture2D(screenTex, distort);
+
+ gl_FragColor = applyWaterFog(fb,view.xyz);
+}
diff --git a/indra/newview/app_settings/shaders/class2/environment/waterF.glsl b/indra/newview/app_settings/shaders/class2/environment/waterF.glsl
index 11a057b177..8f3d11badc 100644
--- a/indra/newview/app_settings/shaders/class2/environment/waterF.glsl
+++ b/indra/newview/app_settings/shaders/class2/environment/waterF.glsl
@@ -1,138 +1,117 @@
-void applyScatter(inout vec3 color);
+/**
+ * @file waterF.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+vec3 scaleSoftClip(vec3 inColor);
+vec3 atmosTransport(vec3 inColor);
-uniform sampler2D diffuseMap;
uniform sampler2D bumpMap;
-uniform samplerCube environmentMap; //: TEXUNIT4, // Environment map texture
-uniform sampler2D screenTex; // : TEXUNIT5
+uniform sampler2D screenTex;
+uniform sampler2D refTex;
+uniform float sunAngle;
+uniform float sunAngle2;
uniform vec3 lightDir;
uniform vec3 specular;
uniform float lightExp;
-uniform vec2 fbScale;
uniform float refScale;
+uniform float kd;
+uniform vec2 screenRes;
+uniform vec3 normScale;
+uniform float fresnelScale;
+uniform float fresnelOffset;
+uniform float blurMultiplier;
-float msin(float x) {
- float k = sin(x)+1.0;
- k *= 0.5;
- k *= k;
- return 2.0 * k;
-}
-float mcos(float x) {
- float k = cos(x)+1.0;
- k *= 0.5;
- k *= k;
- return 2.0 * k;
-}
+//bigWave is (refCoord.w, view.w);
+varying vec4 refCoord;
+varying vec4 littleWave;
+varying vec4 view;
-float waveS(vec2 v, float t, float a, float f, vec2 d, float s, sampler1D sinMap)
+void main()
{
- return texture1D(sinMap, (dot(d, v)*f + t*s)*f).r*a;
-}
+ vec4 color;
+
+ float dist = length(view.xy);
+
+ //normalize view vector
+ vec3 viewVec = normalize(view.xyz);
+
+ //get wave normals
+ vec3 wave1 = texture2D(bumpMap, vec2(refCoord.w, view.w)).xyz*2.0-1.0;
+ vec3 wave2 = texture2D(bumpMap, littleWave.xy).xyz*2.0-1.0;
+ vec3 wave3 = texture2D(bumpMap, littleWave.zw).xyz*2.0-1.0;
+ //get base fresnel components
+
+ vec3 df = vec3(
+ dot(viewVec, wave1),
+ dot(viewVec, wave2),
+ dot(viewVec, wave3)
+ ) * fresnelScale + fresnelOffset;
+ df *= df;
+
+ vec2 distort = (refCoord.xy/refCoord.z) * 0.5 + 0.5;
+
+ float dist2 = dist;
+ dist = max(dist, 5.0);
+
+ float dmod = sqrt(dist);
+
+ vec2 dmod_scale = vec2(dmod*dmod, dmod);
+
+ //get reflected color
+ vec2 refdistort1 = wave1.xy*normScale.x;
+ vec2 refvec1 = distort+refdistort1/dmod_scale;
+ vec4 refcol1 = texture2D(refTex, refvec1);
+
+ vec2 refdistort2 = wave2.xy*normScale.y;
+ vec2 refvec2 = distort+refdistort2/dmod_scale;
+ vec4 refcol2 = texture2D(refTex, refvec2);
+
+ vec2 refdistort3 = wave3.xy*normScale.z;
+ vec2 refvec3 = distort+refdistort3/dmod_scale;
+ vec4 refcol3 = texture2D(refTex, refvec3);
-float waveC(vec2 v, float t, float a, float f, vec2 d, float s, sampler1D sinMap)
-{
- return texture1D(sinMap, (dot(d, v)*f + t*s)*f).g*a*2.0-1.0;
-}
+ vec4 refcol = refcol1 + refcol2 + refcol3;
+ float df1 = df.x + df.y + df.z;
+ refcol *= df1 * 0.333;
+
+ vec3 wavef = (wave1 + wave2 * 0.4 + wave3 * 0.6) * 0.5;
+
+ wavef.z *= max(-viewVec.z, 0.1);
+ wavef = normalize(wavef);
+
+ float df2 = dot(viewVec, wavef) * fresnelScale+fresnelOffset;
+
+ vec2 refdistort4 = wavef.xy*0.125;
+ refdistort4.y -= abs(refdistort4.y);
+ vec2 refvec4 = distort+refdistort4/dmod;
+ float dweight = min(dist2*blurMultiplier, 1.0);
+ vec4 baseCol = texture2D(refTex, refvec4);
+ refcol = mix(baseCol*df2, refcol, dweight);
-float magnitude(vec3 vec) {
- return sqrt(dot(vec,vec));
-}
-
-vec3 mreflect(vec3 i, vec3 n) {
- return i + n * 2.0 * abs(dot(n,i))+vec3(0.0,0.0,0.5);
-}
-
-void main()
-{
- vec2 texCoord = gl_TexCoord[0].xy; // Texture coordinates
- vec2 littleWave1 = gl_TexCoord[0].zw;
- vec2 littleWave2 = gl_TexCoord[1].xy;
- vec2 bigWave = gl_TexCoord[1].zw;
- vec3 viewVec = gl_TexCoord[2].xyz;
- vec4 refCoord = gl_TexCoord[3];
- vec4 col = gl_Color;
- vec4 color;
-
- //get color from alpha map (alpha denotes water depth), rgb denotes water color
- vec4 wcol = texture2D(diffuseMap, texCoord.xy);
-
- //store texture alpha
- float da = wcol.a;
-
- //modulate by incoming water color
- //wcol.a *= refCoord.w;
-
- //scale wcol.a (water depth) for steep transition
- wcol.a *= wcol.a;
-
- //normalize view vector
- viewVec = normalize(viewVec);
-
- //get bigwave normal
- vec3 wavef = texture2D(bumpMap, bigWave).xyz*2.0;
-
- vec3 view = vec3(viewVec.x, viewVec.y, viewVec.z);
-
- float dx = 1.0-(dot(wavef*2.0-vec3(1.0), view))*da;
- dx *= 0.274;
-
- //get detail normals
- vec3 dcol = texture2D(bumpMap, littleWave1+dx*view.xy).rgb*0.75;
- dcol += texture2D(bumpMap, littleWave2+view.xy*dx*0.1).rgb*1.25;
-
- //interpolate between big waves and little waves (big waves in deep water)
- wavef = wavef*wcol.a + dcol*(1.0-wcol.a);
-
- //crunch normal to range [-1,1]
- wavef -= vec3(1,1,1);
-
- //get base fresnel component
- float df = dot(viewVec,wavef);
- //reposition fresnel to latter half of [0,1]
- df = 1.0-clamp(df,0.0,1.0);
+ //get specular component
+ float spec = clamp(dot(lightDir, (reflect(viewVec,wavef))),0.0,1.0);
+
+ //harden specular
+ spec = pow(spec, 128.0);
- //set output alpha based on fresnel
- color.a = clamp((df+da)*0.5,0.0,1.0);
-
- //calculate reflection vector
- vec3 ref = reflect(viewVec.xyz, wavef);
-
- //get specular component
- float spec = clamp(dot(lightDir, normalize(ref)),0.0,1.0);
-
- //fudge reflection to be more noisy at good angles
- ref.z = ref.z*ref.z+df*df*0.5;
-
- //get diffuse component
- float diff = clamp((abs(dot(ref, wavef))),0.0,1.0)*0.9;
-
- //fudge diffuse for extra contrast and ambience
- diff *= diff;
- diff += 0.4;
-
- //set diffuse color contribution
- color.rgb = textureCube(environmentMap, ref).rgb*diff;
-
- //harden specular
- spec = pow(spec, lightExp);
-
- //add specular color contribution
- color.rgb += spec * specular;
+ //figure out distortion vector (ripply)
+ vec2 distort2 = distort+wavef.xy*refScale/max(dmod*df1, 1.0);
+
+ vec4 fb = texture2D(screenTex, distort2);
+
+ //mix with reflection
+ // Note we actually want to use just df1, but multiplying by 0.999999 gets around and nvidia compiler bug
+ color.rgb = mix(fb.rgb, refcol.rgb, df1 * 0.99999);
+ color.rgb += spec * specular;
+
+ color.rgb = atmosTransport(color.rgb);
+ color.rgb = scaleSoftClip(color.rgb);
+ color.a = spec * sunAngle2;
- //figure out distortion vector (ripply)
- vec2 distort = clamp(((refCoord.xy/refCoord.z) * 0.5 + 0.5 + wavef.xy*refScale),0.0,0.99);
-
- //read from framebuffer (offset)
- vec4 fb = texture2D(screenTex, distort*fbScale);
-
- //tint by framebuffer
- color.rgb = color.a*color.rgb + (1.0-color.a)*fb.rgb;
-
- //apply fog
- applyScatter(color.rgb);
-
- color.a = spec*0.5+fb.a;
-
- gl_FragColor = color;
+ gl_FragColor = color;
}
diff --git a/indra/newview/app_settings/shaders/class2/environment/waterFogF.glsl b/indra/newview/app_settings/shaders/class2/environment/waterFogF.glsl
new file mode 100644
index 0000000000..522c990cf8
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class2/environment/waterFogF.glsl
@@ -0,0 +1,54 @@
+/**
+ * @file waterFogF.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+uniform vec4 lightnorm;
+uniform vec4 waterPlane;
+uniform vec4 waterFogColor;
+uniform float waterFogDensity;
+uniform float waterFogKS;
+
+vec3 getPositionEye();
+
+vec4 applyWaterFog(vec4 color)
+{
+ //normalize view vector
+ vec3 view = normalize(getPositionEye());
+ float es = -(dot(view, waterPlane.xyz));
+
+ //find intersection point with water plane and eye vector
+
+ //get eye depth
+ float e0 = max(-waterPlane.w, 0.0);
+
+ vec3 int_v = waterPlane.w > 0.0 ? view * waterPlane.w/es : vec3(0.0, 0.0, 0.0);
+
+ //get object depth
+ float depth = length(getPositionEye() - int_v);
+
+ //get "thickness" of water
+ float l = max(depth, 0.1);
+
+ float kd = waterFogDensity;
+ float ks = waterFogKS;
+ vec4 kc = waterFogColor;
+
+ float F = 0.98;
+
+ float t1 = -kd * pow(F, ks * e0);
+ float t2 = kd + ks * es;
+ float t3 = pow(F, t2*l) - 1.0;
+
+ float L = min(t1/t2*t3, 1.0);
+
+ float D = pow(0.98, l*kd);
+
+ color.rgb = color.rgb * D + kc.rgb * L;
+ color.a = kc.a + color.a;
+
+ return color;
+}
+
diff --git a/indra/newview/app_settings/shaders/class2/lighting/lightF.glsl b/indra/newview/app_settings/shaders/class2/lighting/lightF.glsl
index 6f732ed731..b372d66298 100644
--- a/indra/newview/app_settings/shaders/class2/lighting/lightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/lighting/lightF.glsl
@@ -1,36 +1,23 @@
-void applyScatter(inout vec3 color);
+/**
+ * @file lightF.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
uniform sampler2D diffuseMap;
+vec3 atmosLighting(vec3 light);
+vec3 scaleSoftClip(vec3 light);
+
void default_lighting()
{
- vec4 color = gl_Color * texture2D(diffuseMap, gl_TexCoord[0].xy);
- //applyScatter(color.rgb);
- gl_FragColor = color;
-}
+ vec4 color = texture2D(diffuseMap, gl_TexCoord[0].xy) * gl_Color;
+
+ color.rgb = atmosLighting(color.rgb);
-void alpha_lighting()
-{
- vec4 diff = texture2D(diffuseMap, gl_TexCoord[0].xy);
- vec3 color = gl_Color.rgb * diff.rgb;
- applyScatter(color);
- gl_FragColor.rgb = color;
- gl_FragColor.a = diff.a * gl_Color.a;
-}
+ color.rgb = scaleSoftClip(color.rgb);
-void water_lighting(inout vec3 diff)
-{
- diff = (diff*0.9 + gl_Color.rgb*0.1);
- applyScatter(diff);
-}
-
-void terrain_lighting(inout vec3 color)
-{
- color.rgb *= gl_Color.rgb;
- applyScatter(color);
+ gl_FragColor = color;
}
-vec4 getLightColor()
-{
- return gl_Color;
-} \ No newline at end of file
diff --git a/indra/newview/app_settings/shaders/class2/lighting/lightFullbrightF.glsl b/indra/newview/app_settings/shaders/class2/lighting/lightFullbrightF.glsl
new file mode 100644
index 0000000000..e6b6d85808
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class2/lighting/lightFullbrightF.glsl
@@ -0,0 +1,23 @@
+/**
+ * @file lightFullbrightF.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+uniform sampler2D diffuseMap;
+
+vec3 fullbrightAtmosTransport(vec3 light);
+vec3 fullbrightScaleSoftClip(vec3 light);
+
+void fullbright_lighting()
+{
+ vec4 color = texture2D(diffuseMap, gl_TexCoord[0].xy) * gl_Color;
+
+ color.rgb = fullbrightAtmosTransport(color.rgb);
+
+ color.rgb = fullbrightScaleSoftClip(color.rgb);
+
+ gl_FragColor = color;
+}
+
diff --git a/indra/newview/app_settings/shaders/class2/lighting/lightFullbrightShinyF.glsl b/indra/newview/app_settings/shaders/class2/lighting/lightFullbrightShinyF.glsl
new file mode 100644
index 0000000000..8f408c0436
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class2/lighting/lightFullbrightShinyF.glsl
@@ -0,0 +1,30 @@
+/**
+ * @file lightFullbrightShinyF.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+uniform sampler2D diffuseMap;
+uniform samplerCube environmentMap;
+
+vec3 fullbrightShinyAtmosTransport(vec3 light);
+vec3 fullbrightScaleSoftClip(vec3 light);
+
+void fullbright_shiny_lighting()
+{
+ vec4 color = texture2D(diffuseMap, gl_TexCoord[0].xy);
+ color.rgb *= gl_Color.rgb;
+
+ vec3 envColor = textureCube(environmentMap, gl_TexCoord[1].xyz).rgb;
+ color.rgb = mix(color.rgb, envColor.rgb, gl_Color.a);
+
+ color.rgb = fullbrightShinyAtmosTransport(color.rgb);
+
+ color.rgb = fullbrightScaleSoftClip(color.rgb);
+
+ color.a = max(color.a, gl_Color.a);
+
+ gl_FragColor = color;
+}
+
diff --git a/indra/newview/app_settings/shaders/class2/lighting/lightFullbrightWaterF.glsl b/indra/newview/app_settings/shaders/class2/lighting/lightFullbrightWaterF.glsl
new file mode 100644
index 0000000000..060ad9cb67
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class2/lighting/lightFullbrightWaterF.glsl
@@ -0,0 +1,21 @@
+/**
+ * @file lightFullbrightWaterF.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+uniform sampler2D diffuseMap;
+
+vec3 fullbrightAtmosTransport(vec3 light);
+vec4 applyWaterFog(vec4 color);
+
+void fullbright_lighting_water()
+{
+ vec4 color = texture2D(diffuseMap, gl_TexCoord[0].xy) * gl_Color;
+
+ color.rgb = fullbrightAtmosTransport(color.rgb);
+
+ gl_FragColor = applyWaterFog(color);
+}
+
diff --git a/indra/newview/app_settings/shaders/class2/lighting/lightShinyF.glsl b/indra/newview/app_settings/shaders/class2/lighting/lightShinyF.glsl
new file mode 100644
index 0000000000..b3927c77a6
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class2/lighting/lightShinyF.glsl
@@ -0,0 +1,29 @@
+/**
+ * @file lightShinyF.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+uniform sampler2D diffuseMap;
+uniform samplerCube environmentMap;
+
+vec3 scaleSoftClip(vec3 light);
+vec3 atmosLighting(vec3 light);
+vec4 applyWaterFog(vec4 color);
+
+void shiny_lighting()
+{
+ vec4 color = texture2D(diffuseMap, gl_TexCoord[0].xy);
+ color.rgb *= gl_Color.rgb;
+
+ vec3 envColor = textureCube(environmentMap, gl_TexCoord[1].xyz).rgb;
+ color.rgb = mix(color.rgb, envColor.rgb, gl_Color.a);
+
+ color.rgb = atmosLighting(color.rgb);
+
+ color.rgb = scaleSoftClip(color.rgb);
+ color.a = max(color.a, gl_Color.a);
+ gl_FragColor = color;
+}
+
diff --git a/indra/newview/app_settings/shaders/class2/lighting/lightShinyWaterF.glsl b/indra/newview/app_settings/shaders/class2/lighting/lightShinyWaterF.glsl
new file mode 100644
index 0000000000..f090306be6
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class2/lighting/lightShinyWaterF.glsl
@@ -0,0 +1,27 @@
+/**
+ * @file lightShinyWaterF.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+
+uniform sampler2D diffuseMap;
+uniform samplerCube environmentMap;
+
+vec3 atmosLighting(vec3 light);
+vec4 applyWaterFog(vec4 color);
+
+void shiny_lighting_water()
+{
+ vec4 color = texture2D(diffuseMap, gl_TexCoord[0].xy);
+ color.rgb *= gl_Color.rgb;
+
+ vec3 envColor = textureCube(environmentMap, gl_TexCoord[1].xyz).rgb;
+ color.rgb = mix(color.rgb, envColor.rgb, gl_Color.a);
+
+ color.rgb = atmosLighting(color.rgb);
+ color.a = max(color.a, gl_Color.a);
+ gl_FragColor = applyWaterFog(color);
+}
+
diff --git a/indra/newview/app_settings/shaders/class2/lighting/lightSpecularV.glsl b/indra/newview/app_settings/shaders/class2/lighting/lightSpecularV.glsl
new file mode 100644
index 0000000000..c3384ffc5d
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class2/lighting/lightSpecularV.glsl
@@ -0,0 +1,16 @@
+/**
+ * @file lightSpecularV.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+// All lights, no specular highlights
+
+vec4 sumLightsSpecular(vec3 pos, vec3 norm, vec4 color, inout vec4 specularColor, vec4 baseCol);
+
+vec4 calcLightingSpecular(vec3 pos, vec3 norm, vec4 color, inout vec4 specularColor, vec4 baseCol)
+{
+ return sumLightsSpecular(pos, norm, color, specularColor, baseCol);
+}
+
diff --git a/indra/newview/app_settings/shaders/class2/lighting/lightV.glsl b/indra/newview/app_settings/shaders/class2/lighting/lightV.glsl
index b15960dea2..ff3bcb5cd2 100644
--- a/indra/newview/app_settings/shaders/class2/lighting/lightV.glsl
+++ b/indra/newview/app_settings/shaders/class2/lighting/lightV.glsl
@@ -1,126 +1,16 @@
-// All lights, no specular highlights
-
-float calcDirectionalLight(vec3 n, vec3 l)
-{
- float a = max(dot(n,l),0.0);
- return a;
-}
-
-float calcPointLight(vec3 v, vec3 n, vec4 lp, float la)
-{
- //get light vector
- vec3 lv = lp.xyz-v;
-
- //get distance
- float d = length(lv);
-
- //normalize light vector
- lv *= 1.0/d;
-
- //distance attenuation
- float da = clamp(1.0/(la * d), 0.0, 1.0);
-
- //angular attenuation
- da *= calcDirectionalLight(n, lv);
-
- return da;
-}
+/**
+ * @file lightV.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
-float calcDirectionalSpecular(vec3 view, vec3 n, vec3 l)
-{
- return pow(max(dot(reflect(view, n),l), 0.0),8.0);
-}
+// All lights, no specular highlights
-float calcDirectionalLightSpecular(inout vec4 specular, vec3 view, vec3 n, vec3 l, vec3 lightCol, float da)
-{
-
- specular.rgb += calcDirectionalSpecular(view,n,l)*lightCol*da;
- return calcDirectionalLight(n,l);
-}
-
-vec3 calcPointLightSpecular(inout vec4 specular, vec3 view, vec3 v, vec3 n, vec3 l, float r, float pw, vec3 lightCol)
-{
- //get light vector
- vec3 lv = l-v;
-
- //get distance
- float d = length(lv);
-
- //normalize light vector
- lv *= 1.0/d;
-
- //distance attenuation
- float da = clamp(1.0/(r * d), 0.0, 1.0);
-
- //angular attenuation
-
- da *= calcDirectionalLightSpecular(specular, view, n, lv, lightCol, da);
-
- return da*lightCol;
-}
+vec4 sumLights(vec3 pos, vec3 norm, vec4 color, vec4 baseLight);
vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseLight)
{
- vec4 col;
- col.a = color.a;
-
- col.rgb = gl_LightModel.ambient.rgb + baseLight.rgb;
-
- col.rgb += gl_LightSource[0].diffuse.rgb*calcDirectionalLight(norm, gl_LightSource[0].position.xyz);
- col.rgb += gl_LightSource[1].diffuse.rgb*calcDirectionalLight(norm, gl_LightSource[1].position.xyz);
- col.rgb += gl_LightSource[2].diffuse.rgb*calcPointLight(pos, norm, gl_LightSource[2].position, gl_LightSource[2].linearAttenuation);
- col.rgb += gl_LightSource[3].diffuse.rgb*calcPointLight(pos, norm, gl_LightSource[3].position, gl_LightSource[3].linearAttenuation);
- col.rgb += gl_LightSource[4].diffuse.rgb*calcPointLight(pos, norm, gl_LightSource[4].position, gl_LightSource[4].linearAttenuation);
- col.rgb += gl_LightSource[5].diffuse.rgb*calcPointLight(pos, norm, gl_LightSource[5].position, gl_LightSource[5].linearAttenuation);
- col.rgb += gl_LightSource[6].diffuse.rgb*calcPointLight(pos, norm, gl_LightSource[6].position, gl_LightSource[6].linearAttenuation);
- col.rgb += gl_LightSource[7].diffuse.rgb*calcPointLight(pos, norm, gl_LightSource[7].position, gl_LightSource[7].linearAttenuation);
-
- col.rgb = min(col.rgb*color.rgb, 1.0);
-
- gl_FrontColor = vec4(col.rgb, col.a);
- return col;
-}
-
-vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec3 baseLight)
-{
- return calcLighting(pos, norm, color, vec4(baseLight, 1.0));
-}
-
-vec4 calcLighting(vec3 pos, vec3 norm, vec4 color)
-{
- return calcLighting(pos, norm, color, vec3(0.0,0.0,0.0));
+ return sumLights(pos, norm, color, baseLight);
}
-vec4 calcLightingSpecular(vec3 pos, vec3 norm, vec4 color, inout vec4 specularColor, vec4 baseCol)
-{
- vec4 col;
- col.a = color.a;
-
- col.rgb = gl_LightModel.ambient.rgb;
-
- vec3 view = normalize(pos);
-
- vec4 specular = specularColor;
- specularColor.rgb = vec3(0.0, 0.0, 0.0);
-
- col.rgb += baseCol.a*gl_LightSource[0].diffuse.rgb*calcDirectionalLightSpecular(specularColor, view, norm, gl_LightSource[0].position.xyz,gl_LightSource[0].diffuse.rgb*baseCol.a, 1.0);
- col.rgb += gl_LightSource[1].diffuse.rgb*calcDirectionalLightSpecular(specularColor, view, norm, gl_LightSource[1].position.xyz,gl_LightSource[1].diffuse.rgb, 1.0);
- col.rgb += calcPointLightSpecular(specularColor, view, pos, norm, gl_LightSource[2].position.xyz, gl_LightSource[2].linearAttenuation, gl_LightSource[2].quadraticAttenuation,gl_LightSource[2].diffuse.rgb);
- col.rgb += calcPointLightSpecular(specularColor, view, pos, norm, gl_LightSource[3].position.xyz, gl_LightSource[3].linearAttenuation, gl_LightSource[3].quadraticAttenuation,gl_LightSource[3].diffuse.rgb);
- col.rgb += calcPointLightSpecular(specularColor, view, pos, norm, gl_LightSource[4].position.xyz, gl_LightSource[4].linearAttenuation, gl_LightSource[4].quadraticAttenuation,gl_LightSource[4].diffuse.rgb);
- col.rgb += calcPointLightSpecular(specularColor, view, pos, norm, gl_LightSource[5].position.xyz, gl_LightSource[5].linearAttenuation, gl_LightSource[5].quadraticAttenuation,gl_LightSource[5].diffuse.rgb);
- //col.rgb += calcPointLightSpecular(specularColor, view, pos, norm, gl_LightSource[6].position.xyz, gl_LightSource[6].linearAttenuation, gl_LightSource[6].quadraticAttenuation,gl_LightSource[6].diffuse.rgb);
- //col.rgb += calcPointLightSpecular(specularColor, view, pos, norm, gl_LightSource[7].position.xyz, gl_LightSource[7].linearAttenuation, gl_LightSource[7].quadraticAttenuation,gl_LightSource[7].diffuse.rgb);
- col.rgb += baseCol.rgb;
-
- col.rgb = min(col.rgb*color.rgb, 1.0);
- specularColor.rgb = min(specularColor.rgb*specular.rgb, 1.0);
-
- gl_FrontColor = vec4(col.rgb+specularColor.rgb,col.a);
- return col;
-}
-
-vec4 calcLightingSpecular(vec3 pos, vec3 norm, vec4 color, inout vec4 specularColor, vec3 baseCol)
-{
- return calcLightingSpecular(pos, norm, color, specularColor, vec4(baseCol, 1.0));
-}
diff --git a/indra/newview/app_settings/shaders/class2/lighting/lightWaterF.glsl b/indra/newview/app_settings/shaders/class2/lighting/lightWaterF.glsl
new file mode 100644
index 0000000000..086954cd47
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class2/lighting/lightWaterF.glsl
@@ -0,0 +1,21 @@
+/**
+ * @file lightWaterF.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+uniform sampler2D diffuseMap;
+
+vec3 atmosLighting(vec3 light);
+vec4 applyWaterFog(vec4 color);
+
+void default_lighting_water()
+{
+ vec4 color = texture2D(diffuseMap, gl_TexCoord[0].xy) * gl_Color;
+
+ color.rgb = atmosLighting(color.rgb);
+
+ gl_FragColor = applyWaterFog(color);
+}
+
diff --git a/indra/newview/app_settings/shaders/class2/lighting/sumLightsSpecularV.glsl b/indra/newview/app_settings/shaders/class2/lighting/sumLightsSpecularV.glsl
new file mode 100644
index 0000000000..edd1a8a946
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class2/lighting/sumLightsSpecularV.glsl
@@ -0,0 +1,41 @@
+/**
+ * @file sumLightsV.glsl
+ *
+ * Copyright (c) 2005-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+float calcDirectionalLightSpecular(inout vec4 specular, vec3 view, vec3 n, vec3 l, vec3 lightCol, float da);
+vec3 calcPointLightSpecular(inout vec4 specular, vec3 view, vec3 v, vec3 n, vec3 l, float r, float pw, vec3 lightCol);
+
+vec3 atmosAmbient(vec3 light);
+vec3 atmosAffectDirectionalLight(float lightIntensity);
+vec3 atmosGetDiffuseSunlightColor();
+vec3 scaleDownLight(vec3 light);
+
+vec4 sumLightsSpecular(vec3 pos, vec3 norm, vec4 color, inout vec4 specularColor, vec4 baseCol)
+{
+ vec4 col = vec4(0.0, 0.0, 0.0, color.a);
+
+ vec3 view = normalize(pos);
+
+ /// collect all the specular values from each calcXXXLightSpecular() function
+ vec4 specularSum = vec4(0.0);
+
+ // Collect normal lights (need to be divided by two, as we later multiply by 2)
+ col.rgb += gl_LightSource[1].diffuse.rgb * calcDirectionalLightSpecular(specularColor, view, norm, gl_LightSource[1].position.xyz, gl_LightSource[1].diffuse.rgb, 1.0);
+ col.rgb += calcPointLightSpecular(specularSum, view, pos, norm, gl_LightSource[2].position.xyz, gl_LightSource[2].linearAttenuation, gl_LightSource[2].quadraticAttenuation, gl_LightSource[2].diffuse.rgb);
+ col.rgb += calcPointLightSpecular(specularSum, view, pos, norm, gl_LightSource[3].position.xyz, gl_LightSource[3].linearAttenuation, gl_LightSource[3].quadraticAttenuation, gl_LightSource[3].diffuse.rgb);
+ //col.rgb += calcPointLightSpecular(specularSum, view, pos, norm, gl_LightSource[4].position.xyz, gl_LightSource[4].linearAttenuation, gl_LightSource[4].quadraticAttenuation, gl_LightSource[4].diffuse.rgb);
+ col.rgb = scaleDownLight(col.rgb);
+
+ // Add windlight lights
+ col.rgb += atmosAmbient(baseCol.rgb);
+ col.rgb += atmosAffectDirectionalLight(calcDirectionalLightSpecular(specularSum, view, norm, gl_LightSource[0].position.xyz, atmosGetDiffuseSunlightColor()*baseCol.a, 1.0));
+
+ col.rgb = min(col.rgb*color.rgb, 1.0);
+ specularColor.rgb = min(specularColor.rgb*specularSum.rgb, 1.0);
+ col.rgb += specularColor.rgb;
+
+ return col;
+}
diff --git a/indra/newview/app_settings/shaders/class2/lighting/sumLightsV.glsl b/indra/newview/app_settings/shaders/class2/lighting/sumLightsV.glsl
new file mode 100644
index 0000000000..f4c59734a4
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class2/lighting/sumLightsV.glsl
@@ -0,0 +1,34 @@
+/**
+ * @file sumLightsV.glsl
+ *
+ * Copyright (c) 2005-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+float calcDirectionalLight(vec3 n, vec3 l);
+float calcPointLight(vec3 v, vec3 n, vec4 lp, float la);
+
+vec3 atmosAmbient(vec3 light);
+vec3 atmosAffectDirectionalLight(float lightIntensity);
+vec3 scaleDownLight(vec3 light);
+
+vec4 sumLights(vec3 pos, vec3 norm, vec4 color, vec4 baseLight)
+{
+ vec4 col = vec4(0.0, 0.0, 0.0, color.a);
+
+ // Collect normal lights (need to be divided by two, as we later multiply by 2)
+ col.rgb += gl_LightSource[1].diffuse.rgb * calcDirectionalLight(norm, gl_LightSource[1].position.xyz);
+ col.rgb += gl_LightSource[2].diffuse.rgb * calcPointLight(pos, norm, gl_LightSource[2].position, gl_LightSource[2].linearAttenuation);
+ col.rgb += gl_LightSource[3].diffuse.rgb * calcPointLight(pos, norm, gl_LightSource[3].position, gl_LightSource[3].linearAttenuation);
+ //col.rgb += gl_LightSource[4].diffuse.rgb * calcPointLight(pos, norm, gl_LightSource[4].position, gl_LightSource[4].linearAttenuation);
+ col.rgb = scaleDownLight(col.rgb);
+
+ // Add windlight lights
+ col.rgb += atmosAmbient(baseLight.rgb);
+ col.rgb += atmosAffectDirectionalLight(calcDirectionalLight(norm, gl_LightSource[0].position.xyz));
+
+ col.rgb = min(col.rgb*color.rgb, 1.0);
+
+ return col;
+}
+
diff --git a/indra/newview/app_settings/shaders/class2/objects/shinyV.glsl b/indra/newview/app_settings/shaders/class2/objects/shinyV.glsl
new file mode 100755
index 0000000000..0d52f32a2e
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class2/objects/shinyV.glsl
@@ -0,0 +1,31 @@
+/**
+ * @file shinyV.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
+
+void calcAtmospherics(vec3 inPositionEye);
+
+uniform vec4 origin;
+
+void main()
+{
+ //transform vertex
+ gl_Position = ftransform();
+
+ vec4 pos = (gl_ModelViewMatrix * gl_Vertex);
+ vec3 norm = normalize(gl_NormalMatrix * gl_Normal);
+ vec3 ref = reflect(pos.xyz, -norm);
+
+ gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
+ gl_TexCoord[1] = gl_TextureMatrix[1]*vec4(ref,1.0);
+
+ calcAtmospherics(pos.xyz);
+
+ gl_FrontColor = calcLighting(pos.xyz, norm, gl_Color, vec4(0.0));
+
+ gl_FogFragCoord = pos.z;
+}
diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsF.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsF.glsl
new file mode 100644
index 0000000000..92c0664a5e
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsF.glsl
@@ -0,0 +1,24 @@
+/**
+ * @file atmosphericsF.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+//////////////////////////////////////////////////////////
+// The fragment shader for the terrain atmospherics
+//////////////////////////////////////////////////////////
+
+vec3 getAdditiveColor();
+vec3 getAtmosAttenuation();
+
+uniform sampler2D cloudMap;
+uniform vec4 cloud_pos_density1;
+
+vec3 atmosLighting(vec3 light)
+{
+ light *= getAtmosAttenuation().r;
+ light += getAdditiveColor();
+ return (2.0 * light);
+}
+
diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsHelpersV.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsHelpersV.glsl
new file mode 100644
index 0000000000..32d5ed5db2
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsHelpersV.glsl
@@ -0,0 +1,41 @@
+/**
+ * @file atmosphericsHelpersV.glsl
+ *
+ * Copyright (c) 2005-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+// Output variables
+vec3 getSunlitColor();
+vec3 getAmblitColor();
+vec3 getAdditiveColor();
+vec3 getAtmosAttenuation();
+vec3 getPositionEye();
+
+uniform float scene_light_strength;
+
+vec3 atmosAmbient(vec3 light)
+{
+ return getAmblitColor() + light / 2.0;
+}
+
+vec3 atmosAffectDirectionalLight(float lightIntensity)
+{
+ return getSunlitColor() * lightIntensity;
+}
+
+vec3 atmosGetDiffuseSunlightColor()
+{
+ return getSunlitColor();
+}
+
+vec3 scaleDownLight(vec3 light)
+{
+ return (light / scene_light_strength );
+}
+
+vec3 scaleUpLight(vec3 light)
+{
+ return (light * scene_light_strength);
+}
+
diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl
new file mode 100644
index 0000000000..e40372e819
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsV.glsl
@@ -0,0 +1,137 @@
+/**
+ * @file atmosphericsV.glsl
+ *
+ * Copyright (c) 2005-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+// varying param funcs
+void setSunlitColor(vec3 v);
+void setAmblitColor(vec3 v);
+void setAdditiveColor(vec3 v);
+void setAtmosAttenuation(vec3 v);
+void setPositionEye(vec3 v);
+
+vec3 getAdditiveColor();
+
+//varying vec4 vary_CloudUVs;
+//varying float vary_CloudDensity;
+
+// Inputs
+uniform vec4 morphFactor;
+uniform vec3 camPosLocal;
+//uniform vec4 camPosWorld;
+
+uniform vec4 lightnorm;
+uniform vec4 sunlight_color;
+uniform vec4 ambient;
+uniform vec4 blue_horizon;
+uniform vec4 blue_density;
+uniform vec4 haze_horizon;
+uniform vec4 haze_density;
+uniform vec4 cloud_shadow;
+uniform vec4 density_multiplier;
+uniform vec4 distance_multiplier;
+uniform vec4 max_y;
+uniform vec4 glow;
+
+void calcAtmospherics(vec3 inPositionEye) {
+
+ vec3 P = inPositionEye;
+ setPositionEye(P);
+
+ //(TERRAIN) limit altitude
+ if (P.y > max_y.x) P *= (max_y.x / P.y);
+ if (P.y < -max_y.x) P *= (-max_y.x / P.y);
+
+ vec3 tmpLightnorm = lightnorm.xyz;
+
+ vec3 Pn = normalize(P);
+ float Plen = length(P);
+
+ vec4 temp1 = vec4(0);
+ vec3 temp2 = vec3(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 * 1.0 + vec4(haze_density.r) * 0.25) * (density_multiplier.x * max_y.x);
+ //I had thought blue_density and haze_density should have equal weighting,
+ //but attenuation due to haze_density tends to seem too strong
+
+ temp1 = blue_density + vec4(haze_density.r);
+ blue_weight = blue_density / temp1;
+ haze_weight = vec4(haze_density.r) / temp1;
+
+ //(TERRAIN) compute sunlight from lightnorm only (for short rays like terrain)
+ temp2.y = max(0.0, tmpLightnorm.y);
+ temp2.y = 1. / temp2.y;
+ sunlight *= exp( - light_atten * temp2.y);
+
+ // main atmospheric scattering line integral
+ temp2.z = Plen * density_multiplier.x;
+
+ // Transparency (-> temp1)
+ // ATI Bugfix -- can't store temp1*temp2.z*distance_multiplier.x in a variable because the ati
+ // compiler gets confused.
+ temp1 = exp(-temp1 * temp2.z * distance_multiplier.x);
+
+ //final atmosphere attenuation factor
+ setAtmosAttenuation(temp1.rgb);
+ //vary_AtmosAttenuation = distance_multiplier / 10000.;
+ //vary_AtmosAttenuation = density_multiplier * 100.;
+ //vary_AtmosAttenuation = vec4(Plen / 100000., 0., 0., 1.);
+
+ //compute haze glow
+ //(can use temp2.x as temp because we haven't used it yet)
+ temp2.x = dot(Pn, tmpLightnorm.xyz);
+ temp2.x = 1. - temp2.x;
+ //temp2.x is 0 at the sun and increases away from sun
+ temp2.x = max(temp2.x, .03); //was glow.y
+ //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;
+
+
+ //increase ambient when there are more clouds
+ vec4 tmpAmbient = ambient + (vec4(1.) - ambient) * cloud_shadow.x * 0.5;
+
+ //haze color
+ setAdditiveColor(
+ vec3(blue_horizon * blue_weight * (sunlight*(1.-cloud_shadow.x) + tmpAmbient)
+ + (haze_horizon.r * haze_weight) * (sunlight*(1.-cloud_shadow.x) * temp2.x
+ + tmpAmbient)));
+
+ //brightness of surface both sunlight and ambient
+ setSunlitColor(vec3(sunlight * .5));
+ setAmblitColor(vec3(tmpAmbient * .25));
+ setAdditiveColor(getAdditiveColor() * vec3(1.0 - temp1));
+
+ // vary_SunlitColor = vec3(0);
+ // vary_AmblitColor = vec3(0);
+ // vary_AdditiveColor = vec4(Pn, 1.0);
+
+ /*
+ const float cloudShadowScale = 100.;
+ // Get cloud uvs for shadowing
+ vec3 cloudPos = inPositionEye + camPosWorld - cloudShadowScale / 2.;
+ vary_CloudUVs.xy = cloudPos.xz / cloudShadowScale;
+
+ // We can take uv1 and multiply it by (TerrainSpan / CloudSpan)
+// cloudUVs *= (((worldMaxZ - worldMinZ) * 20) /40000.);
+ vary_CloudUVs *= (10000./40000.);
+
+ // Offset by sun vector * (CloudAltitude / CloudSpan)
+ vary_CloudUVs.x += tmpLightnorm.x / tmpLightnorm.y * (3000./40000.);
+ vary_CloudUVs.y += tmpLightnorm.z / tmpLightnorm.y * (3000./40000.);
+ */
+}
+
diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsF.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsF.glsl
new file mode 100644
index 0000000000..0dbf2d35e7
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsF.glsl
@@ -0,0 +1,34 @@
+/**
+ * @file atmosphericVars.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+varying vec3 vary_PositionEye;
+
+varying vec3 vary_SunlitColor;
+varying vec3 vary_AmblitColor;
+varying vec3 vary_AdditiveColor;
+varying vec3 vary_AtmosAttenuation;
+
+vec3 getPositionEye()
+{
+ return vary_PositionEye;
+}
+vec3 getSunlitColor()
+{
+ return vary_SunlitColor;
+}
+vec3 getAmblitColor()
+{
+ return vary_AmblitColor;
+}
+vec3 getAdditiveColor()
+{
+ return vary_AdditiveColor;
+}
+vec3 getAtmosAttenuation()
+{
+ return vary_AtmosAttenuation;
+}
diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsV.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsV.glsl
new file mode 100644
index 0000000000..b528837a5f
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsV.glsl
@@ -0,0 +1,60 @@
+/**
+ * @file atmosphericVars.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+varying vec3 vary_PositionEye;
+
+varying vec3 vary_SunlitColor;
+varying vec3 vary_AmblitColor;
+varying vec3 vary_AdditiveColor;
+varying vec3 vary_AtmosAttenuation;
+
+vec3 getPositionEye()
+{
+ return vary_PositionEye;
+}
+vec3 getSunlitColor()
+{
+ return vary_SunlitColor;
+}
+vec3 getAmblitColor()
+{
+ return vary_AmblitColor;
+}
+vec3 getAdditiveColor()
+{
+ return vary_AdditiveColor;
+}
+vec3 getAtmosAttenuation()
+{
+ return vary_AtmosAttenuation;
+}
+
+
+void setPositionEye(vec3 v)
+{
+ vary_PositionEye = v;
+}
+
+void setSunlitColor(vec3 v)
+{
+ vary_SunlitColor = v;
+}
+
+void setAmblitColor(vec3 v)
+{
+ vary_AmblitColor = v;
+}
+
+void setAdditiveColor(vec3 v)
+{
+ vary_AdditiveColor = v;
+}
+
+void setAtmosAttenuation(vec3 v)
+{
+ vary_AtmosAttenuation = v;
+}
diff --git a/indra/newview/app_settings/shaders/class2/windlight/cloudsF.glsl b/indra/newview/app_settings/shaders/class2/windlight/cloudsF.glsl
new file mode 100644
index 0000000000..b7d7e5a2c2
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class2/windlight/cloudsF.glsl
@@ -0,0 +1,76 @@
+/**
+ * @file WLCloudsF.glsl
+ *
+ * Copyright (c) 2005-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+/////////////////////////////////////////////////////////////////////////
+// The fragment shader for the sky
+/////////////////////////////////////////////////////////////////////////
+
+varying vec4 vary_CloudColorSun;
+varying vec4 vary_CloudColorAmbient;
+varying float vary_CloudDensity;
+
+uniform sampler2D cloud_noise_texture;
+uniform vec4 cloud_pos_density1;
+uniform vec4 cloud_pos_density2;
+uniform vec4 gamma;
+
+/// 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;
+}
+
+void main()
+{
+ // Set variables
+ vec2 uv1 = gl_TexCoord[0].xy;
+ vec2 uv2 = gl_TexCoord[1].xy;
+
+ vec4 cloudColorSun = vary_CloudColorSun;
+ vec4 cloudColorAmbient = vary_CloudColorAmbient;
+ float cloudDensity = vary_CloudDensity;
+ vec2 uv3 = gl_TexCoord[2].xy;
+ vec2 uv4 = gl_TexCoord[3].xy;
+
+ // Offset texture coords
+ uv1 += cloud_pos_density1.xy; //large texture, visible density
+ uv2 += cloud_pos_density1.xy; //large texture, self shadow
+ uv3 += cloud_pos_density2.xy; //small texture, visible density
+ uv4 += cloud_pos_density2.xy; //small texture, self shadow
+
+
+ // Compute alpha1, the main cloud opacity
+ float alpha1 = (texture2D(cloud_noise_texture, uv1).x - 0.5) + (texture2D(cloud_noise_texture, uv3).x - 0.5) * cloud_pos_density2.z;
+ alpha1 = min(max(alpha1 + cloudDensity, 0.) * 10. * cloud_pos_density1.z, 1.);
+
+ // And smooth
+ alpha1 = 1. - alpha1 * alpha1;
+ alpha1 = 1. - alpha1 * alpha1;
+
+
+ // Compute alpha2, for self shadowing effect
+ // (1 - alpha2) will later be used as percentage of incoming sunlight
+ float alpha2 = (texture2D(cloud_noise_texture, uv2).x - 0.5);
+ alpha2 = min(max(alpha2 + cloudDensity, 0.) * 2.5 * cloud_pos_density1.z, 1.);
+
+ // And smooth
+ alpha2 = 1. - alpha2;
+ alpha2 = 1. - alpha2 * alpha2;
+
+ // Combine
+ vec4 color;
+ color = (cloudColorSun*(1.-alpha2) + cloudColorAmbient);
+ color *= 2.;
+
+ /// Gamma correct for WL (soft clip effect).
+ gl_FragColor.rgb = scaleSoftClip(color.rgb);
+ gl_FragColor.a = alpha1;
+}
+
diff --git a/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl b/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl
new file mode 100644
index 0000000000..e149d5861f
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl
@@ -0,0 +1,163 @@
+/**
+ * @file WLCloudsV.glsl
+ *
+ * Copyright (c) 2005-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+//////////////////////////////////////////////////////////////////////////
+// The vertex shader for creating the atmospheric sky
+///////////////////////////////////////////////////////////////////////////////
+
+// Output parameters
+varying vec4 vary_CloudColorSun;
+varying vec4 vary_CloudColorAmbient;
+varying float vary_CloudDensity;
+
+// Inputs
+uniform vec3 camPosLocal;
+
+uniform vec4 lightnorm;
+uniform vec4 sunlight_color;
+uniform vec4 ambient;
+uniform vec4 blue_horizon;
+uniform vec4 blue_density;
+uniform vec4 haze_horizon;
+uniform vec4 haze_density;
+
+uniform vec4 cloud_shadow;
+uniform vec4 density_multiplier;
+uniform vec4 max_y;
+
+uniform vec4 glow;
+
+uniform vec4 cloud_color;
+
+uniform vec4 cloud_scale;
+
+void main()
+{
+
+ // World / view / projection
+ gl_Position = ftransform();
+
+ gl_TexCoord[0] = gl_MultiTexCoord0;
+
+ // Get relative position
+ vec3 P = gl_Vertex.xyz - camPosLocal.xyz + vec3(0,50,0);
+
+ // Set altitude
+ if (P.y > 0.)
+ {
+ P *= (max_y.x / 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 * 1.0 + haze_density.x * 0.25) * (density_multiplier.x * max_y.x);
+
+ // Calculate relative weights
+ temp1 = blue_density + haze_density.x;
+ blue_weight = blue_density / temp1;
+ haze_weight = haze_density.x / 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.x;
+
+ // 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;
+
+ // Increase ambient when there are more clouds
+ vec4 tmpAmbient = ambient;
+ tmpAmbient += (1. - tmpAmbient) * cloud_shadow.x * 0.5;
+
+ // Dim sunlight by cloud shadow percentage
+ sunlight *= (1. - cloud_shadow.x);
+
+ // Haze color below cloud
+ vec4 additiveColorBelowCloud = ( blue_horizon * blue_weight * (sunlight + tmpAmbient)
+ + (haze_horizon.r * haze_weight) * (sunlight * temp2.x + tmpAmbient)
+ );
+
+ // CLOUDS
+
+ sunlight = sunlight_color;
+ temp2.y = max(0., lightnorm.y * 2.);
+ temp2.y = 1. / temp2.y;
+ sunlight *= exp( - light_atten * temp2.y);
+
+ // Cloud color out
+ vary_CloudColorSun = (sunlight * temp2.x) * cloud_color;
+ vary_CloudColorAmbient = tmpAmbient * cloud_color;
+
+ // Attenuate cloud color by atmosphere
+ temp1 = sqrt(temp1); //less atmos opacity (more transparency) below clouds
+ vary_CloudColorSun *= temp1;
+ vary_CloudColorAmbient *= temp1;
+ vec4 oHazeColorBelowCloud = additiveColorBelowCloud * (1. - temp1);
+
+ // Make a nice cloud density based on the cloud_shadow value that was passed in.
+ vary_CloudDensity = 2. * (cloud_shadow.x - 0.25);
+
+
+ // Texture coords
+ gl_TexCoord[0] = gl_MultiTexCoord0;
+ gl_TexCoord[0].xy -= 0.5;
+ gl_TexCoord[0].xy /= cloud_scale.x;
+ gl_TexCoord[0].xy += 0.5;
+
+ gl_TexCoord[1] = gl_TexCoord[0];
+ gl_TexCoord[1].x += lightnorm.x * 0.0125;
+ gl_TexCoord[1].y += lightnorm.z * 0.0125;
+
+ gl_TexCoord[2] = gl_TexCoord[0] * 16.;
+ gl_TexCoord[3] = gl_TexCoord[1] * 16.;
+
+ // Combine these to minimize register use
+ vary_CloudColorAmbient += oHazeColorBelowCloud;
+
+ // needs this to compile on mac
+ //vary_AtmosAttenuation = vec3(0.0,0.0,0.0);
+
+ // END CLOUDS
+}
+
diff --git a/indra/newview/app_settings/shaders/class2/windlight/gammaF.glsl b/indra/newview/app_settings/shaders/class2/windlight/gammaF.glsl
new file mode 100644
index 0000000000..5410889ed8
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class2/windlight/gammaF.glsl
@@ -0,0 +1,24 @@
+/**
+ * @file gammaF.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+uniform vec4 gamma;
+
+vec3 getAtmosAttenuation();
+
+/// 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 fullbrightScaleSoftClip(vec3 light) {
+ return mix(scaleSoftClip(light.rgb), light.rgb, getAtmosAttenuation());
+}
+
diff --git a/indra/newview/app_settings/shaders/class2/windlight/skyF.glsl b/indra/newview/app_settings/shaders/class2/windlight/skyF.glsl
new file mode 100644
index 0000000000..bc6d6d33ff
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class2/windlight/skyF.glsl
@@ -0,0 +1,41 @@
+/**
+ * @file WLSkyF.glsl
+ *
+ * Copyright (c) 2005-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+/////////////////////////////////////////////////////////////////////////
+// The fragment shader for the sky
+/////////////////////////////////////////////////////////////////////////
+
+varying vec4 vary_HazeColor;
+
+uniform sampler2D cloud_noise_texture;
+uniform vec4 gamma;
+
+/// 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;
+}
+
+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.
+
+ vec4 color;
+ color = vary_HazeColor;
+ color *= 2.;
+
+ /// Gamma correct for WL (soft clip effect).
+ gl_FragColor.rgb = scaleSoftClip(color.rgb);
+ gl_FragColor.a = 1.0;
+}
+
diff --git a/indra/newview/app_settings/shaders/class2/windlight/skyV.glsl b/indra/newview/app_settings/shaders/class2/windlight/skyV.glsl
new file mode 100644
index 0000000000..e396aea6c9
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class2/windlight/skyV.glsl
@@ -0,0 +1,138 @@
+/**
+ * @file WLSkyV.glsl
+ *
+ * Copyright (c) 2005-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+// 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 vec4 haze_horizon;
+uniform vec4 haze_density;
+
+uniform vec4 cloud_shadow;
+uniform vec4 density_multiplier;
+uniform vec4 max_y;
+
+uniform vec4 glow;
+
+uniform vec4 cloud_color;
+
+uniform vec4 cloud_scale;
+
+void main()
+{
+
+ // World / view / projection
+ gl_Position = ftransform();
+ gl_TexCoord[0] = gl_MultiTexCoord0;
+
+ // Get relative position
+ vec3 P = gl_Vertex.xyz - camPosLocal.xyz + vec3(0,50,0);
+ //vec3 P = gl_Vertex.xyz + vec3(0,50,0);
+
+ // Set altitude
+ if (P.y > 0.)
+ {
+ P *= (max_y.x / 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 * 1.0 + haze_density.x * 0.25) * (density_multiplier.x * max_y.x);
+
+ // Calculate relative weights
+ temp1 = blue_density + haze_density.x;
+ blue_weight = blue_density / temp1;
+ haze_weight = haze_density.x / 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.x;
+
+ // 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.r * haze_weight) * (sunlight * temp2.x + ambient)
+ );
+
+
+ // Increase ambient when there are more clouds
+ vec4 tmpAmbient = ambient;
+ tmpAmbient += (1. - tmpAmbient) * cloud_shadow.x * 0.5;
+
+ // Dim sunlight by cloud shadow percentage
+ sunlight *= (1. - cloud_shadow.x);
+
+ // Haze color below cloud
+ vec4 additiveColorBelowCloud = ( blue_horizon * blue_weight * (sunlight + tmpAmbient)
+ + (haze_horizon.r * 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);
+}
+
diff --git a/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl b/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl
new file mode 100644
index 0000000000..b7678cac66
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class2/windlight/transportF.glsl
@@ -0,0 +1,35 @@
+/**
+ * @file transportF.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+//////////////////////////////////////////////////////////
+// The fragment shader for the terrain atmospherics
+//////////////////////////////////////////////////////////
+
+vec3 getAdditiveColor();
+vec3 getAtmosAttenuation();
+
+uniform sampler2D cloudMap;
+uniform vec4 cloud_pos_density1;
+
+vec3 atmosTransport(vec3 light) {
+ light *= getAtmosAttenuation().r;
+ light += getAdditiveColor() * 2.0;
+ return light;
+}
+
+vec3 fullbrightAtmosTransport(vec3 light) {
+ float brightness = dot(light.rgb, vec3(0.33333));
+
+ return mix(atmosTransport(light.rgb), light.rgb + getAdditiveColor().rgb, brightness * brightness);
+}
+
+vec3 fullbrightShinyAtmosTransport(vec3 light) {
+ float brightness = dot(light.rgb, vec3(0.33333));
+
+ return mix(atmosTransport(light.rgb), (light.rgb + getAdditiveColor().rgb) * (2.0 - brightness), brightness * brightness);
+}
+
diff --git a/indra/newview/app_settings/shaders/class3/avatar/avatarV.glsl b/indra/newview/app_settings/shaders/class3/avatar/avatarV.glsl
index 2505afea65..04c10536e0 100644
--- a/indra/newview/app_settings/shaders/class3/avatar/avatarV.glsl
+++ b/indra/newview/app_settings/shaders/class3/avatar/avatarV.glsl
@@ -1,10 +1,14 @@
-vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec3 baseCol);
-mat4 getSkinnedTransform();
-void default_scatter(vec3 viewVec, vec3 lightDir);
+/**
+ * @file avatarV.glsl
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
-attribute vec4 materialColor; //2
+vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
+mat4 getSkinnedTransform();
+void calcAtmospherics(vec3 inPositionEye);
-attribute vec4 binormal; //6
attribute vec4 clothing; //4
attribute vec4 gWindDir; //7
@@ -27,102 +31,80 @@ void main()
norm.z = dot(trans[2].xyz, gl_Normal);
norm = normalize(norm);
- vec3 binorm;
- binorm.x = dot(trans[0].xyz, binormal.xyz);
- binorm.y = dot(trans[1].xyz, binormal.xyz);
- binorm.z = dot(trans[2].xyz, binormal.xyz);
- norm = normalize(norm);
-
//wind
vec4 windEffect;
- windEffect = vec4(dot(norm, gWindDir.xyz)); // DP3 windEffect, blendNorm, gWindDir;
- pos.x = dot(trans[2].xyz, gl_Vertex.xyz); // DP3 blendPos.x, blendMatZ, iPos;
+ windEffect = vec4(dot(norm, gWindDir.xyz));
+ pos.x = dot(trans[2].xyz, gl_Vertex.xyz);
windEffect.xyz = pos.x * vec3(0.015, 0.015, 0.015)
- + windEffect.xyz; // MAD windEffect.xyz, blendPos.x, {0.015, 0.015, 0.015, 0}, windEffect;
- windEffect.w = windEffect.w * 2.0 + 1.0; // MAD windEffect.w, windEffect, {0, 0, 0, 2}, {0, 0, 0, 1}; # move wind offset value to [-1, 3]
- windEffect.w = windEffect.w*gWindDir.w; // MUL windEffect.w, windEffect, gWindDir; # modulate wind strength
+ + windEffect.xyz;
+ windEffect.w = windEffect.w * 2.0 + 1.0; // move wind offset value to [-1, 3]
+ windEffect.w = windEffect.w*gWindDir.w; // modulate wind strength
windEffect.xyz = windEffect.xyz*gSinWaveParams.xyz
- +vec3(gSinWaveParams.w); // MAD windEffect.xyz, windEffect, gSinWaveParams, gSinWaveParams.w; # use sin wave params to scale and offset input
+ +vec3(gSinWaveParams.w); // use sin wave params to scale and offset input
//reduce to period of 2 PI
vec4 temp1, temp0, temp2, offsetPos;
- temp1.xyz = windEffect.xyz * gPiConstants.x; // MUL temp1.xyz, windEffect, gPiConstants.x; # change input as multiple of [0-2PI] to [0-1]
- temp0.y = mod(temp1.x,1.0); // EXP temp0, temp1.x; # find mod(x, 1)
- windEffect.x = temp0.y * gPiConstants.y; // MUL windEffect.x, temp0.y, gPiConstants.y; # scale from [0,1] to [0, 2PI]
- temp1.z = temp1.z - gPiConstants.w; // ADD temp1.z, temp1.z, -gPiConstants.w; # shift normal oscillation by PI/2
- temp0.y = mod(temp1.z,1.0); // EXP temp0, temp1.z; # find mod(x, 1)
+ temp1.xyz = windEffect.xyz * gPiConstants.x; // change input as multiple of [0-2PI] to [0-1]
+ temp0.y = mod(temp1.x,1.0);
+ windEffect.x = temp0.y * gPiConstants.y; // scale from [0,1] to [0, 2PI]
+ temp1.z = temp1.z - gPiConstants.w; // shift normal oscillation by PI/2
+ temp0.y = mod(temp1.z,1.0);
- windEffect.z = temp0.y * gPiConstants.y; // MUL windEffect.z, temp0.y, gPiConstants.y; # scale from [0,1] to [0, 2PI]
- windEffect.xyz = windEffect.xyz + vec3(-3.141592); // # offset to [-PI, PI]
- // ADD windEffect.xyz, windEffect, {-3.141592, -3.141592, -3.141592, -3.141592};
+ windEffect.z = temp0.y * gPiConstants.y; // scale from [0,1] to [0, 2PI]
+ windEffect.xyz = windEffect.xyz + vec3(-3.141592); // offset to [-PI, PI]
+
//calculate sinusoid
vec4 sinWave;
- temp1 = windEffect*windEffect; // MUL temp1, windEffect, windEffect; # x^2
+ temp1 = windEffect*windEffect;
sinWave = -temp1 * gMinMaxConstants.w
- + vec4(gMinMaxConstants.z); // MAD sinWave, -temp1, gMinMaxConstants.w, gMinMaxConstants.z; # y = -(x^2)/7! + 1/5!
- sinWave = sinWave * -temp1 + vec4(gMinMaxConstants.y); // MAD sinWave, sinWave, -temp1, gMinMaxConstants.y; # y = -(x^2) * (-(x^2)/7! + 1/5!) + 1/3!
- sinWave = sinWave * -temp1 + vec4(gMinMaxConstants.x); // MAD sinWave, sinWave, -temp1, gMinMaxConstants.x; # y = -(x^2) * (-(x^2) * (-(x^2)/7! + 1/5!) + 1/3!) + 1
- sinWave = sinWave * windEffect; // MUL sinWave, sinWave, windEffect; # y = x * (-(x^2) * (-(x^2) * (-(x^2)/7! + 1/5!) + 1/3!) + 1)
+ + vec4(gMinMaxConstants.z); // y = -(x^2)/7! + 1/5!
+ sinWave = sinWave * -temp1 + vec4(gMinMaxConstants.y); // y = -(x^2) * (-(x^2)/7! + 1/5!) + 1/3!
+ sinWave = sinWave * -temp1 + vec4(gMinMaxConstants.x); // y = -(x^2) * (-(x^2) * (-(x^2)/7! + 1/5!) + 1/3!) + 1
+ sinWave = sinWave * windEffect; // y = x * (-(x^2) * (-(x^2) * (-(x^2)/7! + 1/5!) + 1/3!) + 1)
// sinWave.x holds sin(norm . wind_direction) with primary frequency
// sinWave.y holds sin(norm . wind_direction) with secondary frequency
// sinWave.z hold cos(norm . wind_direction) with primary frequency
sinWave.xyz = sinWave.xyz * gWindDir.w
- + vec3(windEffect.w); // MAD sinWave.xyz, sinWave, gWindDir.w, windEffect.w; # multiply by wind strength in gWindDir.w [-wind, wind]
+ + vec3(windEffect.w); // multiply by wind strength in gWindDir.w [-wind, wind]
// add normal facing bias offset [-wind,wind] -> [-wind - .25, wind + 1]
- temp1 = vec4(dot(norm, gGravity.xyz)); // DP3 temp1, blendNorm, gGravity; # how much is this normal facing in direction of gGravity?
- temp1 = min(temp1, vec4(0.2,0.0,0.0,0.0)); // MIN temp1, temp1, {0.2, 0, 0, 0}; # clamp [-1, 1] to [-1, 0.2]
- temp1 = temp1*vec4(1.5,0.0,0.0,0.0); // MUL temp1, temp1, {1.5, 0, 0, 0}; # scale from [-1,0.2] to [-1.5, 0.3]
- sinWave.x = sinWave.x + temp1.x; // ADD sinWave.x, sinWave, temp1; # add gGravity effect to sinwave (only primary frequency)
- sinWave.xyz = sinWave.xyz * clothing.w; // MUL sinWave.xyz, sinWave, iClothing.w; # modulate by clothing coverage
+ temp1 = vec4(dot(norm, gGravity.xyz)); // how much is this normal facing in direction of gGravity?
+ temp1 = min(temp1, vec4(0.2,0.0,0.0,0.0)); // clamp [-1, 1] to [-1, 0.2]
+ temp1 = temp1*vec4(1.5,0.0,0.0,0.0); // scale from [-1,0.2] to [-1.5, 0.3]
+ sinWave.x = sinWave.x + temp1.x; // add gGravity effect to sinwave (only primary frequency)
+ sinWave.xyz = sinWave.xyz * clothing.w; // modulate by clothing coverage
- sinWave.xyz = max(sinWave.xyz, vec3(-1.0, -1.0, -1.0)); // MAX sinWave.xyz, sinWave, {-1, -1, -1, -1}; # clamp to underlying body shape
- offsetPos = clothing * sinWave.x; // MUL offsetPos, iClothing, sinWave.x; # multiply wind effect times clothing displacement
- temp2 = gWindDir*sinWave.z + vec4(norm,0); // MAD temp2, gWindDir, sinWave.z, blendNorm; # calculate normal offset due to wind oscillation
- offsetPos = vec4(1.0,1.0,1.0,0.0)*offsetPos+gl_Vertex; // MAD offsetPos, {1.0, 1.0, 1.0, 0.0}, offsetPos, iPos; # add to offset vertex position, and zero out effect from w
- norm += temp2.xyz*2.0; // MAD blendNorm, temp2, {2, 2, 2, 2}, blendNorm; # add sin wave effect on normals (exaggerated)
+ sinWave.xyz = max(sinWave.xyz, vec3(-1.0, -1.0, -1.0)); // clamp to underlying body shape
+ offsetPos = clothing * sinWave.x; // multiply wind effect times clothing displacement
+ temp2 = gWindDir*sinWave.z + vec4(norm,0); // calculate normal offset due to wind oscillation
+ offsetPos = vec4(1.0,1.0,1.0,0.0)*offsetPos+gl_Vertex; // add to offset vertex position, and zero out effect from w
+ norm += temp2.xyz*2.0; // add sin wave effect on normals (exaggerated)
//add "backlighting" effect
float colorAcc;
- colorAcc = 1.0 - clothing.w; // SUB colorAcc, {1, 1, 1, 1}, iClothing;
- norm.z -= colorAcc * 0.2; // MAD blendNorm, colorAcc.w, {0, 0, -0.2, 0}, blendNorm;
+ colorAcc = 1.0 - clothing.w;
+ norm.z -= colorAcc * 0.2;
//renormalize normal (again)
- norm = normalize(norm); // DP3 divisor.w, blendNorm, blendNorm;
- // RSQ divisor.xyz, divisor.w;
- // MUL blendNorm.xyz, blendNorm, divisor;
-
- //project binormal to normal plane to ensure orthogonality
- temp2 = vec4(dot(norm, binorm)); // DP3 temp2, blendNorm, blendBinorm;
- binorm = binorm - temp2.xyz; // SUB blendBinorm, blendBinorm, temp2;
-
- //renormalize binormal
- binorm = normalize(binorm); // DP3 divisor.w, blendBinorm, blendBinorm;
- // RSQ divisor.xyz, divisor.w;
- // MUL blendBinorm.xyz, blendBinorm, divisor;
+ norm = normalize(norm);
pos.x = dot(trans[0], offsetPos);
pos.y = dot(trans[1], offsetPos);
pos.z = dot(trans[2], offsetPos);
pos.w = 1.0;
+
+ calcAtmospherics(pos.xyz);
- vec4 color = calcLighting(pos.xyz, norm, materialColor, gl_Color.rgb);
+ vec4 color = calcLighting(pos.xyz, norm, gl_Color, vec4(0.0));
gl_FrontColor = color;
gl_Position = gl_ProjectionMatrix * pos;
- vec3 N = norm;
- vec3 B = binorm;
- vec3 T = cross(N,B);
- //gl_TexCoord[1].xy = gl_MultiTexCoord0.xy + 1.0/512.0 * vec2(dot(T,gl_LightSource[0].position.xyz),
- // dot(B,gl_LightSource[0].position.xyz));
-
gl_TexCoord[2] = vec4(pos.xyz, 1.0);
- default_scatter(pos.xyz, gl_LightSource[0].position.xyz);
-
-} \ No newline at end of file
+
+}
diff --git a/indra/newview/app_settings/shaders/class3/lighting/sumLightsSpecularV.glsl b/indra/newview/app_settings/shaders/class3/lighting/sumLightsSpecularV.glsl
new file mode 100644
index 0000000000..bf5c78f3ea
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class3/lighting/sumLightsSpecularV.glsl
@@ -0,0 +1,44 @@
+/**
+ * @file sumLightsV.glsl
+ *
+ * Copyright (c) 2005-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+float calcDirectionalLightSpecular(inout vec4 specular, vec3 view, vec3 n, vec3 l, vec3 lightCol, float da);
+vec3 calcPointLightSpecular(inout vec4 specular, vec3 view, vec3 v, vec3 n, vec3 l, float r, float pw, vec3 lightCol);
+
+vec3 atmosAmbient(vec3 light);
+vec3 atmosAffectDirectionalLight(float lightIntensity);
+vec3 atmosGetDiffuseSunlightColor();
+vec3 scaleDownLight(vec3 light);
+
+vec4 sumLightsSpecular(vec3 pos, vec3 norm, vec4 color, inout vec4 specularColor, vec4 baseCol)
+{
+ vec4 col = vec4(0.0, 0.0, 0.0, color.a);
+
+ vec3 view = normalize(pos);
+
+ /// collect all the specular values from each calcXXXLightSpecular() function
+ vec4 specularSum = vec4(0.0);
+
+ // Collect normal lights (need to be divided by two, as we later multiply by 2)
+ col.rgb += gl_LightSource[1].diffuse.rgb * calcDirectionalLightSpecular(specularColor, view, norm, gl_LightSource[1].position.xyz,gl_LightSource[1].diffuse.rgb, 1.0);
+ col.rgb += calcPointLightSpecular(specularSum, view, pos, norm, gl_LightSource[2].position.xyz, gl_LightSource[2].linearAttenuation, gl_LightSource[2].quadraticAttenuation,gl_LightSource[2].diffuse.rgb);
+ col.rgb += calcPointLightSpecular(specularSum, view, pos, norm, gl_LightSource[3].position.xyz, gl_LightSource[3].linearAttenuation, gl_LightSource[3].quadraticAttenuation,gl_LightSource[3].diffuse.rgb);
+ col.rgb += calcPointLightSpecular(specularSum, view, pos, norm, gl_LightSource[4].position.xyz, gl_LightSource[4].linearAttenuation, gl_LightSource[4].quadraticAttenuation,gl_LightSource[4].diffuse.rgb);
+ col.rgb += calcPointLightSpecular(specularSum, view, pos, norm, gl_LightSource[5].position.xyz, gl_LightSource[5].linearAttenuation, gl_LightSource[5].quadraticAttenuation,gl_LightSource[5].diffuse.rgb);
+ col.rgb += calcPointLightSpecular(specularSum, view, pos, norm, gl_LightSource[6].position.xyz, gl_LightSource[6].linearAttenuation, gl_LightSource[6].quadraticAttenuation,gl_LightSource[6].diffuse.rgb);
+ col.rgb += calcPointLightSpecular(specularSum, view, pos, norm, gl_LightSource[7].position.xyz, gl_LightSource[7].linearAttenuation, gl_LightSource[7].quadraticAttenuation,gl_LightSource[7].diffuse.rgb);
+ col.rgb = scaleDownLight(col.rgb);
+
+ // Add windlight lights
+ col.rgb += atmosAmbient(baseCol.rgb);
+ col.rgb += atmosAffectDirectionalLight(calcDirectionalLightSpecular(specularSum, view, norm, gl_LightSource[0].position.xyz,atmosGetDiffuseSunlightColor()*baseCol.a, 1.0));
+
+ col.rgb = min(col.rgb*color.rgb, 1.0);
+ specularColor.rgb = min(specularColor.rgb*specularSum.rgb, 1.0);
+
+ col.rgb += specularColor.rgb;
+ return col;
+}
diff --git a/indra/newview/app_settings/shaders/class3/lighting/sumLightsV.glsl b/indra/newview/app_settings/shaders/class3/lighting/sumLightsV.glsl
new file mode 100644
index 0000000000..1c5234c450
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class3/lighting/sumLightsV.glsl
@@ -0,0 +1,41 @@
+/**
+ * @file sumLightsV.glsl
+ *
+ * Copyright (c) 2005-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+float calcDirectionalLight(vec3 n, vec3 l);
+float calcPointLight(vec3 v, vec3 n, vec4 lp, float la);
+
+vec3 atmosAmbient(vec3 light);
+vec3 atmosAffectDirectionalLight(float lightIntensity);
+vec3 scaleDownLight(vec3 light);
+vec3 scaleUpLight(vec3 light);
+
+vec4 sumLights(vec3 pos, vec3 norm, vec4 color, vec4 baseLight)
+{
+ vec4 col;
+ col.a = color.a;
+
+ // Add windlight lights
+ col.rgb = atmosAffectDirectionalLight(calcDirectionalLight(norm, gl_LightSource[0].position.xyz));
+ col.rgb += atmosAmbient(baseLight.rgb);
+ col.rgb = scaleUpLight(col.rgb);
+
+ // Collect normal lights (need to be divided by two, as we later multiply by 2)
+ col.rgb += gl_LightSource[2].diffuse.rgb*calcPointLight(pos, norm, gl_LightSource[2].position, gl_LightSource[2].linearAttenuation);
+ col.rgb += gl_LightSource[3].diffuse.rgb*calcPointLight(pos, norm, gl_LightSource[3].position, gl_LightSource[3].linearAttenuation);
+ col.rgb += gl_LightSource[4].diffuse.rgb*calcPointLight(pos, norm, gl_LightSource[4].position, gl_LightSource[4].linearAttenuation);
+ col.rgb += gl_LightSource[5].diffuse.rgb*calcPointLight(pos, norm, gl_LightSource[5].position, gl_LightSource[5].linearAttenuation);
+ col.rgb += gl_LightSource[6].diffuse.rgb*calcPointLight(pos, norm, gl_LightSource[6].position, gl_LightSource[6].linearAttenuation);
+ col.rgb += gl_LightSource[7].diffuse.rgb*calcPointLight(pos, norm, gl_LightSource[7].position, gl_LightSource[7].linearAttenuation);
+ col.rgb += gl_LightSource[1].diffuse.rgb*calcDirectionalLight(norm, gl_LightSource[1].position.xyz);
+ col.rgb = scaleDownLight(col.rgb);
+
+
+ col.rgb = min(col.rgb*color.rgb, 1.0);
+
+ return col;
+}
+
diff --git a/indra/newview/app_settings/shaders/shader_heirarchy.txt b/indra/newview/app_settings/shaders/shader_heirarchy.txt
new file mode 100644
index 0000000000..d8bbf69b38
--- /dev/null
+++ b/indra/newview/app_settings/shaders/shader_heirarchy.txt
@@ -0,0 +1,176 @@
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+avatar/avatarV.glsl - gAvatarProgram, gAvatarWaterProgram
+ main() - avatar/avatarV.glsl
+ getSkinnedTransform() - avatarSkinV.glsl
+ calcAtmospherics() - windlight/atmosphericsV.glsl
+ calcLighting() - lighting/lightV.glsl
+ sumLights() - lighting/sumLightsV.glsl
+ calcDirectionalLight() - lighting/lightFuncV.glsl
+ calcPointLight() - lighting/lightFuncV.glsl
+ scaleDownLight() - windlight/atmosphericsHelpersV.glsl
+ atmosAmbient() - windlight/atmosphericsHelpersV.glsl
+ atmosAffectDirectionalLight() - windlight/atmosphericsHelpersV.glsl
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+avatar/avatarF.glsl - gAvatarProgram
+ main() - avatar/avatarF.glsl
+ default_lighting() - lighting/lightF.glsl
+ calc_default_lighting() - lighting/lightF.glsl
+ atmosLighting() - windlight/atmosphericsF.glsl
+ scaleSoftClip() - windlight/gammaF.glsl
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+avatar/eyeballV.glsl - gAvatarEyeballProgram
+ main() - avatar/eyeballV.glsl
+ calcAtmospherics() - windlight/atmosphericsV.glsl
+ calcLightingSpecular() - lighting/lightSpecularV.glsl
+ sumLightsSpecular() - lighting/sumLightsSpecularV.glsl
+ calcDirectionalLightSpecular() - lighting/lightFuncSpecularV.glsl
+ calcPointLightSpecular() - lighting/lightFuncSpecularV.glsl
+ atmosAmbient() - windlight/atmosphericsHelpersV.glsl
+ atmosAffectDirectionalLight() - windlight/atmosphericsHelpersV.glsl
+ atmosGetDiffuseSunlightColor() - windlight/atmosphericsHelpersV.glsl
+ scaleDownLight() - windlight/atmosphericsHelpersV.glsl
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+avatar/eyeballF.glsl - gAvatarEyeballProgram
+ main() - avatar/eyeballF.glsl
+ default_lighting() - lighting/lightF.glsl
+ calc_default_lighting() - lighting/lightF.glsl
+ atmosLighting() - windlight/atmosphericsF.glsl
+ scaleSoftClip() - windlight/gammaF.glsl
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+avatar/pickAvatarV.glsl - gAvatarPickProgram
+ main() - avatar/pickAvatarV.glsl
+ getSkinnedTransform() - avatarSkinV.glsl
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+avatar/pickAvatarF.glsl - gAvatarPickProgram
+ main() - avatar/pickAvatarF.glsl
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+environment/terrainV.glsl - gTerrainProgram, gTerrainWaterProgram
+ texgen_object() - environment/terrainV.glsl
+ main() - environment/terrainV.glsl
+ texgen_object() - environment/terrainV.glsl
+ calcAtmospherics() - windlight/atmosphericsV.glsl
+ calcLighting() - lighting/lightV.glsl
+ sumLights() - lighting/sumLightsV.glsl
+ calcDirectionalLight() - lighting/lightFuncV.glsl
+ calcPointLight() - lighting/lightFuncV.glsl
+ scaleDownLight() - windlight/atmosphericsHelpersV.glsl
+ atmosAmbient() - windlight/atmosphericsHelpersV.glsl
+ atmosAffectDirectionalLight() - windlight/atmosphericsHelpersV.glsl
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+environment/terrainF.glsl - gTerrainProgram
+ main() - environment/terrainF.glsl
+ atmosLighting() - windlight/atmosphericsF.glsl
+ scaleSoftClip() - windlight/gammaF.glsl
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+environment/terrainWaterF.glsl - gTerrainWaterProgram
+ main() - environment/terrainWaterF.glsl
+ atmosLighting() - windlight/atmosphericsF.glsl
+ applyWaterFog() - environment/waterFogF.glsl
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+environment/underWaterF.glsl - gUnderWaterProgram
+ applyWaterFog() - environment/underWaterF.glsl (NOTE: different than one in waterFogF.glsl)
+ main() - environment/underWaterF.glsl
+ applyWaterFog() - environment/underWaterF.glsl
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+environment/waterV.glsl - gWaterProgram, gUnderWaterProgram
+ main() - environment/waterV.glsl
+ calcAtmospherics() - windlight/atmosphericsV.glsl
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+environment/waterF.glsl - gWaterProgram
+ main() - environment/waterF.glsl
+ atmosTransport() - windlight/transportF.glsl
+ scaleSoftClip() - windlight/gammaF.glsl
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+objects/fullbrightV.glsl - gObjectFullbrightProgram, gObjectFullbrightWaterProgram
+ main() - objects/fullbrightV.glsl
+ calcAtmospherics() - windlight/atmosphericsV.glsl
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+objects/fullbrightF.glsl - gObjectFullbrightProgram
+ main() - objects/fullbrightF.glsl
+ fullbright_lighting() - lighting/lightFullbrightF.glsl
+ fullbrightAtmosTransport() - windlight/transportF.glsl
+ atmosTransport() - windlight/transportF.glsl
+ fullbrightScaleSoftClip() - windlight/gammaF.glsl
+ scaleSoftClip() - windlight/gammaF.glsl
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+objects/fullbrightShinyV.glsl - gObjectFullbrightShinyProgram
+ main() - objects/fullbrightShinyV.glsl
+ calcAtmospherics() - windlight/atmosphericsV.glsl
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+objects/fullbrightShinyF.glsl - gObjectFullbrightShinyProgram
+ main() - objects/fullbrightShinyF.glsl
+ fullbright_shiny_lighting() - lighting/lightFullbrightShinyF.glsl
+ fullbrightShinyAtmosTransport() - windlight/transportF.glsl
+ atmosTransport() - windlight/transportF.glsl
+ fullbrightScaleSoftClip() - windlight/gammaF.glsl
+ scaleSoftClip() - windlight/gammaF.glsl
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+objects/fullbrightWaterF.glsl - gObjectFullbrightWaterProgram
+ main() - objects/fullbrightWaterF.glsl
+ fullbright_lighting_water() - lighting/lightFullbrightWaterF.glsl
+ fullbrightAtmosTransport() - windlight/transportF.glsl
+ atmosTransport() - windlight/transportF.glsl
+ applyWaterFog() - environment/waterFogF.glsl
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+objects/shinyV.glsl - gObjectShinyProgram, gObjectShinyWaterProgram
+ main() - objects/shinyV.glsl
+ calcAtmospherics() - windlight/atmosphericsV.glsl
+ calcLighting() - lighting/lightV.glsl
+ calcLighting(vec4) - lighting/lightV.glsl
+ sumLights() - lighting/sumLightsV.glsl
+ calcDirectionalLight() - lighting/lightFuncV.glsl
+ calcPointLight() - lighting/lightFuncV.glsl
+ scaleDownLight() - windlight/atmosphericsHelpersV.glsl
+ atmosAmbient() - windlight/atmosphericsHelpersV.glsl
+ atmosAffectDirectionalLight() - windlight/atmosphericsHelpersV.glsl
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+objects/shinyF.glsl - gObjectShinyProgram
+ main() - objects/shinyF.glsl
+ shiny_lighting() - lighting/lightShinyF.glsl
+ atmosLighting() - windlight/atmosphericsF.glsl
+ scaleSoftClip() - windlight/gammaF.glsl
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+objects/shinyWaterF.glsl - gObjectShinyWaterProgram
+ main() - objects/shinyWaterF.glsl
+ shiny_lighting_water() - lighting/lightShinyWaterF.glsl
+ atmosLighting() - windlight/atmosphericsF.glsl
+ applyWaterFog() - environment/waterFogF.glsl
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+objects/simpleV.glsl - gObjectSimpleProgram, gObjectSimpleWaterProgram
+ main() - objects/simpleV.glsl
+ calcAtmospherics() - windlight/atmosphericsV.glsl
+ calcLighting() - lighting/lightV.glsl
+ sumLights() - lighting/sumLightsV.glsl
+ calcDirectionalLight() - lighting/lightFuncV.glsl
+ calcPointLight() - lighting/lightFuncV.glsl
+ scaleDownLight() - windlight/atmosphericsHelpersV.glsl
+ atmosAmbient() - windlight/atmosphericsHelpersV.glsl
+ atmosAffectDirectionalLight() - windlight/atmosphericsHelpersV.glsl
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+objects/simpleF.glsl - gObjectSimpleProgram
+ main() - objects/simpleF.glsl
+ default_lighting() - lighting/lightF.glsl
+ atmosLighting() - windlight/atmosphericsF.glsl
+ scaleSoftClip() - windlight/gammaF.glsl
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+objects/simpleWaterF.glsl - gObjectSimpleWaterProgram, gAvatarWaterProgram
+ main() - objects/simpleWaterF.glsl
+ default_lighting_water() - lighting/lightWaterF.glsl
+ atmosLighting() - windlight/atmosphericsF.glsl
+ applyWaterFog() - environment/waterFogF.glsl
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+windlight/skyV.glsl - gWLSkyProgram
+ main() - windlight/skyV.glsl
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+windlight/skyF.glsl - gWLSkyProgram
+ main() - windlight/skyF.glsl
+ scaleSoftClip() - windlight/gammaF.glsl
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+windlight/cloudsV.glsl - gWLCloudProgram
+ main() - windlight/cloudsV.glsl
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+windlight/cloudsF.glsl - gWLCloudProgram
+ main() - windlight/cloudsF.glsl
+ scaleSoftClip() - windlight/gammaF.glsl
+
+
diff --git a/indra/newview/app_settings/ultra_graphics.xml b/indra/newview/app_settings/ultra_graphics.xml
new file mode 100644
index 0000000000..f16ec6c30f
--- /dev/null
+++ b/indra/newview/app_settings/ultra_graphics.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<settings version = "101">
+ <!--NO SHADERS-->
+ <RenderAvatarCloth value="TRUE"/>
+ <!--Default for now-->
+ <RenderAvatarLODFactor value="1.0"/>
+ <!--NO SHADERS-->
+ <RenderAvatarVP value="TRUE"/>
+ <!--Short Range-->
+ <RenderFarClip value="256"/>
+ <!--Default for now-->
+ <RenderFlexTimeFactor value="1"/>
+ <!--256... but they don't use this-->
+ <RenderGlowResolutionPow value="9"/>
+ <!--Sun/Moon only-->
+ <RenderLightingDetail value="1"/>
+ <!--Low number-->
+ <RenderMaxPartCount value="4096"/>
+ <!--bump okay-->
+ <RenderObjectBump value="TRUE"/>
+ <!--NO SHADERS-->
+ <RenderReflectionDetail value="3"/>
+ <!--Simple-->
+ <RenderTerrainDetail value="1"/>
+ <!--Default for now-->
+ <RenderTerrainLODFactor value="2.0"/>
+ <!--Default for now-->
+ <RenderTreeLODFactor value="1.0"/>
+ <!--Try Impostors-->
+ <RenderUseImpostors value="TRUE"/>
+ <!--Default for now-->
+ <RenderVolumeLODFactor value="2.0"/>
+ <!--NO SHADERS-->
+ <RenderWaterReflections value="TRUE"/>
+ <!--NO SHADERS-->
+ <VertexShaderEnable value="TRUE"/>
+ <!--NO SHADERS-->
+ <WindLightUseAtmosShaders value="TRUE"/>
+</settings>
diff --git a/indra/newview/app_settings/windlight/clouds2.tga b/indra/newview/app_settings/windlight/clouds2.tga
new file mode 100644
index 0000000000..c95ce7fec4
--- /dev/null
+++ b/indra/newview/app_settings/windlight/clouds2.tga
Binary files differ
diff --git a/indra/newview/app_settings/windlight/days/Default.xml b/indra/newview/app_settings/windlight/days/Default.xml
new file mode 100644
index 0000000000..3d3afd5075
--- /dev/null
+++ b/indra/newview/app_settings/windlight/days/Default.xml
@@ -0,0 +1,36 @@
+<llsd>
+ <array>
+ <array>
+ <real>0</real>
+ <string>A-12AM</string>
+ </array>
+ <array>
+ <real>0.125</real>
+ <string>A-3AM</string>
+ </array>
+ <array>
+ <real>0.25</real>
+ <string>A-6AM</string>
+ </array>
+ <array>
+ <real>0.375</real>
+ <string>A-9AM</string>
+ </array>
+ <array>
+ <real>0.5</real>
+ <string>A-12PM</string>
+ </array>
+ <array>
+ <real>0.625</real>
+ <string>A-3PM</string>
+ </array>
+ <array>
+ <real>0.75</real>
+ <string>A-6PM</string>
+ </array>
+ <array>
+ <real>0.875</real>
+ <string>A-9PM</string>
+ </array>
+ </array>
+</llsd>
diff --git a/indra/newview/app_settings/windlight/postprocesseffects.xml b/indra/newview/app_settings/windlight/postprocesseffects.xml
new file mode 100644
index 0000000000..4645215a47
--- /dev/null
+++ b/indra/newview/app_settings/windlight/postprocesseffects.xml
@@ -0,0 +1,2 @@
+<llsd><map><key>Asi Weird</key><map><key>bloom_strength</key><real>4.5799999237060547</real><key>bloom_width</key><real>12.539999961853027</real><key>brightness</key><real>0.89999997615814209</real><key>brightness_multiplier</key><real>3</real><key>contrast</key><real>0.22999998927116394</real><key>contrast_base</key><array><real>1</real><real>1</real><real>1</real><real>0.5</real></array><key>enable_bloom</key><integer>1</integer><key>enable_color_filter</key><integer>1</integer><key>enable_night_vision</key><boolean>0</boolean><key>extract_high</key><real>1</real><key>extract_low</key><real>0.47999998927116394</real><key>noise_size</key><real>25</real><key>noise_strength</key><real>0.40000000000000002</real><key>saturation</key><real>-1</real></map><key>NegativeSaturation</key><map><key>bloom_strength</key><real>1.5</real><key>bloom_width</key><real>2.25</real><key>brightness</key><real>1</real><key>brightness_multiplier</key><real>3</real><key>contrast</key><real>1</real><key>contrast_base</key><array><real>1</real><real>1</real><real>1</real><real>0.5</real></array><key>enable_bloom</key><boolean>0</boolean><key>enable_color_filter</key><integer>1</integer><key>enable_night_vision</key><boolean>0</boolean><key>extract_high</key><real>1</real><key>extract_low</key><real>0.94999999999999996</real><key>noise_size</key><real>25</real><key>noise_strength</key><real>0.40000000000000002</real><key>saturation</key><real>-1</real></map><key>NightVision</key><map><key>bloom_strength</key><real>1.5</real><key>bloom_width</key><real>2.25</real><key>brightness</key><real>1</real><key>brightness_multiplier</key><real>3</real><key>contrast</key><real>1</real><key>contrast_base</key><array><real>1</real><real>1</real><real>1</real><real>0.5</real></array><key>enable_bloom</key><boolean>0</boolean><key>enable_color_filter</key><boolean>0</boolean><key>enable_night_vision</key><integer>1</integer><key>extract_high</key><real>1</real><key>extract_low</key><real>0.94999999999999996</real><key>noise_size</key><real>25</real><key>noise_strength</key><real>0.40000000000000002</real><key>saturation</key><real>1</real></map><key>WGhost</key><map><key>bloom_strength</key><real>2.0399999618530273</real><key>bloom_width</key><real>2.25</real><key>brightness</key><real>1</real><key>brightness_multiplier</key><real>3</real><key>contrast</key><real>1</real><key>contrast_base</key><array><real>1</real><real>1</real><real>1</real><real>0.5</real></array><key>enable_bloom</key><integer>1</integer><key>enable_color_filter</key><boolean>0</boolean><key>enable_night_vision</key><boolean>0</boolean><key>extract_high</key><real>1</real><key>extract_low</key><real>0.22999998927116394</real><key>noise_size</key><real>25</real><key>noise_strength</key><real>0.40000000000000002</real><key>saturation</key><real>1</real></map><key>default</key><map><key>bloom_strength</key><real>1.5</real><key>bloom_width</key><real>2.25</real><key>brightness</key><real>1</real><key>brightness_multiplier</key><real>3</real><key>contrast</key><real>1</real><key>contrast_base</key><array><real>1</real><real>1</real><real>1</real><real>0.5</real></array><key>enable_bloom</key><boolean>0</boolean><key>enable_color_filter</key><boolean>0</boolean><key>enable_night_vision</key><boolean>0</boolean><key>extract_high</key><real>1</real><key>extract_low</key><real>0.94999999999999996</real><key>noise_size</key><real>25</real><key>noise_strength</key><real>0.40000000000000002</real><key>saturation</key><real>1</real></map></map></llsd>
+><map><key>bloom_strength</key><real>1.5</real><key>bloom_width</key><real>2.25</real><key>brightness</key><real>1</real><key>brightness_multiplier</key><real>3</real><key>contrast</key><real>1</real><key>contrast_base</key><array><real>1</real><real>1</real><real>1</real><real>0.5</real></array><key>enable_bloom</key><boolean>0</boolean><key>enable_color_filter</key><boolean>0</boolean><key>enable_night_vision</key><boolean>0</boolean><key>extract_high</key><real>1</real><key>extract_low</key><real>0.94999999999999996</real><key>noise_size</key><real>25</real><key>noise_strength</key><real>0.40000000000000002</real><key>saturation</key><real>1</real></map></map></llsd>
diff --git a/indra/newview/app_settings/windlight/skies/A%2D12AM.xml b/indra/newview/app_settings/windlight/skies/A%2D12AM.xml
new file mode 100644
index 0000000000..0aba31214a
--- /dev/null
+++ b/indra/newview/app_settings/windlight/skies/A%2D12AM.xml
@@ -0,0 +1,141 @@
+<llsd>
+ <map>
+ <key>ambient</key>
+ <array>
+ <real>0.20405027270317078</real>
+ <real>0.24246673285961151</real>
+ <real>0.32999998331069946</real>
+ <real>0.10999999940395355</real>
+ </array>
+ <key>blue_density</key>
+ <array>
+ <real>0.44999998807907104</real>
+ <real>0.44999998807907104</real>
+ <real>0.44999998807907104</real>
+ <real>1</real>
+ </array>
+ <key>blue_horizon</key>
+ <array>
+ <real>0.23999999463558197</real>
+ <real>0.23999999463558197</real>
+ <real>0.23999999463558197</real>
+ <real>1</real>
+ </array>
+ <key>cloud_color</key>
+ <array>
+ <real>0.22615399956703186</real>
+ <real>0.22615399956703186</real>
+ <real>0.22615399956703186</real>
+ <real>1</real>
+ </array>
+ <key>cloud_pos_density1</key>
+ <array>
+ <real>1.6884100437164307</real>
+ <real>0.52609699964523315</real>
+ <real>0.87999999523162842</real>
+ <real>1</real>
+ </array>
+ <key>cloud_pos_density2</key>
+ <array>
+ <real>1.6884100437164307</real>
+ <real>0.52609699964523315</real>
+ <real>0.125</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scale</key>
+ <array>
+ <real>0.41999998688697815</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scroll_rate</key>
+ <array>
+ <real>10.49940013885498</real>
+ <real>10.01099967956543</real>
+ </array>
+ <key>cloud_shadow</key>
+ <array>
+ <real>0.26999998092651367</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>density_multiplier</key>
+ <array>
+ <real>0.00030000001424923539</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>distance_multiplier</key>
+ <array>
+ <real>0</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>east_angle</key>
+ <real>0</real>
+ <key>enable_cloud_scroll</key>
+ <array>
+ <boolean>1</boolean>
+ <boolean>1</boolean>
+ </array>
+ <key>gamma</key>
+ <array>
+ <real>1</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>glow</key>
+ <array>
+ <real>5</real>
+ <real>0.0010000000474974513</real>
+ <real>-0.47999998927116394</real>
+ <real>1</real>
+ </array>
+ <key>haze_density</key>
+ <array>
+ <real>4</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>haze_horizon</key>
+ <array>
+ <real>0</real>
+ <real>0.19915600121021271</real>
+ <real>0.19915600121021271</real>
+ <real>1</real>
+ </array>
+ <key>lightnorm</key>
+ <array>
+ <real>0</real>
+ <real>1</real>
+ <real>-4.8876205482883961e-007</real>
+ <real>1</real>
+ </array>
+ <key>max_y</key>
+ <array>
+ <real>906.20001220703125</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>preset_num</key>
+ <integer>22</integer>
+ <key>star_brightness</key>
+ <real>2</real>
+ <key>sun_angle</key>
+ <real>4.7123894691467285</real>
+ <key>sunlight_color</key>
+ <array>
+ <real>0.34876692295074463</real>
+ <real>0.35574248433113098</real>
+ <real>0.65999996662139893</real>
+ <real>0.2199999988079071</real>
+ </array>
+ </map>
+</llsd>
diff --git a/indra/newview/app_settings/windlight/skies/A%2D12PM.xml b/indra/newview/app_settings/windlight/skies/A%2D12PM.xml
new file mode 100644
index 0000000000..119b3e1418
--- /dev/null
+++ b/indra/newview/app_settings/windlight/skies/A%2D12PM.xml
@@ -0,0 +1,141 @@
+<llsd>
+ <map>
+ <key>ambient</key>
+ <array>
+ <real>1.0499999523162842</real>
+ <real>1.0499999523162842</real>
+ <real>1.0499999523162842</real>
+ <real>0.34999999403953552</real>
+ </array>
+ <key>blue_density</key>
+ <array>
+ <real>0.24475815892219543</real>
+ <real>0.44872328639030457</real>
+ <real>0.75999999046325684</real>
+ <real>0.37999999523162842</real>
+ </array>
+ <key>blue_horizon</key>
+ <array>
+ <real>0.49548381567001343</real>
+ <real>0.49548381567001343</real>
+ <real>0.63999998569488525</real>
+ <real>0.31999999284744263</real>
+ </array>
+ <key>cloud_color</key>
+ <array>
+ <real>0.40999999642372131</real>
+ <real>0.40999999642372131</real>
+ <real>0.40999999642372131</real>
+ <real>0.40999999642372131</real>
+ </array>
+ <key>cloud_pos_density1</key>
+ <array>
+ <real>1.6884100437164307</real>
+ <real>0.52609699964523315</real>
+ <real>1</real>
+ <real>1</real>
+ </array>
+ <key>cloud_pos_density2</key>
+ <array>
+ <real>1.6884100437164307</real>
+ <real>0.52609699964523315</real>
+ <real>0.125</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scale</key>
+ <array>
+ <real>0.41999998688697815</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scroll_rate</key>
+ <array>
+ <real>10.199999809265137</real>
+ <real>10.01099967956543</real>
+ </array>
+ <key>cloud_shadow</key>
+ <array>
+ <real>0.26999998092651367</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>density_multiplier</key>
+ <array>
+ <real>0.00017999998817685992</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>distance_multiplier</key>
+ <array>
+ <real>0.80000001192092896</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>east_angle</key>
+ <real>0</real>
+ <key>enable_cloud_scroll</key>
+ <array>
+ <boolean>1</boolean>
+ <boolean>1</boolean>
+ </array>
+ <key>gamma</key>
+ <array>
+ <real>1</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>glow</key>
+ <array>
+ <real>5</real>
+ <real>0.0010000000474974513</real>
+ <real>-0.47999998927116394</real>
+ <real>1</real>
+ </array>
+ <key>haze_density</key>
+ <array>
+ <real>0.69999998807907104</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>haze_horizon</key>
+ <array>
+ <real>0.18999999761581421</real>
+ <real>0.19915600121021271</real>
+ <real>0.19915600121021271</real>
+ <real>1</real>
+ </array>
+ <key>lightnorm</key>
+ <array>
+ <real>0</real>
+ <real>1</real>
+ <real>-4.3711388286737929e-008</real>
+ <real>0</real>
+ </array>
+ <key>max_y</key>
+ <array>
+ <real>1605</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>preset_num</key>
+ <integer>22</integer>
+ <key>star_brightness</key>
+ <real>0</real>
+ <key>sun_angle</key>
+ <real>1.5707963705062866</real>
+ <key>sunlight_color</key>
+ <array>
+ <real>0.7342105507850647</real>
+ <real>0.78157895803451538</real>
+ <real>0.89999997615814209</real>
+ <real>0.29999998211860657</real>
+ </array>
+ </map>
+</llsd>
diff --git a/indra/newview/app_settings/windlight/skies/A%2D3AM.xml b/indra/newview/app_settings/windlight/skies/A%2D3AM.xml
new file mode 100644
index 0000000000..f790d3d961
--- /dev/null
+++ b/indra/newview/app_settings/windlight/skies/A%2D3AM.xml
@@ -0,0 +1,141 @@
+<llsd>
+ <map>
+ <key>ambient</key>
+ <array>
+ <real>0.22259476780891418</real>
+ <real>0.26450252532958984</real>
+ <real>0.35999998450279236</real>
+ <real>0.11999999731779099</real>
+ </array>
+ <key>blue_density</key>
+ <array>
+ <real>0.44999116536295314</real>
+ <real>0.44999854555993368</real>
+ <real>0.45001013284446073</real>
+ <real>1</real>
+ </array>
+ <key>blue_horizon</key>
+ <array>
+ <real>0.23999616268583132</real>
+ <real>0.239999227803052</real>
+ <real>0.24000028550619668</real>
+ <real>1</real>
+ </array>
+ <key>cloud_color</key>
+ <array>
+ <real>0.22615400241566114</real>
+ <real>0.22615400241566114</real>
+ <real>0.22615400241566114</real>
+ <real>1</real>
+ </array>
+ <key>cloud_pos_density1</key>
+ <array>
+ <real>1.6884100437164307</real>
+ <real>0.52609699964523315</real>
+ <real>0.88000000953681223</real>
+ <real>1</real>
+ </array>
+ <key>cloud_pos_density2</key>
+ <array>
+ <real>1.6884100437164307</real>
+ <real>0.52609699964523315</real>
+ <real>0.125</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scale</key>
+ <array>
+ <real>0.41999998688697815</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scroll_rate</key>
+ <array>
+ <real>10.499400354105791</real>
+ <real>10.011000104419489</real>
+ </array>
+ <key>cloud_shadow</key>
+ <array>
+ <real>0.26999998092651367</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>density_multiplier</key>
+ <array>
+ <real>0.0003000046529240592</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>distance_multiplier</key>
+ <array>
+ <real>7.8213197608078763e-005</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>east_angle</key>
+ <real>0</real>
+ <key>enable_cloud_scroll</key>
+ <array>
+ <boolean>1</boolean>
+ <boolean>1</boolean>
+ </array>
+ <key>gamma</key>
+ <array>
+ <real>1</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>glow</key>
+ <array>
+ <real>5.0000000000023022</real>
+ <real>0.0010000000214220922</real>
+ <real>-0.47999999165507345</real>
+ <real>1</real>
+ </array>
+ <key>haze_density</key>
+ <array>
+ <real>3.9999044060931555</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>haze_horizon</key>
+ <array>
+ <real>4.6348559691012062e-006</real>
+ <real>0.19915600437461423</real>
+ <real>0.19915600437461423</real>
+ <real>1</real>
+ </array>
+ <key>lightnorm</key>
+ <array>
+ <real>0</real>
+ <real>0.70710653066635132</real>
+ <real>-0.70710700750350952</real>
+ <real>1</real>
+ </array>
+ <key>max_y</key>
+ <array>
+ <real>906.19008370909478</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>preset_num</key>
+ <integer>22</integer>
+ <key>star_brightness</key>
+ <real>1.9999420642852783</real>
+ <key>sun_angle</key>
+ <real>5.4977874755859375</real>
+ <key>sunlight_color</key>
+ <array>
+ <real>0.60242295265197754</real>
+ <real>0.61447036266326904</real>
+ <real>1.1399999856948853</real>
+ <real>0.37999999523162842</real>
+ </array>
+ </map>
+</llsd>
diff --git a/indra/newview/app_settings/windlight/skies/A%2D3PM.xml b/indra/newview/app_settings/windlight/skies/A%2D3PM.xml
new file mode 100644
index 0000000000..ec9706773e
--- /dev/null
+++ b/indra/newview/app_settings/windlight/skies/A%2D3PM.xml
@@ -0,0 +1,141 @@
+<llsd>
+ <map>
+ <key>ambient</key>
+ <array>
+ <real>1.0499999523162842</real>
+ <real>1.0499999523162842</real>
+ <real>1.0499999523162842</real>
+ <real>0.34999999403953552</real>
+ </array>
+ <key>blue_density</key>
+ <array>
+ <real>0.2447581488182351</real>
+ <real>0.44872328639030457</real>
+ <real>0.75999999046325684</real>
+ <real>0.38000004053115788</real>
+ </array>
+ <key>blue_horizon</key>
+ <array>
+ <real>0.49548382097675159</real>
+ <real>0.49548381382419748</real>
+ <real>0.63999999284744291</real>
+ <real>0.31999999642372146</real>
+ </array>
+ <key>cloud_color</key>
+ <array>
+ <real>0.40999999165535073</real>
+ <real>0.40999999165535073</real>
+ <real>0.40999999165535073</real>
+ <real>0.40999999165535073</real>
+ </array>
+ <key>cloud_pos_density1</key>
+ <array>
+ <real>1.6884100437164307</real>
+ <real>0.52609699964523315</real>
+ <real>0.99999999999999289</real>
+ <real>1</real>
+ </array>
+ <key>cloud_pos_density2</key>
+ <array>
+ <real>1.6884100437164307</real>
+ <real>0.52609699964523315</real>
+ <real>0.125</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scale</key>
+ <array>
+ <real>0.4199999868869746</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scroll_rate</key>
+ <array>
+ <real>10.199999809265137</real>
+ <real>10.01099967956543</real>
+ </array>
+ <key>cloud_shadow</key>
+ <array>
+ <real>0.26999998092651367</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>density_multiplier</key>
+ <array>
+ <real>0.00017999998817685818</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>distance_multiplier</key>
+ <array>
+ <real>0.80000001192093606</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>east_angle</key>
+ <real>0</real>
+ <key>enable_cloud_scroll</key>
+ <array>
+ <boolean>1</boolean>
+ <boolean>1</boolean>
+ </array>
+ <key>gamma</key>
+ <array>
+ <real>1</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>glow</key>
+ <array>
+ <real>5</real>
+ <real>0.0010000000474974513</real>
+ <real>-0.47999998927116394</real>
+ <real>1</real>
+ </array>
+ <key>haze_density</key>
+ <array>
+ <real>0.69999998807907104</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>haze_horizon</key>
+ <array>
+ <real>0.18999999761581243</real>
+ <real>0.19915600121021271</real>
+ <real>0.19915600121021271</real>
+ <real>1</real>
+ </array>
+ <key>lightnorm</key>
+ <array>
+ <real>0</real>
+ <real>0.70710659027099609</real>
+ <real>-0.70710694789886475</real>
+ <real>0</real>
+ </array>
+ <key>max_y</key>
+ <array>
+ <real>1605</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>preset_num</key>
+ <integer>22</integer>
+ <key>star_brightness</key>
+ <real>0</real>
+ <key>sun_angle</key>
+ <real>2.3561947345733643</real>
+ <key>sunlight_color</key>
+ <array>
+ <real>0.73421055078505759</real>
+ <real>0.78157895803450828</real>
+ <real>0.89999997615813498</real>
+ <real>0.29999998211860301</real>
+ </array>
+ </map>
+</llsd>
diff --git a/indra/newview/app_settings/windlight/skies/A%2D6AM.xml b/indra/newview/app_settings/windlight/skies/A%2D6AM.xml
new file mode 100644
index 0000000000..bbc7aeec59
--- /dev/null
+++ b/indra/newview/app_settings/windlight/skies/A%2D6AM.xml
@@ -0,0 +1,141 @@
+<llsd>
+ <map>
+ <key>ambient</key>
+ <array>
+ <real>0.80999994277954102</real>
+ <real>0.46289783716201782</real>
+ <real>0.62999993562698364</real>
+ <real>0.26999998092651367</real>
+ </array>
+ <key>blue_density</key>
+ <array>
+ <real>0.15793180465698242</real>
+ <real>0.43499568104743958</real>
+ <real>0.87000000476837158</real>
+ <real>0.87000000476837158</real>
+ </array>
+ <key>blue_horizon</key>
+ <array>
+ <real>0.20673196017742157</real>
+ <real>0.40988314151763916</real>
+ <real>0.47999998927116394</real>
+ <real>0.47999998927116394</real>
+ </array>
+ <key>cloud_color</key>
+ <array>
+ <real>0.22616604226328718</real>
+ <real>0.22616604226328718</real>
+ <real>0.22616604226328718</real>
+ <real>0.99997219085526012</real>
+ </array>
+ <key>cloud_pos_density1</key>
+ <array>
+ <real>1.6884100437164307</real>
+ <real>0.52609699964523315</real>
+ <real>0.88000025272481253</real>
+ <real>1</real>
+ </array>
+ <key>cloud_pos_density2</key>
+ <array>
+ <real>1.6884100437164307</real>
+ <real>0.52609699964523315</real>
+ <real>0.125</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scale</key>
+ <array>
+ <real>0.41999998688697815</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scroll_rate</key>
+ <array>
+ <real>10.49940013883861</real>
+ <real>10.010999679576344</real>
+ </array>
+ <key>cloud_shadow</key>
+ <array>
+ <real>0.26999998092651367</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>density_multiplier</key>
+ <array>
+ <real>0.00062000000616535544</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>distance_multiplier</key>
+ <array>
+ <real>2.6999279499073054</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>east_angle</key>
+ <real>0</real>
+ <key>enable_cloud_scroll</key>
+ <array>
+ <boolean>1</boolean>
+ <boolean>1</boolean>
+ </array>
+ <key>gamma</key>
+ <array>
+ <real>1</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>glow</key>
+ <array>
+ <real>5.0009990693069994</real>
+ <real>0.0010000000474963411</real>
+ <real>-0.48000101923815919</real>
+ <real>1</real>
+ </array>
+ <key>haze_density</key>
+ <array>
+ <real>0.53999996185302734</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>haze_horizon</key>
+ <array>
+ <real>0.15999999642372131</real>
+ <real>0.19915600121021271</real>
+ <real>0.19915600121021271</real>
+ <real>1</real>
+ </array>
+ <key>lightnorm</key>
+ <array>
+ <real>0</real>
+ <real>0.094108223915100098</real>
+ <real>0.99556195735931396</real>
+ <real>0</real>
+ </array>
+ <key>max_y</key>
+ <array>
+ <real>563</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>preset_num</key>
+ <integer>22</integer>
+ <key>star_brightness</key>
+ <real>0</real>
+ <key>sun_angle</key>
+ <real>0.094247691333293915</real>
+ <key>sunlight_color</key>
+ <array>
+ <real>2.369999885559082</real>
+ <real>2.369999885559082</real>
+ <real>2.369999885559082</real>
+ <real>0.78999996185302734</real>
+ </array>
+ </map>
+</llsd>
diff --git a/indra/newview/app_settings/windlight/skies/A%2D6PM.xml b/indra/newview/app_settings/windlight/skies/A%2D6PM.xml
new file mode 100644
index 0000000000..6e82f2eb21
--- /dev/null
+++ b/indra/newview/app_settings/windlight/skies/A%2D6PM.xml
@@ -0,0 +1,141 @@
+<llsd>
+ <map>
+ <key>ambient</key>
+ <array>
+ <real>0.14840038120746613</real>
+ <real>0.17633917927742004</real>
+ <real>0.23999999463558197</real>
+ <real>0.079999998211860657</real>
+ </array>
+ <key>blue_density</key>
+ <array>
+ <real>0.14522500336170197</real>
+ <real>0.39999699592590332</real>
+ <real>0.80000197887420654</real>
+ <real>1</real>
+ </array>
+ <key>blue_horizon</key>
+ <array>
+ <real>0.10767599940299988</real>
+ <real>0.21348699927330017</real>
+ <real>0.25</real>
+ <real>1</real>
+ </array>
+ <key>cloud_color</key>
+ <array>
+ <real>0.22615399956703186</real>
+ <real>0.22615399956703186</real>
+ <real>0.22615399956703186</real>
+ <real>1</real>
+ </array>
+ <key>cloud_pos_density1</key>
+ <array>
+ <real>1.6884100437164307</real>
+ <real>0.52609699964523315</real>
+ <real>0.87999999523162842</real>
+ <real>1</real>
+ </array>
+ <key>cloud_pos_density2</key>
+ <array>
+ <real>1.6884100437164307</real>
+ <real>0.52609699964523315</real>
+ <real>0.125</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scale</key>
+ <array>
+ <real>0.41999998688697815</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scroll_rate</key>
+ <array>
+ <real>10.49940013885498</real>
+ <real>10.01099967956543</real>
+ </array>
+ <key>cloud_shadow</key>
+ <array>
+ <real>0.26999998092651367</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>density_multiplier</key>
+ <array>
+ <real>0.00046000001020729542</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>distance_multiplier</key>
+ <array>
+ <real>2.7000000476837158</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>east_angle</key>
+ <real>0</real>
+ <key>enable_cloud_scroll</key>
+ <array>
+ <boolean>1</boolean>
+ <boolean>1</boolean>
+ </array>
+ <key>gamma</key>
+ <array>
+ <real>1</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>glow</key>
+ <array>
+ <real>5</real>
+ <real>0.0010000000474974513</real>
+ <real>-0.47999998927116394</real>
+ <real>1</real>
+ </array>
+ <key>haze_density</key>
+ <array>
+ <real>0.69999998807907104</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>haze_horizon</key>
+ <array>
+ <real>0.15999999642372131</real>
+ <real>0.19915600121021271</real>
+ <real>0.19915600121021271</real>
+ <real>1</real>
+ </array>
+ <key>lightnorm</key>
+ <array>
+ <real>0</real>
+ <real>0.07532646507024765</real>
+ <real>-0.99715894460678101</real>
+ <real>0</real>
+ </array>
+ <key>max_y</key>
+ <array>
+ <real>562.5</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>preset_num</key>
+ <integer>22</integer>
+ <key>star_brightness</key>
+ <real>0</real>
+ <key>sun_angle</key>
+ <real>3.0661947727203369</real>
+ <key>sunlight_color</key>
+ <array>
+ <real>2.8385701179504395</real>
+ <real>2.8385701179504395</real>
+ <real>2.8385701179504395</real>
+ <real>1</real>
+ </array>
+ </map>
+</llsd>
diff --git a/indra/newview/app_settings/windlight/skies/A%2D9AM.xml b/indra/newview/app_settings/windlight/skies/A%2D9AM.xml
new file mode 100644
index 0000000000..413e3a27d9
--- /dev/null
+++ b/indra/newview/app_settings/windlight/skies/A%2D9AM.xml
@@ -0,0 +1,141 @@
+<llsd>
+ <map>
+ <key>ambient</key>
+ <array>
+ <real>1.0499999949065426</real>
+ <real>1.0499999988079054</real>
+ <real>1.0499999988079054</real>
+ <real>0.3500000095367426</real>
+ </array>
+ <key>blue_density</key>
+ <array>
+ <real>0.15999999642372131</real>
+ <real>0.44872328639030457</real>
+ <real>0.75999999046325684</real>
+ <real>0.75999999046325684</real>
+ </array>
+ <key>blue_horizon</key>
+ <array>
+ <real>0.53999996185302734</real>
+ <real>0.47999998927116394</real>
+ <real>0.69999998807907104</real>
+ <real>0.34999999403953552</real>
+ </array>
+ <key>cloud_color</key>
+ <array>
+ <real>0.37000000476837158</real>
+ <real>0.37000000476837158</real>
+ <real>0.37000000476837158</real>
+ <real>0.37000000476837158</real>
+ </array>
+ <key>cloud_pos_density1</key>
+ <array>
+ <real>1.6884100437164307</real>
+ <real>0.52609699964523315</real>
+ <real>0.99999998569455784</real>
+ <real>1</real>
+ </array>
+ <key>cloud_pos_density2</key>
+ <array>
+ <real>1.6884100437164307</real>
+ <real>0.52609699964523315</real>
+ <real>0.125</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scale</key>
+ <array>
+ <real>0.41999997615814166</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scroll_rate</key>
+ <array>
+ <real>10.199999844956437</real>
+ <real>10.01099967956543</real>
+ </array>
+ <key>cloud_shadow</key>
+ <array>
+ <real>0.27333331108093262</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>density_multiplier</key>
+ <array>
+ <real>0.00017999998102430359</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>distance_multiplier</key>
+ <array>
+ <real>0.80000008344649842</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>east_angle</key>
+ <real>0</real>
+ <key>enable_cloud_scroll</key>
+ <array>
+ <boolean>1</boolean>
+ <boolean>1</boolean>
+ </array>
+ <key>gamma</key>
+ <array>
+ <real>1</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>glow</key>
+ <array>
+ <real>4.9999999284740397</real>
+ <real>0.0010000000474974513</real>
+ <real>-0.47999999046327346</real>
+ <real>1</real>
+ </array>
+ <key>haze_density</key>
+ <array>
+ <real>0.70000003576435432</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>haze_horizon</key>
+ <array>
+ <real>0.18999999284767277</real>
+ <real>0.19915600121021271</real>
+ <real>0.19915600121021271</real>
+ <real>1</real>
+ </array>
+ <key>lightnorm</key>
+ <array>
+ <real>0</real>
+ <real>0.70710676908493042</real>
+ <real>0.70710676908493042</real>
+ <real>0</real>
+ </array>
+ <key>max_y</key>
+ <array>
+ <real>1605</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>preset_num</key>
+ <integer>22</integer>
+ <key>star_brightness</key>
+ <real>0</real>
+ <key>sun_angle</key>
+ <real>0.78539818525314331</real>
+ <key>sunlight_color</key>
+ <array>
+ <real>0.73421054104441197</real>
+ <real>0.7815789463510896</real>
+ <real>0.89999995470046912</real>
+ <real>0.29999997496605069</real>
+ </array>
+ </map>
+</llsd>
diff --git a/indra/newview/app_settings/windlight/skies/A%2D9PM.xml b/indra/newview/app_settings/windlight/skies/A%2D9PM.xml
new file mode 100644
index 0000000000..292f6713b7
--- /dev/null
+++ b/indra/newview/app_settings/windlight/skies/A%2D9PM.xml
@@ -0,0 +1,141 @@
+<llsd>
+ <map>
+ <key>ambient</key>
+ <array>
+ <real>0.20404692765200849</real>
+ <real>0.24246276689169122</real>
+ <real>0.33000383615406292</real>
+ <real>0.1100123608103587</real>
+ </array>
+ <key>blue_density</key>
+ <array>
+ <real>0.44999116536295314</real>
+ <real>0.44999854555993368</real>
+ <real>0.45001013284446073</real>
+ <real>1</real>
+ </array>
+ <key>blue_horizon</key>
+ <array>
+ <real>0.23999616268583132</real>
+ <real>0.239999227803052</real>
+ <real>0.24000028550619668</real>
+ <real>1</real>
+ </array>
+ <key>cloud_color</key>
+ <array>
+ <real>0.22615400241566114</real>
+ <real>0.22615400241566114</real>
+ <real>0.22615400241566114</real>
+ <real>1</real>
+ </array>
+ <key>cloud_pos_density1</key>
+ <array>
+ <real>1.6884100437164307</real>
+ <real>0.52609699964523315</real>
+ <real>0.88000000953681223</real>
+ <real>1</real>
+ </array>
+ <key>cloud_pos_density2</key>
+ <array>
+ <real>1.6884100437164307</real>
+ <real>0.52609699964523315</real>
+ <real>0.125</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scale</key>
+ <array>
+ <real>0.41999998688697815</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scroll_rate</key>
+ <array>
+ <real>10.499400354105791</real>
+ <real>10.011000104419489</real>
+ </array>
+ <key>cloud_shadow</key>
+ <array>
+ <real>0.26999998092651367</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>density_multiplier</key>
+ <array>
+ <real>0.0003000046529240592</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>distance_multiplier</key>
+ <array>
+ <real>7.8213197608078763e-005</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>east_angle</key>
+ <real>0</real>
+ <key>enable_cloud_scroll</key>
+ <array>
+ <boolean>1</boolean>
+ <boolean>1</boolean>
+ </array>
+ <key>gamma</key>
+ <array>
+ <real>1</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>glow</key>
+ <array>
+ <real>5.0000000000023022</real>
+ <real>0.0010000000214220922</real>
+ <real>-0.47999999165507345</real>
+ <real>1</real>
+ </array>
+ <key>haze_density</key>
+ <array>
+ <real>3.9999044060931555</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>haze_horizon</key>
+ <array>
+ <real>4.6348559691012062e-006</real>
+ <real>0.19915600437461423</real>
+ <real>0.19915600437461423</real>
+ <real>1</real>
+ </array>
+ <key>lightnorm</key>
+ <array>
+ <real>0</real>
+ <real>0.70710688829421997</real>
+ <real>0.70710664987564087</real>
+ <real>1</real>
+ </array>
+ <key>max_y</key>
+ <array>
+ <real>906.19008370909478</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>preset_num</key>
+ <integer>22</integer>
+ <key>star_brightness</key>
+ <real>1.9999420642852783</real>
+ <key>sun_angle</key>
+ <real>3.9269909858703613</real>
+ <key>sunlight_color</key>
+ <array>
+ <real>0.34878980098432066</real>
+ <real>0.35576509414380553</real>
+ <real>0.66003586768772493</real>
+ <real>0.22001197576412324</real>
+ </array>
+ </map>
+</llsd>
diff --git a/indra/newview/app_settings/windlight/skies/Barcelona.xml b/indra/newview/app_settings/windlight/skies/Barcelona.xml
new file mode 100644
index 0000000000..ea9cab8fbb
--- /dev/null
+++ b/indra/newview/app_settings/windlight/skies/Barcelona.xml
@@ -0,0 +1,141 @@
+<llsd>
+ <map>
+ <key>ambient</key>
+ <array>
+ <real>0.22260047495365143</real>
+ <real>0.26450866460800171</real>
+ <real>0.35999998450279236</real>
+ <real>0.11999999731779099</real>
+ </array>
+ <key>blue_density</key>
+ <array>
+ <real>0.14522500336170197</real>
+ <real>0.39999699592590332</real>
+ <real>0.80000197887420654</real>
+ <real>1</real>
+ </array>
+ <key>blue_horizon</key>
+ <array>
+ <real>0.15130999684333801</real>
+ <real>0.30000001192092896</real>
+ <real>0.35131001472473145</real>
+ <real>1</real>
+ </array>
+ <key>cloud_color</key>
+ <array>
+ <real>0.50999999046325684</real>
+ <real>0.50999999046325684</real>
+ <real>0.50999999046325684</real>
+ <real>1</real>
+ </array>
+ <key>cloud_pos_density1</key>
+ <array>
+ <real>0.5</real>
+ <real>0.5</real>
+ <real>1</real>
+ <real>1</real>
+ </array>
+ <key>cloud_pos_density2</key>
+ <array>
+ <real>0.5</real>
+ <real>0.5</real>
+ <real>0.125</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scale</key>
+ <array>
+ <real>0.41999998688697815</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scroll_rate</key>
+ <array>
+ <real>10.49940013885498</real>
+ <real>10.01099967956543</real>
+ </array>
+ <key>cloud_shadow</key>
+ <array>
+ <real>0.30000001192092896</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>density_multiplier</key>
+ <array>
+ <real>0.0003499999875202775</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>distance_multiplier</key>
+ <array>
+ <real>6</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>east_angle</key>
+ <real>0</real>
+ <key>enable_cloud_scroll</key>
+ <array>
+ <boolean>1</boolean>
+ <boolean>1</boolean>
+ </array>
+ <key>gamma</key>
+ <array>
+ <real>1</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>glow</key>
+ <array>
+ <real>5</real>
+ <real>0.0010000000474974513</real>
+ <real>-0.33000001311302185</real>
+ <real>1</real>
+ </array>
+ <key>haze_density</key>
+ <array>
+ <real>0.69999998807907104</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>haze_horizon</key>
+ <array>
+ <real>0.19915600121021271</real>
+ <real>0.19915600121021271</real>
+ <real>0.19915600121021271</real>
+ <real>1</real>
+ </array>
+ <key>lightnorm</key>
+ <array>
+ <real>0</real>
+ <real>0.062790460884571075</real>
+ <real>-0.99802672863006592</real>
+ <real>0</real>
+ </array>
+ <key>max_y</key>
+ <array>
+ <real>600</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>preset_num</key>
+ <integer>21</integer>
+ <key>star_brightness</key>
+ <real>0</real>
+ <key>sun_angle</key>
+ <real>3.0787608623504639</real>
+ <key>sunlight_color</key>
+ <array>
+ <real>1.1699999570846558</real>
+ <real>1.1699999570846558</real>
+ <real>1.1699999570846558</real>
+ <real>0.38999998569488525</real>
+ </array>
+ </map>
+</llsd>
diff --git a/indra/newview/app_settings/windlight/skies/Blizzard.xml b/indra/newview/app_settings/windlight/skies/Blizzard.xml
new file mode 100644
index 0000000000..d17d2790a8
--- /dev/null
+++ b/indra/newview/app_settings/windlight/skies/Blizzard.xml
@@ -0,0 +1,141 @@
+<llsd>
+ <map>
+ <key>ambient</key>
+ <array>
+ <real>0.4823022186756134</real>
+ <real>0.57310229539871216</real>
+ <real>0.77999997138977051</real>
+ <real>0.25999999046325684</real>
+ </array>
+ <key>blue_density</key>
+ <array>
+ <real>0.14522500336170197</real>
+ <real>0.39999699592590332</real>
+ <real>0.80000197887420654</real>
+ <real>1</real>
+ </array>
+ <key>blue_horizon</key>
+ <array>
+ <real>0.15130999684333801</real>
+ <real>0.30000001192092896</real>
+ <real>0.35131001472473145</real>
+ <real>1</real>
+ </array>
+ <key>cloud_color</key>
+ <array>
+ <real>0.12862999737262726</real>
+ <real>0.12862999737262726</real>
+ <real>0.12862999737262726</real>
+ <real>1</real>
+ </array>
+ <key>cloud_pos_density1</key>
+ <array>
+ <real>0.88419097661972046</real>
+ <real>0.53047597408294678</real>
+ <real>0.4270470142364502</real>
+ <real>1</real>
+ </array>
+ <key>cloud_pos_density2</key>
+ <array>
+ <real>0.38419300317764282</real>
+ <real>0.5</real>
+ <real>0.125</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scale</key>
+ <array>
+ <real>0.41999998688697815</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scroll_rate</key>
+ <array>
+ <real>10</real>
+ <real>10</real>
+ </array>
+ <key>cloud_shadow</key>
+ <array>
+ <real>0.61711597442626953</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>density_multiplier</key>
+ <array>
+ <real>0.0001250890054507181</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>distance_multiplier</key>
+ <array>
+ <real>11.40000057220459</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>east_angle</key>
+ <real>0</real>
+ <key>enable_cloud_scroll</key>
+ <array>
+ <boolean>1</boolean>
+ <boolean>1</boolean>
+ </array>
+ <key>gamma</key>
+ <array>
+ <real>1</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>glow</key>
+ <array>
+ <real>6.4079799652099609</real>
+ <real>0.0012815999798476696</real>
+ <real>-0.42292699217796326</real>
+ <real>1</real>
+ </array>
+ <key>haze_density</key>
+ <array>
+ <real>4</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>haze_horizon</key>
+ <array>
+ <real>0.21744099259376526</real>
+ <real>0.21744099259376526</real>
+ <real>0.21744099259376526</real>
+ <real>1</real>
+ </array>
+ <key>lightnorm</key>
+ <array>
+ <real>0</real>
+ <real>0.15643447637557983</real>
+ <real>0.98768836259841919</real>
+ <real>0</real>
+ </array>
+ <key>max_y</key>
+ <array>
+ <real>4000</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>preset_num</key>
+ <integer>2</integer>
+ <key>star_brightness</key>
+ <real>0</real>
+ <key>sun_angle</key>
+ <real>0.15707963705062866</real>
+ <key>sunlight_color</key>
+ <array>
+ <real>3</real>
+ <real>3</real>
+ <real>3</real>
+ <real>1</real>
+ </array>
+ </map>
+</llsd>
diff --git a/indra/newview/app_settings/windlight/skies/Blue%20Midday.xml b/indra/newview/app_settings/windlight/skies/Blue%20Midday.xml
new file mode 100644
index 0000000000..570f059961
--- /dev/null
+++ b/indra/newview/app_settings/windlight/skies/Blue%20Midday.xml
@@ -0,0 +1,141 @@
+<llsd>
+ <map>
+ <key>ambient</key>
+ <array>
+ <real>0.14999999105930328</real>
+ <real>0.14999999105930328</real>
+ <real>0.14999999105930328</real>
+ <real>0.049999997019767761</real>
+ </array>
+ <key>blue_density</key>
+ <array>
+ <real>0.18153078854084015</real>
+ <real>0.49999505281448364</real>
+ <real>1</real>
+ <real>1</real>
+ </array>
+ <key>blue_horizon</key>
+ <array>
+ <real>0.43070217967033386</real>
+ <real>0.85394656658172607</real>
+ <real>1</real>
+ <real>1</real>
+ </array>
+ <key>cloud_color</key>
+ <array>
+ <real>0.53962135314941406</real>
+ <real>0.53962135314941406</real>
+ <real>0.53962135314941406</real>
+ <real>1</real>
+ </array>
+ <key>cloud_pos_density1</key>
+ <array>
+ <real>0.5</real>
+ <real>0.5</real>
+ <real>0.69569224119186401</real>
+ <real>1</real>
+ </array>
+ <key>cloud_pos_density2</key>
+ <array>
+ <real>0.5</real>
+ <real>0.5</real>
+ <real>0.125</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scale</key>
+ <array>
+ <real>0.10999999195337296</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scroll_rate</key>
+ <array>
+ <real>10.49940013885498</real>
+ <real>10.01099967956543</real>
+ </array>
+ <key>cloud_shadow</key>
+ <array>
+ <real>0.3765256404876709</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>density_multiplier</key>
+ <array>
+ <real>0.0003499999875202775</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>distance_multiplier</key>
+ <array>
+ <real>2.9846153259277344</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>east_angle</key>
+ <real>0</real>
+ <key>enable_cloud_scroll</key>
+ <array>
+ <boolean>1</boolean>
+ <boolean>1</boolean>
+ </array>
+ <key>gamma</key>
+ <array>
+ <real>1</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>glow</key>
+ <array>
+ <real>4.2061538696289062</real>
+ <real>0.0010000000474974513</real>
+ <real>-0.44246155023574829</real>
+ <real>1</real>
+ </array>
+ <key>haze_density</key>
+ <array>
+ <real>2.8830769062042236</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>haze_horizon</key>
+ <array>
+ <real>0.49740666151046753</real>
+ <real>0.19915600121021271</real>
+ <real>0.19915600121021271</real>
+ <real>1</real>
+ </array>
+ <key>lightnorm</key>
+ <array>
+ <real>0</real>
+ <real>0.86074197292327881</real>
+ <real>-0.50904154777526855</real>
+ <real>0</real>
+ </array>
+ <key>max_y</key>
+ <array>
+ <real>600</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>preset_num</key>
+ <integer>10</integer>
+ <key>star_brightness</key>
+ <real>0</real>
+ <key>sun_angle</key>
+ <real>2.1048672199249268</real>
+ <key>sunlight_color</key>
+ <array>
+ <real>0.88526362180709839</real>
+ <real>1.2300000190734863</real>
+ <real>1.2300000190734863</real>
+ <real>0.40999999642372131</real>
+ </array>
+ </map>
+</llsd>
diff --git a/indra/newview/app_settings/windlight/skies/Coastal%20Afternoon.xml b/indra/newview/app_settings/windlight/skies/Coastal%20Afternoon.xml
new file mode 100644
index 0000000000..4925b29eea
--- /dev/null
+++ b/indra/newview/app_settings/windlight/skies/Coastal%20Afternoon.xml
@@ -0,0 +1,141 @@
+<llsd>
+ <map>
+ <key>ambient</key>
+ <array>
+ <real>0.89040267467498779</real>
+ <real>1.0580335855484009</real>
+ <real>1.4399999380111694</real>
+ <real>0.47999998927116394</real>
+ </array>
+ <key>blue_density</key>
+ <array>
+ <real>0.14522500336170197</real>
+ <real>0.39999699592590332</real>
+ <real>0.80000197887420654</real>
+ <real>1</real>
+ </array>
+ <key>blue_horizon</key>
+ <array>
+ <real>0.15130999684333801</real>
+ <real>0.30000001192092896</real>
+ <real>0.35131001472473145</real>
+ <real>1</real>
+ </array>
+ <key>cloud_color</key>
+ <array>
+ <real>0.21396400034427643</real>
+ <real>0.21396400034427643</real>
+ <real>0.21396400034427643</real>
+ <real>1</real>
+ </array>
+ <key>cloud_pos_density1</key>
+ <array>
+ <real>0.16495099663734436</real>
+ <real>0.09771379828453064</real>
+ <real>1</real>
+ <real>1</real>
+ </array>
+ <key>cloud_pos_density2</key>
+ <array>
+ <real>0.5</real>
+ <real>0.5</real>
+ <real>0.079754598438739777</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scale</key>
+ <array>
+ <real>0.41999998688697815</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scroll_rate</key>
+ <array>
+ <real>9.644780158996582</real>
+ <real>10.423800468444824</real>
+ </array>
+ <key>cloud_shadow</key>
+ <array>
+ <real>0.30061298608779907</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>density_multiplier</key>
+ <array>
+ <real>0.00015800200344529003</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>distance_multiplier</key>
+ <array>
+ <real>1</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>east_angle</key>
+ <real>0</real>
+ <key>enable_cloud_scroll</key>
+ <array>
+ <boolean>1</boolean>
+ <boolean>1</boolean>
+ </array>
+ <key>gamma</key>
+ <array>
+ <real>1</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>glow</key>
+ <array>
+ <real>5</real>
+ <real>0.0010000000474974513</real>
+ <real>-0.33000001311302185</real>
+ <real>1</real>
+ </array>
+ <key>haze_density</key>
+ <array>
+ <real>0.69999998807907104</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>haze_horizon</key>
+ <array>
+ <real>0.13210900127887726</real>
+ <real>0.13210900127887726</real>
+ <real>0.13210900127887726</real>
+ <real>1</real>
+ </array>
+ <key>lightnorm</key>
+ <array>
+ <real>0</real>
+ <real>0.031410444527864456</real>
+ <real>-0.99950659275054932</real>
+ <real>0</real>
+ </array>
+ <key>max_y</key>
+ <array>
+ <real>600</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>preset_num</key>
+ <integer>3</integer>
+ <key>star_brightness</key>
+ <real>0</real>
+ <key>sun_angle</key>
+ <real>3.1101770401000977</real>
+ <key>sunlight_color</key>
+ <array>
+ <real>3</real>
+ <real>3</real>
+ <real>3</real>
+ <real>1</real>
+ </array>
+ </map>
+</llsd>
diff --git a/indra/newview/app_settings/windlight/skies/Coastal%20Sunset.xml b/indra/newview/app_settings/windlight/skies/Coastal%20Sunset.xml
new file mode 100644
index 0000000000..f4736cf4c6
--- /dev/null
+++ b/indra/newview/app_settings/windlight/skies/Coastal%20Sunset.xml
@@ -0,0 +1,141 @@
+<llsd>
+ <map>
+ <key>ambient</key>
+ <array>
+ <real>0.31535112857818604</real>
+ <real>0.37471914291381836</real>
+ <real>0.50999999046325684</real>
+ <real>0.17000000178813934</real>
+ </array>
+ <key>blue_density</key>
+ <array>
+ <real>0.11645399779081345</real>
+ <real>0.32075101137161255</real>
+ <real>0.64150899648666382</real>
+ <real>1</real>
+ </array>
+ <key>blue_horizon</key>
+ <array>
+ <real>0.054176401346921921</real>
+ <real>0.10741499811410904</real>
+ <real>0.12578600645065308</real>
+ <real>1</real>
+ </array>
+ <key>cloud_color</key>
+ <array>
+ <real>0.21396400034427643</real>
+ <real>0.21396400034427643</real>
+ <real>0.21396400034427643</real>
+ <real>1</real>
+ </array>
+ <key>cloud_pos_density1</key>
+ <array>
+ <real>0.27044001221656799</real>
+ <real>1</real>
+ <real>1</real>
+ <real>1</real>
+ </array>
+ <key>cloud_pos_density2</key>
+ <array>
+ <real>0.5</real>
+ <real>0.5</real>
+ <real>0.10062900185585022</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scale</key>
+ <array>
+ <real>0.41999998688697815</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scroll_rate</key>
+ <array>
+ <real>9.644780158996582</real>
+ <real>10.423800468444824</real>
+ </array>
+ <key>cloud_shadow</key>
+ <array>
+ <real>0.32704401016235352</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>density_multiplier</key>
+ <array>
+ <real>0.00015849100600462407</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>distance_multiplier</key>
+ <array>
+ <real>3.4000000953674316</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>east_angle</key>
+ <real>0</real>
+ <key>enable_cloud_scroll</key>
+ <array>
+ <boolean>1</boolean>
+ <boolean>1</boolean>
+ </array>
+ <key>gamma</key>
+ <array>
+ <real>1</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>glow</key>
+ <array>
+ <real>6.867919921875</real>
+ <real>0.0013735899701714516</real>
+ <real>-0.45328301191329956</real>
+ <real>1</real>
+ </array>
+ <key>haze_density</key>
+ <array>
+ <real>0.6792449951171875</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>haze_horizon</key>
+ <array>
+ <real>0.13210900127887726</real>
+ <real>0.13210900127887726</real>
+ <real>0.13210900127887726</real>
+ <real>1</real>
+ </array>
+ <key>lightnorm</key>
+ <array>
+ <real>0</real>
+ <real>0.031410444527864456</real>
+ <real>-0.99950659275054932</real>
+ <real>0</real>
+ </array>
+ <key>max_y</key>
+ <array>
+ <real>1308.1800537109375</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>preset_num</key>
+ <integer>5</integer>
+ <key>star_brightness</key>
+ <real>0</real>
+ <key>sun_angle</key>
+ <real>3.1101770401000977</real>
+ <key>sunlight_color</key>
+ <array>
+ <real>3</real>
+ <real>3</real>
+ <real>3</real>
+ <real>1</real>
+ </array>
+ </map>
+</llsd>
diff --git a/indra/newview/app_settings/windlight/skies/Default.xml b/indra/newview/app_settings/windlight/skies/Default.xml
new file mode 100644
index 0000000000..13a2c75046
--- /dev/null
+++ b/indra/newview/app_settings/windlight/skies/Default.xml
@@ -0,0 +1,141 @@
+<llsd>
+ <map>
+ <key>ambient</key>
+ <array>
+ <real>1.0499999523162842</real>
+ <real>1.0499999523162842</real>
+ <real>1.0499999523162842</real>
+ <real>0.34999999403953552</real>
+ </array>
+ <key>blue_density</key>
+ <array>
+ <real>0.24475815892219543</real>
+ <real>0.44872328639030457</real>
+ <real>0.75999999046325684</real>
+ <real>0.37999999523162842</real>
+ </array>
+ <key>blue_horizon</key>
+ <array>
+ <real>0.49548381567001343</real>
+ <real>0.49548381567001343</real>
+ <real>0.63999998569488525</real>
+ <real>0.31999999284744263</real>
+ </array>
+ <key>cloud_color</key>
+ <array>
+ <real>0.40999999642372131</real>
+ <real>0.40999999642372131</real>
+ <real>0.40999999642372131</real>
+ <real>0.40999999642372131</real>
+ </array>
+ <key>cloud_pos_density1</key>
+ <array>
+ <real>1.6884100437164307</real>
+ <real>0.52609699964523315</real>
+ <real>1</real>
+ <real>1</real>
+ </array>
+ <key>cloud_pos_density2</key>
+ <array>
+ <real>1.6884100437164307</real>
+ <real>0.52609699964523315</real>
+ <real>0.125</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scale</key>
+ <array>
+ <real>0.41999998688697815</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scroll_rate</key>
+ <array>
+ <real>10.199999809265137</real>
+ <real>10.01099967956543</real>
+ </array>
+ <key>cloud_shadow</key>
+ <array>
+ <real>0.26999998092651367</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>density_multiplier</key>
+ <array>
+ <real>0.00017999998817685992</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>distance_multiplier</key>
+ <array>
+ <real>0.80000001192092896</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>east_angle</key>
+ <real>0</real>
+ <key>enable_cloud_scroll</key>
+ <array>
+ <boolean>1</boolean>
+ <boolean>1</boolean>
+ </array>
+ <key>gamma</key>
+ <array>
+ <real>1</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>glow</key>
+ <array>
+ <real>5</real>
+ <real>0.0010000000474974513</real>
+ <real>-0.47999998927116394</real>
+ <real>1</real>
+ </array>
+ <key>haze_density</key>
+ <array>
+ <real>0.69999998807907104</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>haze_horizon</key>
+ <array>
+ <real>0.18999999761581421</real>
+ <real>0.19915600121021271</real>
+ <real>0.19915600121021271</real>
+ <real>1</real>
+ </array>
+ <key>lightnorm</key>
+ <array>
+ <real>0</real>
+ <real>0.91269159317016602</real>
+ <real>-0.40864911675453186</real>
+ <real>0</real>
+ </array>
+ <key>max_y</key>
+ <array>
+ <real>1605</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>preset_num</key>
+ <integer>22</integer>
+ <key>star_brightness</key>
+ <real>0</real>
+ <key>sun_angle</key>
+ <real>1.9917697906494141</real>
+ <key>sunlight_color</key>
+ <array>
+ <real>0.7342105507850647</real>
+ <real>0.78157895803451538</real>
+ <real>0.89999997615814209</real>
+ <real>0.29999998211860657</real>
+ </array>
+ </map>
+</llsd>
diff --git a/indra/newview/app_settings/windlight/skies/Desert%20Sunset.xml b/indra/newview/app_settings/windlight/skies/Desert%20Sunset.xml
new file mode 100644
index 0000000000..b2a611163d
--- /dev/null
+++ b/indra/newview/app_settings/windlight/skies/Desert%20Sunset.xml
@@ -0,0 +1,141 @@
+<llsd>
+ <map>
+ <key>ambient</key>
+ <array>
+ <real>0.07420019805431366</real>
+ <real>0.088169597089290619</real>
+ <real>0.11999999731779099</real>
+ <real>1</real>
+ </array>
+ <key>blue_density</key>
+ <array>
+ <real>0.14522500336170197</real>
+ <real>0.39999699592590332</real>
+ <real>0.80000197887420654</real>
+ <real>1</real>
+ </array>
+ <key>blue_horizon</key>
+ <array>
+ <real>0.10767599940299988</real>
+ <real>0.21348699927330017</real>
+ <real>0.25</real>
+ <real>1</real>
+ </array>
+ <key>cloud_color</key>
+ <array>
+ <real>0.22615399956703186</real>
+ <real>0.22615399956703186</real>
+ <real>0.22615399956703186</real>
+ <real>1</real>
+ </array>
+ <key>cloud_pos_density1</key>
+ <array>
+ <real>1.6884100437164307</real>
+ <real>0.52609699964523315</real>
+ <real>1</real>
+ <real>1</real>
+ </array>
+ <key>cloud_pos_density2</key>
+ <array>
+ <real>1.6884100437164307</real>
+ <real>0.52609699964523315</real>
+ <real>0.125</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scale</key>
+ <array>
+ <real>0.41999998688697815</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scroll_rate</key>
+ <array>
+ <real>10.199999809265137</real>
+ <real>10.01099967956543</real>
+ </array>
+ <key>cloud_shadow</key>
+ <array>
+ <real>0.37999999523162842</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>density_multiplier</key>
+ <array>
+ <real>0.00046000001020729542</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>distance_multiplier</key>
+ <array>
+ <real>2</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>east_angle</key>
+ <real>0</real>
+ <key>enable_cloud_scroll</key>
+ <array>
+ <boolean>1</boolean>
+ <boolean>1</boolean>
+ </array>
+ <key>gamma</key>
+ <array>
+ <real>1.6100000143051147</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>glow</key>
+ <array>
+ <real>5</real>
+ <real>0.0010000000474974513</real>
+ <real>-0.47999998927116394</real>
+ <real>1</real>
+ </array>
+ <key>haze_density</key>
+ <array>
+ <real>0.69999998807907104</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>haze_horizon</key>
+ <array>
+ <real>0.15999999642372131</real>
+ <real>0.19915600121021271</real>
+ <real>0.19915600121021271</real>
+ <real>1</real>
+ </array>
+ <key>lightnorm</key>
+ <array>
+ <real>0</real>
+ <real>0.062790460884571075</real>
+ <real>-0.99802672863006592</real>
+ <real>0</real>
+ </array>
+ <key>max_y</key>
+ <array>
+ <real>562.5</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>preset_num</key>
+ <integer>22</integer>
+ <key>star_brightness</key>
+ <real>0</real>
+ <key>sun_angle</key>
+ <real>3.0787608623504639</real>
+ <key>sunlight_color</key>
+ <array>
+ <real>2.8385701179504395</real>
+ <real>2.8385701179504395</real>
+ <real>2.8385701179504395</real>
+ <real>1</real>
+ </array>
+ </map>
+</llsd>
diff --git a/indra/newview/app_settings/windlight/skies/Fine%20Day.xml b/indra/newview/app_settings/windlight/skies/Fine%20Day.xml
new file mode 100644
index 0000000000..e053815be1
--- /dev/null
+++ b/indra/newview/app_settings/windlight/skies/Fine%20Day.xml
@@ -0,0 +1,141 @@
+<llsd>
+ <map>
+ <key>ambient</key>
+ <array>
+ <real>0.21194984018802643</real>
+ <real>0.25700280070304871</real>
+ <real>0.25999999046325684</real>
+ <real>0.25999999046325684</real>
+ </array>
+ <key>blue_density</key>
+ <array>
+ <real>0.10031381994485855</real>
+ <real>0.2849995493888855</real>
+ <real>0.56999999284744263</real>
+ <real>0.56999999284744263</real>
+ </array>
+ <key>blue_horizon</key>
+ <array>
+ <real>0.15806557238101959</real>
+ <real>0.31211116909980774</real>
+ <real>0.52999997138977051</real>
+ <real>0.52999997138977051</real>
+ </array>
+ <key>cloud_color</key>
+ <array>
+ <real>0.62000000476837158</real>
+ <real>0.72737622261047363</real>
+ <real>0.73626559972763062</real>
+ <real>1</real>
+ </array>
+ <key>cloud_pos_density1</key>
+ <array>
+ <real>0.89999997615814209</real>
+ <real>0.93999999761581421</real>
+ <real>0.74000000953674316</real>
+ <real>1</real>
+ </array>
+ <key>cloud_pos_density2</key>
+ <array>
+ <real>0.11999999731779099</real>
+ <real>0.20999999344348907</real>
+ <real>0.029999999329447746</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scale</key>
+ <array>
+ <real>0.25999999046325684</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scroll_rate</key>
+ <array>
+ <real>9.993240904292179</real>
+ <real>10.010000228881836</real>
+ </array>
+ <key>cloud_shadow</key>
+ <array>
+ <real>0.29999998211860657</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>density_multiplier</key>
+ <array>
+ <real>0.00013000000035390258</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>distance_multiplier</key>
+ <array>
+ <real>10.100000381469727</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>east_angle</key>
+ <real>3.8955750465393066</real>
+ <key>enable_cloud_scroll</key>
+ <array>
+ <boolean>1</boolean>
+ <boolean>1</boolean>
+ </array>
+ <key>gamma</key>
+ <array>
+ <real>1.4699999094009399</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>glow</key>
+ <array>
+ <real>11.200000762939453</real>
+ <real>0.0010000000474974513</real>
+ <real>-0.64999997615814209</real>
+ <real>1</real>
+ </array>
+ <key>haze_density</key>
+ <array>
+ <real>0.35999998450279236</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>haze_horizon</key>
+ <array>
+ <real>0.11999999731779099</real>
+ <real>0.19915600121021271</real>
+ <real>0.19915600121021271</real>
+ <real>1</real>
+ </array>
+ <key>lightnorm</key>
+ <array>
+ <real>0.66304093599319458</real>
+ <real>0.24868990480899811</real>
+ <real>-0.70606660842895508</real>
+ <real>0</real>
+ </array>
+ <key>max_y</key>
+ <array>
+ <real>789</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>preset_num</key>
+ <integer>24</integer>
+ <key>star_brightness</key>
+ <real>0.18999999761581421</real>
+ <key>sun_angle</key>
+ <real>0.25132742524147034</real>
+ <key>sunlight_color</key>
+ <array>
+ <real>2.25</real>
+ <real>1.2599999904632568</real>
+ <real>0.59999996423721313</real>
+ <real>2.25</real>
+ </array>
+ </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
new file mode 100644
index 0000000000..8576ec125c
--- /dev/null
+++ b/indra/newview/app_settings/windlight/skies/Fluffy%20Big%20Clouds.xml
@@ -0,0 +1,141 @@
+<llsd>
+ <map>
+ <key>ambient</key>
+ <array>
+ <real>0.029999999329447746</real>
+ <real>0</real>
+ <real>0</real>
+ <real>0.029999999329447746</real>
+ </array>
+ <key>blue_density</key>
+ <array>
+ <real>0.097999997437000275</real>
+ <real>0.2800000011920929</real>
+ <real>1</real>
+ <real>1</real>
+ </array>
+ <key>blue_horizon</key>
+ <array>
+ <real>0.11999999731779099</real>
+ <real>0.35094299912452698</real>
+ <real>1</real>
+ <real>1</real>
+ </array>
+ <key>cloud_color</key>
+ <array>
+ <real>0.48999997973442078</real>
+ <real>0.79000002145767212</real>
+ <real>0.80000001192092896</real>
+ <real>1</real>
+ </array>
+ <key>cloud_pos_density1</key>
+ <array>
+ <real>0.53999996185302734</real>
+ <real>0.5</real>
+ <real>0.75999999046325684</real>
+ <real>1</real>
+ </array>
+ <key>cloud_pos_density2</key>
+ <array>
+ <real>0.38999998569488525</real>
+ <real>0.5</real>
+ <real>0.039999999105930328</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scale</key>
+ <array>
+ <real>0.43999999761581421</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scroll_rate</key>
+ <array>
+ <real>11.809999465942383</real>
+ <real>12.799999237060547</real>
+ </array>
+ <key>cloud_shadow</key>
+ <array>
+ <real>0.32999998331069946</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>density_multiplier</key>
+ <array>
+ <real>0.00021999998716637492</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>distance_multiplier</key>
+ <array>
+ <real>4</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>east_angle</key>
+ <real>3.2044246196746826</real>
+ <key>enable_cloud_scroll</key>
+ <array>
+ <boolean>1</boolean>
+ <boolean>1</boolean>
+ </array>
+ <key>gamma</key>
+ <array>
+ <real>1.5399999618530273</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>glow</key>
+ <array>
+ <real>3.8000010331979865</real>
+ <real>0.001000000059761974</real>
+ <real>-0.49999996688498527</real>
+ <real>1</real>
+ </array>
+ <key>haze_density</key>
+ <array>
+ <real>0.20999999344348907</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>haze_horizon</key>
+ <array>
+ <real>0.049999997019767761</real>
+ <real>0.19915600121021271</real>
+ <real>0.19915600121021271</real>
+ <real>1</real>
+ </array>
+ <key>lightnorm</key>
+ <array>
+ <real>0.056814663112163544</real>
+ <real>0.42577928304672241</real>
+ <real>-0.90304160118103027</real>
+ <real>0</real>
+ </array>
+ <key>max_y</key>
+ <array>
+ <real>676.10003662109375</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>preset_num</key>
+ <integer>18</integer>
+ <key>star_brightness</key>
+ <real>0.44999998807907104</real>
+ <key>sun_angle</key>
+ <real>0.4398229718208313</real>
+ <key>sunlight_color</key>
+ <array>
+ <real>1.7999999523162842</real>
+ <real>1.4099999666213989</real>
+ <real>1.0199999809265137</real>
+ <real>1.7999999523162842</real>
+ </array>
+ </map>
+</llsd>
diff --git a/indra/newview/app_settings/windlight/skies/Foggy.xml b/indra/newview/app_settings/windlight/skies/Foggy.xml
new file mode 100644
index 0000000000..cb7395d589
--- /dev/null
+++ b/indra/newview/app_settings/windlight/skies/Foggy.xml
@@ -0,0 +1,141 @@
+<llsd>
+ <map>
+ <key>ambient</key>
+ <array>
+ <real>0.32999998331069946</real>
+ <real>0.32999998331069946</real>
+ <real>0.32999998331069946</real>
+ <real>0.10999999940395355</real>
+ </array>
+ <key>blue_density</key>
+ <array>
+ <real>0.14522500336170197</real>
+ <real>0.39999699592590332</real>
+ <real>0.80000197887420654</real>
+ <real>1</real>
+ </array>
+ <key>blue_horizon</key>
+ <array>
+ <real>0.43070214986801147</real>
+ <real>0.85394668579101563</real>
+ <real>1</real>
+ <real>1</real>
+ </array>
+ <key>cloud_color</key>
+ <array>
+ <real>0.69999998807907104</real>
+ <real>0.69999998807907104</real>
+ <real>0.69999998807907104</real>
+ <real>0.69999998807907104</real>
+ </array>
+ <key>cloud_pos_density1</key>
+ <array>
+ <real>0.5</real>
+ <real>0.5</real>
+ <real>0.53999996185302734</real>
+ <real>1</real>
+ </array>
+ <key>cloud_pos_density2</key>
+ <array>
+ <real>0.5</real>
+ <real>0.5</real>
+ <real>0.125</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scale</key>
+ <array>
+ <real>0.29999998211860657</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scroll_rate</key>
+ <array>
+ <real>10.49940013885498</real>
+ <real>10.01099967956543</real>
+ </array>
+ <key>cloud_shadow</key>
+ <array>
+ <real>0.39999997615814209</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>density_multiplier</key>
+ <array>
+ <real>0.0003499999875202775</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>distance_multiplier</key>
+ <array>
+ <real>4</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>east_angle</key>
+ <real>0</real>
+ <key>enable_cloud_scroll</key>
+ <array>
+ <boolean>1</boolean>
+ <boolean>1</boolean>
+ </array>
+ <key>gamma</key>
+ <array>
+ <real>1</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>glow</key>
+ <array>
+ <real>3.7999999523162842</real>
+ <real>0.0010000000474974513</real>
+ <real>-0.5</real>
+ <real>1</real>
+ </array>
+ <key>haze_density</key>
+ <array>
+ <real>4</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>haze_horizon</key>
+ <array>
+ <real>0.64999997615814209</real>
+ <real>0.19915600121021271</real>
+ <real>0.19915600121021271</real>
+ <real>1</real>
+ </array>
+ <key>lightnorm</key>
+ <array>
+ <real>0</real>
+ <real>1</real>
+ <real>-4.3711388286737929e-008</real>
+ <real>0</real>
+ </array>
+ <key>max_y</key>
+ <array>
+ <real>600</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>preset_num</key>
+ <integer>18</integer>
+ <key>star_brightness</key>
+ <real>0</real>
+ <key>sun_angle</key>
+ <real>1.5707963705062866</real>
+ <key>sunlight_color</key>
+ <array>
+ <real>0.53999996185302734</real>
+ <real>0.53999996185302734</real>
+ <real>0.53999996185302734</real>
+ <real>0.17999999225139618</real>
+ </array>
+ </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
new file mode 100644
index 0000000000..32be0d25e6
--- /dev/null
+++ b/indra/newview/app_settings/windlight/skies/Funky%20Funky%20Funky.xml
@@ -0,0 +1,141 @@
+<llsd>
+ <map>
+ <key>ambient</key>
+ <array>
+ <real>0.29999998211860657</real>
+ <real>0.23511900007724762</real>
+ <real>0.31999999284744263</real>
+ <real>1</real>
+ </array>
+ <key>blue_density</key>
+ <array>
+ <real>0.13977900147438049</real>
+ <real>0.38499599695205688</real>
+ <real>0.76999998092651367</real>
+ <real>1</real>
+ </array>
+ <key>blue_horizon</key>
+ <array>
+ <real>0.18999999761581421</real>
+ <real>0.18999999761581421</real>
+ <real>0.18999999761581421</real>
+ <real>1</real>
+ </array>
+ <key>cloud_color</key>
+ <array>
+ <real>0.22615399956703186</real>
+ <real>0.22615399956703186</real>
+ <real>0.22615399956703186</real>
+ <real>1</real>
+ </array>
+ <key>cloud_pos_density1</key>
+ <array>
+ <real>5.3780298233032227</real>
+ <real>1.9675600528717041</real>
+ <real>1</real>
+ <real>1</real>
+ </array>
+ <key>cloud_pos_density2</key>
+ <array>
+ <real>5.3780298233032227</real>
+ <real>1.9675600528717041</real>
+ <real>0.125</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scale</key>
+ <array>
+ <real>0.41999998688697815</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scroll_rate</key>
+ <array>
+ <real>10.739999771118164</real>
+ <real>10.600000381469727</real>
+ </array>
+ <key>cloud_shadow</key>
+ <array>
+ <real>0.31000000238418579</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>density_multiplier</key>
+ <array>
+ <real>0.00052000000141561031</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>distance_multiplier</key>
+ <array>
+ <real>3.4000000953674316</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>east_angle</key>
+ <real>0</real>
+ <key>enable_cloud_scroll</key>
+ <array>
+ <boolean>1</boolean>
+ <boolean>1</boolean>
+ </array>
+ <key>gamma</key>
+ <array>
+ <real>0.77999997138977051</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>glow</key>
+ <array>
+ <real>5</real>
+ <real>0.0010000000474974513</real>
+ <real>-0.47999998927116394</real>
+ <real>1</real>
+ </array>
+ <key>haze_density</key>
+ <array>
+ <real>1.1000000238418579</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>haze_horizon</key>
+ <array>
+ <real>0.12999999523162842</real>
+ <real>0.19915600121021271</real>
+ <real>0.19915600121021271</real>
+ <real>1</real>
+ </array>
+ <key>lightnorm</key>
+ <array>
+ <real>0</real>
+ <real>0.53582650423049927</real>
+ <real>-0.84432810544967651</real>
+ <real>0</real>
+ </array>
+ <key>max_y</key>
+ <array>
+ <real>656.20001220703125</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>preset_num</key>
+ <integer>28</integer>
+ <key>star_brightness</key>
+ <real>0</real>
+ <key>sun_angle</key>
+ <real>2.5761063098907471</real>
+ <key>sunlight_color</key>
+ <array>
+ <real>2.1299998760223389</real>
+ <real>1.5299999713897705</real>
+ <real>2.8385701179504395</real>
+ <real>1</real>
+ </array>
+ </map>
+</llsd>
diff --git a/indra/newview/app_settings/windlight/skies/Funky%20Funky.xml b/indra/newview/app_settings/windlight/skies/Funky%20Funky.xml
new file mode 100644
index 0000000000..ae16b2d135
--- /dev/null
+++ b/indra/newview/app_settings/windlight/skies/Funky%20Funky.xml
@@ -0,0 +1,141 @@
+<llsd>
+ <map>
+ <key>ambient</key>
+ <array>
+ <real>0.32999998331069946</real>
+ <real>0.32999998331069946</real>
+ <real>0.32999998331069946</real>
+ <real>0.10999999940395355</real>
+ </array>
+ <key>blue_density</key>
+ <array>
+ <real>0.14522500336170197</real>
+ <real>0.39999699592590332</real>
+ <real>0.80000197887420654</real>
+ <real>1</real>
+ </array>
+ <key>blue_horizon</key>
+ <array>
+ <real>0.15130999684333801</real>
+ <real>0.30000001192092896</real>
+ <real>0.35131001472473145</real>
+ <real>1</real>
+ </array>
+ <key>cloud_color</key>
+ <array>
+ <real>0.22615399956703186</real>
+ <real>0.22615399956703186</real>
+ <real>0.22615399956703186</real>
+ <real>1</real>
+ </array>
+ <key>cloud_pos_density1</key>
+ <array>
+ <real>0.65280699729919434</real>
+ <real>0.50335597991943359</real>
+ <real>1</real>
+ <real>1</real>
+ </array>
+ <key>cloud_pos_density2</key>
+ <array>
+ <real>0.65280699729919434</real>
+ <real>0.50335597991943359</real>
+ <real>0.125</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scale</key>
+ <array>
+ <real>0.41999998688697815</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scroll_rate</key>
+ <array>
+ <real>10.49940013885498</real>
+ <real>10.01099967956543</real>
+ </array>
+ <key>cloud_shadow</key>
+ <array>
+ <real>0.33064401149749756</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>density_multiplier</key>
+ <array>
+ <real>0.0003499999875202775</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>distance_multiplier</key>
+ <array>
+ <real>1</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>east_angle</key>
+ <real>0</real>
+ <key>enable_cloud_scroll</key>
+ <array>
+ <boolean>1</boolean>
+ <boolean>1</boolean>
+ </array>
+ <key>gamma</key>
+ <array>
+ <real>1</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>glow</key>
+ <array>
+ <real>5</real>
+ <real>0.0010000000474974513</real>
+ <real>-0.33000001311302185</real>
+ <real>1</real>
+ </array>
+ <key>haze_density</key>
+ <array>
+ <real>0.69999998807907104</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>haze_horizon</key>
+ <array>
+ <real>0.19915600121021271</real>
+ <real>0.19915600121021271</real>
+ <real>0.19915600121021271</real>
+ <real>1</real>
+ </array>
+ <key>lightnorm</key>
+ <array>
+ <real>0</real>
+ <real>0.062790460884571075</real>
+ <real>-0.99802672863006592</real>
+ <real>0</real>
+ </array>
+ <key>max_y</key>
+ <array>
+ <real>600</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>preset_num</key>
+ <integer>11</integer>
+ <key>star_brightness</key>
+ <real>0</real>
+ <key>sun_angle</key>
+ <real>3.0787608623504639</real>
+ <key>sunlight_color</key>
+ <array>
+ <real>0.86811381578445435</real>
+ <real>2.2200000286102295</real>
+ <real>2.2200000286102295</real>
+ <real>0.74000000953674316</real>
+ </array>
+ </map>
+</llsd>
diff --git a/indra/newview/app_settings/windlight/skies/Gelatto.xml b/indra/newview/app_settings/windlight/skies/Gelatto.xml
new file mode 100644
index 0000000000..66b3d317b8
--- /dev/null
+++ b/indra/newview/app_settings/windlight/skies/Gelatto.xml
@@ -0,0 +1,141 @@
+<llsd>
+ <map>
+ <key>ambient</key>
+ <array>
+ <real>0</real>
+ <real>0.15999999642372131</real>
+ <real>0</real>
+ <real>0.15999999642372131</real>
+ </array>
+ <key>blue_density</key>
+ <array>
+ <real>0.019999999552965164</real>
+ <real>0.22999770939350128</real>
+ <real>0.45999997854232788</real>
+ <real>0.55000001192092896</real>
+ </array>
+ <key>blue_horizon</key>
+ <array>
+ <real>0</real>
+ <real>0.6319204568862915</real>
+ <real>0.74000000953674316</real>
+ <real>0.84999996423721313</real>
+ </array>
+ <key>cloud_color</key>
+ <array>
+ <real>1</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>cloud_pos_density1</key>
+ <array>
+ <real>0.53999996185302734</real>
+ <real>0.50999999046325684</real>
+ <real>0.23999999463558197</real>
+ <real>1</real>
+ </array>
+ <key>cloud_pos_density2</key>
+ <array>
+ <real>0.5</real>
+ <real>0.5</real>
+ <real>0.059999998658895493</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scale</key>
+ <array>
+ <real>0.2800000011920929</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scroll_rate</key>
+ <array>
+ <real>20</real>
+ <real>20</real>
+ </array>
+ <key>cloud_shadow</key>
+ <array>
+ <real>0.32999998331069946</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>density_multiplier</key>
+ <array>
+ <real>0.00016999999934341758</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>distance_multiplier</key>
+ <array>
+ <real>8.1000003814697266</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>east_angle</key>
+ <real>3.7699110507965088</real>
+ <key>enable_cloud_scroll</key>
+ <array>
+ <boolean>0</boolean>
+ <boolean>0</boolean>
+ </array>
+ <key>gamma</key>
+ <array>
+ <real>1.5399999618530273</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>glow</key>
+ <array>
+ <real>0.39999961853027344</real>
+ <real>0.0010000000474974513</real>
+ <real>-0.49999997019767761</real>
+ <real>1</real>
+ </array>
+ <key>haze_density</key>
+ <array>
+ <real>3.2599999904632568</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>haze_horizon</key>
+ <array>
+ <real>0.4699999988079071</real>
+ <real>0.19915600121021271</real>
+ <real>0.19915600121021271</real>
+ <real>1</real>
+ </array>
+ <key>lightnorm</key>
+ <array>
+ <real>0.58749508857727051</real>
+ <real>-0.031410761177539825</real>
+ <real>-0.80861783027648926</real>
+ <real>0</real>
+ </array>
+ <key>max_y</key>
+ <array>
+ <real>1267.5999755859375</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>preset_num</key>
+ <integer>18</integer>
+ <key>star_brightness</key>
+ <real>0</real>
+ <key>sun_angle</key>
+ <real>-0.031415928155183792</real>
+ <key>sunlight_color</key>
+ <array>
+ <real>0.75</real>
+ <real>0.71999996900558472</real>
+ <real>0.37800011038780212</real>
+ <real>0.80999994277954102</real>
+ </array>
+ </map>
+</llsd>
diff --git a/indra/newview/app_settings/windlight/skies/Ghost.xml b/indra/newview/app_settings/windlight/skies/Ghost.xml
new file mode 100644
index 0000000000..447202ed51
--- /dev/null
+++ b/indra/newview/app_settings/windlight/skies/Ghost.xml
@@ -0,0 +1,141 @@
+<llsd>
+ <map>
+ <key>ambient</key>
+ <array>
+ <real>0.23999999463558197</real>
+ <real>0.23999999463558197</real>
+ <real>0.23999999463558197</real>
+ <real>0.079999998211860657</real>
+ </array>
+ <key>blue_density</key>
+ <array>
+ <real>0.16700799763202667</real>
+ <real>0.45999500155448914</real>
+ <real>0.92000001668930054</real>
+ <real>1</real>
+ </array>
+ <key>blue_horizon</key>
+ <array>
+ <real>0.18089599907398224</real>
+ <real>0.35865798592567444</real>
+ <real>0.41999998688697815</real>
+ <real>1</real>
+ </array>
+ <key>cloud_color</key>
+ <array>
+ <real>0.40999999642372131</real>
+ <real>0.40999999642372131</real>
+ <real>0.40999999642372131</real>
+ <real>1</real>
+ </array>
+ <key>cloud_pos_density1</key>
+ <array>
+ <real>0.5</real>
+ <real>0.5</real>
+ <real>1</real>
+ <real>1</real>
+ </array>
+ <key>cloud_pos_density2</key>
+ <array>
+ <real>0.5</real>
+ <real>0.5</real>
+ <real>0.125</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scale</key>
+ <array>
+ <real>0.41999998688697815</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scroll_rate</key>
+ <array>
+ <real>11.539999961853027</real>
+ <real>10.01099967956543</real>
+ </array>
+ <key>cloud_shadow</key>
+ <array>
+ <real>0.36000001430511475</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>density_multiplier</key>
+ <array>
+ <real>0.00042999998549930751</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>distance_multiplier</key>
+ <array>
+ <real>8.1000003814697266</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>east_angle</key>
+ <real>0</real>
+ <key>enable_cloud_scroll</key>
+ <array>
+ <boolean>1</boolean>
+ <boolean>1</boolean>
+ </array>
+ <key>gamma</key>
+ <array>
+ <real>1</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>glow</key>
+ <array>
+ <real>5</real>
+ <real>0.0010000000474974513</real>
+ <real>-0.51999998092651367</real>
+ <real>1</real>
+ </array>
+ <key>haze_density</key>
+ <array>
+ <real>0.75</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>haze_horizon</key>
+ <array>
+ <real>0.18000000715255737</real>
+ <real>0.19915600121021271</real>
+ <real>0.19915600121021271</real>
+ <real>1</real>
+ </array>
+ <key>lightnorm</key>
+ <array>
+ <real>0</real>
+ <real>0.89100658893585205</real>
+ <real>0.45399042963981628</real>
+ <real>0</real>
+ </array>
+ <key>max_y</key>
+ <array>
+ <real>718.70001220703125</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>preset_num</key>
+ <integer>23</integer>
+ <key>star_brightness</key>
+ <real>2</real>
+ <key>sun_angle</key>
+ <real>1.0995575189590454</real>
+ <key>sunlight_color</key>
+ <array>
+ <real>0.33000001311302185</real>
+ <real>0.33000001311302185</real>
+ <real>0.33000001311302185</real>
+ <real>1</real>
+ </array>
+ </map>
+</llsd>
diff --git a/indra/newview/app_settings/windlight/skies/Incongruent%20Truths.xml b/indra/newview/app_settings/windlight/skies/Incongruent%20Truths.xml
new file mode 100644
index 0000000000..098844e16e
--- /dev/null
+++ b/indra/newview/app_settings/windlight/skies/Incongruent%20Truths.xml
@@ -0,0 +1,141 @@
+<llsd>
+ <map>
+ <key>ambient</key>
+ <array>
+ <real>0</real>
+ <real>0</real>
+ <real>0.44999998807907104</real>
+ <real>0.44999998807907104</real>
+ </array>
+ <key>blue_density</key>
+ <array>
+ <real>0.13997539444089213</real>
+ <real>0.38665792478461469</real>
+ <real>0.77332294252195766</real>
+ <real>0.95108884837904384</real>
+ </array>
+ <key>blue_horizon</key>
+ <array>
+ <real>0</real>
+ <real>0.22876684367656708</real>
+ <real>0.290018230676651</real>
+ <real>0.31999999284744263</real>
+ </array>
+ <key>cloud_color</key>
+ <array>
+ <real>0.25999999046325684</real>
+ <real>0.28883209824562073</real>
+ <real>0.28994369506835938</real>
+ <real>0.28999999165534973</real>
+ </array>
+ <key>cloud_pos_density1</key>
+ <array>
+ <real>0.17999999225139618</real>
+ <real>0.50999999046325684</real>
+ <real>0.91999995708465576</real>
+ <real>1</real>
+ </array>
+ <key>cloud_pos_density2</key>
+ <array>
+ <real>0.5</real>
+ <real>0.5</real>
+ <real>0.079999998211860657</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scale</key>
+ <array>
+ <real>0.25</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scroll_rate</key>
+ <array>
+ <real>10.436104517528292</real>
+ <real>10</real>
+ </array>
+ <key>cloud_shadow</key>
+ <array>
+ <real>0.34000000357627869</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>density_multiplier</key>
+ <array>
+ <real>0.0002899999963119626</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>distance_multiplier</key>
+ <array>
+ <real>1.3000000715255737</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>east_angle</key>
+ <real>2.2619466781616211</real>
+ <key>enable_cloud_scroll</key>
+ <array>
+ <boolean>1</boolean>
+ <boolean>1</boolean>
+ </array>
+ <key>gamma</key>
+ <array>
+ <real>1.5399999618530273</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>glow</key>
+ <array>
+ <real>4.0000009536743164</real>
+ <real>0.0010000000474974513</real>
+ <real>-0.74999994039535522</real>
+ <real>1</real>
+ </array>
+ <key>haze_density</key>
+ <array>
+ <real>0.12999999523162842</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>haze_horizon</key>
+ <array>
+ <real>0.14999999105930328</real>
+ <real>0.19915600121021271</real>
+ <real>0.19915600121021271</real>
+ <real>1</real>
+ </array>
+ <key>lightnorm</key>
+ <array>
+ <real>-0.74630612134933472</real>
+ <real>0.24868990480899811</real>
+ <real>-0.61739814281463623</real>
+ <real>0</real>
+ </array>
+ <key>max_y</key>
+ <array>
+ <real>394.39999389648437</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>preset_num</key>
+ <integer>18</integer>
+ <key>star_brightness</key>
+ <real>0.44999998807907104</real>
+ <key>sun_angle</key>
+ <real>0.25132742524147034</real>
+ <key>sunlight_color</key>
+ <array>
+ <real>2.25</real>
+ <real>1.957500696182251</real>
+ <real>1.170000433921814</real>
+ <real>0.75</real>
+ </array>
+ </map>
+</llsd>
diff --git a/indra/newview/app_settings/windlight/skies/Midday%201.xml b/indra/newview/app_settings/windlight/skies/Midday%201.xml
new file mode 100644
index 0000000000..13a2c75046
--- /dev/null
+++ b/indra/newview/app_settings/windlight/skies/Midday%201.xml
@@ -0,0 +1,141 @@
+<llsd>
+ <map>
+ <key>ambient</key>
+ <array>
+ <real>1.0499999523162842</real>
+ <real>1.0499999523162842</real>
+ <real>1.0499999523162842</real>
+ <real>0.34999999403953552</real>
+ </array>
+ <key>blue_density</key>
+ <array>
+ <real>0.24475815892219543</real>
+ <real>0.44872328639030457</real>
+ <real>0.75999999046325684</real>
+ <real>0.37999999523162842</real>
+ </array>
+ <key>blue_horizon</key>
+ <array>
+ <real>0.49548381567001343</real>
+ <real>0.49548381567001343</real>
+ <real>0.63999998569488525</real>
+ <real>0.31999999284744263</real>
+ </array>
+ <key>cloud_color</key>
+ <array>
+ <real>0.40999999642372131</real>
+ <real>0.40999999642372131</real>
+ <real>0.40999999642372131</real>
+ <real>0.40999999642372131</real>
+ </array>
+ <key>cloud_pos_density1</key>
+ <array>
+ <real>1.6884100437164307</real>
+ <real>0.52609699964523315</real>
+ <real>1</real>
+ <real>1</real>
+ </array>
+ <key>cloud_pos_density2</key>
+ <array>
+ <real>1.6884100437164307</real>
+ <real>0.52609699964523315</real>
+ <real>0.125</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scale</key>
+ <array>
+ <real>0.41999998688697815</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scroll_rate</key>
+ <array>
+ <real>10.199999809265137</real>
+ <real>10.01099967956543</real>
+ </array>
+ <key>cloud_shadow</key>
+ <array>
+ <real>0.26999998092651367</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>density_multiplier</key>
+ <array>
+ <real>0.00017999998817685992</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>distance_multiplier</key>
+ <array>
+ <real>0.80000001192092896</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>east_angle</key>
+ <real>0</real>
+ <key>enable_cloud_scroll</key>
+ <array>
+ <boolean>1</boolean>
+ <boolean>1</boolean>
+ </array>
+ <key>gamma</key>
+ <array>
+ <real>1</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>glow</key>
+ <array>
+ <real>5</real>
+ <real>0.0010000000474974513</real>
+ <real>-0.47999998927116394</real>
+ <real>1</real>
+ </array>
+ <key>haze_density</key>
+ <array>
+ <real>0.69999998807907104</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>haze_horizon</key>
+ <array>
+ <real>0.18999999761581421</real>
+ <real>0.19915600121021271</real>
+ <real>0.19915600121021271</real>
+ <real>1</real>
+ </array>
+ <key>lightnorm</key>
+ <array>
+ <real>0</real>
+ <real>0.91269159317016602</real>
+ <real>-0.40864911675453186</real>
+ <real>0</real>
+ </array>
+ <key>max_y</key>
+ <array>
+ <real>1605</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>preset_num</key>
+ <integer>22</integer>
+ <key>star_brightness</key>
+ <real>0</real>
+ <key>sun_angle</key>
+ <real>1.9917697906494141</real>
+ <key>sunlight_color</key>
+ <array>
+ <real>0.7342105507850647</real>
+ <real>0.78157895803451538</real>
+ <real>0.89999997615814209</real>
+ <real>0.29999998211860657</real>
+ </array>
+ </map>
+</llsd>
diff --git a/indra/newview/app_settings/windlight/skies/Midday%202.xml b/indra/newview/app_settings/windlight/skies/Midday%202.xml
new file mode 100644
index 0000000000..04f2ba85ee
--- /dev/null
+++ b/indra/newview/app_settings/windlight/skies/Midday%202.xml
@@ -0,0 +1,141 @@
+<llsd>
+ <map>
+ <key>ambient</key>
+ <array>
+ <real>0</real>
+ <real>0</real>
+ <real>0</real>
+ <real>0</real>
+ </array>
+ <key>blue_density</key>
+ <array>
+ <real>0.14522500336170197</real>
+ <real>0.39999699592590332</real>
+ <real>0.80000197887420654</real>
+ <real>1</real>
+ </array>
+ <key>blue_horizon</key>
+ <array>
+ <real>0.43070214986801147</real>
+ <real>0.85394668579101563</real>
+ <real>1</real>
+ <real>1</real>
+ </array>
+ <key>cloud_color</key>
+ <array>
+ <real>0.69999998807907104</real>
+ <real>0.69999998807907104</real>
+ <real>0.69999998807907104</real>
+ <real>1</real>
+ </array>
+ <key>cloud_pos_density1</key>
+ <array>
+ <real>0.5</real>
+ <real>0.5</real>
+ <real>0.53999996185302734</real>
+ <real>1</real>
+ </array>
+ <key>cloud_pos_density2</key>
+ <array>
+ <real>0.5</real>
+ <real>0.5</real>
+ <real>0.125</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scale</key>
+ <array>
+ <real>0.29999998211860657</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scroll_rate</key>
+ <array>
+ <real>10.199999809265137</real>
+ <real>10.069999694824219</real>
+ </array>
+ <key>cloud_shadow</key>
+ <array>
+ <real>0.22999998927116394</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>density_multiplier</key>
+ <array>
+ <real>0.0003499999875202775</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>distance_multiplier</key>
+ <array>
+ <real>0</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>east_angle</key>
+ <real>0</real>
+ <key>enable_cloud_scroll</key>
+ <array>
+ <boolean>1</boolean>
+ <boolean>1</boolean>
+ </array>
+ <key>gamma</key>
+ <array>
+ <real>1.6100000143051147</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>glow</key>
+ <array>
+ <real>3.7999999523162842</real>
+ <real>0.0010000000474974513</real>
+ <real>-0.5</real>
+ <real>1</real>
+ </array>
+ <key>haze_density</key>
+ <array>
+ <real>0.69999998807907104</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>haze_horizon</key>
+ <array>
+ <real>0.41999998688697815</real>
+ <real>0.19915600121021271</real>
+ <real>0.19915600121021271</real>
+ <real>1</real>
+ </array>
+ <key>lightnorm</key>
+ <array>
+ <real>0</real>
+ <real>1</real>
+ <real>-4.3711388286737929e-008</real>
+ <real>0</real>
+ </array>
+ <key>max_y</key>
+ <array>
+ <real>600</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>preset_num</key>
+ <integer>-1163005939</integer>
+ <key>star_brightness</key>
+ <real>0</real>
+ <key>sun_angle</key>
+ <real>1.5707963705062866</real>
+ <key>sunlight_color</key>
+ <array>
+ <real>0.80999994277954102</real>
+ <real>0.80999994277954102</real>
+ <real>0.80999994277954102</real>
+ <real>0.26999998092651367</real>
+ </array>
+ </map>
+</llsd>
diff --git a/indra/newview/app_settings/windlight/skies/Midday%203.xml b/indra/newview/app_settings/windlight/skies/Midday%203.xml
new file mode 100644
index 0000000000..a23dcab60b
--- /dev/null
+++ b/indra/newview/app_settings/windlight/skies/Midday%203.xml
@@ -0,0 +1,141 @@
+<llsd>
+ <map>
+ <key>ambient</key>
+ <array>
+ <real>0.33000001311302185</real>
+ <real>0.33000001311302185</real>
+ <real>0.33000001311302185</real>
+ <real>1</real>
+ </array>
+ <key>blue_density</key>
+ <array>
+ <real>0.16449999809265137</real>
+ <real>0.4699999988079071</real>
+ <real>0.93999999761581421</real>
+ <real>1</real>
+ </array>
+ <key>blue_horizon</key>
+ <array>
+ <real>0.17547200620174408</real>
+ <real>0.35094299912452698</real>
+ <real>0.62000000476837158</real>
+ <real>1</real>
+ </array>
+ <key>cloud_color</key>
+ <array>
+ <real>0.5899999737739563</real>
+ <real>0.79000002145767212</real>
+ <real>0.80000001192092896</real>
+ <real>1</real>
+ </array>
+ <key>cloud_pos_density1</key>
+ <array>
+ <real>2.8148899078369141</real>
+ <real>5.6909198760986328</real>
+ <real>1</real>
+ <real>1</real>
+ </array>
+ <key>cloud_pos_density2</key>
+ <array>
+ <real>5.9584097862243652</real>
+ <real>6.9909601211547852</real>
+ <real>0.070000000298023224</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scale</key>
+ <array>
+ <real>0.41999998688697815</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scroll_rate</key>
+ <array>
+ <real>9.9300003051757813</real>
+ <real>10.199999809265137</real>
+ </array>
+ <key>cloud_shadow</key>
+ <array>
+ <real>0.25999999046325684</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>density_multiplier</key>
+ <array>
+ <real>0.00039000000106170774</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>distance_multiplier</key>
+ <array>
+ <real>0.69999998807907104</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>east_angle</key>
+ <real>0</real>
+ <key>enable_cloud_scroll</key>
+ <array>
+ <boolean>1</boolean>
+ <boolean>1</boolean>
+ </array>
+ <key>gamma</key>
+ <array>
+ <real>1.6100000143051147</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>glow</key>
+ <array>
+ <real>5</real>
+ <real>0.0010000000474974513</real>
+ <real>-1.1599999666213989</real>
+ <real>1</real>
+ </array>
+ <key>haze_density</key>
+ <array>
+ <real>0.20999999344348907</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>haze_horizon</key>
+ <array>
+ <real>0.11999999731779099</real>
+ <real>0.19915600121021271</real>
+ <real>0.19915600121021271</real>
+ <real>1</real>
+ </array>
+ <key>lightnorm</key>
+ <array>
+ <real>0</real>
+ <real>1</real>
+ <real>-4.3711388286737929e-008</real>
+ <real>0</real>
+ </array>
+ <key>max_y</key>
+ <array>
+ <real>2250</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>preset_num</key>
+ <integer>24</integer>
+ <key>star_brightness</key>
+ <real>0</real>
+ <key>sun_angle</key>
+ <real>1.5707963705062866</real>
+ <key>sunlight_color</key>
+ <array>
+ <real>1.2599999904632568</real>
+ <real>1.2599999904632568</real>
+ <real>1.2599999904632568</real>
+ <real>1</real>
+ </array>
+ </map>
+</llsd>
diff --git a/indra/newview/app_settings/windlight/skies/Midday%204.xml b/indra/newview/app_settings/windlight/skies/Midday%204.xml
new file mode 100644
index 0000000000..255e314e0f
--- /dev/null
+++ b/indra/newview/app_settings/windlight/skies/Midday%204.xml
@@ -0,0 +1,141 @@
+<llsd>
+ <map>
+ <key>ambient</key>
+ <array>
+ <real>0.33000001311302185</real>
+ <real>0.33000001311302185</real>
+ <real>0.33000001311302185</real>
+ <real>1</real>
+ </array>
+ <key>blue_density</key>
+ <array>
+ <real>0.097999997437000275</real>
+ <real>0.2800000011920929</real>
+ <real>0.56000000238418579</real>
+ <real>0.56000000238418579</real>
+ </array>
+ <key>blue_horizon</key>
+ <array>
+ <real>0.17547200620174408</real>
+ <real>0.35094299912452698</real>
+ <real>0.61000001430511475</real>
+ <real>0.61000001430511475</real>
+ </array>
+ <key>cloud_color</key>
+ <array>
+ <real>0.5899999737739563</real>
+ <real>0.79000002145767212</real>
+ <real>0.80000001192092896</real>
+ <real>1</real>
+ </array>
+ <key>cloud_pos_density1</key>
+ <array>
+ <real>2.8148899078369141</real>
+ <real>5.6909198760986328</real>
+ <real>1</real>
+ <real>1</real>
+ </array>
+ <key>cloud_pos_density2</key>
+ <array>
+ <real>5.9584097862243652</real>
+ <real>6.9909601211547852</real>
+ <real>0.070000000298023224</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scale</key>
+ <array>
+ <real>0.32999998331069946</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scroll_rate</key>
+ <array>
+ <real>9.9300003051757813</real>
+ <real>10.199999809265137</real>
+ </array>
+ <key>cloud_shadow</key>
+ <array>
+ <real>0.22999998927116394</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>density_multiplier</key>
+ <array>
+ <real>0.00039000000106170774</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>distance_multiplier</key>
+ <array>
+ <real>0.69999998807907104</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>east_angle</key>
+ <real>0</real>
+ <key>enable_cloud_scroll</key>
+ <array>
+ <boolean>1</boolean>
+ <boolean>1</boolean>
+ </array>
+ <key>gamma</key>
+ <array>
+ <real>1.6100000143051147</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>glow</key>
+ <array>
+ <real>3.8000011444091797</real>
+ <real>0.0010000000474974513</real>
+ <real>-0.49999997019767761</real>
+ <real>1</real>
+ </array>
+ <key>haze_density</key>
+ <array>
+ <real>0.20999999344348907</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>haze_horizon</key>
+ <array>
+ <real>0.19999998807907104</real>
+ <real>0.19915600121021271</real>
+ <real>0.19915600121021271</real>
+ <real>1</real>
+ </array>
+ <key>lightnorm</key>
+ <array>
+ <real>0</real>
+ <real>1</real>
+ <real>-4.3711388286737929e-008</real>
+ <real>0</real>
+ </array>
+ <key>max_y</key>
+ <array>
+ <real>1802.800048828125</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>preset_num</key>
+ <integer>24</integer>
+ <key>star_brightness</key>
+ <real>0</real>
+ <key>sun_angle</key>
+ <real>1.5707963705062866</real>
+ <key>sunlight_color</key>
+ <array>
+ <real>1.2599999904632568</real>
+ <real>1.2599999904632568</real>
+ <real>1.2599999904632568</real>
+ <real>0.41999998688697815</real>
+ </array>
+ </map>
+</llsd>
diff --git a/indra/newview/app_settings/windlight/skies/Night.xml b/indra/newview/app_settings/windlight/skies/Night.xml
new file mode 100644
index 0000000000..c4938949ce
--- /dev/null
+++ b/indra/newview/app_settings/windlight/skies/Night.xml
@@ -0,0 +1,141 @@
+<llsd>
+ <map>
+ <key>ambient</key>
+ <array>
+ <real>0.20405027105862608</real>
+ <real>0.24246673976617727</real>
+ <real>0.32999997392212316</real>
+ <real>0.11000000166951449</real>
+ </array>
+ <key>blue_density</key>
+ <array>
+ <real>0.44999999369830818</real>
+ <real>0.44999999398335949</real>
+ <real>0.4499999944309046</real>
+ <real>1</real>
+ </array>
+ <key>blue_horizon</key>
+ <array>
+ <real>0.23999999567946317</real>
+ <real>0.23999999579784967</real>
+ <real>0.23999999583870221</real>
+ <real>1</real>
+ </array>
+ <key>cloud_color</key>
+ <array>
+ <real>0.22615400241575034</real>
+ <real>0.22615400241575034</real>
+ <real>0.22615400241575034</real>
+ <real>1</real>
+ </array>
+ <key>cloud_pos_density1</key>
+ <array>
+ <real>0.5</real>
+ <real>0.5</real>
+ <real>0.88000000953711155</real>
+ <real>1</real>
+ </array>
+ <key>cloud_pos_density2</key>
+ <array>
+ <real>0.5</real>
+ <real>0.5</real>
+ <real>0.125</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scale</key>
+ <array>
+ <real>0.41999998688697815</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scroll_rate</key>
+ <array>
+ <real>10.49940035411295</real>
+ <real>10.011000104431371</real>
+ </array>
+ <key>cloud_shadow</key>
+ <array>
+ <real>0.36000001430511475</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>density_multiplier</key>
+ <array>
+ <real>0.00030000001824737163</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>distance_multiplier</key>
+ <array>
+ <real>3.0208916693946743e-009</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>east_angle</key>
+ <real>0</real>
+ <key>enable_cloud_scroll</key>
+ <array>
+ <boolean>1</boolean>
+ <boolean>1</boolean>
+ </array>
+ <key>gamma</key>
+ <array>
+ <real>1</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>glow</key>
+ <array>
+ <real>5</real>
+ <real>0.0010000000214212465</real>
+ <real>-0.47999999165502744</real>
+ <real>1</real>
+ </array>
+ <key>haze_density</key>
+ <array>
+ <real>3.9999999963077992</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>haze_horizon</key>
+ <array>
+ <real>1.7901579546794781e-010</real>
+ <real>0.19915600437467304</real>
+ <real>0.19915600437467304</real>
+ <real>1</real>
+ </array>
+ <key>lightnorm</key>
+ <array>
+ <real>0</real>
+ <real>1</real>
+ <real>3.0028815672267228e-005</real>
+ <real>1</real>
+ </array>
+ <key>max_y</key>
+ <array>
+ <real>906.20003957594895</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>preset_num</key>
+ <integer>26</integer>
+ <key>star_brightness</key>
+ <real>2</real>
+ <key>sun_angle</key>
+ <real>4.7123589515686035</real>
+ <key>sunlight_color</key>
+ <array>
+ <real>0.34876692389196384</real>
+ <real>0.3557424864638451</real>
+ <real>0.65999994893325931</real>
+ <real>0.22000000284673543</real>
+ </array>
+ </map>
+</llsd>
diff --git a/indra/newview/app_settings/windlight/skies/Pirate.xml b/indra/newview/app_settings/windlight/skies/Pirate.xml
new file mode 100644
index 0000000000..dcb9c27ba4
--- /dev/null
+++ b/indra/newview/app_settings/windlight/skies/Pirate.xml
@@ -0,0 +1,141 @@
+<llsd>
+ <map>
+ <key>ambient</key>
+ <array>
+ <real>0.27825063467025757</real>
+ <real>0.33063584566116333</real>
+ <real>0.44999998807907104</real>
+ <real>0.14999999105930328</real>
+ </array>
+ <key>blue_density</key>
+ <array>
+ <real>0.14522500336170197</real>
+ <real>0.39999699592590332</real>
+ <real>0.80000197887420654</real>
+ <real>1</real>
+ </array>
+ <key>blue_horizon</key>
+ <array>
+ <real>0.15130999684333801</real>
+ <real>0.30000001192092896</real>
+ <real>0.35131001472473145</real>
+ <real>1</real>
+ </array>
+ <key>cloud_color</key>
+ <array>
+ <real>0.22615399956703186</real>
+ <real>0.22615399956703186</real>
+ <real>0.22615399956703186</real>
+ <real>1</real>
+ </array>
+ <key>cloud_pos_density1</key>
+ <array>
+ <real>1.2046600580215454</real>
+ <real>0.51547497510910034</real>
+ <real>1</real>
+ <real>1</real>
+ </array>
+ <key>cloud_pos_density2</key>
+ <array>
+ <real>1.2046600580215454</real>
+ <real>0.51547497510910034</real>
+ <real>0.125</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scale</key>
+ <array>
+ <real>0.41999998688697815</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scroll_rate</key>
+ <array>
+ <real>10.49940013885498</real>
+ <real>10.01099967956543</real>
+ </array>
+ <key>cloud_shadow</key>
+ <array>
+ <real>0.33064401149749756</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>density_multiplier</key>
+ <array>
+ <real>0.0003499999875202775</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>distance_multiplier</key>
+ <array>
+ <real>3.4000000953674316</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>east_angle</key>
+ <real>0</real>
+ <key>enable_cloud_scroll</key>
+ <array>
+ <boolean>1</boolean>
+ <boolean>1</boolean>
+ </array>
+ <key>gamma</key>
+ <array>
+ <real>1</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>glow</key>
+ <array>
+ <real>5</real>
+ <real>0.0010000000474974513</real>
+ <real>-0.36000001430511475</real>
+ <real>1</real>
+ </array>
+ <key>haze_density</key>
+ <array>
+ <real>0.69999998807907104</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>haze_horizon</key>
+ <array>
+ <real>0.19915600121021271</real>
+ <real>0.19915600121021271</real>
+ <real>0.19915600121021271</real>
+ <real>1</real>
+ </array>
+ <key>lightnorm</key>
+ <array>
+ <real>0</real>
+ <real>0.062790460884571075</real>
+ <real>-0.99802672863006592</real>
+ <real>0</real>
+ </array>
+ <key>max_y</key>
+ <array>
+ <real>600</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>preset_num</key>
+ <integer>27</integer>
+ <key>star_brightness</key>
+ <real>0</real>
+ <key>sun_angle</key>
+ <real>3.0787608623504639</real>
+ <key>sunlight_color</key>
+ <array>
+ <real>2.8385701179504395</real>
+ <real>2.8385701179504395</real>
+ <real>2.8385701179504395</real>
+ <real>1</real>
+ </array>
+ </map>
+</llsd>
diff --git a/indra/newview/app_settings/windlight/skies/Purple.xml b/indra/newview/app_settings/windlight/skies/Purple.xml
new file mode 100644
index 0000000000..0e9ac3f36e
--- /dev/null
+++ b/indra/newview/app_settings/windlight/skies/Purple.xml
@@ -0,0 +1,141 @@
+<llsd>
+ <map>
+ <key>ambient</key>
+ <array>
+ <real>0.1978670060634613</real>
+ <real>0.23511900007724762</real>
+ <real>0.31999999284744263</real>
+ <real>1</real>
+ </array>
+ <key>blue_density</key>
+ <array>
+ <real>0.13977900147438049</real>
+ <real>0.38499599695205688</real>
+ <real>0.76999998092651367</real>
+ <real>1</real>
+ </array>
+ <key>blue_horizon</key>
+ <array>
+ <real>0.18999999761581421</real>
+ <real>0.18999999761581421</real>
+ <real>0.18999999761581421</real>
+ <real>1</real>
+ </array>
+ <key>cloud_color</key>
+ <array>
+ <real>0.22615399956703186</real>
+ <real>0.22615399956703186</real>
+ <real>0.22615399956703186</real>
+ <real>1</real>
+ </array>
+ <key>cloud_pos_density1</key>
+ <array>
+ <real>5.3780298233032227</real>
+ <real>1.9675600528717041</real>
+ <real>1</real>
+ <real>1</real>
+ </array>
+ <key>cloud_pos_density2</key>
+ <array>
+ <real>5.3780298233032227</real>
+ <real>1.9675600528717041</real>
+ <real>0.125</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scale</key>
+ <array>
+ <real>0.41999998688697815</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scroll_rate</key>
+ <array>
+ <real>10.739999771118164</real>
+ <real>10.600000381469727</real>
+ </array>
+ <key>cloud_shadow</key>
+ <array>
+ <real>0.31000000238418579</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>density_multiplier</key>
+ <array>
+ <real>0.00052000000141561031</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>distance_multiplier</key>
+ <array>
+ <real>3.4000000953674316</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>east_angle</key>
+ <real>0</real>
+ <key>enable_cloud_scroll</key>
+ <array>
+ <boolean>1</boolean>
+ <boolean>1</boolean>
+ </array>
+ <key>gamma</key>
+ <array>
+ <real>1</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>glow</key>
+ <array>
+ <real>5</real>
+ <real>0.0010000000474974513</real>
+ <real>-0.47999998927116394</real>
+ <real>1</real>
+ </array>
+ <key>haze_density</key>
+ <array>
+ <real>1.1000000238418579</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>haze_horizon</key>
+ <array>
+ <real>0.12999999523162842</real>
+ <real>0.19915600121021271</real>
+ <real>0.19915600121021271</real>
+ <real>1</real>
+ </array>
+ <key>lightnorm</key>
+ <array>
+ <real>0</real>
+ <real>0.094108030200004578</real>
+ <real>-0.99556201696395874</real>
+ <real>0</real>
+ </array>
+ <key>max_y</key>
+ <array>
+ <real>656.20001220703125</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>preset_num</key>
+ <integer>28</integer>
+ <key>star_brightness</key>
+ <real>0</real>
+ <key>sun_angle</key>
+ <real>3.0473451614379883</real>
+ <key>sunlight_color</key>
+ <array>
+ <real>1.5</real>
+ <real>1.5299999713897705</real>
+ <real>2.8385701179504395</real>
+ <real>1</real>
+ </array>
+ </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
new file mode 100644
index 0000000000..70df6b0e60
--- /dev/null
+++ b/indra/newview/app_settings/windlight/skies/Sailor%27s%20Delight.xml
@@ -0,0 +1,141 @@
+<llsd>
+ <map>
+ <key>ambient</key>
+ <array>
+ <real>0.8399999737739563</real>
+ <real>0.090738050639629364</real>
+ <real>0.1234893873333931</real>
+ <real>0.8399999737739563</real>
+ </array>
+ <key>blue_density</key>
+ <array>
+ <real>0.93999999761581421</real>
+ <real>0.69999998807907104</real>
+ <real>0.25</real>
+ <real>0.93999999761581421</real>
+ </array>
+ <key>blue_horizon</key>
+ <array>
+ <real>1</real>
+ <real>0.59999996423721313</real>
+ <real>0.25001853704452515</real>
+ <real>1</real>
+ </array>
+ <key>cloud_color</key>
+ <array>
+ <real>0.65999996662139893</real>
+ <real>0.38999998569488525</real>
+ <real>0.22618354856967926</real>
+ <real>0.65999996662139893</real>
+ </array>
+ <key>cloud_pos_density1</key>
+ <array>
+ <real>0.76999998092651367</real>
+ <real>0.50999999046325684</real>
+ <real>1</real>
+ <real>1</real>
+ </array>
+ <key>cloud_pos_density2</key>
+ <array>
+ <real>0.5</real>
+ <real>0.5899999737739563</real>
+ <real>0.019999999552965164</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scale</key>
+ <array>
+ <real>0.26999998092651367</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scroll_rate</key>
+ <array>
+ <real>9.4499998092651367</real>
+ <real>9.4399995803833008</real>
+ </array>
+ <key>cloud_shadow</key>
+ <array>
+ <real>0.5</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>density_multiplier</key>
+ <array>
+ <real>0.00019999999494757503</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>distance_multiplier</key>
+ <array>
+ <real>6.7000002861022949</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>east_angle</key>
+ <real>3.7070791721343994</real>
+ <key>enable_cloud_scroll</key>
+ <array>
+ <boolean>1</boolean>
+ <boolean>1</boolean>
+ </array>
+ <key>gamma</key>
+ <array>
+ <real>1.4800000190734863</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>glow</key>
+ <array>
+ <real>0.79999923706054688</real>
+ <real>0.0010000000474974513</real>
+ <real>-0.94999998807907104</real>
+ <real>1</real>
+ </array>
+ <key>haze_density</key>
+ <array>
+ <real>0.89999997615814209</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>haze_horizon</key>
+ <array>
+ <real>0.29999998211860657</real>
+ <real>0.19915600121021271</real>
+ <real>0.19915600121021271</real>
+ <real>1</real>
+ </array>
+ <key>lightnorm</key>
+ <array>
+ <real>0.53160154819488525</real>
+ <real>0.12533323466777802</real>
+ <real>-0.83767020702362061</real>
+ <real>0</real>
+ </array>
+ <key>max_y</key>
+ <array>
+ <real>281.70001220703125</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>preset_num</key>
+ <integer>18</integer>
+ <key>star_brightness</key>
+ <real>1.3799999952316284</real>
+ <key>sun_angle</key>
+ <real>0.12566371262073517</real>
+ <key>sunlight_color</key>
+ <array>
+ <real>0.75</real>
+ <real>1.6800000667572021</real>
+ <real>1.0777359008789062</real>
+ <real>0.56000000238418579</real>
+ </array>
+ </map>
+</llsd>
diff --git a/indra/newview/app_settings/windlight/skies/Sheer%20Surreality.xml b/indra/newview/app_settings/windlight/skies/Sheer%20Surreality.xml
new file mode 100644
index 0000000000..4c44a1bdb2
--- /dev/null
+++ b/indra/newview/app_settings/windlight/skies/Sheer%20Surreality.xml
@@ -0,0 +1,141 @@
+<llsd>
+ <map>
+ <key>ambient</key>
+ <array>
+ <real>0</real>
+ <real>0.059999998658895493</real>
+ <real>0</real>
+ <real>0.059999998658895493</real>
+ </array>
+ <key>blue_density</key>
+ <array>
+ <real>0</real>
+ <real>0.099999994039535522</real>
+ <real>0.32999998331069946</real>
+ <real>0.32999998331069946</real>
+ </array>
+ <key>blue_horizon</key>
+ <array>
+ <real>0.029999999329447746</real>
+ <real>0</real>
+ <real>1</real>
+ <real>1</real>
+ </array>
+ <key>cloud_color</key>
+ <array>
+ <real>0.81999999284744263</real>
+ <real>0.18999999761581421</real>
+ <real>0.039999999105930328</real>
+ <real>0.81999999284744263</real>
+ </array>
+ <key>cloud_pos_density1</key>
+ <array>
+ <real>0.74000000953674316</real>
+ <real>0.93999999761581421</real>
+ <real>0.20999999344348907</real>
+ <real>1</real>
+ </array>
+ <key>cloud_pos_density2</key>
+ <array>
+ <real>0.65999996662139893</real>
+ <real>0.52999997138977051</real>
+ <real>0.0099999997764825821</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scale</key>
+ <array>
+ <real>0.14000000059604645</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>cloud_scroll_rate</key>
+ <array>
+ <real>18</real>
+ <real>20</real>
+ </array>
+ <key>cloud_shadow</key>
+ <array>
+ <real>0.37999999523162842</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>density_multiplier</key>
+ <array>
+ <real>0.00018000000272877514</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>distance_multiplier</key>
+ <array>
+ <real>6.7000002861022949</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>east_angle</key>
+ <real>2.3247785568237305</real>
+ <key>enable_cloud_scroll</key>
+ <array>
+ <boolean>1</boolean>
+ <boolean>1</boolean>
+ </array>
+ <key>gamma</key>
+ <array>
+ <real>1.9499999284744263</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>glow</key>
+ <array>
+ <real>17.399999618530273</real>
+ <real>0.0010000000474974513</real>
+ <real>-0.64999997615814209</real>
+ <real>1</real>
+ </array>
+ <key>haze_density</key>
+ <array>
+ <real>0.40999999642372131</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>haze_horizon</key>
+ <array>
+ <real>0.17000000178813934</real>
+ <real>0.19915600121021271</real>
+ <real>0.19915600121021271</real>
+ <real>1</real>
+ </array>
+ <key>lightnorm</key>
+ <array>
+ <real>-0.72322052717208862</real>
+ <real>0.12533323466777802</real>
+ <real>-0.67914927005767822</real>
+ <real>0</real>
+ </array>
+ <key>max_y</key>
+ <array>
+ <real>263</real>
+ <real>0</real>
+ <real>0</real>
+ <real>1</real>
+ </array>
+ <key>preset_num</key>
+ <integer>24</integer>
+ <key>star_brightness</key>
+ <real>1.0399999618530273</real>
+ <key>sun_angle</key>
+ <real>0.12566371262073517</real>
+ <key>sunlight_color</key>
+ <array>
+ <real>1.5899999141693115</real>
+ <real>1.5299999713897705</real>
+ <real>0.53999996185302734</real>
+ <real>1.5899999141693115</real>
+ </array>
+ </map>
+</llsd>
diff --git a/indra/newview/app_settings/windlight/water/Default.xml b/indra/newview/app_settings/windlight/water/Default.xml
new file mode 100644
index 0000000000..dce4148c7d
--- /dev/null
+++ b/indra/newview/app_settings/windlight/water/Default.xml
@@ -0,0 +1,43 @@
+<llsd>
+ <map>
+ <key>blurMultiplier</key>
+ <real>0.040000002831220627</real>
+ <key>fresnelOffset</key>
+ <real>0.5</real>
+ <key>fresnelScale</key>
+ <real>0.39999997615814209</real>
+ <key>normScale</key>
+ <array>
+ <integer>2</integer>
+ <integer>2</integer>
+ <integer>2</integer>
+ </array>
+ <key>normalMap</key>
+ <uuid>822ded49-9a6c-f61c-cb89-6df54f42cdf4</uuid>
+ <key>scaleAbove</key>
+ <real>0.029999999329447746</real>
+ <key>scaleBelow</key>
+ <real>0.20000000298023224</real>
+ <key>underWaterFogMod</key>
+ <real>0.25</real>
+ <key>waterFogColor</key>
+ <array>
+ <real>0.015686275437474251</real>
+ <real>0.14901961386203766</real>
+ <real>0.25098040699958801</real>
+ <real>1</real>
+ </array>
+ <key>waterFogDensity</key>
+ <real>16</real>
+ <key>wave1Dir</key>
+ <array>
+ <real>1.0499997138977051</real>
+ <real>-0.42000007629394531</real>
+ </array>
+ <key>wave2Dir</key>
+ <array>
+ <real>1.1099996566772461</real>
+ <real>-1.1600000858306885</real>
+ </array>
+ </map>
+</llsd>
diff --git a/indra/newview/app_settings/windlight/water/Glassy.xml b/indra/newview/app_settings/windlight/water/Glassy.xml
new file mode 100644
index 0000000000..01183e4687
--- /dev/null
+++ b/indra/newview/app_settings/windlight/water/Glassy.xml
@@ -0,0 +1,43 @@
+<llsd>
+ <map>
+ <key>blurMultiplier</key>
+ <real>0.003000000026077032089233398</real>
+ <key>fresnelOffset</key>
+ <real>0.579999983310699462890625</real>
+ <key>fresnelScale</key>
+ <real>0.0999999940395355224609375</real>
+ <key>normScale</key>
+ <array>
+ <integer>2</integer>
+ <integer>2</integer>
+ <integer>2</integer>
+ </array>
+ <key>normalMap</key>
+ <uuid>822ded49-9a6c-f61c-cb89-6df54f42cdf4</uuid>
+ <key>scaleAbove</key>
+ <real>0.07999999821186065673828125</real>
+ <key>scaleBelow</key>
+ <real>0.2000000029802322387695312</real>
+ <key>underWaterFogMod</key>
+ <real>0.25</real>
+ <key>waterFogColor</key>
+ <array>
+ <real>0.04999999701976776123046875</real>
+ <real>0.37999999523162841796875</real>
+ <real>0.5299999713897705078125</real>
+ <real>0.5299999713897705078125</real>
+ </array>
+ <key>waterFogDensity</key>
+ <real>1</real>
+ <key>wave1Dir</key>
+ <array>
+ <real>0.5</real>
+ <real>-0.1700000017881393432617188</real>
+ </array>
+ <key>wave2Dir</key>
+ <array>
+ <real>0.579999983310699462890625</real>
+ <real>-0.670000016689300537109375</real>
+ </array>
+ </map>
+</llsd>
diff --git a/indra/newview/app_settings/windlight/water/Murky.xml b/indra/newview/app_settings/windlight/water/Murky.xml
new file mode 100644
index 0000000000..1d9e022422
--- /dev/null
+++ b/indra/newview/app_settings/windlight/water/Murky.xml
@@ -0,0 +1,43 @@
+<llsd>
+ <map>
+ <key>blurMultiplier</key>
+ <real>0.0030000000260770321</real>
+ <key>fresnelOffset</key>
+ <real>0.39999997615814209</real>
+ <key>fresnelScale</key>
+ <real>0.5</real>
+ <key>normScale</key>
+ <array>
+ <integer>2</integer>
+ <integer>2</integer>
+ <integer>2</integer>
+ </array>
+ <key>normalMap</key>
+ <uuid>822ded49-9a6c-f61c-cb89-6df54f42cdf4</uuid>
+ <key>scaleAbove</key>
+ <real>0.079999998211860657</real>
+ <key>scaleBelow</key>
+ <real>0.20000000298023224</real>
+ <key>underWaterFogMod</key>
+ <real>0.76999998092651367</real>
+ <key>waterFogColor</key>
+ <array>
+ <real>0.08999999612569809</real>
+ <real>0.17000000178813934</real>
+ <real>0.20999999344348907</real>
+ <real>0.20999999344348907</real>
+ </array>
+ <key>waterFogDensity</key>
+ <real>16</real>
+ <key>wave1Dir</key>
+ <array>
+ <real>0.5</real>
+ <real>-0.17000000178813934</real>
+ </array>
+ <key>wave2Dir</key>
+ <array>
+ <real>0.57999998331069946</real>
+ <real>-0.67000001668930054</real>
+ </array>
+ </map>
+</llsd>
diff --git a/indra/newview/app_settings/windlight/water/Pond.xml b/indra/newview/app_settings/windlight/water/Pond.xml
new file mode 100644
index 0000000000..59e3c441ea
--- /dev/null
+++ b/indra/newview/app_settings/windlight/water/Pond.xml
@@ -0,0 +1,43 @@
+<llsd>
+ <map>
+ <key>blurMultiplier</key>
+ <real>0.0030000000260770321</real>
+ <key>fresnelOffset</key>
+ <real>0.50999999046325684</real>
+ <key>fresnelScale</key>
+ <real>0.099999994039535522</real>
+ <key>normScale</key>
+ <array>
+ <integer>2</integer>
+ <integer>2</integer>
+ <integer>2</integer>
+ </array>
+ <key>normalMap</key>
+ <uuid>822ded49-9a6c-f61c-cb89-6df54f42cdf4</uuid>
+ <key>scaleAbove</key>
+ <real>0.079999998211860657</real>
+ <key>scaleBelow</key>
+ <real>0.20000000298023224</real>
+ <key>underWaterFogMod</key>
+ <real>0.25</real>
+ <key>waterFogColor</key>
+ <array>
+ <real>0.059999998658895493</real>
+ <real>0.37999999523162842</real>
+ <real>0.52999997138977051</real>
+ <real>0.52999997138977051</real>
+ </array>
+ <key>waterFogDensity</key>
+ <real>2.1000001430511475</real>
+ <key>wave1Dir</key>
+ <array>
+ <real>0.5</real>
+ <real>-0.17000000178813934</real>
+ </array>
+ <key>wave2Dir</key>
+ <array>
+ <real>0.57999998331069946</real>
+ <real>-0.67000001668930054</real>
+ </array>
+ </map>
+</llsd>
diff --git a/indra/newview/app_settings/windlight/water/SNAKE%21%21%21.xml b/indra/newview/app_settings/windlight/water/SNAKE%21%21%21.xml
new file mode 100644
index 0000000000..6dbc4e8719
--- /dev/null
+++ b/indra/newview/app_settings/windlight/water/SNAKE%21%21%21.xml
@@ -0,0 +1,43 @@
+<llsd>
+ <map>
+ <key>blurMultiplier</key>
+ <real>0.0030000000260770321</real>
+ <key>fresnelOffset</key>
+ <real>0.57999998331069946</real>
+ <key>fresnelScale</key>
+ <real>0.099999994039535522</real>
+ <key>normScale</key>
+ <array>
+ <real>10</real>
+ <real>10</real>
+ <real>10</real>
+ </array>
+ <key>normalMap</key>
+ <uuid>470626e3-ac38-8554-d49b-90311c0176a9</uuid>
+ <key>scaleAbove</key>
+ <real>0.91999995708465576</real>
+ <key>scaleBelow</key>
+ <real>0.93999999761581421</real>
+ <key>underWaterFogMod</key>
+ <real>0.25</real>
+ <key>waterFogColor</key>
+ <array>
+ <real>0.049999997019767761</real>
+ <real>0.37999999523162842</real>
+ <real>0.52999997138977051</real>
+ <real>0.52999997138977051</real>
+ </array>
+ <key>waterFogDensity</key>
+ <real>3.2000000476837158</real>
+ <key>wave1Dir</key>
+ <array>
+ <real>0.5</real>
+ <real>-0.17000000178813934</real>
+ </array>
+ <key>wave2Dir</key>
+ <array>
+ <real>0.57999998331069946</real>
+ <real>-0.67000001668930054</real>
+ </array>
+ </map>
+</llsd>
diff --git a/indra/newview/app_settings/windlight/water/Second%20Plague.xml b/indra/newview/app_settings/windlight/water/Second%20Plague.xml
new file mode 100644
index 0000000000..137483ab64
--- /dev/null
+++ b/indra/newview/app_settings/windlight/water/Second%20Plague.xml
@@ -0,0 +1,43 @@
+<llsd>
+ <map>
+ <key>blurMultiplier</key>
+ <real>0.017000000923871994</real>
+ <key>fresnelOffset</key>
+ <real>0.37000000476837158</real>
+ <key>fresnelScale</key>
+ <real>0</real>
+ <key>normScale</key>
+ <array>
+ <integer>2</integer>
+ <integer>2</integer>
+ <integer>2</integer>
+ </array>
+ <key>normalMap</key>
+ <uuid>822ded49-9a6c-f61c-cb89-6df54f42cdf4</uuid>
+ <key>scaleAbove</key>
+ <real>0.079999998211860657</real>
+ <key>scaleBelow</key>
+ <real>0.20000000298023224</real>
+ <key>underWaterFogMod</key>
+ <real>0.85999995470046997</real>
+ <key>waterFogColor</key>
+ <array>
+ <real>0.48999997973442078</real>
+ <real>0</real>
+ <real>0</real>
+ <real>0.48999997973442078</real>
+ </array>
+ <key>waterFogDensity</key>
+ <real>20</real>
+ <key>wave1Dir</key>
+ <array>
+ <real>0.5</real>
+ <real>-0.17000000178813934</real>
+ </array>
+ <key>wave2Dir</key>
+ <array>
+ <real>0.57999998331069946</real>
+ <real>-0.67000001668930054</real>
+ </array>
+ </map>
+</llsd>
diff --git a/indra/newview/app_settings/windlight/water/Valdez.xml b/indra/newview/app_settings/windlight/water/Valdez.xml
new file mode 100644
index 0000000000..eb70a142e0
--- /dev/null
+++ b/indra/newview/app_settings/windlight/water/Valdez.xml
@@ -0,0 +1,43 @@
+<llsd>
+ <map>
+ <key>blurMultiplier</key>
+ <real>0.0020000000949949026</real>
+ <key>fresnelOffset</key>
+ <real>0.28999999165534973</real>
+ <key>fresnelScale</key>
+ <real>0</real>
+ <key>normScale</key>
+ <array>
+ <integer>2</integer>
+ <integer>2</integer>
+ <integer>2</integer>
+ </array>
+ <key>normalMap</key>
+ <uuid>822ded49-9a6c-f61c-cb89-6df54f42cdf4</uuid>
+ <key>scaleAbove</key>
+ <real>0.079999998211860657</real>
+ <key>scaleBelow</key>
+ <real>0.20000000298023224</real>
+ <key>underWaterFogMod</key>
+ <real>1</real>
+ <key>waterFogColor</key>
+ <array>
+ <real>0</real>
+ <real>0</real>
+ <real>0</real>
+ <real>0</real>
+ </array>
+ <key>waterFogDensity</key>
+ <real>1024</real>
+ <key>wave1Dir</key>
+ <array>
+ <real>0.5</real>
+ <real>-0.17000000178813934</real>
+ </array>
+ <key>wave2Dir</key>
+ <array>
+ <real>0.57999998331069946</real>
+ <real>-0.67000001668930054</real>
+ </array>
+ </map>
+</llsd>