diff options
| author | andreykproductengine <andreykproductengine@lindenlab.com> | 2017-11-13 14:26:15 +0200 |
|---|---|---|
| committer | andreykproductengine <andreykproductengine@lindenlab.com> | 2017-11-13 14:26:15 +0200 |
| commit | 9de2af8b2dde7dc326f970d61950bebc565883f6 (patch) | |
| tree | 87d799179a0fdb1ad6279f62a4f41747dedfce19 /indra/newview/llface.cpp | |
| parent | 8da9e0ffd73e30a55734864e49a6ec917e3bee00 (diff) | |
MAINT-7847 Remake of 'white alpfa' fix
Diffstat (limited to 'indra/newview/llface.cpp')
| -rw-r--r-- | indra/newview/llface.cpp | 36 |
1 files changed, 32 insertions, 4 deletions
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index c6fff6e57a..d502e686c7 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -344,6 +344,34 @@ void LLFace::dirtyTexture() gPipeline.markTextured(drawablep); } +void LLFace::notifyAboutCreatingTexture(LLViewerTexture *texture) +{ + LLDrawable* drawablep = getDrawable(); + if(mVObjp.notNull() && mVObjp->getVolume()) + { + LLVOVolume *vobj = drawablep->getVOVolume(); + if(vobj && vobj->notifyAboutCreatingTexture(texture)) + { + gPipeline.markTextured(drawablep); + gPipeline.markRebuild(drawablep, LLDrawable::REBUILD_VOLUME); + } + } +} + +void LLFace::notifyAboutMissingAsset(LLViewerTexture *texture) +{ + LLDrawable* drawablep = getDrawable(); + if(mVObjp.notNull() && mVObjp->getVolume()) + { + LLVOVolume *vobj = drawablep->getVOVolume(); + if(vobj && vobj->notifyAboutMissingAsset(texture)) + { + gPipeline.markTextured(drawablep); + gPipeline.markRebuild(drawablep, LLDrawable::REBUILD_VOLUME); + } + } +} + void LLFace::switchTexture(U32 ch, LLViewerTexture* new_texture) { llassert(ch < LLRender::NUM_TEXTURE_CHANNELS); @@ -1056,7 +1084,7 @@ bool LLFace::canRenderAsMask() } LLMaterial* mat = te->getMaterialParams(); - if (mat && mat->getDiffuseAlphaMode() == LLMaterial::DIFFUSE_ALPHA_MODE_BLEND) + if (mat && !mat->isDiffuseAlphaInvalid() && mat->getDiffuseAlphaMode() == LLMaterial::DIFFUSE_ALPHA_MODE_BLEND) { return false; } @@ -1290,14 +1318,14 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, if (LLPipeline::sRenderDeferred) { //store shiny in alpha if we don't have a specular map - if (!mat || mat->getSpecularID().isNull()) + if (!mat || mat->getSpecularID().isNull() || mat->isSpecularInvalid()) { shiny_in_alpha = true; } } else { - if (!mat || mat->getDiffuseAlphaMode() != LLMaterial::DIFFUSE_ALPHA_MODE_MASK) + if (!mat || mat->getDiffuseAlphaMode() != LLMaterial::DIFFUSE_ALPHA_MODE_MASK || mat->isDiffuseAlphaInvalid()) { shiny_in_alpha = true; } @@ -1783,7 +1811,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, std::vector<LLVector2> bump_tc; - if (mat && !mat->getNormalID().isNull()) + if (mat && !(mat->getNormalID().isNull() || mat->isNormalInvalid())) { //writing out normal and specular texture coordinates, not bump offsets do_bump = false; } |
