Saturday, April 25, 2020
UNREAL Engine 4 – Universal Fix 2 - V1.18 with Configuration Tool
— Created and assembled by Losti —
— Made with and for the 3D-Vision Community —
— Version: 1.18 —
Stereo Image 1
Version History
•	1.	00 - First release
•	1.	01 - An error was fixed that prevented saving the SSR side-screen workaround fix / 2 new HUD shaders that I have found in a game / The troubleshooting section has been supplemented with two additional notes regarding the interface / Added a NoHudFix version for download
•	1.	10 - AutoConvergence scripts added made by DSS, UE4 AutoConvergence Formula by DJ_RK / OnScreenDisplay (OSD) added for tracking current state of settings including Separation and Convergence, you do not need Hunting Mode for adaption anymore / Add 3 Versions of the fixes, see below @ DOWNLOAD  / Add scaling for AutoDepth, see section: "Notes on the user interface/HUD – (Auto)-Depth-Function" -- Plase read again section: Keys used in the Universal Fix 2 / Numpad + will now control Auto Convergence, no adjust for AutoDepth needed anymore, THANK YOU DJ_RK!!!! / ALL KEYS and settings are displayed @ the new OSD if you install this new version!
•	1.	11 - AutoConvergence Speed change added (see section: Keys used in the Universal Fix 2) / Updated Download Section / Updated "Additional Information Section" text / Fixed some OSD writing errors
•	1.	12 - AutoConvergence Speed Key Text in OSD now correct / added 3 more possible HUD-Shaders found / changes for more AutoConvergence compatibility in some games not working with V 1.11 
•	1.	13 - Should now have better AutoConvergenceSupport
•	1.	14 - Bring back mouse depth, SORRY I missed this in 1.13 / Fix AutoDepth for mouse courser, should work now! NOTE: This AutoDepthMouse may need adaption for games that really needs this, the UNIVERSAL Version is only rudimentary! / Added some Crash trouble shooting hints in the trouble shooting section here!
•	1.	15
•	1.	151
•	1.	152
•	1.	16
•	1.	17
•	1.	18 - MAJOR UPDATE
Foreword
Since DHR launched the first UE4 Universal Fix last year, many games have been repaired very well for 3D-Vision. Unfortunately, there was the last update in April 2019 and the games as well as the engine have evolved, so I have invested plenty of time to fix the missing things in current games. Unfortunately, DHR is currently no longer active, so a new update seemed out of reach.
I have noticed that many new correction mechanisms are being repeated, but not for every game, and again and again new small or bigger changes have been added. Therefore, I decided to expand the UE4 Universal Fix and combine the new effects corrections in a new UNREAL Engine 4 - Universal Fix 2 and adapt them for universal use.
Intention
First and foremost, a universal fix should serve to ensure that not every game, especially the smaller Indi games, needs to be repaired by a shaderhacker. In addition, a lot of repair time can be saved, if you can rely on something already existing, so that perfect 3D fixes can be created much faster. This saves a lot of time for shaderhackers to repair a game perfectly. In the optimal case, only a few individual adjustments are necessary and the removal of unneeded correction mechanisms to increase performance. The intention behind a Universal Fix is not to create the perfect 3D fix. Individually repaired games are always better than a universal correction, but that does not mean that a game cannot be perfect even with a universal fix.
Performance
The UNREAL Engine 4 - Universal Fix 2 fixes broken effects with the help of Regular Expressions. Only this possibility, which the 3D-Migoto development team has implemented some time ago, makes a universal correction possible in the first place. The Universal Fix 2 includes over 70 such regular expressions. Since each shader is checked to see if a correction formula fits, there will inevitably be initial performance losses. This is especially the case with graphically very expensive games that have thousands of shader files. Thanks to the shader cache function, this improves as the game progresses. The more shader corrections are saved, the smoother the game becomes.
That means:
1.	When the game starts for the first time, it can lead to increased loading times and longer phases with a black screen, you may need to wait up to 15 min if you run the game for the first time!
•	Even if the OSD shaders are cached, it also happens to me that some of it was recreated even without any changes in the HLSL files for some games, may be because of driver change, may be because of other things
•	THIS takes MINUTES, i cant tell you how many but i think it's CPU dependend. I am using a core I9 (9th generation), so if you have lower CPU it may takes even longer!
•	If this recaching happens, the following happens: You start the game and it obviousely will not load, it seems to run in the background!
•	WAIT, get a smoke, drink a beer, whatever you want to do but JUST WAIT! The game will start! If it crashes, just start it again, the cached shaders wont be cached again, you may have to start the game a second or a third time if it crashes while caching OSD shaders.
1.	         New territory, level or game sections may initially suffer from stuttering and frozen image,
             give the tool the time to make the necessary corrections and cache shaders
•	Auto Convergence will kill up to 10 % of performance (fps)
•	Auto Depth-HUD will kill another 10 % of performance (fps)
•	---You can skip this features with "UE4-UF2-Configuration Tool"!!!
Addressed effects with associated involvement and further contributions
__Contribution__                                                 __by__                                 __RegEx Formula by__
Objects:                                                                     DHR                                               DHR / Losti
Effect fixes:                                                               DHR                                               DHR / Losti
Additional object light fix:                                      Losti                                              Losti
Basic reflections:                                                     DHR / Masterotaku                    DHR
Extended reflection fixes:                                      Losti                                              Losti
One Additional SSR pattern:                                  DJ_RK                                            DJ_RK
Water and special reflections:                              Masterotaku                               Losti
SSR-Sidescreen Approx. Fix/Workaround:           Losti                                              Losti
Approx Fix for SSR motion effect:                          Losti                                              Losti
Workarround for wrong AO on Walls/Ground:   Losti                                              Losti
Basic lights and shadows:                                      DHR                                               DHR / Losti
Light shafts:                                                              DHR                                               DHR
Volumetric lights:                                                    DJ_RK                                           DJ_RK / Losti
Volumetric fog:                                                        Losti                                              Losti
Additional lights and shadows:                            Losti                                              Losti
Shadow and light clipping:                                    Losti / Masterotaku                   Losti
Main halo fix:                                                           DHR                                               DHR
One Additional halo pattern:                                 DJ_RK                                            DJ_RK
One Additional halo pattern:                                 Losti                                               Losti
TAA ghosting and flicker fixes:                               DJ_RK                                            DJ_RK
Decals:                                                                       DHR / DJ_RK                                DHR / DJ_RK / Losti
Auto Convergence Scripts:                                    DarkStarSword
Auto Convergence UE4 Depth Formula:             DJ_RK
Auto Convergence Matrix Detection:                   Losti
Auto Convergence Configuration Options:          Losti
HUD/UI Sahders with AutoDepth Option:           Losti
Automatic decal fix detection:                               Losti
Additional decal fix options:                                   Losti
Basic HUD fix for possible depth:                          Losti
Automatic outline fix:                                              Stereo Flags 5008
Universal AO and shadow stereo settings:        Masterotaku
Migoto-Launcher for Windows Store Games:   Bo3B
3D-Migoto-Launcher starting scripts                    Losti
installation scripts for UE4 suitible AA                  Losti
Tutorials and trouble shooting hints                     Losti
Presentation, Testing, Assembling:                       Losti
Configuration Tool and TROUBLESHOOTING       Losti
Optional donations
Donations for to show appreciation and provide funding towards future game fixes
Losti:                        via PayPal: www.paypal.me/Losti3D or by sending to rauti@inetmx.de
DHR:                        via PayPal: www.paypal.me/dhrdonation
Masterotaku:         via PayPal: masterotakusuko@gmail.com
DarkStarSword:     via PayPal: www.paypal.me/DarkStarSword or support @ https://www.patreon.com/DarkStarSword
DJ-RK:                      via PayPal: www.paypal.me/DShanz or by sending to rshannonca@gmail.com
Some words about existing problems and hints to cure
Most incorrect effects in UNREAL Engine 4 games are caused by anti-aliasing (AA). AA leads in particular to a partially extreme motion blur effect (I call this "motion sickness"). The effects move asynchronous to the direction of movement in the game. This means textures are smudged and stretched too deep, or the textures are over the correct depth, depending on the camera's direction of motion. Often the motion blur selectable in the game options does not work without errors. I therefore recommend turning off motion blur in the game and starting with the lowest option for anti-aliasing and gradually increasing it until problems occur. These can also be slightly wrong reflections or lights on walls or textures. To ensure best setting for working AA and less "motion sickness", please refer to the section "Instructions to install the fix" below. Since version 1.16 of this fix you have the option to automatically apply the best settings using "UE4-UF2-Configuration Tool". NOTE: Some games are using a folder for that can't be identified automatically, than you need the manual hands on this!!!
Some shadows, lights or other effects may still have the described motion sickness effect. This affects above all the dynamic and volumetric light/fog and cones of lights. There is no solution for this. You have to live with it. This causes the effects that are affected to appear at the wrong depth during the movement.
Some incorrect effects can be easily resolved by changing the graphics rendering options. Depending on how much an effect disturbs me therefore recommend to test different graphics settings for minor errors, this may help.
There are three approximate corrections that can be used if needed to improve some other false effects a bit. Please read the section “Approximate fixes and workarounds” from below.
If a game has significant 3d errors, please read the last section "Troubleshooting" at the end of this post, here are some things you can do in this case. You can also use "UE4-UF2-Configuration Tool" and read the things there, most of the troubleshooting options are integrated and can be changed on demand. This is not because there are errors in the universal fix, but that some games may require smaller settings to be made individually to function properly.
Often you have to skip LensFlairs on Screen or in some cases some Sun/Sky elements are at screen depth. Please read section "Troubleshooting" below, to learn how to disable effects or use "UE4-UF2-Configuration Tool"!
Instructions to install the fix
Note: „XXXXXXX“ as a directory name means: the game name, the developer or distributor, a short name or a synonym for the game. That real name of the directory depends on the game!
•	Extract the fix to …\GAMEDIRECTORY\XXXXXXX\Binaries\Win64\ where you can find a …shipping.exe
•	NOTE: in special cases you will have to install the game to …\GAMEDIRECTORY\Engine\Binaries\Win64\   if you cant find a Binaries folder in …\GAMEDIRECTORY\XXXXXXX\
•	Open d3dx.ini, search for “x12 = 1920.0, 1920.0, 1080.0” (without “”) and enter your screen width here you are use in the game (two times) and once your screen height. Also do this if you are using DSR! The width and height should match your in game resolution! This is for trouble-shooting ref. decals and effect fixes, if automatic correction is wrong! (see troubleshooting section for more information)
•	OPTIONAL: copy "Scalability.ini" from the archive to XXX:\Users\YOURUSERNAME\AppData\Local\XXXXXXX\Saved\Config\WindowsNoEditor\
(this can disable motion blur and lowers the AA settings)
•	OR use "UE4-UF2-Configuration Tool"  for installation!
•	NOTE: Some games are using a folder for that can't be identified automatically, than you need the manual hands on this!!!
•	OPTIONAL: You can try to solve motion sickness: there is an Engine_additions.txt in the archive, add its content to the end of XXX:\Users\YOURUSERNAME\AppData\Local\XXXXXXX\Saved\Config\WindowsNoEditor\Engine.ini
•	OR use "UE4-UF2-Configuration Tool"  for installation!
•	NOTE: Some games are using a folder for that can't be identified automatically, than you need the manual hands on this!!!
•	set Scalability.ini and Engine.ini as write protected if you have copied over or changed it!!!
•	You do not have to do this, if you have used automatic installation via "UE4-UF2-Configuration Tool"
Gamestart Options
•	you can start any game as you are used to! NOTE: PLEASE read the Performance section for hints if the game is obvousely NOT loading, the solution is: WAIT ... WAIT ... WAIT!!
•	More options available via "UE4-UF2-Configuration Tool"
•	in case of crashes or any other things like you want to use another d3d11.dll you can start any game with the 3D-Mitoto Loader, please use "UE4-UF2-Configuration Tool"
•	You can also start the game via 00_UE4-UniversalFix-2_Config.cmd
Custom Keys and Constants
•	Please use X80 until X99 as constants for custom things!!!! This should be save and not beeing in use!
Instructions for the UE4-UF2-Configuration Tool
•	This tool is based on MS batch instructions and do not use any external program but it changes files! So make sure your AntiVirus will not block this
•	This tool should be selfe explaining BUT NOT A ONE CLICK EVERYTHING IS COOL "app". You have to read and make your choices carefully.
•	START IT: 00_UE4-UniversalFix-2_Config.cmd
•	DO NOT create a LINK to this, this will NOT WORK! START it DIRECTLY!!!
•	NOTE: All the changes are NOT a guaranty to make the game 3D-Vision ready. If changes will NOT HAVE any effect, REVERSE IT and you may need some other options to choose or a SHADERHACKER have to repair this game.
•	The tool replaces nearly all manual hands on for the changes described in the TROUBLESHOOTING section below, means you can:
General hints on Game-Options
Some recommendations regarding the game settings have been described above; I summarize here again the most important and give more general recommendations.
•	use fullscreen mode, if 3D do not kick in, you can try STRG+T or two times ALT+ENTER OR enable Force-Full-Screen via "UE4-UF2-Configuration Tool"
•	AA: off, low or medium,dont use TAA, max FXAA (if you have the choice) OR install AA/AO Improvements via "UE4-UF2-Configuration Tool"
•	I don’t recommend the usage of effects like motion blur, chromatic aberration, film grain
•	try lower settings for graphic options like: Material, Effects, Visuals, Post  Processing, Ambient Occlusion in case of strange effects or some incorrect effects, this may help fixing it (skipping it)
Keys used in the Universal Fix 2 (please see detailed Information on its usage below)
This is a complete listing of the key bindings used in the Universal FIX 2. For detailed information, please read the following sections carefully!
NOTE: Try to avoid key changes for Auto-Cconvergence and Auto-Depth-HUD if you want to use "UE4-UF2-Configuration Tool" for disable HUD or Auto-Convergence correctly, key changes made by YOU will ALSO NOT beeing displayed in the OSD!
__Key__                           __Function__ 
NUMPAD -                       toggle Auto-Depth-Function HUD (ON/OFF)
NUMPAD +                      enable / disable AutoConvegence
NUMPAD /                       HUD Depth (cycle)
NUMPAD *                       add optional mouse courser depth (cycle)
.                                          raise convergence (cycle)
,                                          reduce convergence(cycle)
#~ (EN-keyboard)            toggle low convergence (ON/OFF)
°^ (DE-keyboard)             toggle low convergence (ON/OFF)
XB_GUIDE                         toggle low convergence (ON/OFF)
RBUTTON (Mouse)          lowers convergence for aiming (on hold)
XB_LEFT_TRIGGER           lowers convergence for aiming (on hold)
LCTRL + NUMPAD7          SSR-Motion-Sickness-Workaround (ON/OFF)
LCTRL + NUMPAD8          SSR-Side-Screen-Approximate Fix (ON/OFF)
LCTRL + NUMPAD9          SSR-Side-Screen-Approximate Fix angel (cycle)
LCTRL + NUMPAD4          Troubleshooting, DECAL-RegEx fix options (cycle)
LCTRL + NUMPAD5          Troubleshooting, EFFECT-RegEx fix options (cycle)
LCTRL + NUMPAD6          Troubleshooting, EFFECT/DECAL RegEx manual mode 1/2/Automatic (cycle)
LCTRL + NUMPAD1          Troubleshooting, light/shadow RegEx – Type 1 (OFF/ON)
LCTRL + NUMPAD2          Troubleshooting, Sun/Horizon Light Fix – (ON/OFF)
LCTRL + NUMPAD3          Troubleshooting, Additional Halo RegEx – 1 (ON/OFF)
LCTRL + NUMPAD0          Ambient Occlusion, adaption and strength workaround (cycle)
ALT + UP                            Increase UPPER AUTO-DEPTH-HUD
LCTRL + UP                        Decrease UPPER AUTO-DEPTH-HUD
ALT + DOWN                     Increase LOWER AUTO-DEPTH-HUD
LCTRL + DWON                 Decrease LOWER AUTO-DEPTH-HUD
ALT + LEFT                         Increase LEFT AUTO-DEPTH-HUD
LCTRL + LEFT                     Decrease LEFT AUTO-DEPTH-HUD
ALT + RIGHT                      Increase RIGTH AUTO-DEPTH-HUD
LCTRL + RIGHT                  Decrease RIGHT AUTO-DEPTH-HUD
F1                                        Disable/Enable OSD 
ALT + NUMPAD0               Optional Horizon fix Workaround (cycle)
ALT + NUMPAD2               Increase Minimal Auto-Convergence
ALT + NUMPAD1               Decrease Minimal Auto-Convergence
ALT + NUMPAD5               Increase Maximal Auto-Convergence
ALT + NUMPAD4               Decrease Maximal Auto-Convergence
ALT + NUMPAD6               Switch to User Definede Convegence Settings for Min and Max Auto Convergence
ALT + NUMPAD3               Adjust Speed of Auto-Convergence change
___________________________________________________Additional Information__________________________________________________
Notes on the user interface/HUD – OnScreenDisplay (OSD)
The new OSD will tell you all the things that are currently set or active and you can see changes you do with keys. It will also show you the keys that are available for changing things. You can switch if off and on by the F1 key. If you want to disable this for the hext game start please open d3dx.ini and set y20 = 1.0 to 0.0 OR use "UE4-UF2-Configuration Tool"
Notes on the user interface/HUD – (Auto)-Depth-Function
The UNREAL Engine 4 - Universal Fix 2 contains some vertex shader files that are very often used for the interface. I've added the option for an Auto-Depth-Crosshair. If the Auto-Depth-HUD function is activated, the entire interface, minus the margins, is adapted to the of the depth buffer from Lightshaders. This allows for Auto-Depth-Crosshair, nameplates or other target functions in the middle of the screen. This should work for almost any game, unless the game uses a different hash for the vertex shader of the interface. If there are interface elements in the depth of the screen, then the correct Vertex-Shader file is missing. This can be found out and adapted by means of the HUNTING function of 3D-Migoto. An explanation for this can be found below in the "Troubleshooting" section.
By default, the Auto-Depth-Function is turned off. This can be switched on by means of the NUMPAD-SUBSTRACT (-) button. You can adjust the automatic depth starting point using the ALT (increase) or CTRL (decrease) + LEFT / RIGHT / UP / DOWN keys. These buttons changes the beginning of the automatic depth. The standard is 50, which means that the automatic depth begins in every half of the screen from 50%. Please read this post here @ the new place for 3D-Vision to ment to be seen for more information on the automatic depth starting point adjustment: Detailed Information on what the Auto-Depth-HUD adjustment is doing and what this is used for
The screen depth of the rest of the user interface is set using the NUMPAD-DEVICE (/) button. When Auto Depth is on, the crosshairs and all objects in the center of the screen are not affected. When auto-depth is off, the crosshairs and surrounding interface elements are changed in depth, as with the rest of the interface. The scaling starts with 10% depth and takes place in increments of 10 to 100%, with repeated key press. After 100%, the interface switches to 0 % depth, and then it starts again at 10%.
Notes on the user interface/HUD – Auto-Convergence-Function
The Automatic convergence is switched off by default. Not every game needs this or is suitable for it. You have to find out for yourself. To switch on AutoConvergence, please press the NUMPAD + button. Please  use ALT + NUMPAD2 / ALT + NUMPAD1 / ALT + NUMPAD5 / ALT + NUMPAD4 keys to adjust the minimum and maximum depth for AutoConvergence. Please read the information on the OnScreenDisplay, then everything will be clearer. You can adjust the speed of convergence chaning with ALT + NUMPAD3 up to 200 % of normal speed. It's up to you to find your way which setting is is cool for you!
If you don't find any of the given options good, you can set your own limits for min and max in d3dx.ini and activate them in the game using ALT + NUMPAD6. To do this, you have to search for "[Key_USER_MinAuto_Conv]" in d3dx.ini (without ""). Here you will find $MinConvAdjust = 20 and $MaxConvAdjust = 110. Enter the convergence values that you want to have as minimum and maximum.
Approximate fixes and workarounds
•	SSR-Side-Screen-Fix (ON/OFF: LCTRL + NUMPAD8)
Some reflections, especially in large puddles or on the water, have a faulty appearance on the edges of the screen. Here it comes to dark shadowy areas that are not in the right depth. There is an approximate correction that works well with water. Depending on the game, however, this may negatively affect the specular reflections of glass in the presentation. Therefore, this fix is initially disabled. It's up to you to test what's best for the game. The SSR side-screen fix can be switched on using the LCTRL + NUMPAD8 key and switched off again in the same way. If the correction is switched on, the angle can be adjusted on the screen edge, also for this: try out what suits you depending on the game and your perception. The adaptation can be done with LCTRL + NUMPAD9. Normally you do not need the adjustment of the angle.
•	SSR-Motion-Sickness-Workaround (ON/OFF: LCTRL + NUMPAD7)
Especially the representation of puddles in a game in which the environment is reflected is often affected by the motion-sickness effect. This can be very annoying in some games, depending on how many puddles are displayed. I have a workaround built in that can be turned on and off when needed. For all other reflections, this leads to more and less intense flickering or washed-out appearance. It is therefore your decision which attitude you use in which situation. The workaround can be switched on and off with the key combination LCTRL + NUMPAD7.
•	Ambient Occlusion, adaption and strength (cycle: LCTRL + NUMPAD0)
The ambient occlusions (AO) are fundamentally at the correct depth, but wall textures and stone textures can lead to errors in the reflection representation, this depends above all on the viewing angle. A possible improvement can be achieved by turning on the AO workarround. Which setting is suitable depends on the game and has to be tried out. So it's up to you to use and test this workaround, if you find wrong reflections on walls or rocks and that bothers you a lot. Switching on and off or switching through the various options is done by means of LCTRL + NUMPAD 0.
Other functions and key assignments
•	Aiming Key – Convergence switch
The XB_LEFT_TRIGGER and MOUSE-RIGHT-BUTTON (RBUTTON) keys are assigned a lower convergence, which reduces the depth of in-game targeting. Not every game needs this, or you do not want that change, or you want a higher or lower convergence when aiming. When auto convergence is activated, the depth should automatically decrease to a comfortable level. You can adjust the value for the convergence in the d3dx.ini to your preferences if you do not use auto Convergence. Removes or simply modifies the lines "convergence = 0.33", you will find them in the key section at [CommandListAim]. Please note that THIS is a multiplyer of your curret convergence. so adjust it slightly if it do not match!!! Set this to 1.0 if you do not want any convergence change by this keys.
•	Low Convergence switch
Unfortunately I have not been able to install the Auto convergence of DarkStarSword universally. Unfortunately, every game needs a special formula. However, depending on the situation, many games require significantly lower convergence values ​​than what is used in normal gameplay. This mainly concerns dialogues or cutscenes as well as other situations. Here, if required, the convergence can be reduced with the push of a button. By pressing the button again, the previously set convergence is restored. As with aiming, you can adjust the convergence to your preferences. The keys for this are XB_GUIDE, for the US standard keyboard, the '' ~ 'key and for german keyboards it’s the key left to the numeric 1 key (°^). The default value is 40, which you can increase or decrease at any time. To do this, find the key section in d3dx.ini and change the line convergence = 40.00 under [Key_Low_Convergence]. By pressing this key, the automatic depth of the crosshair is switched off at the same time. Since a universal fix does not automatically perform this shutdown, for example, when the main menu or inventory or other menu item is opened (causing that skew to be extremely distorted), using this key in menu items is recommended. Of course, alternatively, the auto depth HUD function can be turned off. If Auto Depth Shutdown is not desired when the LowConvergence button is pressed, please clear x22 = 0.0 from the [Key_Low_Convergence] section.
•	Cycle Depth Presets
There are ready-made profiles for convergence and separation that you can use or change at will to suit your needs if the ready-made profiles are not suitable for you. The switching is done by means of  comma-Key (,) and point.Key (.). For changes, please adjust the values in the key section under [Key_DepthPresets]. Of course you can also set any freely selectable convergence as usual via LCTRL + F5 / F6 or separation via LCTRL + F3 / F4, as long as these key functions have been activated in the NVIDIA control panel in the stereoscopic settings. Unfortunately, saving these settings does not work properly. The default convergence for a game is set in the following line in d3dx.ini and set to this value each time the game starts: StereoConvergence = 125.0 … So, depending on the game, enter your preferred convergence here. If you choose a convergence via LCTRL + F5 / F6 and save it with LCTRL + F7, this value should not matter, but I'm not sure if this always works.
Save your settings
The following settings should be saved automatically, so that after a game restart the previously selected options do not have to be redone each time:
•	Effect and Decal options (see section Troubleshooting from below for explanation)
•	HUD-Depth
•	Settings for toggled fixes (SSR-Side-Screen Fix, SSR Velocity Fix, disabled or enabled correction formulas, AO fix)
•	Auto-Depth-Adjustment
However, sometimes auto-save does not work to make sure all options are saved, press F10 after choosing your settings. Convergence and Separation Settings can be saved as normal using STRG+F7.
Troubleshooting
Some games require a slight adjustment of the settings, which unfortunately cannot be done universally. For 90% of the games this should not be necessary and the universalfix 2 should work flawlessly correct the wrong effects with a RegEx formula. BUT: If no RegEx formula exits, then the following settings will not help either. If you have the game "Assetto Corsa Competizione", you are welcome to use it for testing. Here you will need to switch to StereoTextureEnable = 0x00000027, as well as the adjustment of the Decal and Effect correction option. Both troubleshooting variants are described below.
•	Game does not start in Stereo, even if you set fullscreen in the game options!
>>> Change available in "UE4-UF2-Configuration Tool"
It may happen that 3D not kicks in and you do not have stereo enabled. In this case please open d3dx.ini and seach for "full_screen=0" (without "") and change this to full_screen=1. Save the ini and start the game. 3D should now kick in!
•	Your health, live, stamina etc. bars are not changing/moving?
>>> Change available in "UE4-UF2-Configuration Tool"
It happens that life bars or endurance bars or similar do not move, and are always full. In this case, you must set disable_scissor = 1 to zero for the HUD / UI shaders. Open the d3dx.ini with a suitable text editor and use the search and replace function. Then replace "disable_scissor = 1" (without "") with "disable_scissor = 0" (even without ""). However, this will cause clipping with the interface elements. Therefore you can choose in this case only a very small or no depth for the interface. The HUD depth is switched through as usual with the NUMPAD-DIVIDE key.
•	Something is completely wrong with the interface
If you still have problems with the interface, please try the DISABLE HUD via "UE4-UF2-Configuration Tool".
•	You may need to change StereoTextureEnable (d3dx.ini)
>>> Change available in "UE4-UF2-Configuration Tool"
The settings of the UNREAL Engine 4 - Universal Fix 2 are chosen so that they should work in 90% of the games. However, a game may require a different value for StereoTextureEnable (for example, Assetto Corsa C.). You will notice this very quickly when many elements are displayed in 2D and some in 3D. If this is the case, please try an alternative value for StereoTextureEnable in the d3dx.ini. Exit the game, look for StereoTextureEnable = 0x00000023 and change this line to StereoTextureEnable = 0x00000027, save this and restart the game.
VERY IMPORTANT: If you cannot see any visible improvement by switching to StereoTextureEnable = 0x00000027, please reset this to StereoTextureEnable = 0x00000023 before trying another trouble shooting variant, otherwise you may experience problems with rendering shadows or reflections.
•	You may need to change StereoFlagsDX10 to 4008 (d3dx.ini)
>>> Change available in "UE4-UF2-Configuration Tool"
If you have wrong effects with shadows and lights, the game may need another stereo flag. Open d3dx.ini and search for StereoFlagsDX10 = 0x00005008. Changes this to StereoFlagsDX10 = 0x00004008. Using StereoFlags 4008 will make the Outlines 2D. This can be fixed by the identification of the VertexShader and add some lines in the d3dx.ini. In this case please let me know that you want to learn how to do this. Start the game and see if the shadows have been corrected. If not, there is little hope and you have to live with it. You can still try to change the following line StereoTextureEnable = 0x00000023 to StereoTextureEnable = 0x00000027.
•	You may need to change Decal and Effect option (cycle CTRL + NUMPAD4/5/6)
In over 90% of cases, decals and effects are automatically repaired. However, it may happen that, despite correct correction, the matrix recognized by the correction formula is not correct. There are several options that can solve the problem. However, switching through the DECAL and EFFECT correction options only makes sense if it is really DECALS and / or EFFECT RegEx is used. And then there are always more than just one or two EFFECTS / DECALS that are not correct. In case a RegEx formula exists and the automatic detection of the correction matrix does not work, EFFECTS / DECALS are ALWAYS at a wrong depth, but NEVER at screen depth. For things that are displayed in the screen depth, there is no RegEx formula! You can first use LCTRL + NUMPAD 6 to choose between two manual and the default AUTO-REPAIR function. However, this may happen for the decals, but not for the effects, or just for some effects and decals. Therefore, there are two more buttons. LCTRL + NUMPAD 4 provides 4 options for decal correction. LCTRL + NUMPAD 5 provides 4 options for effect correction. Since this problem has so far only occurred with Assetto Corsa C., I cannot guarantee that it works for other games where the recognized matrix is ​​not the right one. So if decals or other textures are not in the right depth, just try switching the options. That should not be necessary often.
Important: If switching through the options does not improve things, then please set the DECAL and EFFECT correction option back to AUTO. Press LCTRL + NUMPAD6 until the green text in the lower left corner of the screen indicates "AUTOMATIC Resolution FIX ON".
•	Use another Effect-Fix matrix for inversion with EffectRegEx formula from DHR
>>> Change available in "UE4-UF2-Configuration Tool"
The effect regluar expression correction of DHR requires the inversion of a specific matrix. This can differ from game to game between usually 3 variants. If you notice any wrong effects in a game, the first thing you do is to switch the effect correction options on, as I described above. I do not mean the decal option, which of course can also be switched through in case of errors. But decals and effects are two different regular expressions. It is therefore difficult to say what is corrected by the EFFECT RegEx and what is done by the DECAL RegEx. This is relatively easy to figure out by switching the EFFECT correction options in case of errors. If certain textures change in the process, but their presentation cannot be adjusted correctly, THEN you should try to use a different matrix, and, if the effects are still wrong, switch the effect correction options again and see if this leads to the success of correcting the effects.
By default, universalfix 2 uses matrix 44. The RegEx corrections are loaded and used by the following line in the d3dx.ini:
include = ShaderFixes \ ShaderRegEx_UE4_UNIVERSAL2_C44.iniBut some games use 36 or 40. There are two lines in the d3dx.ini, you can find them a few lines below:;include = ShaderFixes \ ShaderRegEx_UE4_UNIVERSAL2_C40.ini;include = ShaderFixes \ ShaderRegEx_UE4_UNIVERSAL2_C36.ini
These lines are deactivated by the semicolon at the beginning of the line. You can remove the semicolon to allow the inclusion of these files. But it is important that only one of the three ShaderRegEx files is included. For example, if you want to use ShaderRegEx_UE4_UNIVERSAL2_C36.ini, then remove the semicolon at the beginning of the line and place a semicolon before the line include = ShaderFixes \ ShaderRegEx_UE4_UNIVERSAL2_C44.ini.
Unfortunately, there is no more comfortable variant for this. However, there are few games that use this EFFECT RegEx, so this trial should be a rarity if the standard matrix used is not the right one.
•	Disable fals positive Light fix on demand (cycle CTRL + NUMPAD1/2)
There are three very universal light and shadow correction styles. Out of more than 10 games tested, there is only one game that does not require the first formula, causing some shadows and lights to shimmer or flicker. I have not seen any other problems so far and formula two and three were always needed. By default, all correction formulas are switched on. However, I've added a button to turn off the correction for these three formulas. So if it comes to wrong lights or shadows, by turning on and off the three corrections can be tried to see whether an improvement can be achieved. This is done by means of the key combination CTRL + NUMPAD1, (first formula) and CTRL + NUMPAD2 for the other one.
•	Disable false positive OBJECT shaders 
Those false fixed shaders will result in transparency, flickering or any kind of strangeness for textures. Start the game with hunting=1 in d3dx.ini and switch to ORIGINAL view of shaders by hold down NUMPAD "," key and use NUMPAD1 or 2 to switch hunting options to ORIGINAL, than HUNT PIXEL shaders until the effect is cool. If this shader is marked as a RegEx catched shader, save it. Edit the saved shader and remove its fix by deleting the lines between the lines //Shader Fix 1/1 and the next line where you can see //Shader Fix 1/1. You can do the same thing easily by the use of the UE4-UF2-Configuration Tool choosing option 7-6-2
•	Enable additional Halo Fix (NEW since 1.15)
II found 2 games that didn't need a specific ShaderRegEx fix and only one where it was needed. In both cases the effect is defective. If it is repaired and does not need to be repaired, it is wrong. If it is not repaired and has to be repaired it is also wrong. I have not found a game that does not need the Additional Ligth Fix 3. Therefore I removed the switch-off function for this (since version 1.15) and added the option to switch the AdditionalHaloFix on and off. As of version 1.15, LCTRL + NUMPAD3 is responsible for this. Standard is DISABLED. If something is strange, try turning it on, as for the other optional fixes and options.
•	Basic instructions to disable a wrong shader
>>> HUNTING available in "UE4-UF2-Configuration Tool"
BUT: IF using the tools method and this will kill more than you want and will not disable the shader as you can see it while HUNTING, please go on following this!!!
It can sometimes happen that in a game a special effect was not corrected, since it is an isolated case for which there is no RegEx formula. This is not the cause of the universal fix and it's not a part of it either, it's more like a little tutorial on how you can turn off false effects if they have not been fixed and are annoying. Examples include lens reflections, screen depth effects such as water drops, etc. Turning off the effect can sometimes improve the gameplay experience. But that only makes sense if the game itself is 99% repaired and in order. However, this option should be taken with caution, as simply turning off shaders may cause unpredictable problems in other areas of the game. Nevertheless, I would like to show you this possibility, whose use, like everything else, lies entirely with you.
This is also usefull for effects @ the "camera" or other things @ screen depth like rain drops, mud, lens flairs etc...
In order to switch off a shader, the so-called hash must first be identified. A sequence of numbers and letters that is unique for each shader. For this purpose, the so-called hunting option in the d3dx.ini must be turned on. Search for hunting = 0 and change this to hunting = 1. Now start the game and use the NUMPAD2 button cycle through the pixel shaders until the unwanted effect disappears. Often you miss this and the effect comes back to when the next one is switched through. You can switch off the previously switched off pixel shader with the NUMPAD1 key. If you cannot find a PixelShader that will disable the unwanted effect, you can use NUMPAD4 / 5 to search for vertex shaders. CAUTION: Often VertexShaders are used by multiple PixelShaders, turning them off can do more harm than good. That you have to try out, if that is suitable. If you have now identified a pixel shader and turned it off, then you have the hash of the shader in the upper left corner. Write this down or press NUMPAD3 (vertex shader: NUMPAD 6) to save the shader file in the directory ShaderFixes. Sort the ShaderFixes directory by date and you'll see the newly saved shader as a file, for example, like this: 316fbffe600c5cf4-ps_replace.txt or 316fbffe600c5cf4-ps.txt. The hash is then everything before "-vs", in this example: 316fbffe600c5cf4. Copy the hash, and then delete the shader file. In the d3dx.ini you will find the following lines at the bottom:
; [ShaderOverride_DISABLE_1]
; Hash = e3f8758b45febbec
; handling = skip
Please remove the semicolons in front of these lines and insert instead of e3f8758b45febbec the hash of the shader you have just copied to the clipboard, which you want to switch off. If you have several shaders to disable, copy the three lines, change [ShaderOverride_DISABLE_1] eg. on [ShaderOverride_DISABLE_2] and insert a new hash. When done, please change hunting = 1 to hunting = 0, save the file and start the game.
•	Disable Mouse-Auto-Depth if this is not working for the courser
If you have enabled AutoDepth for the HUD, the Fix will apply this also for the mouse courser. But this is not working for every game. If the mouse appears at a very high depth and will not change its depth based on the things you target, you have to disable AutoDepth for mouse if you still want to use AutoDepth for the rest of the HUD. Please open "...\ShaderFixes\mouse.hlsl" and search for "output.pos.x+=adjust_from_depth_buffer(0,0);" (without ""). Replace this line with "output.pos.x+=stereo.x*HudDepth.x;" (also without "") and save the file. This will disable AutoDepth for the courser.
•	HUD-Element is not in depth even with enabled HUD-Depth
>>> HUNTING available in "UE4-UF2-Configuration Tool"
This means that the HUD shader is not included in the recent UE4-UV2. You can add the HUD-Depth for this shader following this tutorial:
Guide on how to add depth to HUD elements that are not included in a fix
•	You need to change depth for a HUD-Element or disable it because its not cool??
You can add the HUD-Depth for textures following this tutorial:
Guide on how to get access to specific textures to fix its depth / use another depth / disable it
•	Crashes and Hangups - possible Options to cure
Games may hang or crash. The reason for this can be different, so I would like to provide a small selection of options below for how the problem can either be fixed or at least narrowed down. Please note that some hangup and crashes are caused by extense shadercaching in the first minutes or hrs of the game after install the universal fix. As you can read above, this cures automatically the more you play.
1.	 Enable APP_COMPAT_SHIM
>>> Change available in "UE4-UF2-Configuration Tool"
It helped some players to activate the APP_COMPAT_SHIM = 1 option in d3dx.ini. To do this, look for this line and remove the semicolon in front of it to unlock the option. If this is not already the case, set this to 1.
1.	 Start the game several times
It can happen that saving the shaders becomes so performance-intensive that the game crashes. A crash is the case if you get an error message or the game does not respond for more than 5 minutes. Starts the game after a crash or hangup over 5 min, multiple times and looks to see if it gets better or the crash is fixed.
1.	 Use Display Driver Uninstaller (DDU) and a fresh Driver Installation
Even if it sounds like a standard phrase, it can work wonders. In case of problems with crashing or undesirable behavior in a game, you should use DDU to completely uninstall the installed graphics card driver. Download the DDU and the driver with version 425.31. Run Windows in Safe Mode and please disconnect from the internet. Run DDU and reboot, then install driver 425.31. Please continue for without being connected to the internet! Then reboots and sets up 3D vision. Start the game and see if the problems have been fixed. If not, please install the latest driver by following the tutorial below and using the installation tool (https://www.mtbs3d.com/phpbb/viewtopic.php?f=105&t=23277). Maybe that helps.
1.	 Start the Game using MigotoLauncher
>>> Change available in "UE4-UF2-Configuration Tool"
If you have installed the 3D fix, you should have a 3DMigotoLoader.exe and a 3DMigotoLoaderWindowsStoreGames.exe file in the directory. The 3DMigotoLoaderWindowsStoreGames.exe. Please open the properties menu by right-clicking on the exe files and selecting properties. Here you go to the Compatibility tab and click "Run as Administrator". To start the game using launcher, please run the 0StartGameVia3D-MigotoLoader.cmd (or in the case of Windows Store games that don't start like this, 0StartGameVia3D-MigotoLoader_WinStoreGames.cmd). This may fix the Crash.
1.	 Remove some unsteriorization Option
Bo3B has reported that the game OuterWorlds (Windows Store Version) crashes due to the following entries in d3dx.ini:
[TextureOverrideDepthTarget1]match_type = Texture2Dmatch_format = R16_TYPELESS; match_bind_flags = 0x48match_width = heightStereo Mode = 2
It is not clear why this happens and it can also be an isolated case. The fact is that by removing these lines, some shadow corrections are lost. First remove these lines and see if the crash problem is solved. If so, you have the following option, how the broken shadows can still be corrected:
>>> Change available in "UE4-UF2-Configuration Tool"
Look for the following line in d3dx.ini: StereoFlagsDX10 = 0x00005008
Changes this to StereoFlagsDX10 = 0x00004008
Using StereoFlags 4008 will make the Outlines 2D. This can be fixed by the identification of the VertexShader and add some lines in the d3dx.ini. In this case please let me know that you want to learn how to do this. Start the game and see if the shadows have been corrected. If not, there is little hope and you have to live with it.
>>> Change available in "UE4-UF2-Configuration Tool"
You can still try to change the following line StereoTextureEnable = 0x00000023 to StereoTextureEnable = 0x00000027.
1.	 Disable STEREO while starting/loading a gameTurning off 3D while a game is loading may prevent a crash. Make sure beforehand that you have activated the extended key combinations in the Nvidia Control Panel for 3D vision. This enables you to disable 3D by pressing CTRL + T. When you have loaded your savegame, you can turn 3D on again by pressing this key combination.
1.	 Disable NVIDIA Shader Cache
I remember that a few years ago some games crashed due to the NVIDIA shader cache. Switching off will increase loading times and may affect InGame performance, but it is worth trying. Go to the 3D settings in the NVIDIA Control Panel and set Shader Chace to OFF.
1.	 Use a clean MIGOTO Version to track down if the Universal FIX is the Problem or not
If nothing works, please download a clean 3D Migoto version and uninstall the Universal Fix. Copy the content of the x64 directory to where you had installed the universal fix. Then start the game. If it still crashes, a Sahder hacker can't help. There is still the possibility that fix settings or false positively recognized sahder will crash the game. If the game crashes despite a clean version of Migoto, it is not because of the fix, but because of the system, the game or 3D in General.
1.	 Please let the others know about your findings and things you have tried
If there is a post for a game here in the blog that has been repaired with the UNIVERSAL Fix, please post everything you did to solve the problem. But please let us know if nothing has helped so that the other users know. Please indicate your Windows version and the graphics card you are using. If there is no post here, I ask you to create one in the MTBS forum so that either someone can deal with it in more detail or the others are informed (https://www.mtbs3d.com/phpbb/viewforum.php?f= 181).
Download:
Plase uninstall a previous installed version first and than apply another one if you have changed your mind! Do not copy a new version over a previous one !!
•	UNREAL_Engine_4_UNIVERSAL-FIX_2_V1.18
Posted by Losti
