From 08f9ef92399ab4abdc8652c48c85c1110b907e37 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Fri, 31 May 2013 12:53:58 -0500 Subject: NORSPEC-223 Fix for wrong textures displaying on fullbright+shiny faces with advanced lighting enabled. --- .../app_settings/shaders/class1/deferred/fullbrightShinyF.glsl | 4 +++- indra/newview/llviewershadermgr.cpp | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/indra/newview/app_settings/shaders/class1/deferred/fullbrightShinyF.glsl b/indra/newview/app_settings/shaders/class1/deferred/fullbrightShinyF.glsl index b2bfd69f6e..f3d04a22f2 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/fullbrightShinyF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/fullbrightShinyF.glsl @@ -46,11 +46,13 @@ vec3 fullbrightScaleSoftClip(vec3 light); void main() { -#ifdef diffuseLookup +#if HAS_DIFFUSE_LOOKUP vec4 color = diffuseLookup(vary_texcoord0.xy); #else vec4 color = texture2D(diffuseMap, vary_texcoord0.xy); #endif + + color.rgb *= vertex_color.rgb; vec3 envColor = textureCube(environmentMap, vary_texcoord1.xyz).rgb; diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index a36d6c10da..5f08e8ca2e 100755 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -1495,7 +1495,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredFullbrightShinyProgram.mFeatures.calculatesAtmospherics = true; gDeferredFullbrightShinyProgram.mFeatures.hasGamma = true; gDeferredFullbrightShinyProgram.mFeatures.hasTransport = true; - gDeferredFullbrightShinyProgram.mFeatures.mIndexedTextureChannels = 0; + gDeferredFullbrightShinyProgram.mFeatures.mIndexedTextureChannels = LLGLSLShader::sIndexedTextureChannels-1; gDeferredFullbrightShinyProgram.mShaderFiles.clear(); gDeferredFullbrightShinyProgram.mShaderFiles.push_back(make_pair("deferred/fullbrightShinyV.glsl", GL_VERTEX_SHADER_ARB)); gDeferredFullbrightShinyProgram.mShaderFiles.push_back(make_pair("deferred/fullbrightShinyF.glsl", GL_FRAGMENT_SHADER_ARB)); -- cgit v1.2.3