From b60ea52902c86302bc39bb3812b4d0711eaa9bef Mon Sep 17 00:00:00 2001 From: Graham Madarasz Date: Wed, 12 Jun 2013 14:08:16 -0700 Subject: NORSPEC-251 fixed and 258 not regressed --- indra/newview/llpanelface.h | 2 +- indra/newview/llvovolume.cpp | 6 +++++- indra/newview/pipeline.cpp | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpanelface.h b/indra/newview/llpanelface.h index 222f8f3688..a324be7e7e 100755 --- a/indra/newview/llpanelface.h +++ b/indra/newview/llpanelface.h @@ -300,7 +300,7 @@ private: if (tep) { material_ptr = tep->getMaterialParams(); - if (!material_ptr.isNull()) + if (!material_ptr.isNull() && !tep->getMaterialID().isNull()) { ret = (material_ptr->*(MaterialGetFunc))(); } diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index e74d2d4b98..83ffd3e695 100755 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -4115,6 +4115,8 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep, LLMaterial* mat = facep->getTextureEntry()->getMaterialParams().get(); LLMaterialID mat_id = facep->getTextureEntry()->getMaterialID(); + mat = mat_id.isNull() ? NULL : mat; + bool batchable = false; U32 shader_mask = 0xFFFFFFFF; //no shader @@ -4545,6 +4547,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) } LLMaterial* mat = te->getMaterialParams().get(); + mat = te->getMaterialID().isNull() ? NULL : mat; if (mat && LLPipeline::sRenderDeferred) { @@ -4764,7 +4767,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) if (gPipeline.canUseWindLightShadersOnObjects() && LLPipeline::sRenderBump) { - if (LLPipeline::sRenderDeferred && te->getMaterialParams().notNull()) + if (LLPipeline::sRenderDeferred && te->getMaterialParams().notNull() && !te->getMaterialID().isNull()) { LLMaterial* mat = te->getMaterialParams().get(); if (mat->getNormalID().notNull()) @@ -5340,6 +5343,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std:: BOOL is_alpha = (facep->getPoolType() == LLDrawPool::POOL_ALPHA) ? TRUE : FALSE; LLMaterial* mat = te->getMaterialParams().get(); + mat = te->getMaterialID().isNull() ? NULL : mat; bool can_be_shiny = true; if (mat) diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index a2a5552f3c..94152e4afe 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -8691,7 +8691,7 @@ void LLPipeline::renderDeferredLighting() gDeferredPostGammaCorrectProgram.uniform2f(LLShaderMgr::DEFERRED_SCREEN_RES, mScreen.getWidth(), mScreen.getHeight()); F32 gamma = 1.0/2.2; - + gDeferredPostGammaCorrectProgram.uniform1f(LLShaderMgr::TEXTURE_GAMMA, gamma); gGL.begin(LLRender::TRIANGLE_STRIP); -- cgit v1.2.3