summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1/objects
diff options
context:
space:
mode:
authorBrad Kittenbrink <brad@lindenlab.com>2008-02-27 18:58:14 +0000
committerBrad Kittenbrink <brad@lindenlab.com>2008-02-27 18:58:14 +0000
commit6d52efe452aa8469e0343da1c7d108f3f52ab651 (patch)
treea87be48e9840d7fc1f7ee514d7c7f994e71fdb3c /indra/newview/app_settings/shaders/class1/objects
parent6027ad2630b8650cabcf00628ee9b0d25bedd67f (diff)
Merge of windlight into release (QAR-286). This includes all changes in
windlight14 which have passed QA (up through r79932). svn merge -r 80831:80833 svn+ssh://svn.lindenlab.com/svn/linden/branches/merge_windlight14_r80620
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/objects')
-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
11 files changed, 160 insertions, 27 deletions
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();
+}