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/deferred/alphaF.glsl5
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/materialF.glsl7
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl5
3 files changed, 10 insertions, 7 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
index e8cbf318a1..f63e2f7198 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
@@ -72,7 +72,6 @@ uniform vec3 light_direction[8];
uniform vec3 light_attenuation[8];
uniform vec3 light_diffuse[8];
-uniform sampler2D bumpMap;
uniform samplerCube environmentMap;
uniform mat3 env_mat;
@@ -125,7 +124,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
@@ -136,7 +135,7 @@ void main()
float vertex_color_alpha = vertex_color.a;
#endif
- vec3 normal = texture2D(bumpMap, vary_texcoord1.xy).xyz * 2 - 1;
+ vec3 normal = vec3(0,0,1);
normal = vec3(dot(normal.xyz, vary_rotation[0]),
dot(normal.xyz, vary_rotation[1]),
dot(normal.xyz, vary_rotation[2]));
diff --git a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl
index 79a06bed2c..9674d9e88e 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl
@@ -566,11 +566,13 @@ void main()
col *= diffuse.rgb;
+ vec3 refnormpersp = normalize(reflect(pos.xyz, norm.xyz));
+
if (spec.a > 0.0) // specular reflection
{
// the old infinite-sky shiny reflection
//
- vec3 refnormpersp = normalize(reflect(pos.xyz, norm.xyz));
+
float sa = dot(refnormpersp, sun_dir.xyz);
vec3 dumbshiny = vary_SunlitColor*shadow*(texture2D(lightFunc, vec2(sa, spec.a)).r);
@@ -578,7 +580,10 @@ void main()
vec3 spec_contrib = dumbshiny * spec.rgb;
bloom = dot(spec_contrib, spec_contrib) / 6;
col += spec_contrib;
+ }
+ if (envIntensity > 0.0)
+ {
//add environmentmap
vec3 env_vec = env_mat * refnormpersp;
col = mix(col.rgb, textureCube(environmentMap, env_vec).rgb,
diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
index 5faa94fb03..293613e74c 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
@@ -217,7 +217,7 @@ void main()
float vertex_color_alpha = vertex_color.a;
#endif
- vec3 normal = texture2D(bumpMap, vary_texcoord1.xy).xyz * 2 - 1;
+ vec3 normal = vec3(0,0,1);
vec3 l = light_position[0].xyz;
vec3 dlight = calcDirectionalLight(normal, l);
@@ -244,7 +244,6 @@ void main()
color.rgb += diff.rgb * vary_pointlight_col * col.rgb;
- frag_color = vec4(1,0,1,1);
- //frag_color = color;
+ frag_color = color;
}