From b1ef5dee93d9aa585544e271721f9b84ebf903a9 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Tue, 4 Nov 2014 13:07:14 +0200 Subject: MAINT-4619 FIXED Using Align Planar Faces on flexible prims causes viewer to crash --- indra/newview/llface.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/newview/llface.cpp') diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 32b510b21a..2182b619be 100755 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -956,6 +956,10 @@ void LLFace::getPlanarProjectedParams(LLQuaternion* face_rot, LLVector3* face_po const LLVolumeFace& vf = getViewerObject()->getVolume()->getVolumeFace(mTEOffset); const LLVector4a& normal4a = vf.mNormals[0]; const LLVector4a& tangent = vf.mTangents[0]; + if (!&tangent) + { + return; + } LLVector4a binormal4a; binormal4a.setCross3(normal4a, tangent); -- cgit v1.2.3 From c686407731751ababecf01569fa02eb5ba62337d Mon Sep 17 00:00:00 2001 From: ruslantproductengine Date: Thu, 13 Nov 2014 18:47:57 +0200 Subject: MAINT-4092 FIXED Prim faces with opaque diffuse maps, with material set to ALPHA_MODE_BLEND, do not render MAINT-4645 FIXED [viewer-lion] The build tool shows normal or specular map as 'none' when one exists --- indra/newview/llface.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'indra/newview/llface.cpp') diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 2182b619be..dc74f4a6ef 100755 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -1303,15 +1303,15 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, } if (shiny_in_alpha) - { - - GLfloat alpha[4] = { - 0.00f, - 0.25f, - 0.5f, - 0.75f - }; + + static const GLfloat alpha[4] = + { + 0.00f, + 0.25f, + 0.5f, + 0.75f + }; llassert(tep->getShiny() <= 3); color.mV[3] = U8 (alpha[tep->getShiny()] * 255); -- cgit v1.2.3 From bb3517c24e77e7fdea915a8a57326e10e8261d7c Mon Sep 17 00:00:00 2001 From: ruslantproductengine Date: Wed, 7 Jan 2015 02:04:03 +0200 Subject: MAINT-4773 FIXED Some transparent textures are rendered as white. This bug fix related also to MAINT-4092. In 4092 sometimes when we don't have information about the texture during the setup the materail (LLVOVolume::setTEMaterialParams()), we should substitute the material with disabled "diffuse alpha mode" (for detail in cases see MAINT-4092 JIRA ticket comment). This bug fix cover the case when after the loading texture we have all information about alpha mode, and in this case we should restore diffuse alpha mode if need. In short: now we always believe that information about the material is valid (LLVOVolume::setTEMaterialParams()). Of course before setup it we check information about texture (if it possible) , if texture is not exist in database or not 32 bit depth (for diffuse) we made changes. But in all other cases (if we can't receive information about texture) we remeber this case in mWaitingTextureInfo multimap. When information about texture will be available we get it in: LLVOVolume::notify AboutCreatingTexture() or Volume::notifyAboutMissingAsset() and again, we recheck it and if need change (substitute) the material parameters. I suppose that this solution is better than was before. If this patch will be accepted , I think that MAINT-4092 should be rechecked again. --- indra/newview/llface.cpp | 42 +++++++++++++++++++++++++++++++++++------- 1 file changed, 35 insertions(+), 7 deletions(-) (limited to 'indra/newview/llface.cpp') diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index dc74f4a6ef..de349a03d4 100755 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -330,24 +330,52 @@ void LLFace::dirtyTexture() { vobj->mLODChanged = TRUE; - LLVOAvatar* avatar = vobj->getAvatar(); - if (avatar) - { //avatar render cost may have changed - avatar->updateVisualComplexity(); - } + LLVOAvatar* avatar = vobj->getAvatar(); + if (avatar) + { //avatar render cost may have changed + avatar->updateVisualComplexity(); + } } gPipeline.markRebuild(drawablep, LLDrawable::REBUILD_VOLUME, FALSE); } } } - + 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); - + if(mTexture[ch] == new_texture) { return ; -- cgit v1.2.3