Add chromatic aberrations.
This commit is contained in:
@@ -19,7 +19,7 @@ static SetBoolFn SetFPSFixEnabled = nullptr;
|
|||||||
static SetBoolFn SetResolutionFixEnabled = nullptr;
|
static SetBoolFn SetResolutionFixEnabled = nullptr;
|
||||||
static SetBoolFn SetAspectRatioFixEnabled = nullptr;
|
static SetBoolFn SetAspectRatioFixEnabled = nullptr;
|
||||||
static SetBoolFn SetDOFFixEnabled = nullptr;
|
static SetBoolFn SetDOFFixEnabled = nullptr;
|
||||||
//static SetBoolFn SetCAFixEnabled = nullptr;
|
static SetBoolFn SetCAFixEnabled = nullptr;
|
||||||
static SetBoolFn SetVignettingFixEnabled = nullptr;
|
static SetBoolFn SetVignettingFixEnabled = nullptr;
|
||||||
static SetBoolFn SetFogFixEnabled = nullptr;
|
static SetBoolFn SetFogFixEnabled = nullptr;
|
||||||
static SetIntFn SetFOV = nullptr;
|
static SetIntFn SetFOV = nullptr;
|
||||||
@@ -33,7 +33,7 @@ static bool FPS_fix_enabled = false;
|
|||||||
static bool Resolution_fix_enabled = false;
|
static bool Resolution_fix_enabled = false;
|
||||||
static bool Aspect_fix_enabled = false;
|
static bool Aspect_fix_enabled = false;
|
||||||
static bool DOF_fix_enabled = false;
|
static bool DOF_fix_enabled = false;
|
||||||
//static bool CA_fix_enabled = false;
|
static bool CA_fix_enabled = false;
|
||||||
static bool Vignetting_fix_enabled = false;
|
static bool Vignetting_fix_enabled = false;
|
||||||
static bool Fog_fix_enabled = false;
|
static bool Fog_fix_enabled = false;
|
||||||
static bool fix_enabled = false;
|
static bool fix_enabled = false;
|
||||||
@@ -49,11 +49,12 @@ const char* FPS_FIX_SETTING = "FPSFIX=";
|
|||||||
const char* RESOLUTION_FIX_SETTING = "ResolutionFIX=";
|
const char* RESOLUTION_FIX_SETTING = "ResolutionFIX=";
|
||||||
const char* ASPECT_FIX_SETTING = "AspectFIX=";
|
const char* ASPECT_FIX_SETTING = "AspectFIX=";
|
||||||
const char* DOF_FIX_SETTING = "DOFFIX=";
|
const char* DOF_FIX_SETTING = "DOFFIX=";
|
||||||
|
const char* CA_FIX_SETTING = "ChromaticAberrationsFIX=";
|
||||||
const char* VIGNETTING_FIX_SETTING = "VignettingFIX=";
|
const char* VIGNETTING_FIX_SETTING = "VignettingFIX=";
|
||||||
const char* FOG_FIX_SETTING = "FogFIX=";
|
const char* FOG_FIX_SETTING = "FogFIX=";
|
||||||
const char* WORLD_FOV_SETTING = "WorldFOV=";
|
const char* WORLD_FOV_SETTING = "WorldFOV=";
|
||||||
const char* FIX_VERSION = "1.0.2";
|
const char* FIX_VERSION = "1.0.3";
|
||||||
const char* FIX_INFORMATIONS = "This fix allows to:\n - Control FOV in game.\n - Unlock ultrawide resolutions.\n - Remove pillar boxing.\n - Unlock FPS.\n - Disable depth of field.\n - Disable vignetting.\n - Disable FOG.";
|
const char* FIX_INFORMATIONS = "This fix allows to:\n - Control FOV in game.\n - Unlock ultrawide resolutions.\n - Remove pillar boxing.\n - Unlock FPS.\n - Disable depth of field.\n - Disable chromatic aberrations.\n - Disable vignetting.\n - Disable FOG.";
|
||||||
const char* DONATION_URL = "https://buymeacoffee.com/k4sh44";
|
const char* DONATION_URL = "https://buymeacoffee.com/k4sh44";
|
||||||
|
|
||||||
|
|
||||||
@@ -75,6 +76,7 @@ static void LoadFixDLL()
|
|||||||
SetResolutionFixEnabled = (SetBoolFn)GetProcAddress(fixLib, "SetResolutionFixEnabled");
|
SetResolutionFixEnabled = (SetBoolFn)GetProcAddress(fixLib, "SetResolutionFixEnabled");
|
||||||
SetAspectRatioFixEnabled = (SetBoolFn)GetProcAddress(fixLib, "SetAspectRatioFixEnabled");
|
SetAspectRatioFixEnabled = (SetBoolFn)GetProcAddress(fixLib, "SetAspectRatioFixEnabled");
|
||||||
SetDOFFixEnabled = (SetBoolFn)GetProcAddress(fixLib, "SetDOFFixEnabled");
|
SetDOFFixEnabled = (SetBoolFn)GetProcAddress(fixLib, "SetDOFFixEnabled");
|
||||||
|
SetCAFixEnabled = (SetBoolFn)GetProcAddress(fixLib, "SetCAFixEnabled");
|
||||||
SetVignettingFixEnabled = (SetBoolFn)GetProcAddress(fixLib, "SetVignettingFixEnabled");
|
SetVignettingFixEnabled = (SetBoolFn)GetProcAddress(fixLib, "SetVignettingFixEnabled");
|
||||||
SetFogFixEnabled = (SetBoolFn)GetProcAddress(fixLib, "SetFogFixEnabled");
|
SetFogFixEnabled = (SetBoolFn)GetProcAddress(fixLib, "SetFogFixEnabled");
|
||||||
SetFOV = (SetIntFn)GetProcAddress(fixLib, "SetFOV");
|
SetFOV = (SetIntFn)GetProcAddress(fixLib, "SetFOV");
|
||||||
@@ -89,6 +91,7 @@ static void LoadFixDLL()
|
|||||||
if (SetResolutionFixEnabled) SetResolutionFixEnabled(Resolution_fix_enabled, true);
|
if (SetResolutionFixEnabled) SetResolutionFixEnabled(Resolution_fix_enabled, true);
|
||||||
if (SetAspectRatioFixEnabled) SetAspectRatioFixEnabled(Aspect_fix_enabled, true);
|
if (SetAspectRatioFixEnabled) SetAspectRatioFixEnabled(Aspect_fix_enabled, true);
|
||||||
if (SetDOFFixEnabled) SetDOFFixEnabled(DOF_fix_enabled, true);
|
if (SetDOFFixEnabled) SetDOFFixEnabled(DOF_fix_enabled, true);
|
||||||
|
if (SetCAFixEnabled) SetCAFixEnabled(CA_fix_enabled, true);
|
||||||
if (SetVignettingFixEnabled) SetVignettingFixEnabled(Vignetting_fix_enabled, true);
|
if (SetVignettingFixEnabled) SetVignettingFixEnabled(Vignetting_fix_enabled, true);
|
||||||
if (SetFogFixEnabled) SetFogFixEnabled(Fog_fix_enabled, true);
|
if (SetFogFixEnabled) SetFogFixEnabled(Fog_fix_enabled, true);
|
||||||
if (SetFixEnabled) SetFixEnabled(fix_enabled, true);
|
if (SetFixEnabled) SetFixEnabled(fix_enabled, true);
|
||||||
@@ -106,6 +109,7 @@ static void SaveSettings()
|
|||||||
file << RESOLUTION_FIX_SETTING << (Resolution_fix_enabled ? "1" : "0") << "\n";
|
file << RESOLUTION_FIX_SETTING << (Resolution_fix_enabled ? "1" : "0") << "\n";
|
||||||
file << ASPECT_FIX_SETTING << (Aspect_fix_enabled ? "1" : "0") << "\n";
|
file << ASPECT_FIX_SETTING << (Aspect_fix_enabled ? "1" : "0") << "\n";
|
||||||
file << DOF_FIX_SETTING << (DOF_fix_enabled ? "1" : "0") << "\n";
|
file << DOF_FIX_SETTING << (DOF_fix_enabled ? "1" : "0") << "\n";
|
||||||
|
file << CA_FIX_SETTING << (CA_fix_enabled ? "1" : "0") << "\n";
|
||||||
file << VIGNETTING_FIX_SETTING << (Vignetting_fix_enabled ? "1" : "0") << "\n";
|
file << VIGNETTING_FIX_SETTING << (Vignetting_fix_enabled ? "1" : "0") << "\n";
|
||||||
file << FOG_FIX_SETTING << (Fog_fix_enabled ? "1" : "0") << "\n";
|
file << FOG_FIX_SETTING << (Fog_fix_enabled ? "1" : "0") << "\n";
|
||||||
file << WORLD_FOV_SETTING << worldFOVvalue << "\n";
|
file << WORLD_FOV_SETTING << worldFOVvalue << "\n";
|
||||||
@@ -151,6 +155,11 @@ static void LoadSettings()
|
|||||||
std::string val = line.substr(strlen(DOF_FIX_SETTING));
|
std::string val = line.substr(strlen(DOF_FIX_SETTING));
|
||||||
DOF_fix_enabled = (val == "1" || val == "true");
|
DOF_fix_enabled = (val == "1" || val == "true");
|
||||||
}
|
}
|
||||||
|
else if (line.find(CA_FIX_SETTING) == 0)
|
||||||
|
{
|
||||||
|
std::string val = line.substr(strlen(CA_FIX_SETTING));
|
||||||
|
CA_fix_enabled = (val == "1" || val == "true");
|
||||||
|
}
|
||||||
else if (line.find(VIGNETTING_FIX_SETTING) == 0)
|
else if (line.find(VIGNETTING_FIX_SETTING) == 0)
|
||||||
{
|
{
|
||||||
std::string val = line.substr(strlen(VIGNETTING_FIX_SETTING));
|
std::string val = line.substr(strlen(VIGNETTING_FIX_SETTING));
|
||||||
@@ -239,33 +248,33 @@ static void on_overlay_draw(reshade::api::effect_runtime* runtime)
|
|||||||
SaveSettings();
|
SaveSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::SetCursorPos(ImVec2(5, 55));
|
ImGui::SetCursorPos(ImVec2(70, 30));
|
||||||
if (ImGui::Checkbox("Frame time", &FPS_fix_enabled)) {
|
if (ImGui::Checkbox("Frame time", &FPS_fix_enabled)) {
|
||||||
if (SetFPSFixEnabled) SetFPSFixEnabled(FPS_fix_enabled, false);
|
if (SetFPSFixEnabled) SetFPSFixEnabled(FPS_fix_enabled, false);
|
||||||
SaveSettings();
|
SaveSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::SetCursorPos(ImVec2(110, 55));
|
ImGui::SetCursorPos(ImVec2(5, 55));
|
||||||
if (ImGui::Checkbox("Resolution", &Resolution_fix_enabled)) {
|
if (ImGui::Checkbox("Resolution", &Resolution_fix_enabled)) {
|
||||||
if (SetResolutionFixEnabled) SetResolutionFixEnabled(Resolution_fix_enabled, false);
|
if (SetResolutionFixEnabled) SetResolutionFixEnabled(Resolution_fix_enabled, false);
|
||||||
SaveSettings();
|
SaveSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::SetCursorPos(ImVec2(5, 80));
|
ImGui::SetCursorPos(ImVec2(120, 55));
|
||||||
if (ImGui::Checkbox("Aspect ratio fix", &Aspect_fix_enabled)) {
|
if (ImGui::Checkbox("Aspect ratio", &Aspect_fix_enabled)) {
|
||||||
if (SetAspectRatioFixEnabled) SetAspectRatioFixEnabled(Aspect_fix_enabled, false);
|
if (SetAspectRatioFixEnabled) SetAspectRatioFixEnabled(Aspect_fix_enabled, false);
|
||||||
SaveSettings();
|
SaveSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ImGui::IsItemHovered()) {
|
ImGui::SetCursorPos(ImVec2(5, 80));
|
||||||
ImGui::BeginTooltip();
|
if (ImGui::Checkbox("Depth of field", &DOF_fix_enabled)) {
|
||||||
ImGui::Text("This doesn't remove pillar boxing in cutscenes.");
|
if (SetDOFFixEnabled) SetDOFFixEnabled(DOF_fix_enabled, false);
|
||||||
ImGui::EndTooltip();
|
SaveSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::SetCursorPos(ImVec2(5, 105));
|
ImGui::SetCursorPos(ImVec2(5, 105));
|
||||||
if (ImGui::Checkbox("Depth of field", &DOF_fix_enabled)) {
|
if (ImGui::Checkbox("Chromatic aberrations", &CA_fix_enabled)) {
|
||||||
if (SetDOFFixEnabled) SetDOFFixEnabled(DOF_fix_enabled, false);
|
if (SetCAFixEnabled) SetCAFixEnabled(CA_fix_enabled, false);
|
||||||
SaveSettings();
|
SaveSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user