summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1/deferred/bumpV.glsl
diff options
context:
space:
mode:
authorAura Linden <aura@lindenlab.com>2013-07-11 17:49:13 -0700
committerAura Linden <aura@lindenlab.com>2013-07-11 17:49:13 -0700
commitce9962b33872db65b70c9b10901ec9062cb59169 (patch)
tree94be5367128e241ef1c6f802e8551a9b4ed786ff /indra/newview/app_settings/shaders/class1/deferred/bumpV.glsl
parent8642f57dd95864ec6b002f6519701f30866c6502 (diff)
parent6060e5e46acbeb20a301070a0fd0efea029d33d0 (diff)
Merged in viewer-release
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred/bumpV.glsl')
-rwxr-xr-x[-rw-r--r--]indra/newview/app_settings/shaders/class1/deferred/bumpV.glsl6
1 files changed, 3 insertions, 3 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/bumpV.glsl b/indra/newview/app_settings/shaders/class1/deferred/bumpV.glsl
index c8d38bb8f7..9f9749394e 100644..100755
--- a/indra/newview/app_settings/shaders/class1/deferred/bumpV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/bumpV.glsl
@@ -31,7 +31,7 @@ ATTRIBUTE vec3 position;
ATTRIBUTE vec4 diffuse_color;
ATTRIBUTE vec3 normal;
ATTRIBUTE vec2 texcoord0;
-ATTRIBUTE vec3 binormal;
+ATTRIBUTE vec4 tangent;
VARYING vec3 vary_mat0;
VARYING vec3 vary_mat1;
@@ -46,8 +46,8 @@ void main()
vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
vec3 n = normalize(normal_matrix * normal);
- vec3 b = normalize(normal_matrix * binormal);
- vec3 t = cross(b, n);
+ vec3 t = normalize(normal_matrix * tangent.xyz);
+ vec3 b = cross(n, t) * tangent.w;
vary_mat0 = vec3(t.x, b.x, n.x);
vary_mat1 = vec3(t.y, b.y, n.y);