Skip to content

Commit

Permalink
add FixAutoExposure
Browse files Browse the repository at this point in the history
  • Loading branch information
ThirteenAG committed Jan 8, 2024
1 parent 39526c9 commit 010f7cb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions data/plugins/GTAIV.EFLC.FusionFix.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 5 additions & 2 deletions source/shaders.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down Expand Up @@ -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<float>(fxaa->get());
arr3[0] = (bFixAutoExposure ? 1.0f : 0.0f);
arr3[1] = static_cast<float>(cutscene_dof->get());
arr3[2] = static_cast<float>(gamma->get());
arr3[3] = static_cast<float>(mblur->get());
Expand Down

0 comments on commit 010f7cb

Please sign in to comment.