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/shaders/class1/deferred/alphaF.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl13
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/alphaV.glsl4
4 files changed, 12 insertions, 11 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
index d175d2b518..17ac5a276d 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
@@ -105,7 +105,7 @@ void main()
vec4 pos = vec4(vary_position, 1.0);
#if INDEX_MODE == INDEXED
- vec4 diff = diffuseLookup(vary_texcoord0.xy);
+ vec4 diff= diffuseLookup(vary_texcoord0.xy);
#else
vec4 diff = texture2D(diffuseMap,vary_texcoord0.xy);
#endif
@@ -117,7 +117,7 @@ void main()
#endif
vec3 normal = vary_norm;
-
+
vec3 l = light_position[0].xyz;
vec3 dlight = calcDirectionalLight(normal, l);
dlight = dlight * vary_directional.rgb * vary_pointlight_col;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl
index 4c26621a88..a4b4cd51e3 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl
@@ -80,13 +80,13 @@ uniform vec3 light_direction[8];
uniform vec3 light_attenuation[8];
uniform vec3 light_diffuse[8];
-float calcDirectionalLight(vec3 n, vec3 l)
+vec3 calcDirectionalLight(vec3 n, vec3 l)
{
float a = max(dot(n,l),0.0);
- return a;
+ return vec3(a,a,a);
}
-float calcPointLightOrSpotLight(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, float fa, float is_pointlight)
+vec3 calcPointLightOrSpotLight(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, float fa, float is_pointlight)
{
//get light vector
vec3 lv = lp.xyz-v;
@@ -113,7 +113,7 @@ float calcPointLightOrSpotLight(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, floa
da *= max(dot(n, lv), 0.0);
}
- return da;
+ return vec3(da,da,da);
}
void main()
@@ -177,10 +177,11 @@ void main()
col.rgb = vec3(0,0,0);
// Add windlight lights
- col.rgb = atmosAmbient(vec3(0.));
+ col.rgb = atmosAmbient(col.rgb);
vary_ambient = col.rgb*diffuse_color.rgb;
- vary_directional.rgb = atmosAffectDirectionalLight(1);
+
+ vary_directional.rgb = atmosAffectDirectionalLight(1.0f);
col.rgb = col.rgb*diffuse_color.rgb;
#if INDEX_MODE != NON_INDEXED_NO_COLOR
diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
index db58c19057..59950a88ef 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
@@ -211,7 +211,7 @@ void main()
#endif
vec3 normal = vary_norm;
-
+
vec3 l = light_position[0].xyz;
vec3 dlight = calcDirectionalLight(normal, l);
dlight = dlight * vary_directional.rgb * vary_pointlight_col;
diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaV.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaV.glsl
index 46fd8da4f8..dc4dd5d5e9 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/alphaV.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/alphaV.glsl
@@ -176,14 +176,14 @@ void main()
//vec4 color = calcLighting(pos.xyz, norm, diffuse_color, vec4(0.));
vec4 col = vec4(0.0, 0.0, 0.0, diffuse_color.a);
- vec3 dff = pow(diffuse_color.rgb, vec3(2.2));
+ vec3 dff = pow(diffuse_color.rgb, vec3(2.2f,2.2f,2.2f));
vary_pointlight_col = dff;
col.rgb = vec3(0,0,0);
// Add windlight lights
- col.rgb = atmosAmbient(vec3(0.));
+ col.rgb = atmosAmbient(col.rgb);
vary_directional.rgb = atmosAffectDirectionalLight(1);
vary_ambient = col.rgb*dff;