summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2013-03-29 20:12:27 -0500
committerDave Parks <davep@lindenlab.com>2013-03-29 20:12:27 -0500
commit14f02e48b877569539c96ef5f261ac8b3943579f (patch)
tree382802d341977dc87f452804ba53062dc4f76c01
parentfc4869fb7871632b95dd293157b9965fb2edcb73 (diff)
NORSPEC-66 Hook up material parameters to rigged attachments.
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/materialV.glsl42
-rw-r--r--indra/newview/lldrawpoolalpha.cpp15
-rw-r--r--indra/newview/lldrawpoolavatar.cpp89
-rw-r--r--indra/newview/lldrawpoolavatar.h65
-rw-r--r--indra/newview/llface.cpp16
-rw-r--r--indra/newview/llviewershadermgr.cpp13
-rw-r--r--indra/newview/llviewershadermgr.h2
-rw-r--r--indra/newview/llvovolume.cpp98
8 files changed, 280 insertions, 60 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/materialV.glsl b/indra/newview/app_settings/shaders/class1/deferred/materialV.glsl
index 744f79c0c9..6475d8d003 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/materialV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/materialV.glsl
@@ -23,15 +23,24 @@
* $/LicenseInfo$
*/
+#if HAS_SKIN
+uniform mat4 modelview_matrix;
+uniform mat4 projection_matrix;
+mat4 getObjectSkinnedTransform();
+#else
uniform mat3 normal_matrix;
-uniform mat4 texture_matrix0;
uniform mat4 modelview_projection_matrix;
+#endif
+
+uniform mat4 texture_matrix0;
+
ATTRIBUTE vec3 position;
ATTRIBUTE vec4 diffuse_color;
ATTRIBUTE vec3 normal;
ATTRIBUTE vec2 texcoord0;
+
#if HAS_NORMAL_MAP
ATTRIBUTE vec3 binormal;
ATTRIBUTE vec2 texcoord1;
@@ -55,8 +64,21 @@ VARYING vec2 vary_texcoord0;
void main()
{
+#if HAS_SKIN
+ mat4 mat = getObjectSkinnedTransform();
+
+ mat = modelview_matrix * mat;
+
+ vec3 pos = (mat*vec4(position.xyz,1.0)).xyz;
+
+ gl_Position = projection_matrix*vec4(pos,1.0);
+
+#else
//transform vertex
gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
+
+#endif
+
vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
#if HAS_NORMAL_MAP
@@ -67,6 +89,19 @@ void main()
vary_texcoord2 = (texture_matrix0 * vec4(texcoord2,0,1)).xy;
#endif
+#if HAS_SKIN
+ vec3 n = normalize((mat*vec4(normal.xyz+position.xyz,1.0)).xyz-pos.xyz);
+#if HAS_NORMAL_MAP
+ vec3 b = normalize((mat*vec4(binormal.xyz+position.xyz,1.0)).xyz-pos.xyz);
+ vec3 t = cross(b, n);
+
+ vary_mat0 = vec3(t.x, b.x, n.x);
+ vary_mat1 = vec3(t.y, b.y, n.y);
+ vary_mat2 = vec3(t.z, b.z, n.z);
+#else //HAS_NORMAL_MAP
+vary_normal = n;
+#endif //HAS_NORMAL_MAP
+#else //HAS_SKIN
vec3 n = normalize(normal_matrix * normal);
#if HAS_NORMAL_MAP
vec3 b = normalize(normal_matrix * binormal);
@@ -75,9 +110,10 @@ void main()
vary_mat0 = vec3(t.x, b.x, n.x);
vary_mat1 = vec3(t.y, b.y, n.y);
vary_mat2 = vec3(t.z, b.z, n.z);
-#else
+#else //HAS_NORMAL_MAP
vary_normal = n;
-#endif
+#endif //HAS_NORMAL_MAP
+#endif //HAS_SKIN
vertex_color = diffuse_color;
}
diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp
index 24a7939d12..a8abe9a267 100644
--- a/indra/newview/lldrawpoolalpha.cpp
+++ b/indra/newview/lldrawpoolalpha.cpp
@@ -447,16 +447,19 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask)
if (use_shaders)
{
target_shader = fullbright_shader;
- if (LLPipeline::sRenderDeferred)
+ if (target_shader)
{
- if (params.mFace->getViewerObject()->isHUDAttachment())
+ if (LLPipeline::sRenderDeferred)
{
- target_shader->uniform1f(LLShaderMgr::TEXTURE_GAMMA, 1.0);
+ if (params.mFace->getViewerObject()->isHUDAttachment())
+ {
+ target_shader->uniform1f(LLShaderMgr::TEXTURE_GAMMA, 1.0);
+ } else {
+ target_shader->uniform1f(LLShaderMgr::TEXTURE_GAMMA, 2.2);
+ }
} else {
- target_shader->uniform1f(LLShaderMgr::TEXTURE_GAMMA, 2.2);
+ target_shader->uniform1f(LLShaderMgr::TEXTURE_GAMMA, 1.0);
}
- } else {
- target_shader->uniform1f(LLShaderMgr::TEXTURE_GAMMA, 1.0);
}
}
else
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index 294cecc703..f5ec803f51 100644
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -182,6 +182,8 @@ void LLDrawPoolAvatar::beginDeferredPass(S32 pass)
break;
case 4:
beginDeferredRiggedBump();
+ default:
+ beginDeferredRiggedMaterial(pass-5);
break;
}
}
@@ -215,6 +217,9 @@ void LLDrawPoolAvatar::endDeferredPass(S32 pass)
case 4:
endDeferredRiggedBump();
break;
+ default:
+ endDeferredRiggedMaterial(pass-5);
+ break;
}
}
@@ -425,12 +430,10 @@ void LLDrawPoolAvatar::renderShadow(S32 pass)
}
else
{
- renderRigged(avatarp, RIGGED_SIMPLE);
- renderRigged(avatarp, RIGGED_ALPHA);
- renderRigged(avatarp, RIGGED_FULLBRIGHT);
- renderRigged(avatarp, RIGGED_FULLBRIGHT_SHINY);
- renderRigged(avatarp, RIGGED_SHINY);
- renderRigged(avatarp, RIGGED_FULLBRIGHT_ALPHA);
+ for (U32 i = 0; i < NUM_RIGGED_PASSES; ++i)
+ {
+ renderRigged(avatarp, i);
+ }
}
}
@@ -451,11 +454,11 @@ S32 LLDrawPoolAvatar::getNumDeferredPasses()
{
if (LLPipeline::sImpostorRender)
{
- return 3;
+ return 19;
}
else
{
- return 5;
+ return 21;
}
}
@@ -1010,6 +1013,27 @@ void LLDrawPoolAvatar::endDeferredRiggedBump()
sVertexProgram = NULL;
}
+void LLDrawPoolAvatar::beginDeferredRiggedMaterial(S32 pass)
+{
+ sVertexProgram = &gDeferredMaterialProgram[pass+LLMaterial::SHADER_COUNT];
+ sVertexProgram->bind();
+ normal_channel = sVertexProgram->enableTexture(LLViewerShaderMgr::BUMP_MAP);
+ specular_channel = sVertexProgram->enableTexture(LLViewerShaderMgr::SPECULAR_MAP);
+ sDiffuseChannel = sVertexProgram->enableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
+}
+
+void LLDrawPoolAvatar::endDeferredRiggedMaterial(S32 pass)
+{
+ LLVertexBuffer::unbind();
+ sVertexProgram->disableTexture(LLViewerShaderMgr::BUMP_MAP);
+ sVertexProgram->disableTexture(LLViewerShaderMgr::SPECULAR_MAP);
+ sVertexProgram->disableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
+ sVertexProgram->unbind();
+ normal_channel = -1;
+ sDiffuseChannel = 0;
+ sVertexProgram = NULL;
+}
+
void LLDrawPoolAvatar::beginDeferredSkinned()
{
sShaderLevel = mVertexShaderLevel;
@@ -1185,6 +1209,13 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
return;
}
+ if (is_deferred_render && pass >= 5 && pass <= 21)
+ {
+ renderDeferredRiggedMaterial(avatarp, pass-5);
+ return;
+ }
+
+
if (pass == 5)
{
renderRiggedShinySimple(avatarp);
@@ -1510,10 +1541,41 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow)
gGL.diffuseColor4f(0,0,0,face->getTextureEntry()->getGlow());
}*/
- gGL.getTexUnit(sDiffuseChannel)->bind(face->getTexture());
- if (normal_channel > -1)
+ LLMaterial* mat = face->getTextureEntry()->getMaterialParams().get();
+
+ if (is_deferred_render && mat)
{
- LLDrawPoolBump::bindBumpMap(face, normal_channel);
+ gGL.getTexUnit(sDiffuseChannel)->bind(face->getTexture(LLRender::DIFFUSE_MAP));
+ gGL.getTexUnit(normal_channel)->bind(face->getTexture(LLRender::NORMAL_MAP));
+ gGL.getTexUnit(specular_channel)->bind(face->getTexture(LLRender::SPECULAR_MAP));
+
+ LLColor4U col = mat->getSpecularLightColor();
+ U8 spec = mat->getSpecularLightExponent();
+
+ U8 env = mat->getEnvironmentIntensity();
+
+ sVertexProgram->uniform4f(LLShaderMgr::SPECULAR_COLOR, col.mV[0]/255.f, col.mV[1]/255.f, col.mV[2]/255.f, spec/255.f);
+
+ sVertexProgram->uniform1f(LLShaderMgr::ENVIRONMENT_INTENSITY, env/255.f);
+
+ sVertexProgram->setMinimumAlpha(mat->getAlphaMaskCutoff()/255.f);
+
+ for (U32 i = 0; i < LLRender::NUM_TEXTURE_CHANNELS; ++i)
+ {
+ LLViewerTexture* tex = face->getTexture(i);
+ if (tex)
+ {
+ tex->addTextureStats(avatar->getPixelArea());
+ }
+ }
+ }
+ else
+ {
+ gGL.getTexUnit(sDiffuseChannel)->bind(face->getTexture());
+ if (normal_channel > -1)
+ {
+ LLDrawPoolBump::bindBumpMap(face, normal_channel);
+ }
}
if (face->mTextureMatrix)
@@ -1545,6 +1607,11 @@ void LLDrawPoolAvatar::renderDeferredRiggedBump(LLVOAvatar* avatar)
renderRigged(avatar, RIGGED_DEFERRED_BUMP);
}
+void LLDrawPoolAvatar::renderDeferredRiggedMaterial(LLVOAvatar* avatar, S32 pass)
+{
+ renderRigged(avatar, pass);
+}
+
static LLFastTimer::DeclareTimer FTM_RIGGED_VBO("Rigged VBO");
void LLDrawPoolAvatar::updateRiggedVertexBuffers(LLVOAvatar* avatar)
diff --git a/indra/newview/lldrawpoolavatar.h b/indra/newview/lldrawpoolavatar.h
index 69e3068858..b87449fbf6 100644
--- a/indra/newview/lldrawpoolavatar.h
+++ b/indra/newview/lldrawpoolavatar.h
@@ -75,7 +75,7 @@ public:
/*virtual*/ void beginDeferredPass(S32 pass);
/*virtual*/ void endDeferredPass(S32 pass);
/*virtual*/ void renderDeferred(S32 pass);
-
+
/*virtual*/ S32 getNumPostDeferredPasses();
/*virtual*/ void beginPostDeferredPass(S32 pass);
/*virtual*/ void endPostDeferredPass(S32 pass);
@@ -113,6 +113,7 @@ public:
void beginRiggedFullbrightAlpha();
void beginRiggedGlow();
void beginDeferredRiggedAlpha();
+ void beginDeferredRiggedMaterial(S32 pass);
void endRiggedSimple();
void endRiggedFullbright();
@@ -122,6 +123,7 @@ public:
void endRiggedFullbrightAlpha();
void endRiggedGlow();
void endDeferredRiggedAlpha();
+ void endDeferredRiggedMaterial(S32 pass);
void beginDeferredRiggedSimple();
void beginDeferredRiggedBump();
@@ -146,10 +148,27 @@ public:
void renderRiggedGlow(LLVOAvatar* avatar);
void renderDeferredRiggedSimple(LLVOAvatar* avatar);
void renderDeferredRiggedBump(LLVOAvatar* avatar);
+ void renderDeferredRiggedMaterial(LLVOAvatar* avatar, S32 pass);
typedef enum
{
- RIGGED_SIMPLE = 0,
+ RIGGED_MATERIAL=0,
+ RIGGED_MATERIAL_ALPHA,
+ RIGGED_MATERIAL_ALPHA_MASK,
+ RIGGED_MATERIAL_ALPHA_EMISSIVE,
+ RIGGED_SPECMAP,
+ RIGGED_SPECMAP_BLEND,
+ RIGGED_SPECMAP_MASK,
+ RIGGED_SPECMAP_EMISSIVE,
+ RIGGED_NORMMAP,
+ RIGGED_NORMMAP_BLEND,
+ RIGGED_NORMMAP_MASK,
+ RIGGED_NORMMAP_EMISSIVE,
+ RIGGED_NORMSPEC,
+ RIGGED_NORMSPEC_BLEND,
+ RIGGED_NORMSPEC_MASK,
+ RIGGED_NORMSPEC_EMISSIVE,
+ RIGGED_SIMPLE,
RIGGED_FULLBRIGHT,
RIGGED_SHINY,
RIGGED_FULLBRIGHT_SHINY,
@@ -164,6 +183,48 @@ public:
typedef enum
{
+ RIGGED_MATERIAL_MASK =
+ LLVertexBuffer::MAP_VERTEX |
+ LLVertexBuffer::MAP_NORMAL |
+ LLVertexBuffer::MAP_TEXCOORD0 |
+ LLVertexBuffer::MAP_COLOR |
+ LLVertexBuffer::MAP_WEIGHT4,
+ RIGGED_MATERIAL_ALPHA_VMASK = RIGGED_MATERIAL_MASK,
+ RIGGED_MATERIAL_ALPHA_MASK_MASK = RIGGED_MATERIAL_MASK,
+ RIGGED_MATERIAL_ALPHA_EMISSIVE_MASK = RIGGED_MATERIAL_MASK,
+ RIGGED_SPECMAP_VMASK =
+ LLVertexBuffer::MAP_VERTEX |
+ LLVertexBuffer::MAP_NORMAL |
+ LLVertexBuffer::MAP_TEXCOORD0 |
+ LLVertexBuffer::MAP_TEXCOORD2 |
+ LLVertexBuffer::MAP_COLOR |
+ LLVertexBuffer::MAP_WEIGHT4,
+ RIGGED_SPECMAP_BLEND_MASK = RIGGED_SPECMAP_VMASK,
+ RIGGED_SPECMAP_MASK_MASK = RIGGED_SPECMAP_VMASK,
+ RIGGED_SPECMAP_EMISSIVE_MASK = RIGGED_SPECMAP_VMASK,
+ RIGGED_NORMMAP_VMASK =
+ LLVertexBuffer::MAP_VERTEX |
+ LLVertexBuffer::MAP_NORMAL |
+ LLVertexBuffer::MAP_BINORMAL |
+ LLVertexBuffer::MAP_TEXCOORD0 |
+ LLVertexBuffer::MAP_TEXCOORD1 |
+ LLVertexBuffer::MAP_COLOR |
+ LLVertexBuffer::MAP_WEIGHT4,
+ RIGGED_NORMMAP_BLEND_MASK = RIGGED_NORMMAP_VMASK,
+ RIGGED_NORMMAP_MASK_MASK = RIGGED_NORMMAP_VMASK,
+ RIGGED_NORMMAP_EMISSIVE_MASK = RIGGED_NORMMAP_VMASK,
+ RIGGED_NORMSPEC_VMASK =
+ LLVertexBuffer::MAP_VERTEX |
+ LLVertexBuffer::MAP_NORMAL |
+ LLVertexBuffer::MAP_BINORMAL |
+ LLVertexBuffer::MAP_TEXCOORD0 |
+ LLVertexBuffer::MAP_TEXCOORD1 |
+ LLVertexBuffer::MAP_TEXCOORD2 |
+ LLVertexBuffer::MAP_COLOR |
+ LLVertexBuffer::MAP_WEIGHT4,
+ RIGGED_NORMSPEC_BLEND_MASK = RIGGED_NORMSPEC_VMASK,
+ RIGGED_NORMSPEC_MASK_MASK = RIGGED_NORMSPEC_VMASK,
+ RIGGED_NORMSPEC_EMISSIVE_MASK = RIGGED_NORMSPEC_VMASK,
RIGGED_SIMPLE_MASK = LLVertexBuffer::MAP_VERTEX |
LLVertexBuffer::MAP_NORMAL |
LLVertexBuffer::MAP_TEXCOORD0 |
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index 9a8b37bf8b..3d6acedd02 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -2595,6 +2595,22 @@ void LLFace::clearVertexBuffer()
U32 LLFace::getRiggedDataMask(U32 type)
{
static const U32 rigged_data_mask[] = {
+ LLDrawPoolAvatar::RIGGED_MATERIAL_MASK,
+ LLDrawPoolAvatar::RIGGED_MATERIAL_ALPHA_VMASK,
+ LLDrawPoolAvatar::RIGGED_MATERIAL_ALPHA_MASK_MASK,
+ LLDrawPoolAvatar::RIGGED_MATERIAL_ALPHA_EMISSIVE_MASK,
+ LLDrawPoolAvatar::RIGGED_SPECMAP_VMASK,
+ LLDrawPoolAvatar::RIGGED_SPECMAP_BLEND_MASK,
+ LLDrawPoolAvatar::RIGGED_SPECMAP_MASK_MASK,
+ LLDrawPoolAvatar::RIGGED_SPECMAP_EMISSIVE_MASK,
+ LLDrawPoolAvatar::RIGGED_NORMMAP_VMASK,
+ LLDrawPoolAvatar::RIGGED_NORMMAP_BLEND_MASK,
+ LLDrawPoolAvatar::RIGGED_NORMMAP_MASK_MASK,
+ LLDrawPoolAvatar::RIGGED_NORMMAP_EMISSIVE_MASK,
+ LLDrawPoolAvatar::RIGGED_NORMSPEC_VMASK,
+ LLDrawPoolAvatar::RIGGED_NORMSPEC_BLEND_MASK,
+ LLDrawPoolAvatar::RIGGED_NORMSPEC_MASK_MASK,
+ LLDrawPoolAvatar::RIGGED_NORMSPEC_EMISSIVE_MASK,
LLDrawPoolAvatar::RIGGED_SIMPLE_MASK,
LLDrawPoolAvatar::RIGGED_FULLBRIGHT_MASK,
LLDrawPoolAvatar::RIGGED_SHINY_MASK,
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index 4e38d2f7e9..286152867f 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -208,7 +208,7 @@ LLGLSLShader gDeferredStarProgram;
LLGLSLShader gNormalMapGenProgram;
// Deferred materials shaders
-LLGLSLShader gDeferredMaterialProgram[LLMaterial::SHADER_COUNT];
+LLGLSLShader gDeferredMaterialProgram[LLMaterial::SHADER_COUNT*2];
LLViewerShaderMgr::LLViewerShaderMgr() :
mVertexShaderLevel(SHADER_COUNT, 0),
@@ -1108,7 +1108,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredWLCloudProgram.unload();
gDeferredStarProgram.unload();
gNormalMapGenProgram.unload();
- for (U32 i = 0; i < LLMaterial::SHADER_COUNT; ++i)
+ for (U32 i = 0; i < LLMaterial::SHADER_COUNT*2; ++i)
{
gDeferredMaterialProgram[i].unload();
}
@@ -1227,7 +1227,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
}
- for (U32 i = 0; i < LLMaterial::SHADER_COUNT; ++i)
+ for (U32 i = 0; i < LLMaterial::SHADER_COUNT*2; ++i)
{
if (success)
{
@@ -1243,6 +1243,13 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredMaterialProgram[i].addPermutation("HAS_SPECULAR_MAP", i & 0x4 ? "1" : "0");
gDeferredMaterialProgram[i].addPermutation("DIFFUSE_ALPHA_MODE", llformat("%d", alpha_mode));
+ bool has_skin = i & 0x10;
+ gDeferredMaterialProgram[i].addPermutation("HAS_SKIN",has_skin ? "1" : "0");
+ if (has_skin)
+ {
+ gDeferredMaterialProgram[i].mFeatures.hasObjectSkinning = true;
+ }
+
success = gDeferredMaterialProgram[i].createShader(NULL, NULL);
}
}
diff --git a/indra/newview/llviewershadermgr.h b/indra/newview/llviewershadermgr.h
index f0bf352e75..e9283d8bad 100644
--- a/indra/newview/llviewershadermgr.h
+++ b/indra/newview/llviewershadermgr.h
@@ -364,6 +364,6 @@ extern LLGLSLShader gDeferredStarProgram;
extern LLGLSLShader gNormalMapGenProgram;
// Deferred materials shaders
-extern LLGLSLShader gDeferredMaterialProgram[LLMaterial::SHADER_COUNT];
+extern LLGLSLShader gDeferredMaterialProgram[LLMaterial::SHADER_COUNT*2];
#endif
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index df462e5013..9d5f2f9233 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -4463,66 +4463,96 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
LLViewerTexture* tex = facep->getTexture();
U32 type = gPipeline.getPoolTypeFromTE(te, tex);
- if (type == LLDrawPool::POOL_ALPHA)
+
+ if (te->getGlow())
{
- if (te->getColor().mV[3] > 0.f)
+ pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_GLOW);
+ }
+
+ LLMaterial* mat = te->getMaterialParams().get();
+
+ if (mat)
+ {
+ if (te->getFullbright())
{
- if (te->getFullbright())
+ if (mat->getDiffuseAlphaMode() == LLMaterial::DIFFUSE_ALPHA_MODE_MASK)
{
pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_FULLBRIGHT_ALPHA);
}
- else
+ else if (type == LLDrawPool::POOL_ALPHA)
{
pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_ALPHA);
}
+ else
+ {
+ pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_FULLBRIGHT);
+ }
+ }
+ else
+ {
+ U32 mask = mat->getShaderMask();
+ pool->addRiggedFace(facep, mask);
}
}
- else if (te->getShiny())
+ else
{
- if (te->getFullbright())
+ if (type == LLDrawPool::POOL_ALPHA)
{
- pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_FULLBRIGHT_SHINY);
+ if (te->getColor().mV[3] > 0.f)
+ {
+ if (te->getFullbright())
+ {
+ pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_FULLBRIGHT_ALPHA);
+ }
+ else
+ {
+ pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_ALPHA);
+ }
+ }
}
- else
+ else if (te->getShiny())
{
- if (LLPipeline::sRenderDeferred)
+ if (te->getFullbright())
{
- pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_SIMPLE);
+ pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_FULLBRIGHT_SHINY);
}
else
{
- pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_SHINY);
+ if (LLPipeline::sRenderDeferred)
+ {
+ pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_SIMPLE);
+ }
+ else
+ {
+ pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_SHINY);
+ }
}
}
- }
- else
- {
- if (te->getFullbright())
- {
- pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_FULLBRIGHT);
- }
else
{
- pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_SIMPLE);
- }
- }
-
- if (te->getGlow())
- {
- pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_GLOW);
- }
-
- if (LLPipeline::sRenderDeferred)
- {
- if (type != LLDrawPool::POOL_ALPHA && !te->getFullbright())
- {
- if (te->getBumpmap())
+ if (te->getFullbright())
{
- pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_DEFERRED_BUMP);
+ pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_FULLBRIGHT);
}
else
{
- pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_DEFERRED_SIMPLE);
+ pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_SIMPLE);
+ }
+ }
+
+
+ if (LLPipeline::sRenderDeferred)
+ {
+ if (type != LLDrawPool::POOL_ALPHA && !te->getFullbright())
+ {
+ if (te->getBumpmap())
+ {
+ pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_DEFERRED_BUMP);
+ }
+ else
+ {
+ pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_DEFERRED_SIMPLE);
+ }
}
}
}