summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2013-05-01 20:01:37 -0500
committerDave Parks <davep@lindenlab.com>2013-05-01 20:01:37 -0500
commit90c2be46bf677db00207a45478ade362b90d7a6c (patch)
tree1699cd77acd5153dddca5afe1a0b690c803131a3 /indra
parent73404da266ffd5560d6faef5243d45c3478c1d6e (diff)
NORSPEC-145 Fix for improper rendering of glow pass for rigged meshes.
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/emissiveSkinnedV.glsl2
-rw-r--r--indra/newview/lldrawpoolavatar.cpp39
2 files changed, 26 insertions, 15 deletions
diff --git a/indra/newview/app_settings/shaders/class1/objects/emissiveSkinnedV.glsl b/indra/newview/app_settings/shaders/class1/objects/emissiveSkinnedV.glsl
index 3dab224258..9064904191 100644
--- a/indra/newview/app_settings/shaders/class1/objects/emissiveSkinnedV.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/emissiveSkinnedV.glsl
@@ -48,6 +48,8 @@ void main()
mat = modelview_matrix * mat;
vec3 pos = (mat*vec4(position.xyz, 1.0)).xyz;
+ vertex_color = emissive;
+
calcAtmospherics(pos.xyz);
gl_Position = projection_matrix*vec4(pos, 1.0);
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index 612741e57c..ef8df305e3 100644
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -252,10 +252,11 @@ void LLDrawPoolAvatar::beginPostDeferredPass(S32 pass)
case 4:
beginRiggedFullbrightAlpha();
break;
- case 5:
+ case 9:
beginRiggedGlow();
+ break;
default:
- beginDeferredRiggedMaterialAlpha(pass-6);
+ beginDeferredRiggedMaterialAlpha(pass-5);
break;
}
}
@@ -368,14 +369,14 @@ void LLDrawPoolAvatar::renderPostDeferred(S32 pass)
13, //rigged glow
};
- pass = actual_pass[pass];
+ S32 p = actual_pass[pass];
if (LLPipeline::sImpostorRender)
{ //HACK for impostors so actual pass ends up being proper pass
- pass -= 2;
+ p -= 2;
}
- render(pass);
+ render(p);
}
@@ -1299,20 +1300,28 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
return;
}
- S32 p = 0;
- switch (pass)
+ if (LLPipeline::sRenderDeferred)
{
- case 9: p = 1; break;
- case 10: p = 5; break;
- case 11: p = 9; break;
- case 12: p = 13; break;
- }
+ S32 p = 0;
+ switch (pass)
+ {
+ case 9: p = 1; break;
+ case 10: p = 5; break;
+ case 11: p = 9; break;
+ case 12: p = 13; break;
+ }
+ {
+ LLGLEnable blend(GL_BLEND);
+ renderDeferredRiggedMaterial(avatarp, p);
+ }
+ return;
+ }
+ else if (pass == 9)
{
- LLGLEnable blend(GL_BLEND);
- renderDeferredRiggedMaterial(avatarp, p);
+ renderRiggedGlow(avatarp);
+ return;
}
- return;
}
if (pass == 13)