summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2011-04-07 00:27:48 -0500
committerDave Parks <davep@lindenlab.com>2011-04-07 00:27:48 -0500
commite52613aad6bc2a9ec2b20171e59fee5a124d5765 (patch)
treeee2f94471f23b6e1e9a4c89289e597ee854b14fe /indra
parent2bf450f48cac5077f2398c70164d35ea49cb3385 (diff)
SH-1318 Add check box for disabling depth of field.
Diffstat (limited to 'indra')
-rwxr-xr-xindra/newview/app_settings/settings.xml12
-rw-r--r--indra/newview/llfloaterpreference.cpp15
-rwxr-xr-xindra/newview/pipeline.cpp4
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml13
4 files changed, 42 insertions, 2 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 4b530d5b55..386fae8fa5 100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -7717,6 +7717,18 @@
<key>Value</key>
<real>0</real>
</map>
+
+ <key>RenderDepthOfField</key>
+ <map>
+ <key>Comment</key>
+ <string>Whether to use depth of field effect when lighting and shadows are enabled</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
<key>RenderSpotLightsInNondeferred</key>
<map>
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index a90bacf41d..5172370890 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -1046,11 +1046,13 @@ void LLFloaterPreference::refreshEnabledState()
ctrl_deferred->setEnabled(enabled);
LLCheckBoxCtrl* ctrl_ssao = getChild<LLCheckBoxCtrl>("UseSSAO");
+ LLCheckBoxCtrl* ctrl_dof = getChild<LLCheckBoxCtrl>("UseDoF");
LLComboBox* ctrl_shadow = getChild<LLComboBox>("ShadowDetail");
enabled = enabled && LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferredSSAO") && (ctrl_deferred->get() ? TRUE : FALSE);
ctrl_ssao->setEnabled(enabled);
+ ctrl_dof->setEnabled(enabled);
enabled = enabled && LLFeatureManager::getInstance()->isFeatureAvailable("RenderShadowDetail");
@@ -1074,6 +1076,7 @@ void LLFloaterPreference::disableUnavailableSettings()
LLCheckBoxCtrl* ctrl_deferred = getChild<LLCheckBoxCtrl>("UseLightShaders");
LLComboBox* ctrl_shadows = getChild<LLComboBox>("ShadowDetail");
LLCheckBoxCtrl* ctrl_ssao = getChild<LLCheckBoxCtrl>("UseSSAO");
+ LLCheckBoxCtrl* ctrl_dof = getChild<LLCheckBoxCtrl>("UseDoF");
// if vertex shaders off, disable all shader related products
if(!LLFeatureManager::getInstance()->isFeatureAvailable("VertexShaderEnable"))
@@ -1099,6 +1102,9 @@ void LLFloaterPreference::disableUnavailableSettings()
ctrl_ssao->setEnabled(FALSE);
ctrl_ssao->setValue(FALSE);
+ ctrl_dof->setEnabled(FALSE);
+ ctrl_dof->setValue(FALSE);
+
ctrl_deferred->setEnabled(FALSE);
ctrl_deferred->setValue(FALSE);
}
@@ -1116,6 +1122,9 @@ void LLFloaterPreference::disableUnavailableSettings()
ctrl_ssao->setEnabled(FALSE);
ctrl_ssao->setValue(FALSE);
+ ctrl_dof->setEnabled(FALSE);
+ ctrl_dof->setValue(FALSE);
+
ctrl_deferred->setEnabled(FALSE);
ctrl_deferred->setValue(FALSE);
}
@@ -1130,6 +1139,9 @@ void LLFloaterPreference::disableUnavailableSettings()
ctrl_ssao->setEnabled(FALSE);
ctrl_ssao->setValue(FALSE);
+ ctrl_dof->setEnabled(FALSE);
+ ctrl_dof->setValue(FALSE);
+
ctrl_deferred->setEnabled(FALSE);
ctrl_deferred->setValue(FALSE);
}
@@ -1171,6 +1183,9 @@ void LLFloaterPreference::disableUnavailableSettings()
ctrl_ssao->setEnabled(FALSE);
ctrl_ssao->setValue(FALSE);
+ ctrl_dof->setEnabled(FALSE);
+ ctrl_dof->setValue(FALSE);
+
ctrl_deferred->setEnabled(FALSE);
ctrl_deferred->setValue(FALSE);
}
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 5f74423c7b..bf65fd123e 100755
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -6314,8 +6314,8 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
F32 fnumber = gSavedSettings.getF32("CameraFNumber");
F32 default_focal_length = gSavedSettings.getF32("CameraFocalLength");
- if (LLToolMgr::getInstance()->inBuildMode())
- { //squish focal length when in build mode so DoF doesn't make editing objects difficult
+ if (LLToolMgr::getInstance()->inBuildMode() || !gSavedSettings.getBOOL("RenderDepthOfField"))
+ { //squish focal length when in build mode (or if DoF is disabled) so DoF doesn't make editing objects difficult
default_focal_length = 5.f;
}
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 70db3c6592..2e1f41fd74 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml
@@ -258,6 +258,19 @@
<check_box.commit_callback
function="Pref.VertexShaderEnable" />
</check_box>
+ <check_box
+ control_name="RenderDepthOfField"
+ height="16"
+ initial_value="true"
+ label="Depth of Field"
+ layout="topleft"
+ left_delta="0"
+ name="UseDoF"
+ top_pad="1"
+ width="256">
+ <check_box.commit_callback
+ function="Pref.VertexShaderEnable" />
+ </check_box>
<text
type="string"