diff options
author | Dave Parks <davep@lindenlab.com> | 2013-05-30 17:44:05 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2013-05-30 17:44:05 -0500 |
commit | 38f62f5ceed5ec7a9c5bcfd8afe443475b343b08 (patch) | |
tree | 7aa07490a02d0a85d6f7d03842f1d30eeba174e6 /indra/newview | |
parent | 4a1b6bdeef3753a65cb11ccbad151560da508e15 (diff) |
Fix for some objects not rendering underwater with advanced lighting enabled
Diffstat (limited to 'indra/newview')
4 files changed, 11 insertions, 5 deletions
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterAlphaMaskF.glsl index 9c82056fd7..6dd3bb937f 100755 --- a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterAlphaMaskF.glsl +++ b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterAlphaMaskF.glsl @@ -41,7 +41,9 @@ VARYING vec2 vary_texcoord0; void fullbright_lighting_water() { - vec4 color = diffuseLookup(vary_texcoord0.xy) * vertex_color; + vec4 color = diffuseLookup(vary_texcoord0.xy); + + color.rgb *= vertex_color.rgb; if (color.a < minimum_alpha) { diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightWaterAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightWaterAlphaMaskF.glsl index b68240ba0d..3426fea52f 100755 --- a/indra/newview/app_settings/shaders/class1/lighting/lightWaterAlphaMaskF.glsl +++ b/indra/newview/app_settings/shaders/class1/lighting/lightWaterAlphaMaskF.glsl @@ -39,7 +39,9 @@ VARYING vec2 vary_texcoord0; void default_lighting_water() { - vec4 color = diffuseLookup(vary_texcoord0.xy) * vertex_color; + vec4 color = diffuseLookup(vary_texcoord0.xy); + + color.rgb *= vertex_color.rgb; if (color.a < minimum_alpha) { diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightWaterAlphaMaskNonIndexedF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightWaterAlphaMaskNonIndexedF.glsl index da3b20012d..d9faa9b314 100755 --- a/indra/newview/app_settings/shaders/class1/lighting/lightWaterAlphaMaskNonIndexedF.glsl +++ b/indra/newview/app_settings/shaders/class1/lighting/lightWaterAlphaMaskNonIndexedF.glsl @@ -41,7 +41,9 @@ VARYING vec2 vary_texcoord0; void default_lighting_water() { - vec4 color = texture2D(diffuseMap,vary_texcoord0.xy) * vertex_color; + vec4 color = texture2D(diffuseMap,vary_texcoord0.xy); + + color.rgb *= vertex_color.rgb; if (color.a < minimum_alpha) { diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp index 90474ea6f6..d305126a75 100755 --- a/indra/newview/lldrawpoolalpha.cpp +++ b/indra/newview/lldrawpoolalpha.cpp @@ -144,8 +144,8 @@ void LLDrawPoolAlpha::beginRenderPass(S32 pass) if (LLPipeline::sUnderWaterRender) { - simple_shader = &gObjectSimpleWaterAlphaMaskProgram; - fullbright_shader = &gObjectFullbrightWaterAlphaMaskProgram; + simple_shader = &gObjectSimpleWaterProgram; + fullbright_shader = &gObjectFullbrightWaterProgram; emissive_shader = &gObjectEmissiveWaterProgram; } else |