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.glsl9
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl19
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/alphaV.glsl18
4 files changed, 5 insertions, 43 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
index f63e2f7198..94ce8a658a 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
@@ -56,8 +56,6 @@ VARYING vec3 vary_fragcoord;
VARYING vec3 vary_position;
VARYING vec3 vary_pointlight_col;
VARYING vec2 vary_texcoord0;
-VARYING vec2 vary_texcoord1;
-VARYING vec2 vary_texcoord2;
VARYING vec3 vary_norm;
VARYING mat3 vary_rotation;
@@ -135,11 +133,8 @@ void main()
float vertex_color_alpha = vertex_color.a;
#endif
- 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]));
-
+ 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 e6b63657e6..76277069d5 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl
@@ -40,9 +40,6 @@ void passTextureIndex();
ATTRIBUTE vec3 normal;
ATTRIBUTE vec4 diffuse_color;
ATTRIBUTE vec2 texcoord0;
-ATTRIBUTE vec3 binormal;
-ATTRIBUTE vec2 texcoord1;
-ATTRIBUTE vec2 texcoord2;
#if HAS_SKIN
mat4 getObjectSkinnedTransform();
@@ -71,11 +68,8 @@ VARYING vec4 vertex_color;
#endif
VARYING vec2 vary_texcoord0;
-VARYING vec2 vary_texcoord1;
-VARYING vec2 vary_texcoord2;
VARYING vec3 vary_norm;
-VARYING mat3 vary_rotation;
uniform float near_clip;
uniform float shadow_offset;
@@ -159,8 +153,7 @@ void main()
pos = (modelview_matrix * vert);
gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0);
#endif
- vary_texcoord1 = (texture_matrix0 * vec4(texcoord1,0,1)).xy;
- vary_texcoord2 = (texture_matrix0 * vec4(texcoord2,0,1)).xy;
+
#if INDEX_MODE == INDEXED
passTextureIndex();
vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
@@ -169,17 +162,7 @@ void main()
#endif
vary_norm = norm;
- float dp_directional_light = max(0.0, dot(norm, light_position[0].xyz));
- vary_position = pos.xyz + light_position[0].xyz * (1.0-dp_directional_light)*shadow_offset;
- vec3 n = norm;
- vec3 b = normalize(normal_matrix * binormal);
- vec3 t = cross(b, n);
-
- vary_rotation[0] = vec3(t.x, b.x, n.x);
- vary_rotation[1] = vec3(t.y, b.y, n.y);
- vary_rotation[2] = vec3(t.z, b.z, n.z);
-
calcAtmospherics(pos.xyz);
//vec4 color = calcLighting(pos.xyz, norm, diffuse_color, vec4(0.));
diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
index 293613e74c..c765962352 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 = vec3(0,0,1);
+ vec3 normal = vary_norm;
vec3 l = light_position[0].xyz;
vec3 dlight = calcDirectionalLight(normal, l);
diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaV.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaV.glsl
index 5f2961c90e..63953b37bf 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/alphaV.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/alphaV.glsl
@@ -40,10 +40,6 @@ void passTextureIndex();
ATTRIBUTE vec3 normal;
ATTRIBUTE vec4 diffuse_color;
ATTRIBUTE vec2 texcoord0;
-ATTRIBUTE vec3 binormal;
-ATTRIBUTE vec2 texcoord1;
-ATTRIBUTE vec2 texcoord2;
-
#if HAS_SKIN
mat4 getObjectSkinnedTransform();
@@ -72,11 +68,8 @@ VARYING vec4 vertex_color;
#endif
VARYING vec2 vary_texcoord0;
-VARYING vec2 vary_texcoord1;
-VARYING vec2 vary_texcoord2;
VARYING vec3 vary_norm;
-VARYING mat3 vary_rotation;
uniform float near_clip;
uniform float shadow_offset;
@@ -160,8 +153,7 @@ void main()
pos = (modelview_matrix * vert);
gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0);
#endif
- vary_texcoord1 = (texture_matrix0 * vec4(texcoord1,0,1)).xy;
- vary_texcoord2 = (texture_matrix0 * vec4(texcoord2,0,1)).xy;
+
#if INDEX_MODE == INDEXED
passTextureIndex();
vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
@@ -173,14 +165,6 @@ void main()
float dp_directional_light = max(0.0, dot(norm, light_position[0].xyz));
vary_position = pos.xyz + light_position[0].xyz * (1.0-dp_directional_light)*shadow_offset;
- vec3 n = norm;
- vec3 b = normalize(normal_matrix * binormal);
- vec3 t = cross(b, n);
-
- vary_rotation[0] = vec3(t.x, b.x, n.x);
- vary_rotation[1] = vec3(t.y, b.y, n.y);
- vary_rotation[2] = vec3(t.z, b.z, n.z);
-
calcAtmospherics(pos.xyz);
//vec4 color = calcLighting(pos.xyz, norm, diffuse_color, vec4(0.));