summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorGraham Madarasz (Graham) <graham@lindenlab.com>2013-04-22 14:12:34 -0700
committerGraham Madarasz (Graham) <graham@lindenlab.com>2013-04-22 14:12:34 -0700
commitb5868bda0d441823fa9783a1c712c258f4cecfa5 (patch)
tree809b68646b278f2ffea392da1b05e5dc0b0ade36 /indra
parent38b222e76bc5fc4dd3f05787a45f38087b4af5cc (diff)
Fix avatar alpha shader define setup
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl2
-rw-r--r--indra/newview/llviewershadermgr.cpp5
3 files changed, 5 insertions, 6 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
index ec04f856fb..9f1fdb4385 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
@@ -106,9 +106,7 @@ void main()
#ifdef USE_INDEXED_TEX
vec4 diff = diffuseLookup(vary_texcoord0.xy);
-#endif
-
-#ifdef USE_DIFFUSE_TEX
+#else
vec4 diff = texture2D(diffuseMap,vary_texcoord0.xy);
#endif
diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl
index 91f7b007f3..20042f2248 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl
@@ -50,7 +50,7 @@ ATTRIBUTE vec2 texcoord0;
#ifdef HAS_SKIN
mat4 getObjectSkinnedTransform();
#else
-ifdef IS_AVATAR_SKIN
+#ifdef IS_AVATAR_SKIN
mat4 getSkinnedTransform();
#endif
#endif
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index 7a9264fa84..92004cbc27 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -1428,8 +1428,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredAlphaProgram.mShaderFiles.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");
- gDeferredSkinnedAlphaProgram.addPermutation("USE_VERTEX_COLOR", "1");
+ gDeferredAlphaProgram.addPermutation("USE_INDEXED_TEX", "1");
+ gDeferredAlphaProgram.addPermutation("USE_VERTEX_COLOR", "1");
gDeferredAlphaProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
success = gDeferredAlphaProgram.createShader(NULL, NULL);
@@ -1608,6 +1608,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredAvatarAlphaProgram.mShaderFiles.push_back(make_pair("deferred/alphaF.glsl", GL_FRAGMENT_SHADER_ARB));
gDeferredAvatarAlphaProgram.addPermutation("USE_DIFFUSE_TEX", "1");
gDeferredAvatarAlphaProgram.addPermutation("IS_AVATAR_SKIN", "1");
+ gDeferredAvatarAlphaProgram.addPermutation("USE_VERTEX_COLOR", "1");
gDeferredAvatarAlphaProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
success = gDeferredAvatarAlphaProgram.createShader(NULL, &mAvatarUniforms);