diff options
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred/pbropaqueV.glsl')
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/pbropaqueV.glsl | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/pbropaqueV.glsl b/indra/newview/app_settings/shaders/class1/deferred/pbropaqueV.glsl index a2606ed771..e17d91af38 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/pbropaqueV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/pbropaqueV.glsl @@ -59,13 +59,7 @@ ATTRIBUTE vec2 texcoord0; ATTRIBUTE vec4 tangent; ATTRIBUTE vec2 texcoord1; -VARYING vec3 vary_mat0; -VARYING vec3 vary_mat1; -VARYING vec3 vary_mat2; - VARYING vec2 vary_texcoord1; -#else -VARYING vec3 vary_normal; #endif #ifdef HAS_SPECULAR_MAP @@ -75,6 +69,10 @@ VARYING vec2 vary_texcoord2; VARYING vec4 vertex_color; VARYING vec2 vary_texcoord0; +VARYING vec3 vary_tangent; +flat out float vary_sign; + +VARYING vec3 vary_normal; void main() { @@ -113,9 +111,9 @@ void main() vec3 t = normalize((mat*vec4(tangent.xyz+position.xyz,1.0)).xyz-pos.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); - vary_mat2 = vec3(t.z, b.z, n.z); + //vary_mat0 = vec3(t.x, b.x, n.x); + //vary_mat1 = vec3(t.y, b.y, n.y); + //vary_mat2 = vec3(t.z, b.z, n.z); #else //HAS_NORMAL_MAP vary_normal = n; #endif //HAS_NORMAL_MAP @@ -123,12 +121,16 @@ vary_normal = n; vec3 n = normalize(normal_matrix * normal); #ifdef HAS_NORMAL_MAP vec3 t = normalize(normal_matrix * tangent.xyz); - vec3 b = cross(n,t)*tangent.w; + vary_tangent = t; + vary_sign = tangent.w; + vary_normal = n; + + //vec3 b = cross(n,t)*tangent.w; //vec3 t = cross(b,n) * binormal.w; - vary_mat0 = vec3(t.x, b.x, n.x); - vary_mat1 = vec3(t.y, b.y, n.y); - vary_mat2 = vec3(t.z, b.z, n.z); + //vary_mat0 = vec3(t.x, b.x, n.x); + //vary_mat1 = vec3(t.y, b.y, n.y); + //vary_mat2 = vec3(t.z, b.z, n.z); #else //HAS_NORMAL_MAP vary_normal = n; #endif //HAS_NORMAL_MAP |