Skip to content

Commit

Permalink
merge dof settings
Browse files Browse the repository at this point in the history
  • Loading branch information
ThirteenAG committed Jan 23, 2024
1 parent 4cd6c0f commit e7ed9a2
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 30 deletions.
15 changes: 7 additions & 8 deletions data/update/TBoGT/common/data/frontend_menus.xml
Original file line number Diff line number Diff line change
Expand Up @@ -394,10 +394,11 @@
</menupc>
<menupc enum="MENU_DISPLAY_DOF">
<options text="Off" action="ACTION_NONE" value="1" />
<options text="Low" action="ACTION_NONE" value="2" />
<options text="Medium" action="ACTION_NONE" value="3" />
<options text="High" action="ACTION_NONE" value="4" />
<options text="Very High" action="ACTION_NONE" value="5" />
<options text="Cutscenes Only" action="ACTION_NONE" value="2" />
<options text="Low" action="ACTION_NONE" value="3" />
<options text="Medium" action="ACTION_NONE" value="4" />
<options text="High" action="ACTION_NONE" value="5" />
<options text="Very High" action="ACTION_NONE" value="6" />
</menupc>
<menupc enum="MENU_DISPLAY_TREE_LIGHTING">
<options text="PC" action="ACTION_NONE" value="1" />
Expand Down Expand Up @@ -615,8 +616,7 @@
<optionspc action="MENUOPT_ADJUST" label="Bloom" value="PREF_BLOOM" scaler="2" displayValue="MENU_DISPLAY_ON_OFF" />
<optionspc action="MENUOPT_ADJUST" label="Console Gamma" value="PREF_CONSOLE_GAMMA" scaler="2" displayValue="MENU_DISPLAY_ON_OFF" />
<optionspc action="MENUOPT_ADJUST" label="Screen Filter" value="PREF_TIMECYC" scaler="10" displayValue="MENU_DISPLAY_TIMECYC" />
<optionspc action="MENUOPT_ADJUST" label="Distant Blur" value="PREF_TCYC_DOF" scaler="10" displayValue="MENU_DISPLAY_DOF" />
<optionspc action="MENUOPT_ADJUST" label="Depth of Field" value="PREF_CUTSCENE_DOF" scaler="2" displayValue="MENU_DISPLAY_ON_OFF" />
<optionspc action="MENUOPT_ADJUST" label="Depth of Field" value="PREF_TCYC_DOF" scaler="11" displayValue="MENU_DISPLAY_DOF" />
<optionspc action="MENUOPT_ADJUST" label="TreeFX" value="PREF_TREE_LIGHTING" scaler="9" displayValue="MENU_DISPLAY_TREE_LIGHTING" />
<optionspc action="MENUOPT_ADJUST" label="Definition" value="PREF_DEFINITION" scaler="7" displayValue="MENU_DISPLAY_DEFINITION" />
<options action="MENUOPT_NONE" label="" value="PREF_NULL" scaler="0" displayValue="MENU_DISPLAY_NONE" />
Expand Down Expand Up @@ -1310,8 +1310,7 @@
displayValue="MENU_DISPLAY_ON_OFF" />
<options action="MENUOPT_NONE" label="" value="PREF_NULL" scaler="0" displayValue="MENU_DISPLAY_NONE" />
<optionspc action="MENUOPT_ADJUST" label="Screen Filter" value="PREF_TIMECYC" scaler="10" displayValue="MENU_DISPLAY_TIMECYC" />
<optionspc action="MENUOPT_ADJUST" label="Distant Blur" value="PREF_TCYC_DOF" scaler="10" displayValue="MENU_DISPLAY_DOF" />
<optionspc action="MENUOPT_ADJUST" label="Depth of Field" value="PREF_CUTSCENE_DOF" scaler="2" displayValue="MENU_DISPLAY_ON_OFF" />
<optionspc action="MENUOPT_ADJUST" label="Depth of Field" value="PREF_TCYC_DOF" scaler="11" displayValue="MENU_DISPLAY_DOF" />
<optionspc action="MENUOPT_ADJUST" label="TreeFX" value="PREF_TREE_LIGHTING" scaler="9" displayValue="MENU_DISPLAY_TREE_LIGHTING" />
<optionspc action="MENUOPT_ADJUST" label="Definition" value="PREF_DEFINITION" scaler="7" displayValue="MENU_DISPLAY_DEFINITION" />
<options action="MENUOPT_NONE" label="" value="PREF_NULL" scaler="0" displayValue="MENU_DISPLAY_NONE" />
Expand Down
15 changes: 7 additions & 8 deletions data/update/TLAD/common/data/frontend_menus.xml
Original file line number Diff line number Diff line change
Expand Up @@ -470,10 +470,11 @@
</menupc>
<menupc enum="MENU_DISPLAY_DOF">
<options text="Off" action="ACTION_NONE" value="1" />
<options text="Low" action="ACTION_NONE" value="2" />
<options text="Medium" action="ACTION_NONE" value="3" />
<options text="High" action="ACTION_NONE" value="4" />
<options text="Very High" action="ACTION_NONE" value="5" />
<options text="Cutscenes Only" action="ACTION_NONE" value="2" />
<options text="Low" action="ACTION_NONE" value="3" />
<options text="Medium" action="ACTION_NONE" value="4" />
<options text="High" action="ACTION_NONE" value="5" />
<options text="Very High" action="ACTION_NONE" value="6" />
</menupc>
<menupc enum="MENU_DISPLAY_TREE_LIGHTING">
<options text="PC" action="ACTION_NONE" value="1" />
Expand Down Expand Up @@ -645,8 +646,7 @@
<optionspc action="MENUOPT_ADJUST" label="Bloom" value="PREF_BLOOM" scaler="2" displayValue="MENU_DISPLAY_ON_OFF" />
<optionspc action="MENUOPT_ADJUST" label="Console Gamma" value="PREF_CONSOLE_GAMMA" scaler="2" displayValue="MENU_DISPLAY_ON_OFF" />
<optionspc action="MENUOPT_ADJUST" label="Screen Filter" value="PREF_TIMECYC" scaler="10" displayValue="MENU_DISPLAY_TIMECYC" />
<optionspc action="MENUOPT_ADJUST" label="Distant Blur" value="PREF_TCYC_DOF" scaler="10" displayValue="MENU_DISPLAY_DOF" />
<optionspc action="MENUOPT_ADJUST" label="Depth of Field" value="PREF_CUTSCENE_DOF" scaler="2" displayValue="MENU_DISPLAY_ON_OFF" />
<optionspc action="MENUOPT_ADJUST" label="Depth of Field" value="PREF_TCYC_DOF" scaler="11" displayValue="MENU_DISPLAY_DOF" />
<optionspc action="MENUOPT_ADJUST" label="TreeFX" value="PREF_TREE_LIGHTING" scaler="9" displayValue="MENU_DISPLAY_TREE_LIGHTING" />
<optionspc action="MENUOPT_ADJUST" label="Definition" value="PREF_DEFINITION" scaler="7" displayValue="MENU_DISPLAY_DEFINITION" />
<options action="MENUOPT_NONE" label="" value="PREF_NULL" scaler="0" displayValue="MENU_DISPLAY_NONE" />
Expand Down Expand Up @@ -1278,8 +1278,7 @@
<optionsps3 action="MENUOPT_ADJUST" label="MO_FLIC" value="PREF_FLICKER_FILTER" scaler="2" displayValue="MENU_DISPLAY_ON_OFF" />
<options action="MENUOPT_NONE" label="" value="PREF_NULL" scaler="0" displayValue="MENU_DISPLAY_NONE" />
<optionspc action="MENUOPT_ADJUST" label="Screen Filter" value="PREF_TIMECYC" scaler="10" displayValue="MENU_DISPLAY_TIMECYC" />
<optionspc action="MENUOPT_ADJUST" label="Distant Blur" value="PREF_TCYC_DOF" scaler="10" displayValue="MENU_DISPLAY_DOF" />
<optionspc action="MENUOPT_ADJUST" label="Depth of Field" value="PREF_CUTSCENE_DOF" scaler="2" displayValue="MENU_DISPLAY_ON_OFF" />
<optionspc action="MENUOPT_ADJUST" label="Depth of Field" value="PREF_TCYC_DOF" scaler="11" displayValue="MENU_DISPLAY_DOF" />
<optionspc action="MENUOPT_ADJUST" label="TreeFX" value="PREF_TREE_LIGHTING" scaler="9" displayValue="MENU_DISPLAY_TREE_LIGHTING" />
<optionspc action="MENUOPT_ADJUST" label="Definition" value="PREF_DEFINITION" scaler="7" displayValue="MENU_DISPLAY_DEFINITION" />
<options action="MENUOPT_NONE" label="" value="PREF_NULL" scaler="0" displayValue="MENU_DISPLAY_NONE" />
Expand Down
15 changes: 7 additions & 8 deletions data/update/common/data/frontend_menus.xml
Original file line number Diff line number Diff line change
Expand Up @@ -325,10 +325,11 @@

<menupc enum="MENU_DISPLAY_DOF">
<options text="Off" action="ACTION_NONE" value="1" />
<options text="Low" action="ACTION_NONE" value="2" />
<options text="Medium" action="ACTION_NONE" value="3" />
<options text="High" action="ACTION_NONE" value="4" />
<options text="Very High" action="ACTION_NONE" value="5" />
<options text="Cutscenes Only" action="ACTION_NONE" value="2" />
<options text="Low" action="ACTION_NONE" value="3" />
<options text="Medium" action="ACTION_NONE" value="4" />
<options text="High" action="ACTION_NONE" value="5" />
<options text="Very High" action="ACTION_NONE" value="6" />
</menupc>

<menupc enum="MENU_DISPLAY_TREE_LIGHTING">
Expand Down Expand Up @@ -521,8 +522,7 @@
<optionspc action="MENUOPT_ADJUST" label="Bloom" value="PREF_BLOOM" scaler="2" displayValue="MENU_DISPLAY_ON_OFF" />
<optionspc action="MENUOPT_ADJUST" label="Console Gamma" value="PREF_CONSOLE_GAMMA" scaler="2" displayValue="MENU_DISPLAY_ON_OFF" />
<optionspc action="MENUOPT_ADJUST" label="Screen Filter" value="PREF_TIMECYC" scaler="10" displayValue="MENU_DISPLAY_TIMECYC" />
<optionspc action="MENUOPT_ADJUST" label="Distant Blur" value="PREF_TCYC_DOF" scaler="10" displayValue="MENU_DISPLAY_DOF" />
<optionspc action="MENUOPT_ADJUST" label="Depth of Field" value="PREF_CUTSCENE_DOF" scaler="2" displayValue="MENU_DISPLAY_ON_OFF" />
<optionspc action="MENUOPT_ADJUST" label="Depth of Field" value="PREF_TCYC_DOF" scaler="11" displayValue="MENU_DISPLAY_DOF" />
<optionspc action="MENUOPT_ADJUST" label="TreeFX" value="PREF_TREE_LIGHTING" scaler="9" displayValue="MENU_DISPLAY_TREE_LIGHTING" />
<optionspc action="MENUOPT_ADJUST" label="Definition" value="PREF_DEFINITION" scaler="7" displayValue="MENU_DISPLAY_DEFINITION" />
<options action="MENUOPT_NONE" label="" value="PREF_NULL" scaler="0" displayValue="MENU_DISPLAY_NONE" />
Expand Down Expand Up @@ -897,8 +897,7 @@
<optionsps3 action="MENUOPT_ADJUST" label="MO_FLIC" value="PREF_FLICKER_FILTER" scaler="2" displayValue="MENU_DISPLAY_ON_OFF" />
<options action="MENUOPT_NONE" label="" value="PREF_NULL" scaler="0" displayValue="MENU_DISPLAY_NONE" />
<optionspc action="MENUOPT_ADJUST" label="Screen Filter" value="PREF_TIMECYC" scaler="10" displayValue="MENU_DISPLAY_TIMECYC" />
<optionspc action="MENUOPT_ADJUST" label="Distant Blur" value="PREF_TCYC_DOF" scaler="10" displayValue="MENU_DISPLAY_DOF" />
<optionspc action="MENUOPT_ADJUST" label="Depth of Field" value="PREF_CUTSCENE_DOF" scaler="2" displayValue="MENU_DISPLAY_ON_OFF" />
<optionspc action="MENUOPT_ADJUST" label="Depth of Field" value="PREF_TCYC_DOF" scaler="11" displayValue="MENU_DISPLAY_DOF" />
<optionspc action="MENUOPT_ADJUST" label="TreeFX" value="PREF_TREE_LIGHTING" scaler="9" displayValue="MENU_DISPLAY_TREE_LIGHTING" />
<optionspc action="MENUOPT_ADJUST" label="Definition" value="PREF_DEFINITION" scaler="7" displayValue="MENU_DISPLAY_DEFINITION" />
<options action="MENUOPT_NONE" label="" value="PREF_NULL" scaler="0" displayValue="MENU_DISPLAY_NONE" />
Expand Down
8 changes: 4 additions & 4 deletions source/settings.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,11 @@ public:
{ 0, "PREF_SSAA", "MISC", "SSAA", "", 0, nullptr, 0, 1 },
{ 0, "PREF_CONSOLE_GAMMA", "MISC", "ConsoleGamma", "", 0, nullptr, 0, 1 },
{ 0, "PREF_TIMECYC", "MISC", "ScreenFilter", "MENU_DISPLAY_TIMECYC", 5, nullptr, TimecycText.eMO_DEF, std::distance(std::begin(TimecycText.data), std::end(TimecycText.data)) - 1 },
{ 0, "PREF_CUTSCENE_DOF", "MISC", "DepthOfField", "", 1, nullptr, 0, 1 },
/*UNUSED*/{ 0, "PREF_CUTSCENE_DOF", "MISC", "DistantBlurUnused", "", 1, nullptr, 0, 1 },
{ 0, "PREF_CONSOLE_SHADOWS", "SHADOWS", "ConsoleShadows", "", 1, nullptr, 0, 1 },
{ 0, "PREF_SHADOW_FILTER", "SHADOWS", "ShadowFilter", "MENU_DISPLAY_SHADOWFILTER", 3, nullptr, ShadowFilterText.eSharp, std::distance(std::begin(ShadowFilterText.data), std::end(ShadowFilterText.data)) - 1 },
{ 0, "PREF_TREE_LIGHTING", "MISC", "TreeLighting", "MENU_DISPLAY_TREE_LIGHTING", 8, nullptr, TreeFxText.ePC, std::distance(std::begin(TreeFxText.data), std::end(TreeFxText.data)) - 1 },
{ 0, "PREF_TCYC_DOF", "MISC", "DistantBlur", "MENU_DISPLAY_DOF", 7, nullptr, DofText.eOff, std::distance(std::begin(DofText.data), std::end(DofText.data)) - 1 },
{ 0, "PREF_TCYC_DOF", "MISC", "DepthOfField", "MENU_DISPLAY_DOF", 7, nullptr, DofText.eOff, std::distance(std::begin(DofText.data), std::end(DofText.data)) - 1 },
{ 0, "PREF_MOTIONBLUR", "MAIN", "MotionBlur", "", 0, nullptr, 0, 1 },
{ 0, "PREF_LEDILLUMINATION", "MISC", "LightSyncRGB", "", 0, nullptr, 0, 1 },
{ 0, "PREF_DEFINITION", "MAIN", "Definition", "MENU_DISPLAY_DEFINITION", 6, nullptr, DefinitionText.eClassic, std::distance(std::begin(DefinitionText.data), std::end(DefinitionText.data)) - 1 },
Expand Down Expand Up @@ -352,9 +352,9 @@ public:
struct
{
enum eDofText {
eAuto, e43, e54, e159, e169, eOff, eLow, eMedium, eHigh, eVeryHigh
eAuto, e43, e54, e159, e169, eOff, eCutscenesOnly, eLow, eMedium, eHigh, eVeryHigh
};
std::vector<const char*> data = { "Auto", "4:3", "5:4", "15:9", "16:9", "Off", "Low", "Medium", "High", "Very High" };
std::vector<const char*> data = { "Auto", "4:3", "5:4", "15:9", "16:9", "Off", "Cutscenes Only", "Low", "Medium", "High", "Very High"};
} DofText;

struct
Expand Down
4 changes: 2 additions & 2 deletions source/shaders.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,12 @@ public:

// FXAA, DOF, Gamma
{
static auto cutscene_dof = FusionFixSettings.GetRef("PREF_CUTSCENE_DOF");
static auto cutscene_dof = FusionFixSettings.GetRef("PREF_TCYC_DOF");
static auto gamma = FusionFixSettings.GetRef("PREF_CONSOLE_GAMMA");
static auto mblur = FusionFixSettings.GetRef("PREF_MOTIONBLUR");
static float arr3[4];
arr3[0] = (bFixAutoExposure ? 1.0f : 0.0f);
arr3[1] = static_cast<float>(cutscene_dof->get());
arr3[1] = static_cast<float>(cutscene_dof->get() >= FusionFixSettings.DofText.eCutscenesOnly);
arr3[2] = static_cast<float>(gamma->get());
arr3[3] = static_cast<float>(mblur->get());
pDevice->SetPixelShaderConstantF(222, &arr3[0], 1);
Expand Down
1 change: 1 addition & 0 deletions source/timecyc.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ int timecyc_scanf(const char* i, const char* fmt, int* mAmbient0ColorR, int* mAm
switch (FusionFixSettings("PREF_TCYC_DOF"))
{
case FusionFixSettings.DofText.eOff:
case FusionFixSettings.DofText.eCutscenesOnly:
*mNearDOFBlur *= 0.0f;
*mFarDOFBlur *= 0.0f;
break;
Expand Down

0 comments on commit e7ed9a2

Please sign in to comment.