diff --git a/data/plugins/GTAIV.EFLC.FusionFix.ini b/data/plugins/GTAIV.EFLC.FusionFix.ini index 01d6378e..45b16ff3 100644 --- a/data/plugins/GTAIV.EFLC.FusionFix.ini +++ b/data/plugins/GTAIV.EFLC.FusionFix.ini @@ -20,6 +20,7 @@ PedDeathAnimFixFromTBOGT = 1 FixRainDrops = 1 RainDropsBlur = 2 // 1, 2 or 4 only WalkKey = 0x12 // VK_MENU, used by Always Run option +FixAutoExposure = 1 [BudgetedIV] VehicleBudget = 0 // may cause issues, set to e.g. 260000000 to increase budget limit diff --git a/source/shaders.ixx b/source/shaders.ixx index d7d8fc01..bcd777f7 100644 --- a/source/shaders.ixx +++ b/source/shaders.ixx @@ -48,9 +48,13 @@ public: static UINT oldCascadesWidth = 0; static UINT oldCascadesHeight = 0; static IDirect3DTexture9* pHDRTexQuarter = nullptr; + static bool bFixAutoExposure = false; FusionFix::onInitEvent() += []() { + CIniReader iniReader(""); + bFixAutoExposure = iniReader.ReadInteger("MISC", "FixAutoExposure", 1) != 0; + // Redirect path to one unified folder auto pattern = hook::pattern("8B 04 8D ? ? ? ? A3 ? ? ? ? 8B 44 24 04"); if (!pattern.empty()) @@ -130,12 +134,11 @@ public: // FXAA, DOF, Gamma { - //static auto fxaa = FusionFixSettings.GetRef("PREF_ANTIALIASING"); static auto cutscene_dof = FusionFixSettings.GetRef("PREF_CUTSCENE_DOF"); static auto gamma = FusionFixSettings.GetRef("PREF_CONSOLE_GAMMA"); static auto mblur = FusionFixSettings.GetRef("PREF_MOTIONBLUR"); static float arr3[4]; - arr3[0] = 0.0f; //static_cast(fxaa->get()); + arr3[0] = (bFixAutoExposure ? 1.0f : 0.0f); arr3[1] = static_cast(cutscene_dof->get()); arr3[2] = static_cast(gamma->get()); arr3[3] = static_cast(mblur->get());