summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraham Madarasz <graham@lindenlab.com>2013-04-19 18:00:13 -0700
committerGraham Madarasz <graham@lindenlab.com>2013-04-19 18:00:13 -0700
commit894412285b3bbcb1f790145202e77a5aa6f369ec (patch)
tree93d97c3edf9cd9bb495fab2b5977d95809012b28
parente10cac8847b78f1bf6bb50527d347690c48896c9 (diff)
Fix forward decl to match changed func def and clear defines between shader compiles for ifdef sanity
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl2
-rw-r--r--indra/newview/llviewershadermgr.cpp4
2 files changed, 5 insertions, 1 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl
index 3f42e8a24b..11759af2ad 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl
@@ -56,7 +56,7 @@ mat4 getSkinnedTransform();
vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
void calcAtmospherics(vec3 inPositionEye);
-float calcDirectionalLight(vec3 n, vec3 l);
+vec3 calcDirectionalLight(vec3 n, vec3 l);
vec3 atmosAmbient(vec3 light);
vec3 atmosAffectDirectionalLight(float lightIntensity);
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index bdef74fcb8..218bbbe6dc 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -1210,6 +1210,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredSkinnedAlphaProgram.mFeatures.isAlphaLighting = true;
gDeferredSkinnedAlphaProgram.mFeatures.disableTextureIndex = true;
gDeferredSkinnedAlphaProgram.mShaderFiles.clear();
+ gDeferredSkinnedAlphaProgram.mDefines.clear();
+
gDeferredSkinnedAlphaProgram.mShaderFiles.push_back(make_pair("deferred/alphaV.glsl", GL_VERTEX_SHADER_ARB));
gDeferredSkinnedAlphaProgram.mShaderFiles.push_back(make_pair("deferred/alphaF.glsl", GL_FRAGMENT_SHADER_ARB));
gDeferredSkinnedAlphaProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
@@ -1407,6 +1409,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
}
gDeferredAlphaProgram.mShaderFiles.clear();
+ gDeferredAlphaProgram.mDefines.clear();
+
gDeferredAlphaProgram.mShaderFiles.push_back(make_pair("deferred/alphaV.glsl", GL_VERTEX_SHADER_ARB));
gDeferredAlphaProgram.mShaderFiles.push_back(make_pair("deferred/alphaF.glsl", GL_FRAGMENT_SHADER_ARB));
gDeferredSkinnedAlphaProgram.addPermutation("USE_INDEXED_TEX", "1");