summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorGraham Madarasz (Graham) <graham@lindenlab.com>2013-05-03 09:16:15 -0700
committerGraham Madarasz (Graham) <graham@lindenlab.com>2013-05-03 09:16:15 -0700
commit04fceb5f006d6f3b9b36996382e4c1483a599dde (patch)
tree28085d2cded5908ce654d9ef201f3a67cf804848 /indra/newview
parentf1975f0fe9d09b0c9cffa94dad31de2c9f0d4849 (diff)
NORSPEC-151 make disabling bumpyshiny disable adv lighting model as well
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llface.cpp1
-rwxr-xr-xindra/newview/llfloaterpreference.cpp5
-rw-r--r--indra/newview/llvovolume.cpp3
-rw-r--r--indra/newview/pipeline.cpp3
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml23
5 files changed, 22 insertions, 13 deletions
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index 08a16c9c33..dad62dd045 100644
--- 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<LLCheckBoxCtrl>("BumpShiny");
bool bumpshiny = gGLManager.mHasCubeMap && LLCubeMap::sUseCubeMaps && LLFeatureManager::getInstance()->isFeatureAvailable("RenderObjectBump");
- getChild<LLCheckBoxCtrl>("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<LLCheckBoxCtrl>("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 100644
--- 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 f053d26172..4cce654f47 100644
--- 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 100644
--- 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" />
- <check_box
- control_name="RenderObjectBump"
- height="16"
- initial_value="true"
- label="Bump mapping and shiny"
- layout="topleft"
- left_delta="0"
- name="BumpShiny"
- top_pad="1"
- width="256" />
+ <check_box
+ control_name="RenderObjectBump"
+ height="16"
+ initial_value="true"
+ label="Bump mapping and shiny"
+ layout="topleft"
+ left_delta="0"
+ name="BumpShiny"
+ top_pad="1"
+ width="256">
+ <check_box.commit_callback
+ function="Pref.VertexShaderEnable" />
+ </check_box>
<check_box
control_name="RenderLocalLights"
height="16"