diff options
author | Geenz <geenz@geenzo.com> | 2013-04-15 02:29:03 -0400 |
---|---|---|
committer | Geenz <geenz@geenzo.com> | 2013-04-15 02:29:03 -0400 |
commit | 39544a3b06e3221602444eb81c7df8c1030c6bb5 (patch) | |
tree | 2967c0fbac4329922f3c04e14d3066f7bd9607fd /indra/newview/app_settings/shaders/class2/deferred | |
parent | 6257a8394c23b518febdf5ec9c9ecbdce224e046 (diff) |
Hooked up normal and specular texture coordinates.
Diffstat (limited to 'indra/newview/app_settings/shaders/class2/deferred')
-rw-r--r-- | indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl | 4 | ||||
-rw-r--r-- | indra/newview/app_settings/shaders/class2/deferred/alphaV.glsl | 8 |
2 files changed, 10 insertions, 2 deletions
diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl index 0c8d48368f..7bc6a9b1dd 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl @@ -56,6 +56,8 @@ 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; @@ -221,7 +223,7 @@ void main() #endif vec3 normal = vary_norm; - normal = texture2D(bumpMap, vary_texcoord0.xy).xyz * 2 - 1; + normal = texture2D(bumpMap, vary_texcoord1.xy).xyz * 2 - 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/class2/deferred/alphaV.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaV.glsl index 9a3407372d..5f2961c90e 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/alphaV.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/alphaV.glsl @@ -41,6 +41,9 @@ ATTRIBUTE vec3 normal; ATTRIBUTE vec4 diffuse_color; ATTRIBUTE vec2 texcoord0; ATTRIBUTE vec3 binormal; +ATTRIBUTE vec2 texcoord1; +ATTRIBUTE vec2 texcoord2; + #if HAS_SKIN mat4 getObjectSkinnedTransform(); @@ -69,6 +72,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; @@ -155,7 +160,8 @@ 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; |