From 6d52efe452aa8469e0343da1c7d108f3f52ab651 Mon Sep 17 00:00:00 2001 From: Brad Kittenbrink Date: Wed, 27 Feb 2008 18:58:14 +0000 Subject: 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 --- .../shaders/class1/windlight/atmosphericsF.glsl | 13 +++++++++ .../class1/windlight/atmosphericsHelpersV.glsl | 34 ++++++++++++++++++++++ .../shaders/class1/windlight/atmosphericsV.glsl | 15 ++++++++++ .../class1/windlight/atmosphericsVarsF.glsl | 13 +++++++++ .../class1/windlight/atmosphericsVarsV.glsl | 19 ++++++++++++ .../shaders/class1/windlight/gammaF.glsl | 19 ++++++++++++ .../shaders/class1/windlight/transportF.glsl | 26 +++++++++++++++++ 7 files changed, 139 insertions(+) create mode 100644 indra/newview/app_settings/shaders/class1/windlight/atmosphericsF.glsl create mode 100644 indra/newview/app_settings/shaders/class1/windlight/atmosphericsHelpersV.glsl create mode 100644 indra/newview/app_settings/shaders/class1/windlight/atmosphericsV.glsl create mode 100644 indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsF.glsl create mode 100644 indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsV.glsl create mode 100644 indra/newview/app_settings/shaders/class1/windlight/gammaF.glsl create mode 100644 indra/newview/app_settings/shaders/class1/windlight/transportF.glsl (limited to 'indra/newview/app_settings/shaders/class1/windlight') 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; +} + -- cgit v1.2.3