Friday, September 28, 2018

Unity Universal Fix



I made this Unity Universal Fix because the time spending on fixing games is HUGE, so this save A LOT OF TIME. End results: More time to play and less time spending on fixing a game. And second i made this because there are a lot of games that are not fixed (not catch the attention of a Shaderhacker, or they are very niche....so sadly, not fix for them)....this add a new possibility if those games are using this engine :)

This Universal Fixes are made thanks to DarkStarSword, who add ShaderRegex to 3Dmigoto. You also can try the Unity Template script from DarkStarSword.

Read the README.txt for more info.
In any case this should always be the starting point to fix a game using this engine.


This is less polished that UE4 Universal fix, but i will trying to update time to time. To polish a tool like this take some time.


Note: 
- I noticed that some Unity games tagged VR (VR support) don't need this fix, and only need a couple of minor fixes. You need to test.

**IMPORTANT**
Instructions:

Depending of the Unity version of the game you need to enable in the d3dx.ini the include section:
;include = ShaderFixes\Unity55_DHR.ini
;include = ShaderFixes\Unity56_DHR.ini
;include = ShaderFixes\Unity20171_DHR.ini

*Unity 5.5 may work on 5.4
*Unity 20171 works in 2018.x version (i test a few games)

Fix on the Fly:
- Shadows
- Lights
- Reflections
- Halos
- Light Shafts

Not Fix:
- HUD elements
- Volumetric Lights
- Sun/Moon Position
- Some variant of any of the fixes listed


Download


** Do you like the fix? **
If you like the fix, you can donate to this PAYPAL account: dhr.donation@gmail.com


Updated fix from 4everawake for Unity 2019: See this thread.

32 comments:

  1. You guys amaze me, its a miracle you exist on this day and age. If something happens to you guys I'm changing to AMD gpus.

    Godspeed and good luck in pushing forward.

    ReplyDelete
  2. double post, sorry: You guys amaze me, its a miracle you exist on this day and age. If something happens to you guys I'm changing to AMD gpus.

    Godspeed and good luck in pushing forward.

    ReplyDelete
  3. Thanks DHR! Very amazing universal fix!

    I'll try to automate the installation of the universal Unity fix (include-section of d3dx.ini should be automatically set on game launch depending on the detected unity version)

    ReplyDelete
    Replies
    1. Great Paul! will be great Thanks!!
      Is only a think to enable one line or the other depending of the version.

      Delete
  4. This is awesome! 🚀🌔

    ReplyDelete
  5. once again a great work by DHR.
    thanks so much

    ReplyDelete
  6. thanks so much! was waiting on the 55 version, will test this out with a few games. Universal fixes are amazing, not only saving our glorious fixers time and effort in the future - but also allowing less knowledgeable 3D gamers a chance to get a game working themselves without having to bother anyone. thanks again to everyone involved!!!

    ReplyDelete
    Replies
    1. Indeed, these are actually terrific times for fixing 3D games. Great tools.

      Please be sure to let other people know when you've fixed a game, even if it is just a drop-in Universal Fix. It helps to know when it works. Post in the forums at a minimum. Worth posting here to let people know where the Universal Fix works.

      Delete
    2. dumb question, but I couldn't find any steps on how to post a fix to this blog, where to upload fix etc? I do have a couple games with some minor shader fixes I wanted to share..

      Delete
  7. -- Shroud of the Avatar: Forsaken Virtues --

    Having applied the Unity Universal Fix, the fix itself easily exceeded its own 80% minimum estimated rendering correction rate for a random Unity title. I'd say it's nearer 90%. A vast improvement overall. Admittedly I've only played a portion of the game so far, but there are some issues that I've noticed.

    - Exterior waterfalls only render in one eye, which may well apply to flowing water within interior areas too.
    - Cobwebs, which are almost exclusively interior based, although present on certain exteriors as well - render solely in either the left or the right eye. This is certainly a deal breaker in dungeons/interiors at present.
    - Fog renders incorrectly within the game's main map, which itself is a minimised 3D environment.

    Fully appreciating that it's unlikely that any shaderhacker currently has this game in their library, any d3dx.ini settings changes that could possibly be suggested would of course be great. Or perhaps, any general pointers or possible ways a newbie could assist.

    -Tothepoint2

    ReplyDelete
  8. As a follow-up to my prior comment, I have a current profile issue with one other game, so I'm now figuring that it's entirely likely that this is also profile related issue, instead of it being related to the fix itself. If that's so, could someone confirm that tinkering with the profile instead would at least have a chance of resolving these remaining issues that I'm seeing?

    As a side note, in SotA's pre-fixed state, the skybox, and everything else sky-related, were all set at the correct relative distances seemingly by sheer chance, and remained that way after the fix was applied. Hence why I rate this game as 90% fixed already. It may in fact be at around 100%, if it's solely a profile issue.

    -Tothepoint2

    ReplyDelete
    Replies
    1. That definitely happens, depending upon the Profile. Before doing anything heroic, it would be worth doing a fully clean driver install using DDU. And possibly looking for best driver/best profile for the game.

      There are other scenarios where doing alt-tab and/or alt-enter of the game will somehow rebuild the textures and fix one-eye problems. Needs some experimentation.

      In general we don't expect to run across one-eye problems when using 3D Vision Automatic, because it does all the heavy lifting to stereoize. Still, there are pieces it sometimes misses, like ComputeShader items.

      Delete
    2. Always very appreciative of any potential 'get out of jail free' options, but on this occasion the alt-enter/tab combo had no effect. As it's only 2 games out of my entire library that aren't functioning in 3D at present, is there anything shy of a DDU/driver re-installation option that I could possibly explore? Would a DDU have to be the starting point, before you'd wish to advise any further. I'd certainly understand, if that were the case.

      I'd really like to get this game working if at all possible, or at the very least resolve as to why it might not be working for me. Any further assistance would be welcomed.

      Side-note: I understand that DHR uses a single GPU, so I came off SLI as a further test but aside from the expected lower fps, there were no other differences or improvements in stereo rendering.

      Delete
    3. No, sorry, but the DDU reinstall is pretty much the first thing to try for problems like this. It needs to be drawing in stereo 3D without one-eye problems before we install any fix. Generally speaking we cannot fix one-eye problems with shaderhacking (although DarkStarSword has fixed a couple of game engine specific problems, we don't see this with Unity games.)

      Delete
    4. That's quite alright, and understood. With any new future rig, it'll be SotA that I try out first in that case. Thanks anyway for your input.

      -Tothepoint2

      Delete
  9. This is great! I verified it works with Runner3. The hotkey to switch from in-game to cutscenes is a nice touch.

    ReplyDelete
  10. Don't believe it works with games using the HDRP. One camera seems to be missing most, if not all, shaders (sometimes blue). Not sure if it's a single case or happens for all games using it.

    ReplyDelete
    Replies
    1. Uncommenting these in [Profile] section makes it work:
      StereoFlagsDX10 = 0x00004008
      StereoTextureEnable = 0x00000027

      Delete
  11. All games tried with Unity version 2019 have given an error when launching. No matter the resolution. This would be setting the resolution to the lowest in the dialogue.

    Switching to resolution 640x480 failed, trying lower one
    Switching to resolution 640x480 failed, trying lower one
    All resolution switches have failed
    Screen: DX11 could not switch resolution (640x480 fs=1 hz=0)

    ReplyDelete
    Replies
    1. Same issue. No solution. I'm afraid all future Unity games will be unable to enter 3D mode.

      Delete
  12. This ought to fix all 'the room' series games! If I had known that before, I would have already played it last winter! Admin! We need to update the game list accordingly!

    BTW: THX U ALL!!!

    ReplyDelete
  13. Had to exclude the appropriate comment as mentioned in the README
    include = ShaderFixes\Unity*

    ...and hat to apend the usual cmd parameters in Steam:
    -window-mode exclusive



    The Room Two
    PE version 5.3.4.47953
    Well, 'the Room Two' doesn't work at all in normal S3D. It seems to work in minimum details mode.

    The Room Three
    PE version 2017.3.0.38621
    OK, 'the Room Three' WORKS! The zoomed-in depth preset makes my eyes hurt though.

    Tacoma
    PE version 5.6.4.62028
    Well, does not work. I have to add that it has worked last year or so, but then I have played other helixmod games inbetween and now - even after Windows reinstallation - the same error w/ or w/o the universal fix shows up. It looks like there are 4 instead of 2 3D images. Nausea! Damn, if I only knew what caused this in the first place... I have a feeling that extended playing around with the convergence settings can trigger some bugs to show up.



    Keep on the work. Some things already work. :-)

    ReplyDelete
  14. - Shroud of the Avatar: Forsaken Virtues - Updated Review

    Finally I'm able to confirm that Richard Garriot's latest RPG game scrubs up very well indeed, using DHR's Universal Unity Fix. It's not perfect, but seemingly pretty close to it, seeing as I've not yet completed this game. As was suggested previously, cobwebs and waterfalls now render correctly with a non-corrupted profile and driver.

    There are one-off effects that this universal fix can't be in a position to correct on the fly. For example:

    - Pre-rendered bloodstains
    - Buildings on fire

    The above examples are rendered as such for purely narrative/story purposes and are encountered at the very beginning SoTA, and so at least in theory should be a rare sight throughout the rest of the game itself. Even these issues can be corrected or at least mitigated to a large extent by dropping the depth setting to just above the minimum level, and then raising the convergence levels to suit.

    The colour palette that's used in SoTA is extremely good, and overall this game is visually stunning in stereoscopic 3D. On the downside it needs a beefy rig to get high fps at high settings, as the game engine does have performance issues. However, on a slightly better note, it's currently free to play on Steam so you really can't go wrong with this one.

    Special thanks to DHR for this fantastic fix!

    -Tothepoint

    ReplyDelete
  15. Hi there! I'm using this with HelixVision on Steam and loving it but I found this amazing game called PRODEUS that crashes just by launching it with this 3D FIX. This is the game: https://store.steampowered.com/app/964800/Prodeus/

    Can you check it?

    ReplyDelete
  16. I'll be trying this with Pillars of Eternity, free on Epic this week, 12.10.2020

    ReplyDelete
    Replies
    1. Hmm, tried all three include lines. What next? Not sure how to determine Unity version here. Maybe the code is altered in some way and the fix isn't hooking?

      Delete
    2. I gave it a quick look too. It's a Unity 2019 game, the only one that might work would be the DHR 2017 version. IIRC Losti also has a WIP for a unity universal update.

      I couldn't get it to work either. I could get it into 3D, but the 3D was completely flat, all on one plane. So 3D Vision is not working properly to start. Would be worth experimenting with different profiles.

      Delete
  17. This fix got Plane Mechanic Simulator working for me but I cant take screenshots. Alt-F1 doesn't respond. Works in other games though.

    ReplyDelete
  18. "Sonic Superstars" is a Unity game, and seems to have a lot of effects that'd look great in 3D.

    I tried the current fix, but it doesn't work :-( It'd be awesome if someone could mod it for 3D :-)

    ReplyDelete
  19. Hi,

    I used this fix on "Prince of Persia The Lost Crown" works very good by the way (at least when combined with geo-11).

    Anyway, I realized (in this game, and also some other) that on my television with shutter glasses, the 3D image is slightly distorted by left or right movement. This is actually to be expected: If both images are generated at the same time, but shown one after the other an additional depth or flatness (depending on the direction) is added.

    Therefor I wondered, is it possible to set the system up to actually generate to sperate images, on after the other for better work with a 3D tv? Or is there like a settings to counter effect the effect?

    ReplyDelete
  20. Demn, pac-man re-pac uses 2020.3.25f1 :,v

    ReplyDelete