From 9187a06d0bc70ea7670192a5fe53f75ef6f36259 Mon Sep 17 00:00:00 2001 From: "Graham Madarasz (Graham)" Date: Fri, 3 May 2013 09:16:15 -0700 Subject: NORSPEC-151 make disabling bumpyshiny disable adv lighting model as well --- indra/newview/llface.cpp | 1 + indra/newview/llfloaterpreference.cpp | 5 ++++- indra/newview/llvovolume.cpp | 3 ++- indra/newview/pipeline.cpp | 3 ++- .../default/xui/en/panel_preferences_graphics1.xml | 23 ++++++++++++---------- 5 files changed, 22 insertions(+), 13 deletions(-) diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 879dbf8470..999bfc48ef 100755 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -1331,6 +1331,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, getPoolType() != LLDrawPool::POOL_ALPHA && (LLPipeline::sRenderDeferred || (LLPipeline::sRenderBump && tep->getShiny()))) { + llassert(tep->getShiny() <= 3); color.mV[3] = U8 (alpha[tep->getShiny()] * 255); } } diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index bbf88060c1..b45c944a5f 100755 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -1089,8 +1089,9 @@ void LLFloaterPreference::refreshEnabledState() ctrl_reflections->setEnabled(reflections); // Bump & Shiny + LLCheckBoxCtrl* bumpshiny_ctrl = getChild("BumpShiny"); bool bumpshiny = gGLManager.mHasCubeMap && LLCubeMap::sUseCubeMaps && LLFeatureManager::getInstance()->isFeatureAvailable("RenderObjectBump"); - getChild("BumpShiny")->setEnabled(bumpshiny ? TRUE : FALSE); + bumpshiny_ctrl->setEnabled(bumpshiny ? TRUE : FALSE); radio_reflection_detail->setEnabled(reflections); @@ -1149,6 +1150,7 @@ void LLFloaterPreference::refreshEnabledState() LLCheckBoxCtrl* ctrl_deferred = getChild("UseLightShaders"); BOOL enabled = LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred") && + ((bumpshiny_ctrl && bumpshiny_ctrl->get()) ? TRUE : FALSE) && shaders && gGLManager.mHasFramebufferObject && gSavedSettings.getBOOL("RenderAvatarVP") && @@ -2319,3 +2321,4 @@ void LLFloaterPreferenceProxy::onChangeSocksSettings() } } + diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index a08a8a9676..9b940300f5 100755 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -4152,7 +4152,7 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep, draw_vec.push_back(draw_info); draw_info->mTextureMatrix = tex_mat; draw_info->mModelMatrix = model_mat; - if (mat) + if (mat && LLPipeline::sRenderBump && LLPipeline::sRenderDeferred) { // We have a material. Update our draw info accordingly. draw_info->mMaterial = mat; @@ -4178,6 +4178,7 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep, 0.5f, 0.75f }; + llassert(shiny <= 3); float spec = alpha[shiny]; LLVector4 specColor(spec, spec, spec, spec); draw_info->mSpecColor = specColor; diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index c62f099e3b..7317996de6 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -1018,7 +1018,8 @@ void LLPipeline::updateRenderDeferred() { BOOL deferred = ((RenderDeferred && LLRenderTarget::sUseFBO && - LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred") && + LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred") && + LLFeatureManager::getInstance()->isFeatureAvailable("RenderObjectBump") && VertexShaderEnable && RenderAvatarVP && WindLightUseAtmosShaders) ? TRUE : FALSE) && diff --git a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml index 708dcf4e95..d7db7caf66 100755 --- a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml @@ -211,16 +211,19 @@ name="TransparentWater" top_pad="7" width="256" /> - + + +