summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1/windlight
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/windlight')
-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
7 files changed, 139 insertions, 0 deletions
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;
+}
+