diff --git a/data/update/GTAIV.EFLC.FusionFix/GTAIV.FusionFix/veh@helicopter.wad b/data/update/GTAIV.EFLC.FusionFix/GTAIV.FusionFix/veh@helicopter.wad
new file mode 100644
index 00000000..8bab4953
Binary files /dev/null and b/data/update/GTAIV.EFLC.FusionFix/GTAIV.FusionFix/veh@helicopter.wad differ
diff --git a/data/update/GTAIV.EFLC.FusionFix/TLAD.FusionFix/veh@helicopter.wad b/data/update/GTAIV.EFLC.FusionFix/TLAD.FusionFix/veh@helicopter.wad
new file mode 100644
index 00000000..8bab4953
Binary files /dev/null and b/data/update/GTAIV.EFLC.FusionFix/TLAD.FusionFix/veh@helicopter.wad differ
diff --git a/data/update/TBoGT/common/data/frontend_menus.xml b/data/update/TBoGT/common/data/frontend_menus.xml
index 8726322c..154c18bc 100644
--- a/data/update/TBoGT/common/data/frontend_menus.xml
+++ b/data/update/TBoGT/common/data/frontend_menus.xml
@@ -393,10 +393,10 @@
-
-
-
-
+
+
+
+
diff --git a/data/update/TLAD/common/data/frontend_menus.xml b/data/update/TLAD/common/data/frontend_menus.xml
index d6185377..ca1d3473 100644
--- a/data/update/TLAD/common/data/frontend_menus.xml
+++ b/data/update/TLAD/common/data/frontend_menus.xml
@@ -469,10 +469,10 @@
-
-
-
-
+
+
+
+
diff --git a/data/update/TLAD/pc/data/effects/gta_ep1.wpfl b/data/update/TLAD/pc/data/effects/gta_ep1.wpfl
new file mode 100644
index 00000000..90fb379c
Binary files /dev/null and b/data/update/TLAD/pc/data/effects/gta_ep1.wpfl differ
diff --git a/data/update/common/data/frontend_menus.xml b/data/update/common/data/frontend_menus.xml
index f0c9b708..8e9835af 100644
--- a/data/update/common/data/frontend_menus.xml
+++ b/data/update/common/data/frontend_menus.xml
@@ -324,10 +324,10 @@
-
-
-
-
+
+
+
+
@@ -368,10 +368,10 @@
-
-
+
+
-
+
diff --git a/data/update/pc/data/effects/gta_core.wpfl b/data/update/pc/data/effects/gta_core.wpfl
new file mode 100644
index 00000000..715f49fe
Binary files /dev/null and b/data/update/pc/data/effects/gta_core.wpfl differ
diff --git a/premake5.exe b/premake5.exe
index 1a637aa9..addb59af 100644
Binary files a/premake5.exe and b/premake5.exe differ
diff --git a/readme.md b/readme.md
index eaea2803..a636cb33 100644
--- a/readme.md
+++ b/readme.md
@@ -164,6 +164,11 @@ This projects aims to fix some issues in Grand Theft Auto IV: Complete Edition.
> [!WARNING]
> Non-Windows users (Proton/Wine) need to perform a [DLL override](https://cookieplmonster.github.io/setup-instructions/#proton-wine).
+>
+> Additionally:
+> * Install and run Protontricks.
+> * Select "Grand Theft Auto IV" -> "Select the default Wineprefix" -> "Install a Windows DLL or component".
+> * Search for "d3dx9_43", select it and click OK.
> [!IMPORTANT]
> This fix was tested only with latest official update and latest [ASI Loader](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/latest/download/Ultimate-ASI-Loader.zip) (included in the archive).
@@ -307,27 +312,28 @@ Note: most of this content requires additional modifications by the end user to
**Special thanks to [Parallellines0451](https://github.com/Parallellines0451) [AssaultKifle47](https://github.com/akifle47), [RaphaelK12](https://github.com/RaphaelK12), [robi29](https://github.com/robi29) and [\_CP_](https://github.com/cpmodding) for directly contributing with fixes, to [Shvab](https://github.com/d3g0n-byte) for making RAGE Shader Editor.**
-**Fusion Fix uses dx hook to implement some features. It causes certain 3rd party software to crash/hang the game. To avoid this, Fusion Fix prevents [certain dlls from injecting into the game's process](https://github.com/ThirteenAG/GTAIV.EFLC.FusionFix/blob/master/source/dllblacklist.ixx#L15).**
+**Fusion Fix prevents [certain dlls from injecting into the game's process, to avoid issues](https://github.com/ThirteenAG/GTAIV.EFLC.FusionFix/blob/master/source/dllblacklist.ixx#L15).**
-### General
+#### General
- Fixed z-fighting
- Fixed object pop-in caused by version 1.0.6.0
- Improved screen door transparency
-### Lighting
+#### Lighting
- Fixed volumetric lights occlusion
- Restored console foliage translucency
-- Added an improved tree lighting mode based on PC
+- Fixed orange glow under trees
- Fixed mismatched intensity of shadow casting lights causing visible pop-in
- Fixed lights that were made invisible with version 1.0.6.0
- Fixed black normal map halos on several surfaces such as asphalt, sidewalks and rocks
-### Shadows
-- Restored shadow filter from versions prior to 1.0.6.0 and also added an improved one based on it
+#### Shadows
+- Restored rotated disk filter from versions prior to 1.0.6.0
- Fixed large shadow artifacts visible from high altitudes
- Fixed shadowmap being erroneously blurred before the lighting pass
- Fixed shadows stretching at certain camera angles
- Fixed shadow view distance being lower than the actual rendered distance
- Fixed cutoff penumbras of distant shadows
- Restored normal offset bias from versions prior to 1.0.6.0
+- Added contact hardening shadows
- Fixed disconnected night shadows
- Fixed blur artifacts between shadow cascades under some conditions
- Added "pseudo" shadow cascade blending to reduce the disparity between cascades
@@ -336,20 +342,20 @@ Note: most of this content requires additional modifications by the end user to
- Fixed incorrectly offset shadows on water
- Fixed flickering when shadows of transparent objects overlap
- Added parameters to control shadow softness and bias
-### Post processing
+#### Post processing
- Split depth of field, motion blur and stippling filter into separate passes to prevent overlap
- Fixed color banding, most noticeably in the sky
- Added a mask to selectively filter screen door transparency
- Fixed depth of field and bloom not scaling correctly at resolutions higher than 720p
+- Improved bloom weights and stability in motion
- Fixed excessively blurry screen compared to consoles caused by leftover anti aliasing code
- Restored console bloom and auto exposure
-- Restored console timecyc gamma bump
- Fixed flickering auto exposure
- Fixed motion blur losing intensity at high framerates
- Fixed incorrect TLAD noise tiling on water quality levels other than medium
- Fixed TLAD noise aspect ratio
- Added a console-like gamma toggle
-### Reflections
+#### Reflections
- Restored console behavior for tree and terrain reflections
- Fixed excessive specularity of several meshes in Alderney
- Fixed distorted vehicle reflections
@@ -360,22 +366,23 @@ Note: most of this content requires additional modifications by the end user to
- Restored console environment reflection intensity
- Fixed distorted mirror reflections at certain camera angles
- Restored console mirror blur
-### Particles
+#### Particles
- Fixed soft particles
- Fixed stuttery particle animations caused by version 1.0.5.0
- Fixed rain being almost invisible, especially at night
- Fixed rain streaks becoming shorter at high framerates
-### Water
+#### Water
+- Fixed flickering outlines around shores and thin objects
+- Fixed invisible water foam
+- Improved shallow water transparency and improved foam texture
- Fixed incorrect water texture tiling on quality levels other than medium
- Fixed flat, mirror-like water surface on AMD graphics cards
-- Removed broken shore foam effect
-### Misc
+#### Misc
- Fixed outlines around objects when using DXVK
- Partially restored console object fade speed
- Fixed terrain pop-in
- Reduced procobj pop-in for the default view and detail distance values
- Partially fixed building windows visible near the far plane if emissive depth write is disabled
-- Adjusted tree mipmap bias
- Restored fence mipmap bias from versions prior to 1.0.6.0
- Fixed incorrect texture filtering used in several shaders
- Added a parameter to control the alpha threshold of tree leaves
diff --git a/source/fixes.ixx b/source/fixes.ixx
index f8eba032..cc057715 100644
--- a/source/fixes.ixx
+++ b/source/fixes.ixx
@@ -509,6 +509,18 @@ public:
if (!pattern.empty())
injector::WriteMemory(pattern.get_first(0), 0xEB, true); // jz -> jmp
}
+
+ // Subtract Contrast slider value by 1 internally, same as on Xbox 360
+ {
+ auto pattern = find_pattern("F3 0F 59 C7 0F 2F C8 76 05 0F 28 C1 EB 05 0F 2F E0 76 16", "F3 0F 59 C6 0F 2F E8 76 05 0F 28 C5 EB 05 0F 2F D8 76 16");
+ if (!pattern.empty())
+ {
+ static auto ContrastSliderHook = safetyhook::create_mid(pattern.get_first(0), [](SafetyHookContext& regs)
+ {
+ regs.xmm0.f32[0] -= 1.0f;
+ });
+ }
+ }
};
}
} Fixes;
\ No newline at end of file
diff --git a/source/frameratevigilante.ixx b/source/frameratevigilante.ixx
index 8a04f70d..3251f33e 100644
--- a/source/frameratevigilante.ixx
+++ b/source/frameratevigilante.ixx
@@ -19,36 +19,22 @@ public:
FramerateVigilante()
{
FusionFix::onInitEventAsync() += []()
- {
- // Handbrake Cam (test)
- auto pattern = find_pattern("E8 ? ? ? ? D9 5C 24 7C F3 0F 10 4C 24", "E8 ? ? ? ? D9 5C 24 70 F3 0F 10 44 24 ? F3 0F 58 86");
- hbsub_A18510.fun = injector::MakeCALL(pattern.get_first(0), sub_A18510).get();
+ {
+ // Handbrake Cam (test)
+ auto pattern = find_pattern("E8 ? ? ? ? D9 5C 24 7C F3 0F 10 4C 24", "E8 ? ? ? ? D9 5C 24 70 F3 0F 10 44 24 ? F3 0F 58 86");
+ hbsub_A18510.fun = injector::MakeCALL(pattern.get_first(0), sub_A18510).get();
- pattern = hook::pattern("F3 0F 58 05 ? ? ? ? F3 0F 2A 0D");
- if (!pattern.empty())
- {
- struct LoadingTextSparks
- {
- void operator()(injector::reg_pack& regs)
- {
- regs.xmm1.f32[0] += 0.085f * *CTimer::fTimeStep;
- }
- }; injector::MakeInline(pattern.get_first(0), pattern.get_first(8));
- }
- else
+ pattern = hook::pattern("F3 0F 58 05 ? ? ? ? F3 0F 2A 0D");
+ if (!pattern.empty())
+ {
+ struct LoadingTextSparks
{
- pattern = hook::pattern("F3 0F 58 0D ? ? ? ? 0F 5B C0 F3 0F 11 0D");
- if (!pattern.empty())
+ void operator()(injector::reg_pack& regs)
{
- struct LoadingTextSparks
- {
- void operator()(injector::reg_pack& regs)
- {
- regs.xmm0.f32[0] += 0.085f * *CTimer::fTimeStep;
- }
- }; injector::MakeInline(pattern.get_first(0), pattern.get_first(8));
+ regs.xmm0.f32[0] += 0.085f * *CTimer::fTimeStep;
}
- }
- };
+ }; injector::MakeInline(pattern.get_first(0), pattern.get_first(8));
+ }
+ };
}
} FramerateVigilante;
diff --git a/source/shaders.ixx b/source/shaders.ixx
index c4ae3916..f15a7b48 100644
--- a/source/shaders.ixx
+++ b/source/shaders.ixx
@@ -150,6 +150,13 @@ public:
}
}
+ // Override reflection multiplier that resulted in weaker reflections on PC, a fix/workaround used to be in place on the shader side, move it in here instead.
+ {
+ static float dw103F984 = 1.0f; // 0.6f -> 1.0f
+ auto pattern = find_pattern("F3 0F 10 05 ? ? ? ? F3 0F 59 C1 51 F3 0F 11 04 24 E8", "F3 0F 10 0D ? ? ? ? 51 F3 0F 59 C8 F3 0F 11 0C 24 E8");
+ injector::WriteMemory(pattern.get_first(4), &dw103F984, true);
+ }
+
// Restore console car reflections and dirt level settings. Any car on console could have dirt when they would spawn while on PC some cars _always_ spawn fully cleaned.
if (bConsoleCarReflectionsAndDirt)
{