Friday, November 9, 2012

Grand Theft Auto IV

Grand Theft Auto IV - by mana84

BEFORE
AFTER

Description:
- Crosshair is made 3d and a little transparent to aim better
- Doubling near water is fixed
- DX9Settings.ini is configured to use with dynamic convergence when you press 'right-click'
  (just install autohotkey and doubleclick on "RightMouseBind.ahk")

10/11/2012 Update:
- a glitch related to cars 'squashing up' should be solved

I strongly suggest to disable shadows by ingame menu. This fix is compatible with other graphics mod like ENB or iCenhancer.

If you want to use a mod just rename the mod's d3d9.dll to "d3d9fx.dll" and edit the ProxyLib line (remove the comment '//' from behind) in DX9Settings.ini to point your game's installation folder, you should write something like that:
ProxyLib = C:\your_installation_folder\grand theft auto iv\GTAIV\d3d9fx.dll

How to install:
extract "GtaIV_fix.zip" archive in the "./GTAIV" directory of the game, required d3d9.dll is already included in the archive.

Download:
GtaIV_fix.zip

68 comments:

  1. Great fix, thanks :-) The water issue was just unpleasant before, now it's gone. God luck with the shadows.

    On a related note, if you play L4D2, would your water fix technique work for that? Water is the main problem with that game (double images in particular) - I tried to look at it but don't really know where to start.

    ReplyDelete
  2. Water fix in this game is different from other ones I've seen/done before (i.e. skydrift water..) in this game the fix was harder and and I had to fix a related pixel shader too. I haven't look at L4D2 water issue yet, but it uses the source engine and it could be easyer to fix. Actually I am a lot busier than usual but if you can post the issued shader in the forum and a picture of the issue I could try to post a solution ;)

    ReplyDelete
  3. Thanks! I'll post up what I have found.

    ReplyDelete
  4. Can you do anything with Grand Theft Auto 3, GTA Vice City or GTA San Andreas they have 2D lights.

    ReplyDelete
  5. Is there any way to fix the shadows, even conceivably?

    ReplyDelete
    Replies
    1. Its pretty much always "possible" however this code is written by video game programmers. We have to figure out to rewrite code into it. Its easy to fix most effects (ussually). However shadows are multiple shaders that require fixing all of them precisely and you have to understand the code entirely.... long story short its hard.

      Delete
    2. This comment has been removed by a blog administrator.

      Delete
  6. I love you SO MUCH! Thanks for all the game fixes. Most of the games you've fixed are game I play and wanted to work in 3D the most.

    Based on how the shadows look in this game as compared to others I would expect a shadow fix to be too much trouble.

    ReplyDelete
  7. Hi does this work with the steam version?

    I placed the files in properly and now they game just crashed during initial load.

    ReplyDelete
    Replies
    1. Disable steam community.
      More information thats recommended on reading whenever you face an issue @ http://helixmod.wikispot.org/How_To_Install


      Let me know either way.

      Delete
  8. Yep works now, however I'm getting some weird glitch where in any vehicle, the body of it bends out of place and i see the skeleton of the car (wheels floating, seats floating, etc). Any fix to this... BTW this is the steam version.

    ReplyDelete
  9. Anyone have any similar problems with the car body glitch mentioned above?

    ReplyDelete
    Replies
    1. Wierd, Id imagine if this happened to other users someone else would of reported it as well.
      Try this, save right before entering a vehicle.
      Exit game.
      Go into ../shaderoverride/
      Make a backup.
      go into /vertexshaders/. And delete one .txt at a time, start after each delete.
      See which file causes the issue. If that doesnt work try /pixelshaders/

      Delete
    2. Off topic POSSIBLY.
      What video card do you have. 600 series has a wierd issue and I am trying to see if its related to other issues.

      Delete
  10. I actually just built this machine a few months ago, i got dual GTX680's in SLI (game only uses about 40% of each tho and doesn't really utilize the the GPU properly), but I still get a minimum of 50 fps in 1080p in highest settings in the busiest areas.

    Its such a weird issue, because the cars don't glitch at all at the beginning, and only start doing so AFTER i crash a car into something. And it only does so in a few specific angles (so if i move mouse around, the car pops back to normal and then back to gimped and on and on. It also happens to only one car at a time, the one that I was most recently in, so if I walk around and never initially get into a car, it never happens.

    When i remove the 3 items (overwrites) from the folder, it never does it, but obviously the cross hair goes back to 2d and the water gets bad again.

    ReplyDelete
    Replies
    1. Edit: sorry for making new topic, forgot to use the Reply button. I'll remember next time :)

      Delete
    2. Ah I know what you are talking about. I was actually talking about this with some people recently. For some reason when certain shaders are injected it causes some issues. It probably looks like a jagged spike is shooting out of the model.
      Its been a huge issue for me with fixing some games. I will reply back if I find a solution, I think I need to speak to helix about it.

      I BELIEVE, its the the shader thats for night shadows.
      shaderoverride/vertexshaders/C68A72CD.TXT

      delete that one and start game.

      Delete
  11. Thx, for making so many game so much better, but still 1 question. How can I make this fix work with ICEnhancer 2.1 on GTA pathed to 1.0.4.0? Which d3d9.dll or which ini file to use?

    ReplyDelete
    Replies
    1. http://helixmod.blogspot.com/2012/08/guidehow-to-install-helixmod-game-fixes.html

      Delete
    2. thx, for the quick reply! Sadly the fix doesn't work for version 1.0.4.0. Probably because de shaders work differently from version 1.0.7.0. And ICenhancer doesn't work that well with version 1.0.7.0. So I will have to make a choice ;)

      Delete
  12. Great fix, thanks very much! I just wish the cars didn't squash up randomly, the mod would've been perfect.

    ReplyDelete
    Replies
    1. Find which shader it is.
      shaderoverride/vertexshaders/

      try each one till u find which is causing it and Ill try to fix.

      Delete
    2. it is the crosshair/radar 35CE761D.txt. i did not get more cars glitche.

      Delete
    3. edit DX9Settings.ini with this settings seem to work. but i do not really know what i did ^^
      [General]
      DumpAll = false
      OverrideMethod = 1

      [VS35CE761D]
      CheckTexCRC = true
      TexCounterReg = 251
      DefinedTexturesVs = 39613703;E8737E88;
      ValForDefined = 0
      ValNotDefined = 1

      [VS4D6E3B0C]
      DefVSSampler = 258

      Delete
    4. One of the defined textures it looks like is on list by accident. Gj

      Delete
    5. my previous post did not resolve anything ^^
      39613703 crosshair point
      9831B693 radar
      E8737E88 crosshair circle
      the problem seem to be in this line :
      [VS35CE761D]
      CheckTexCRC = true
      TexCounterReg = 251
      DefinedTexturesVs = 39613703;9831B693;E8737E88;
      ValForDefined = 0
      ValNotDefined = 1
      when i delete this line the glitch seem to gone
      i am working around

      Delete
    6. nothing seem to work in the DX9Settings.ini.
      i played from 1hour without the 35CE761D.txt and without glitches.
      i will try more tomorow.

      Delete
    7. I cant really help since I dont have installed. Id say open 35CE761D.txt and remove this line.
      add o2.w, v1.w, c220.y

      Delete
    8. tried to remove add o2.w, v1.w, c220.y but glitche not gone.

      Delete
  13. One of the defined textures it looks like is on list by accident. Gj

    ReplyDelete
  14. i post a screenshot of the glitche http://photos.3dvisionlive.com/kaxak/album/509ba8c4a3e067cd44000004/
    i have it with this lines into 35CE761D.txt :
    vs_3_0
    dcl_position v0
    dcl_position o0
    i tryed with and without this lines into DX9Settings.ini :
    [VS35CE761D]
    CheckTexCRC = true
    TexCounterReg = 251
    DefinedTexturesVs = 39613703;9831B693;E8737E88;
    ValForDefined = 0
    ValNotDefined = 1
    the only wd atm to remove it, it is to remove the 35CE761D.txt.
    would to have the crosshair it is usefull

    ReplyDelete
  15. Hi! Sorry for being in late but I'm always busy lately :(
    Thanks for reporting the issue, I didn't noticed it becouse I haven't had the time to play this game! I wanted to fix it before playing, but I was unappy with shadows that I wasn't able to fix (and I think perhaps it's not possible with helixmod becouse shadows are hardcoded in the game)... so I leaved the game apart for a while...

    anyway I've just looked at it and found the cause of the bug.. there's a conflict with the s0 sampler and I should have declared DefVSSampler = 258 in the "General" field of the ini and use s1 in place of s0.

    I'm just updating the file with the files fixed! I've tested it for a while and it seems to behave correcly now.

    ReplyDelete
  16. Fix uploaded and post updated.

    ReplyDelete
  17. fast test passed without glitche with this settings
    =====================================
    DX9Settings.ini :
    =====================================
    [General]
    DumpAll = false
    OverrideMethod = 1
    DefPSSampler = 14
    DefVSSampler = 258
    Preset1Key = 112
    Preset2Key = 113
    Preset3Key = 114
    DefPreset = 1


    [VS35CE761D]
    CheckTexCRC = true
    TexCounterReg = 251
    DefinedTexturesVs = 39613703;9831B693;E8737E88;
    ValForDefined = 0
    ValNotDefined = 1


    [Preset1]
    Convergence = 0x3f000000
    Separation = 0x42a00000
    UseSepSettings = true


    [Preset2]
    Convergence = 0x3ecccccd
    Separation = 0x42a00000
    UseSepSettings = true


    [Preset3]
    Convergence = 0x3e99999a
    Separation = 0x42a00000
    UseSepSettings = true
    =====================================
    35CE761D.txt :
    =====================================
    //crosshair + radar
    // Generated by Microsoft (R) HLSL Shader Compiler 9.26.952.2844
    //
    // Parameters:
    //
    // row_major float4x4 gWorldViewProj;
    //
    //
    // Registers:
    //
    // Name Reg Size
    // -------------- ----- ----
    // gWorldViewProj c8 4
    //

    vs_3_0
    def c220, 0.95, -0.5, 0.0625, 0
    dcl_2d s1
    dcl_position v0
    dcl_color v1
    dcl_texcoord v2
    dcl_position o0
    dcl_texcoord o1.xy
    dcl_color o2
    mul r0, c9, v0.y
    mad r0, v0.x, c8, r0
    mad r0, v0.z, c10, r0
    add r1, r0, c11
    mov r14.x, c251.x
    texldl r11, c220.z, s1
    if_eq r14.x, c220.w
    mul r11.x, r11.x, c220.x
    add r1.x, r1.x, r11.x
    endif
    mov o0, r1
    mov o1.xy, v2
    mov o2, v1
    add o2.w, v1.w, c220.y

    // approximately 6 instruction slots used
    =====================================
    i will try a long a test.
    where is to remove alpha of the crosshair?
    it is better to change it in the "hud.dat".

    ReplyDelete
    Replies
    1. remove this "DefPSSampler = 14"

      Delete
  18. finally what i suggest :
    http://www.kaxak.net/download.php?file=gtaIV_3Dfix.zip
    -fix car glitche
    -add sniper scope 3D
    -change crosshair fix(remove the dot for some reasons and keep the circle but smaller and change color to red)
    -F5 to F7 to set convergence (0.5 to 0.3)

    ReplyDelete
  19. my fix V2
    http://www.kaxak.net/download.php?file=gtaIV_3Dfix_V2.zip
    -remove all fix (keep only the crosshair+scope fix)
    -fix the halo from light by remove it
    -fix water(remove de reflect because i can not completly fix it, by default reflect is ok but doubling bug and with mana fix doubling is ok but border water + reflect is wrong...)
    that fix is enought for me to play and keep my eyes ;)
    hf & thx mana84 to fix the car glitche

    ReplyDelete
  20. thanks for reporting issues I had little testing with this game, sorry. I've just updated the fix and the water should be perfect now. Please make me know if you try it or if you find any other issue. Meantime I've found that cars reflections should be fixed too and I tried but it seems to be unfixable to me since I don't have access to objects depth in the cars reflection shader.

    ReplyDelete
  21. a problem of this game is that it need restarting each time a shader is modified.. and its loading time is a pain. Another problem that made me tired is the fact that some lighting/shadowing shaders cannot be fixed.

    ReplyDelete
  22. kaxak
    tested water. it is ok now. BIG thx
    I agree with you testing in this game is really boring every loading are soooooooooooo long...

    ReplyDelete
  23. I've tried to install this mod with GTA IV EFLC, but it doesn't seem to work, any ideas?

    ReplyDelete
    Replies
    1. Dont know anything about GTA or its mods but did u do this? http://helixmod.blogspot.com/2012/08/guidehow-to-install-helixmod-game-fixes.html

      Delete
    2. Gta IV EFLC is a standalone expansion so that game has different shaders crc and I should make another fix for it. I don't have much time atm and I'm a little busy with bioshock, but I'm planning to improve this fix and make a EFLC fix too.

      Delete
    3. Yes Mana84, it would be great if you made this fix for EFLC too, just finish Mafia 2 which was awesome, can't wait for EFLC :)

      Delete
  24. Many thanks for your great work, guys.
    One question - your fix seems to create separation between the plane of "player" cursor on the big map / minimap, and the plane of the map itself(basically the cursor is doubled) It's difficult to know where you are unless you approximate the cursor position at the middle.
    Was wondering if anyone spotted this too.

    ReplyDelete
    Replies
    1. KaXaK
      try this : http://www.kaxak.net/download.php?file=gtaIV_3Dfix_V3.zip
      and give me a back.

      Delete
    2. Thank you for taking the time to reply. Will give it a go and let you know.

      Delete
    3. Thanks a lot KaXak, I now had some time to test (loading times are driving me crazy, sometimes it's 10 seconds, sometimes it's 3 minutes).
      Here is what I found:
      1. With your fix the map is in proper 2d now, which is good
      2. The bottom left quadrant of the big map is broken - left/right eye images don't mix well. This might happen only under certain conditions, but I could not determine which.
      3. The gun crosshair is too small, I failed a mission because I could not see where I was shooting.
      (I switched back to mana84's fix, the crosshair is also very small, but at least I can see it. It is "double" though, so I have to aim somewhere in the middle.)
      Bottom line, if I can understand why the bottom left sector of the map is broken sometimes, and if you can enlarge your 3D crosshair somehow to make it visible, your fix would be the recommended one and should be stickied)
      ===========================
      That being said, I wish to thank everyone of the people posting here, trying to give 3d gamers an improved gaming experience. You guys are incredible, and the fact that you are willing to sacrifice so much of your spare time to help everyone is greatly appreciated.
      Respect and kudos to Helix, Eqzitara, Mana84, Kaxak and all other contributors!

      Delete
    4. KaXaK
      your 2. bug is strange take a 3D screenshot (alt+f1). i am not a shader programer, maybe a coud not fix it.
      Two things about the 3.
      I.you can edit the crosshair size
      edit "your game folder/common/data/hud.dat" with text editor
      search for "HUD_WEAPON_CROSSHAIR 0.5,0.5 0.01,0.0135 HUD_COLOUR_RED 255" (there is 2 lines)
      edit 0.01,0.0135 to what size you want (x horizontal,y vertical) 1.0 should be all your screen.
      II. the depth of the crosshair is not dynamic but you can change it.
      edit "yourgamefolder/ShaderOverride/35CE761D.txt" with text editor
      search for def c220, 0.94, 0, 0.0625, 0//crosshair z, alpha, (z), (w)
      edit 0.94 to what you want 1.0 is max depth and 0.0 should be your screen.
      you can edit the alpha too 0 is fully visible 1.0 is invisible.
      all of this settings depend of what people want, sure.
      I just finish the game, maybe i will not came back here soon :)
      have fun

      Delete
    5. Thanks man, don't worry, I'll manage fine. I just realised that the reason the cursor was so small was because I had "simple" cursor in options. If I choose the other option is big enough and red.
      The map issue is ok, I can switch off 3D if I really need to plot a course in that part of the map. It's just annoying because I could swear it was not happening all the time (just like the loading time which were ok first, like 15 seconds, and now I have to wait 2-3 minutes for some reason)
      Thanks again, and enjoy your gaming :-)

      Delete
  25. Hey guys, I've managed to find a workaround for the insane loading times for GTA IV steam version. I launch the game from a shortcut modified to force windowed mode.
    The problem is that 3D vision does not start in this mode.
    Do you guys know of any issues with 3D for windowed games?

    I've made sure the 3D mode is selected in the NVIDIA panel, and I've tested 3D images (both with photo viewer and web pages with 3d images - in windowed mode)
    Unfortunately I don't have another game installed which has windowed mode, so I cannot test games, only images.

    I would appreciate any ideas, I could not find anything on the net yet.

    Thanks in advance

    ReplyDelete
    Replies
    1. Never mind, y'all.
      I figured it out by myself. I don't think it's possible to activate 3d vision in windowed games (I tried Borderlands2) but at least I found a way to avoid teh insanely long loading times for GTA 4.
      I hope this will help other users:
      Switch 3d vision off (my shortcut is Ctrl+T) when the game is loading anything. You will see that the "animations" of the loading text are moving much quicker (for example the sparks/stars around the LOADING text, for Ballad of Gay Tony).
      Once loading is done, you can switch back to 3d mode.

      I just wished I had figured this out sooner.

      Thank you again for the 3d fix. Merry Christmas!

      Delete
  26. Thanks a ton, this works great. GTA IV looks amazing in 3d. This makes it actually playable.

    ReplyDelete
  27. This works great, the game is without a doubt playable now. With shadows removed the only other thing that I noticed is headlights seem to render at the wrong depth which can look a little odd.

    ReplyDelete
  28. I Have 3D problem in GTA IV, Can anybody tell me how to fix it Plzzzzz....

    ReplyDelete
  29. Thanks for a great 3D experience in GTA4 :) :)

    About to finish it ...Does the same fix work for Grand Theft Auto IV: Episodes From Liberty City ?

    Would be awesome if the answer is Yes...

    Thanks once again for keeping the 3D alive :) :)

    ReplyDelete
    Replies
    1. Author of this patch doesn't really hang out here anymore. Would have to ask on nvidia 3d vision forums

      Delete
    2. Thank you ..Ok will ask on the forums ...actually I was not able to find the GTA 4 3dvision related thread ..so thought of asking here...
      Will create a new thread in case if needed :)

      Delete
  30. One question:
    Is posible to change convergence with the patch?,
    Every time i try to save convergence , it restarts...

    ReplyDelete
    Replies
    1. The Convergence changes when your holding down sights while aiming (use autohotkey and double click on "RightMouseBind.ahk")..

      Other than that I don't think we can adjust convergence..Please correct me if I am wrong..:(

      Delete
    2. NM. Im an idiot. He must of added that and I didnt realize it.

      Delete
    3. I think still it looks insane ..I was playing at 60% depth and the popout still was too good ..like the leaves flying and the papers from the mailbox looked as if its happening all around u :) :)

      Delete
  31. So I can not run GTA IV from steam when I have the fix installed. Using win 7, 64 bit, Nvidia 760. Have a duel monitor set up sound going through digital out on hdmi port from nvidia card to amplifier but 2nd monitor not turned on. It crashes after the social club login but before GFWL sign in.

    I CAN run GTA IV by using a launch GTA IV icon on the desktop that points directly to the .exe launch file. However I would rather play directly from steam. Is there any ideas so I can use the 3D fix and run from Steam?

    ReplyDelete
  32. Hi

    This mod is no longer working for me. I am sure it did work once.

    I am playing the disk version with the 1.4 update. I tried the steam version and it kept crashing (would the hook work here?). With regard to the disk version, am I doing anything wrong?

    ReplyDelete
  33. It is really an informative post.Thanks for reporting issues I had little testing with this game, sorry. I've just updated the fix and the water should be perfect now. Please make me know if you try it or if you find any other issue. Meantime I've found that cars reflections should be fixed too and I tried but it seems to be unfixable to me since I don't have access to objects depth in the cars reflection shader.Thanks again for sharing such post.
    Grand Thegt Auto

    ReplyDelete
  34. so I installed the ICEnhancer 1.0.7.0 mod and the game worked fine, when I unziped the gta4 fix after renaming "d3d9" to "d3d9fx" and correcting the proxylib line in the new dx9settings file. Steam says that gta4 is playing but nothing happens; it appears to get stuck on the gtalauncher program. any idea what im doing wrong?

    ReplyDelete
  35. So if anyone wants to play the game with shadows on, I suggest you try the old trick of low depth / high convergence, it makes the game really playable with them.

    ReplyDelete