From 08f364bfc9aaeb771145d660287427c41b1dc0bf Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Mon, 21 Nov 2011 16:00:52 -0600 Subject: SH-2708 Fix for broken shadows on alpha objects --- .../app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl | 2 +- .../app_settings/shaders/class1/deferred/shadowAlphaMaskV.glsl | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'indra/newview/app_settings/shaders/class1/deferred') diff --git a/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl index 46d42d2a4a..c1fb7b55d4 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl @@ -37,7 +37,7 @@ VARYING vec2 vary_texcoord0; void main() { - float alpha = texture2D(diffuseMap, vary_texcoord0.xy).a * vertex_color.a; + float alpha = diffuseLookup(vary_texcoord0.xy).a * vertex_color.a; if (alpha < minimum_alpha) { diff --git a/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskV.glsl b/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskV.glsl index 6a3cba771b..7d3b06c56e 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskV.glsl @@ -34,15 +34,18 @@ VARYING vec4 post_pos; VARYING vec4 vertex_color; VARYING vec2 vary_texcoord0; +void passTextureIndex(); + void main() { //transform vertex vec4 pos = modelview_projection_matrix*vec4(position.xyz, 1.0); - post_pos = pos; gl_Position = vec4(pos.x, pos.y, pos.w*0.5, pos.w); + passTextureIndex(); + vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy; vertex_color = diffuse_color; } -- cgit v1.2.3