summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/lldrawpoolavatar.cpp45
-rw-r--r--indra/newview/lldrawpoolavatar.h11
-rw-r--r--indra/newview/llviewershadermgr.cpp20
-rw-r--r--indra/newview/llviewershadermgr.h1
-rw-r--r--indra/newview/llvovolume.cpp9
5 files changed, 79 insertions, 7 deletions
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index 9463be6059..8227e8ede2 100644
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -364,7 +364,7 @@ S32 LLDrawPoolAvatar::getNumPasses()
}
else if (getVertexShaderLevel() > 0)
{
- return 6;
+ return 7;
}
else
{
@@ -416,6 +416,9 @@ void LLDrawPoolAvatar::beginRenderPass(S32 pass)
case 5:
beginRiggedShinySimple();
break;
+ case 6:
+ beginRiggedFullbrightShiny();
+ break;
}
}
@@ -449,6 +452,9 @@ void LLDrawPoolAvatar::endRenderPass(S32 pass)
case 5:
endRiggedShinySimple();
break;
+ case 6:
+ endRiggedFullbrightShiny();
+ break;
}
}
@@ -683,6 +689,24 @@ void LLDrawPoolAvatar::endRiggedShinySimple()
LLVertexBuffer::sWeight4Loc = -1;
}
+void LLDrawPoolAvatar::beginRiggedFullbrightShiny()
+{
+ sVertexProgram = &gSkinnedObjectFullbrightShinyProgram;
+ sVertexProgram->bind();
+ LLDrawPoolBump::bindCubeMap(sVertexProgram, 2, diffuse_channel, cube_channel, false);
+ LLVertexBuffer::sWeight4Loc = sVertexProgram->getAttribLocation(LLViewerShaderMgr::OBJECT_WEIGHT);
+}
+
+void LLDrawPoolAvatar::endRiggedFullbrightShiny()
+{
+ LLVertexBuffer::unbind();
+ LLDrawPoolBump::unbindCubeMap(sVertexProgram, 2, diffuse_channel, cube_channel, false);
+ sVertexProgram->unbind();
+ sVertexProgram = NULL;
+ LLVertexBuffer::sWeight4Loc = -1;
+}
+
+
void LLDrawPoolAvatar::beginDeferredRigged()
{
sVertexProgram = &gDeferredSkinnedDiffuseProgram;
@@ -858,6 +882,12 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
return;
}
+ if (pass == 6)
+ {
+ renderRiggedFullbrightShiny(avatarp);
+ return;
+ }
+
if (sShaderLevel > 0)
{
@@ -1037,7 +1067,18 @@ void LLDrawPoolAvatar::renderRiggedShinySimple(LLVOAvatar* avatar)
LLVertexBuffer::MAP_COLOR |
LLVertexBuffer::MAP_WEIGHT4;
- renderRigged(avatar, RIGGED_SHINY_SIMPLE, data_mask);
+ renderRigged(avatar, RIGGED_SHINY, data_mask);
+}
+
+void LLDrawPoolAvatar::renderRiggedFullbrightShiny(LLVOAvatar* avatar)
+{
+ const U32 data_mask = LLVertexBuffer::MAP_VERTEX |
+ LLVertexBuffer::MAP_NORMAL |
+ LLVertexBuffer::MAP_TEXCOORD0 |
+ LLVertexBuffer::MAP_COLOR |
+ LLVertexBuffer::MAP_WEIGHT4;
+
+ renderRigged(avatar, RIGGED_FULLBRIGHT_SHINY, data_mask);
}
//-----------------------------------------------------------------------------
diff --git a/indra/newview/lldrawpoolavatar.h b/indra/newview/lldrawpoolavatar.h
index 8443069376..d758bb07f0 100644
--- a/indra/newview/lldrawpoolavatar.h
+++ b/indra/newview/lldrawpoolavatar.h
@@ -98,6 +98,7 @@ public:
void beginSkinned();
void beginRiggedSimple();
void beginRiggedFullbright();
+ void beginRiggedFullbrightShiny();
void beginRiggedShinySimple();
void endRigid();
@@ -105,6 +106,7 @@ public:
void endSkinned();
void endRiggedSimple();
void endRiggedFullbright();
+ void endRiggedFullbrightShiny();
void endRiggedShinySimple();
void beginDeferredImpostor();
@@ -127,6 +129,7 @@ public:
void renderRiggedSimple(LLVOAvatar* avatar);
void renderRiggedFullbright(LLVOAvatar* avatar);
void renderRiggedShinySimple(LLVOAvatar* avatar);
+ void renderRiggedFullbrightShiny(LLVOAvatar* avatar);
/*virtual*/ LLViewerTexture *getDebugTexture();
/*virtual*/ LLColor3 getDebugColor() const; // For AGP debug display
@@ -137,11 +140,11 @@ public:
{
RIGGED_SIMPLE = 0,
RIGGED_FULLBRIGHT,
- RIGGED_SHINY_SIMPLE,
- RIGGED_SHINY_FULLBRIGHT,
- RIGGED_SHINY_BUMP,
- RIGGED_BUMP,
+ RIGGED_SHINY,
+ RIGGED_FULLBRIGHT_SHINY,
+ RIGGED_GLOW,
RIGGED_ALPHA,
+ RIGGED_FULLBRIGHT_ALPHA,
NUM_RIGGED_PASSES,
RIGGED_UNKNOWN,
} eRiggedPass;
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index 3cc5b4357a..eafc52748e 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -80,6 +80,7 @@ LLGLSLShader gObjectShinyWaterProgram;
//object hardware skinning shaders
LLGLSLShader gSkinnedObjectSimpleProgram;
LLGLSLShader gSkinnedObjectFullbrightProgram;
+LLGLSLShader gSkinnedObjectFullbrightShinyProgram;
LLGLSLShader gSkinnedObjectShinySimpleProgram;
//environment shaders
@@ -157,6 +158,7 @@ LLViewerShaderMgr::LLViewerShaderMgr() :
mShaderList.push_back(&gObjectFullbrightShinyProgram);
mShaderList.push_back(&gSkinnedObjectSimpleProgram);
mShaderList.push_back(&gSkinnedObjectFullbrightProgram);
+ mShaderList.push_back(&gSkinnedObjectFullbrightShinyProgram);
mShaderList.push_back(&gSkinnedObjectShinySimpleProgram);
mShaderList.push_back(&gTerrainProgram);
mShaderList.push_back(&gTerrainWaterProgram);
@@ -565,6 +567,7 @@ void LLViewerShaderMgr::unloadShaders()
gSkinnedObjectSimpleProgram.unload();
gSkinnedObjectFullbrightProgram.unload();
+ gSkinnedObjectFullbrightShinyProgram.unload();
gSkinnedObjectShinySimpleProgram.unload();
@@ -1262,6 +1265,7 @@ BOOL LLViewerShaderMgr::loadShadersObject()
gObjectFullbrightWaterProgram.unload();
gSkinnedObjectSimpleProgram.unload();
gSkinnedObjectFullbrightProgram.unload();
+ gSkinnedObjectFullbrightShinyProgram.unload();
gSkinnedObjectShinySimpleProgram.unload();
return FALSE;
@@ -1406,6 +1410,22 @@ BOOL LLViewerShaderMgr::loadShadersObject()
if (success)
{
+ gSkinnedObjectFullbrightShinyProgram.mName = "Skinned Fullbright Shiny Shader";
+ gSkinnedObjectFullbrightShinyProgram.mFeatures.calculatesAtmospherics = true;
+ gSkinnedObjectFullbrightShinyProgram.mFeatures.hasGamma = true;
+ gSkinnedObjectFullbrightShinyProgram.mFeatures.hasTransport = true;
+ gSkinnedObjectFullbrightShinyProgram.mFeatures.isShiny = true;
+ gSkinnedObjectFullbrightShinyProgram.mFeatures.isFullbright = true;
+ gSkinnedObjectFullbrightShinyProgram.mFeatures.hasObjectSkinning = true;
+ gSkinnedObjectFullbrightShinyProgram.mShaderFiles.clear();
+ gSkinnedObjectFullbrightShinyProgram.mShaderFiles.push_back(make_pair("objects/fullbrightShinySkinnedV.glsl", GL_VERTEX_SHADER_ARB));
+ gSkinnedObjectFullbrightShinyProgram.mShaderFiles.push_back(make_pair("objects/fullbrightShinyF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gSkinnedObjectFullbrightShinyProgram.mShaderLevel = mVertexShaderLevel[SHADER_OBJECT];
+ success = gSkinnedObjectFullbrightShinyProgram.createShader(NULL, &mShinyUniforms);
+ }
+
+ if (success)
+ {
gSkinnedObjectShinySimpleProgram.mName = "Skinned Shiny Simple Shader";
gSkinnedObjectShinySimpleProgram.mFeatures.calculatesLighting = true;
gSkinnedObjectShinySimpleProgram.mFeatures.calculatesAtmospherics = true;
diff --git a/indra/newview/llviewershadermgr.h b/indra/newview/llviewershadermgr.h
index b4fc336bf3..bb28cd7ec2 100644
--- a/indra/newview/llviewershadermgr.h
+++ b/indra/newview/llviewershadermgr.h
@@ -316,6 +316,7 @@ extern LLGLSLShader gObjectShinyWaterProgram;
extern LLGLSLShader gSkinnedObjectSimpleProgram;
extern LLGLSLShader gSkinnedObjectFullbrightProgram;
+extern LLGLSLShader gSkinnedObjectFullbrightShinyProgram;
extern LLGLSLShader gSkinnedObjectShinySimpleProgram;
//environment shaders
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 3449c05be8..43252c553c 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -3547,7 +3547,14 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
//add face to new pool
if (te->getShiny())
{
- pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_SHINY_SIMPLE);
+ if (te->getFullbright())
+ {
+ pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_FULLBRIGHT_SHINY);
+ }
+ else
+ {
+ pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_SHINY);
+ }
}
else
{