diff options
Diffstat (limited to 'indra/newview/lldrawpoolbump.cpp')
-rw-r--r-- | indra/newview/lldrawpoolbump.cpp | 29 |
1 files changed, 4 insertions, 25 deletions
diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp index 07384a136a..a264eae302 100644 --- a/indra/newview/lldrawpoolbump.cpp +++ b/indra/newview/lldrawpoolbump.cpp @@ -72,7 +72,7 @@ static LLGLSLShader* shader = NULL; static S32 cube_channel = -1; static S32 diffuse_channel = -1; static S32 bump_channel = -1; -static S32 spec_channel = -1; + // static void LLStandardBumpmap::init() { @@ -153,7 +153,7 @@ void LLStandardBumpmap::addstandard() gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount].mLabel = label; gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount].mImage = LLViewerTextureManager::getFetchedTexture(LLUUID(bump_image_id)); - gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount].mImage->setBoostLevel(LLViewerTexture::BOOST_BUMP); + gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount].mImage->setBoostLevel(LLViewerTexture::BOOST_BUMP) ; gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount].mImage->setLoadedCallback(LLBumpImageList::onSourceStandardLoaded, 0, TRUE, FALSE, NULL, NULL ); gStandardBumpmapList[LLStandardBumpmap::sStandardBumpmapCount].mImage->forceToSaveRawImage(0) ; LLStandardBumpmap::sStandardBumpmapCount++; @@ -632,11 +632,6 @@ 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 = 99; - return bindBumpMap(bump_code, params.mNormalMap, params.mVSize, channel); - } return bindBumpMap(bump_code, params.mTexture, params.mVSize, channel); } @@ -675,10 +670,7 @@ BOOL LLDrawPoolBump::bindBumpMap(U8 bump_code, LLViewerTexture* texture, F32 vsi case BE_DARKNESS: bump = gBumpImageList.getBrightnessDarknessImage( tex, bump_code ); break; - case 99: - bump = tex; - bump->addTextureStats(vsize); - break; + default: if( bump_code < LLStandardBumpmap::sStandardBumpmapCount ) { @@ -828,7 +820,6 @@ void LLDrawPoolBump::beginDeferredPass(S32 pass) gDeferredBumpProgram.bind(); diffuse_channel = gDeferredBumpProgram.enableTexture(LLViewerShaderMgr::DIFFUSE_MAP); bump_channel = gDeferredBumpProgram.enableTexture(LLViewerShaderMgr::BUMP_MAP); - spec_channel = gDeferredBumpProgram.enableTexture(LLViewerShaderMgr::SPECULAR_MAP); gGL.getTexUnit(diffuse_channel)->unbind(LLTexUnit::TT_TEXTURE); gGL.getTexUnit(bump_channel)->unbind(LLTexUnit::TT_TEXTURE); } @@ -843,7 +834,6 @@ void LLDrawPoolBump::endDeferredPass(S32 pass) mShiny = FALSE; gDeferredBumpProgram.disableTexture(LLViewerShaderMgr::DIFFUSE_MAP); gDeferredBumpProgram.disableTexture(LLViewerShaderMgr::BUMP_MAP); - gDeferredBumpProgram.disableTexture(LLViewerShaderMgr::SPECULAR_MAP); gDeferredBumpProgram.unbind(); gGL.getTexUnit(0)->activate(); } @@ -865,18 +855,7 @@ void LLDrawPoolBump::renderDeferred(S32 pass) for (LLCullResult::drawinfo_iterator i = begin; i != end; ++i) { LLDrawInfo& params = **i; - - gDeferredBumpProgram.uniform4f(LLShaderMgr::SPECULAR_COLOR, params.mSpecColor.mV[0], params.mSpecColor.mV[1], params.mSpecColor.mV[2], params.mSpecColor.mV[3]); - gDeferredBumpProgram.uniform1f(LLShaderMgr::ENVIRONMENT_INTENSITY, params.mEnvIntensity); - - if (params.mSpecularMap) - { - params.mSpecularMap->addTextureStats(params.mVSize); - gGL.getTexUnit(spec_channel)->bind(params.mSpecularMap); - } else { - gGL.getTexUnit(spec_channel)->bind(LLViewerFetchedTexture::sWhiteImagep); - } - + LLDrawPoolBump::bindBumpMap(params, bump_channel); pushBatch(params, mask, TRUE); } |