@@ -1104,7 +1104,9 @@ namespace dxvk {
1104
1104
1105
1105
ImGui::SameLine ();
1106
1106
if (ImGui::Button (" Reset Settings" )) {
1107
- RtxOptions::reset ();
1107
+ for (auto & optionLayer : RtxOptionImpl::getRtxOptionLayerMap ()) {
1108
+ optionLayer.setEnabled (false );
1109
+ }
1108
1110
}
1109
1111
1110
1112
ImGui::SameLine ();
@@ -1975,6 +1977,54 @@ namespace dxvk {
1975
1977
ImGui::Unindent ();
1976
1978
}
1977
1979
#endif
1980
+
1981
+ if (ImGui::CollapsingHeader (" Option Layers" )) {
1982
+ ImGui::Indent ();
1983
+
1984
+ if (ImGui::Button (" Reset runtime settings" )) {
1985
+ // Remove all run-time changed settings
1986
+ RtxOptionLayer::setResetSettings (true );
1987
+ }
1988
+
1989
+ uint32_t optionLayerCounter = 1 ;
1990
+ for (auto & optionLayer : RtxOptionImpl::getRtxOptionLayerMap ()) {
1991
+ // Runtime option layer priority is reserved for real-time user changes.
1992
+ // These layers should not be modified through the GUI.
1993
+ if (optionLayer.getPriority () != RtxOptionLayer::s_runtimeOptionLayerPriority) {
1994
+ ImGui::Dummy (ImVec2 (0 .0f , 5 .0f ));
1995
+ const std::string optionLayerText = std::to_string (optionLayerCounter++) + " . " + optionLayer.getName ();
1996
+ const std::string optionLayerStrengthText = optionLayer.getName () + " Strength" ;
1997
+ if (ImGui::Checkbox (optionLayerText.c_str (), &optionLayer.isEnabledRef ())) {
1998
+ optionLayer.setDirty (true );
1999
+ }
2000
+
2001
+ if (IMGUI_ADD_TOOLTIP (ImGui::SliderFloat (optionLayerStrengthText.c_str (), &optionLayer.getBlendStrengthRef (), 0 .0f , 1 .0f ),
2002
+ " Adjusts the blending strength of this option layer (0 = off, 1 = full effect)." )) {
2003
+ optionLayer.setBlendStrengthDirty (true );
2004
+ }
2005
+
2006
+ if (ImGui::CollapsingHeader ((optionLayer.getName () + " Details" ).c_str (), collapsingHeaderClosedFlags)) {
2007
+ ImGui::Indent ();
2008
+ const std::string priorityText = " Priority: " + std::to_string (optionLayer.getPriority ());
2009
+ ImGui::Text (priorityText.c_str ());
2010
+ if (ImGui::IsItemHovered ()) {
2011
+ ImGui::SetTooltip (
2012
+ " Layers are applied starting with the lowest priority layer, ending with the highest.\n "
2013
+ " Each layer overrides the values written before it.\n "
2014
+ " If a layer's blendWeight is not 1 and the option is a float or Vector type,\n "
2015
+ " then the values will be calculated as LERP(previousValue, layerValue, blendWeight)." );
2016
+ }
2017
+ for (const auto & option : optionLayer.getConfig ().getOptions ()) {
2018
+ const std::string optionText = option.first + " =" + option.second ;
2019
+ ImGui::TextWrapped (optionText.c_str ());
2020
+ }
2021
+ ImGui::Unindent ();
2022
+ }
2023
+ }
2024
+ }
2025
+
2026
+ ImGui::Unindent ();
2027
+ }
1978
2028
}
1979
2029
1980
2030
ImGui::PopItemWidth ();
0 commit comments