summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpoolbump.cpp
diff options
context:
space:
mode:
authorGeenz <geenz@geenzo.com>2013-01-25 17:54:38 -0500
committerGeenz <geenz@geenzo.com>2013-01-25 17:54:38 -0500
commit5f03e197f4cfb43de93dc42b16b54beafccd376a (patch)
tree77fe17e9c36021148c18f7f9f33aae5abcd100c0 /indra/newview/lldrawpoolbump.cpp
parentcc7ae8fbd1fc249f77ced95171e5c22e48adedb6 (diff)
Trying to set materials up for rendering! Yay!
Diffstat (limited to 'indra/newview/lldrawpoolbump.cpp')
-rw-r--r--indra/newview/lldrawpoolbump.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp
index 718133ba29..d613def1bd 100644
--- a/indra/newview/lldrawpoolbump.cpp
+++ b/indra/newview/lldrawpoolbump.cpp
@@ -632,6 +632,11 @@ void LLDrawPoolBump::renderGroup(LLSpatialGroup* group, U32 type, U32 mask, BOOL
BOOL LLDrawPoolBump::bindBumpMap(LLDrawInfo& params, S32 channel)
{
U8 bump_code = params.mBump;
+ if (params.mNormalMap.notNull())
+ {
+ bump_code = BE_CUSTOM;
+ return bindBumpMap(bump_code, params.mNormalMap, params.mVSize, channel);
+ }
return bindBumpMap(bump_code, params.mTexture, params.mVSize, channel);
}
@@ -670,7 +675,9 @@ BOOL LLDrawPoolBump::bindBumpMap(U8 bump_code, LLViewerTexture* texture, F32 vsi
case BE_DARKNESS:
bump = gBumpImageList.getBrightnessDarknessImage( tex, bump_code );
break;
-
+ case BE_CUSTOM:
+ bump = tex;
+ break;
default:
if( bump_code < LLStandardBumpmap::sStandardBumpmapCount )
{
@@ -855,7 +862,9 @@ void LLDrawPoolBump::renderDeferred(S32 pass)
for (LLCullResult::drawinfo_iterator i = begin; i != end; ++i)
{
LLDrawInfo& params = **i;
-
+
+ gDeferredBumpProgram.uniform4fv(LLShaderMgr::SPECULAR_COLOR, 4, (GLfloat*)params.mSpecColor.mV);
+
LLDrawPoolBump::bindBumpMap(params, bump_channel);
pushBatch(params, mask, TRUE);
}