summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/app_settings/shaders')
-rw-r--r--indra/newview/app_settings/shaders/class1/avatar/avatarV.glsl5
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/avatarAlphaV.glsl10
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/simpleNoColorV.glsl6
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/avatarAlphaV.glsl7
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsV.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class3/avatar/avatarV.glsl6
6 files changed, 24 insertions, 14 deletions
diff --git a/indra/newview/app_settings/shaders/class1/avatar/avatarV.glsl b/indra/newview/app_settings/shaders/class1/avatar/avatarV.glsl
index 2901e18db8..19203ab670 100644
--- a/indra/newview/app_settings/shaders/class1/avatar/avatarV.glsl
+++ b/indra/newview/app_settings/shaders/class1/avatar/avatarV.glsl
@@ -32,6 +32,7 @@ ATTRIBUTE vec2 texcoord0;
VARYING vec4 vertex_color;
VARYING vec2 vary_texcoord0;
+uniform vec4 color;
vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
mat4 getSkinnedTransform();
@@ -61,8 +62,8 @@ void main()
calcAtmospherics(pos.xyz);
- vec4 color = calcLighting(pos.xyz, norm, vec4(1,1,1,1), vec4(0,0,0,0));
- vertex_color = color;
+ vec4 col = calcLighting(pos.xyz, norm, color, vec4(0,0,0,0));
+ vertex_color = col;
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/avatarAlphaV.glsl b/indra/newview/app_settings/shaders/class1/deferred/avatarAlphaV.glsl
index acbc3f7e15..d7b90978ba 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/avatarAlphaV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/avatarAlphaV.glsl
@@ -52,6 +52,8 @@ VARYING vec2 vary_texcoord0;
uniform float near_clip;
+uniform vec4 color;
+
uniform vec4 light_position[8];
uniform vec3 light_direction[8];
uniform vec3 light_attenuation[8];
@@ -123,17 +125,17 @@ void main()
col.rgb += light_diffuse[6].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[6], light_direction[6], light_attenuation[6].x, light_attenuation[6].y, light_attenuation[6].z);
col.rgb += light_diffuse[7].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[7], light_direction[7], light_attenuation[7].x, light_attenuation[7].y, light_attenuation[7].z);
- vary_pointlight_col = col.rgb;
+ vary_pointlight_col = col.rgb*color.rgb;
col.rgb = vec3(0,0,0);
// Add windlight lights
col.rgb = atmosAmbient(vec3(0.));
- vary_ambient = col.rgb;
- vary_directional = atmosAffectDirectionalLight(max(calcDirectionalLight(norm, light_position[0].xyz), 0.0));
+ vary_ambient = col.rgb*color.rgb;
+ vary_directional = color.rgb*atmosAffectDirectionalLight(max(calcDirectionalLight(norm, light_position[0].xyz), 0.0));
- col.rgb = min(col.rgb, 1.0);
+ col.rgb = col.rgb * color.rgb;
vertex_color = col;
diff --git a/indra/newview/app_settings/shaders/class1/objects/simpleNoColorV.glsl b/indra/newview/app_settings/shaders/class1/objects/simpleNoColorV.glsl
index 706627e175..0be52a52af 100644
--- a/indra/newview/app_settings/shaders/class1/objects/simpleNoColorV.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/simpleNoColorV.glsl
@@ -28,6 +28,8 @@ uniform mat4 texture_matrix0;
uniform mat4 modelview_matrix;
uniform mat4 modelview_projection_matrix;
+uniform vec4 color;
+
ATTRIBUTE vec3 position;
ATTRIBUTE vec3 normal;
ATTRIBUTE vec2 texcoord0;
@@ -50,8 +52,8 @@ void main()
calcAtmospherics(pos.xyz);
- vec4 color = calcLighting(pos.xyz, norm, vec4(1,1,1,1), vec4(0.));
- vertex_color = color;
+ vec4 col = calcLighting(pos.xyz, norm, color, vec4(0.));
+ vertex_color = col;
}
diff --git a/indra/newview/app_settings/shaders/class2/deferred/avatarAlphaV.glsl b/indra/newview/app_settings/shaders/class2/deferred/avatarAlphaV.glsl
index 63c7a6b13d..9c7a332417 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/avatarAlphaV.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/avatarAlphaV.glsl
@@ -49,6 +49,7 @@ VARYING vec3 vary_pointlight_col;
VARYING vec4 vertex_color;
VARYING vec2 vary_texcoord0;
+uniform vec4 color;
uniform float near_clip;
uniform float shadow_offset;
@@ -125,17 +126,17 @@ void main()
col.rgb += light_diffuse[6].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[6], light_direction[6], light_attenuation[6].x, light_attenuation[6].y, light_attenuation[6].z);
col.rgb += light_diffuse[7].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[7], light_direction[7], light_attenuation[7].x, light_attenuation[7].y, light_attenuation[7].z);
- vary_pointlight_col = col.rgb;
+ vary_pointlight_col = col.rgb*color.rgb;
col.rgb = vec3(0,0,0);
// Add windlight lights
col.rgb = atmosAmbient(vec3(0.));
- vary_ambient = col.rgb;
+ vary_ambient = col.rgb*color.rgb;
vary_directional = atmosAffectDirectionalLight(max(calcDirectionalLight(norm, light_position[0].xyz), 0.0));
- col.rgb = min(col.rgb, 1.0);
+ col.rgb = col.rgb*color.rgb;
vertex_color = col;
diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsV.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsV.glsl
index 01605e5b25..ba2ed6b1ce 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsV.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsV.glsl
@@ -27,6 +27,7 @@
VARYING vec3 vary_AdditiveColor;
VARYING float vary_AtmosAttenuation;
+vec3 additive_color;
vec3 atmos_attenuation;
vec3 sunlit_color;
vec3 amblit_color;
@@ -43,7 +44,7 @@ vec3 getAmblitColor()
vec3 getAdditiveColor()
{
- return vary_AdditiveColor;
+ return additive_color;
}
vec3 getAtmosAttenuation()
{
@@ -72,6 +73,7 @@ void setAmblitColor(vec3 v)
void setAdditiveColor(vec3 v)
{
+ additive_color = v;
vary_AdditiveColor = v;
}
diff --git a/indra/newview/app_settings/shaders/class3/avatar/avatarV.glsl b/indra/newview/app_settings/shaders/class3/avatar/avatarV.glsl
index 7fb3cb6552..721054b5ad 100644
--- a/indra/newview/app_settings/shaders/class3/avatar/avatarV.glsl
+++ b/indra/newview/app_settings/shaders/class3/avatar/avatarV.glsl
@@ -37,6 +37,8 @@ vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
mat4 getSkinnedTransform();
void calcAtmospherics(vec3 inPositionEye);
+uniform vec4 color;
+
uniform vec4 gWindDir;
uniform vec4 gSinWaveParams;
uniform vec4 gGravity;
@@ -125,8 +127,8 @@ void main()
calcAtmospherics(pos.xyz);
- vec4 color = calcLighting(pos.xyz, norm, vec4(1,1,1,1), vec4(0.0));
- vertex_color = color;
+ vec4 col = calcLighting(pos.xyz, norm, color, vec4(0.0));
+ vertex_color = col;
gl_Position = projection_matrix * pos;
}