diff --git a/indra/llcommon/indra_constants.cpp b/indra/llcommon/indra_constants.cpp index 90866631feefb0a91a19ce24ab020644dedd4356..1d094cd4f4d69bdbf9d0bf425f8ab4d6b0cd51ca 100644 --- a/indra/llcommon/indra_constants.cpp +++ b/indra/llcommon/indra_constants.cpp @@ -68,4 +68,4 @@ const LLUUID TERRAIN_ROCK_DETAIL ("53a2f406-4895-1d13-d541-d2e3b86bc19c"); // V const LLUUID DEFAULT_WATER_NORMAL ("822ded49-9a6c-f61c-cb89-6df54f42cdf4"); // VIEWER -const LLUUID IMG_BLACK_SQUARE_MALEVICH ("3b39cc01-c2d1-e194-1181-e4404978b20c"); // On dataserver +const LLUUID IMG_BLACK_SQUARE ("3b39cc01-c2d1-e194-1181-e4404978b20c"); // On dataserver diff --git a/indra/llcommon/indra_constants.h b/indra/llcommon/indra_constants.h index 6a9e777e695aaa93eb4f9e9965e165717b6c8972..6d39aef32e487f644acb23fb55d19db6f8b205de 100644 --- a/indra/llcommon/indra_constants.h +++ b/indra/llcommon/indra_constants.h @@ -205,7 +205,7 @@ LL_COMMON_API extern const LLUUID TERRAIN_ROCK_DETAIL; LL_COMMON_API extern const LLUUID DEFAULT_WATER_NORMAL; -LL_COMMON_API extern const LLUUID IMG_BLACK_SQUARE_MALEVICH; +LL_COMMON_API extern const LLUUID IMG_BLACK_SQUARE; // radius within which a chat message is fully audible diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index 63e4abb3081fe3bb6d34910cdde6082100ae6fc8..d4f37e51efc32750d4322c82eb0aa64f973a0e41 100644 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -1808,7 +1808,25 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow) { //order is important here LLRender::DIFFUSE_MAP should be last, becouse it change //(gGL).mCurrTextureUnitIndex - gGL.getTexUnit(specular_channel)->bind(LLPipeline::sImpostorRender ? LLViewerTextureManager::findTexture(IMG_BLACK_SQUARE_MALEVICH) : face->getTexture(LLRender::SPECULAR_MAP)); + LLViewerTexture* specular = NULL; + if (LLPipeline::sImpostorRender) + { + std::vector<LLViewerFetchedTexture*> found; + LLViewerTextureManager::findFetchedTextures(IMG_BLACK_SQUARE, found); + if (1 <= found.size()) + { + specular = found[0]; + } + } + else + { + specular = face->getTexture(LLRender::SPECULAR_MAP); + } + if (specular) + { + gGL.getTexUnit(specular_channel)->bind(specular); + } + gGL.getTexUnit(normal_channel)->bind(face->getTexture(LLRender::NORMAL_MAP)); gGL.getTexUnit(sDiffuseChannel)->bind(face->getTexture(LLRender::DIFFUSE_MAP), false, true);