Improved DHR Unreal 4 Engine Universal fix [Released-V3.60] - CONFIG TOOL INCLUDED

Post Reply
User avatar
DJ-RK
Sharp Eyed Eagle!
Posts: 398
Joined: Thu Sep 19, 2019 8:13 pm

Re: Improved DHR Unreal 4 Engine Universal fix [Released-V1.

Post by DJ-RK »

Ok, so I've made a universal implementation of both the autoconvergence shader and autodepth crosshair shader. This accounts for all the CB's you mentioned in your other post (I probably should have maybe added a few more possible matches beyond those ones you gave, though).

Download: https://www.mediafire.com/file/iqqjez2l ... UE4_AC.zip

In order to integrate this into the universal fix, add all the files in the zip into the shaderfixes folder, make sure that include line is in the d3dx.ini (commented out, of course), and make sure to remove anything in any of your regexes that pass the depth buffer or the CB to the autoconverence.ini file otherwise it will conflict with mine.

As for the crosshair.hlsl, in order to hook that up will still require the person to make a [ShaderOverrideHUD] section, and pass the depth buffer and CB acquired in the autoconvergence.ini to the HUD shader. For example, my Jedi shaderoverride looks like:

[ShaderOverrideHUD1]
hash=f899aaa7ef2e07b5
vs-t110 = Resource\ShaderFixes\auto_convergence.ini\DepthBuffer
vs-cb13 = Resource\ShaderFixes\auto_convergence.ini\_gGlobalParam

and then they still need to add:
#include <crosshair.hlsl>

and then, of course, use the appropriate adjust_from_depth_buffer or adjust_from_stereo2mono_depth_buffer function call, eg.

o0.x += adjust_from_stereo2mono_depth_buffer(0,0);

or

o0.x += adjust_from_stereo2mono_depth_buffer(o0.x, o0.y);

etc.

Edit:: Forgot to mention, might want to test for performance. I was getting some pretty bad performance just now from JFO. It felt like it was caching a bunch of new shaders (may have been an update recently), which could be why, or maybe it was because I was testing on Windows 10, and I get way better performance on Win 7. I'll start testing there to compare, but might want to try this out on a couple of your games to see as well. There *shouldn't* really be that much more of a hit, but hey, even if there is it's better than not having the option at all!
Last edited by DJ-RK on Sun Dec 08, 2019 9:27 pm, edited 1 time in total.
User avatar
DJ-RK
Sharp Eyed Eagle!
Posts: 398
Joined: Thu Sep 19, 2019 8:13 pm

Re: Improved DHR Unreal 4 Engine Universal fix [Released-V1.

Post by DJ-RK »

Deleted, added to the post above via edit.
Last edited by DJ-RK on Sun Dec 08, 2019 9:28 pm, edited 1 time in total.
User avatar
DJ-RK
Sharp Eyed Eagle!
Posts: 398
Joined: Thu Sep 19, 2019 8:13 pm

Re: Improved DHR Unreal 4 Engine Universal fix [Released-V1.

Post by DJ-RK »

Deleted, added to the post above via edit
User avatar
Losti
Golden Eyed Wiseman! (or woman!)
Posts: 1545
Joined: Tue Sep 17, 2019 5:30 am

Re: Improved DHR Unreal 4 Engine Universal fix [Released-V1.

Post by Losti »

DJ-RK, we all have to thank you for your great contribution regarding the universal autoconvergence. I will test a few games, including performance. Maybe I will add variable for the determination of the maximum or the minimum. The game Arise, for example, actually needs 1500 as hard maximum, other games like The Beast Inside significantly less.

Using your formula for the AutoDepth HUD is a great idea. This should make it unnecessary that, depending on the game, the maximum depth on NUMPAD + must be set, as it is currently. The current version of UNIVERSAL Fix 2 already contains all HUD shaders that I found. Unfortunately it is rarely the case that only one of them is for the Crosshair and in the case of The Outer Worlds it is also meaningful, although the target symbols and health bars etc are in the automatic depth. This of course also requires the menu to auto depth, but in the case of a Universal Fix you have to live with it, in which case a button to shut down. But I will introduce a few buttons on how to change the AutoDepth area, I wanted to do that anyway. I add your formula to the shaders and test that, thank you very much, will again make an adjustment by the user!
User avatar
DJ-RK
Sharp Eyed Eagle!
Posts: 398
Joined: Thu Sep 19, 2019 8:13 pm

Re: Improved DHR Unreal 4 Engine Universal fix [Released-V1.

Post by DJ-RK »

Honestly, I think we could put just about anything in for the hard maximum, even up to 10000 or more, because I'm pretty sure the majority of the calculations look at the soft max and the popout bias (which the user has control over). I tested 10000 in Jedi, because some cutscenes are extremely zoomed out, and it really doesn't seem to affect how the autoconvergence shader works other than allowing the shader to have the headroom if it needs it. I just set it down to 1000 instead to be on the safe side, though. Again, I think the important thing is having it hooked up, and then the users can tweak it to their liking if the slightly conservative values aren't to their liking.
User avatar
Losti
Golden Eyed Wiseman! (or woman!)
Posts: 1545
Joined: Tue Sep 17, 2019 5:30 am

Re: Improved DHR Unreal 4 Engine Universal fix [Released-V1.

Post by Losti »

Yeah ill Check this in several games with the current setup an tell you about the results. But if i remember Right in The Beast inside the things where often at the hard max but i am not sure if i have done the DB number Adaption here. I think not. So as i say, ill check this twice in several games. Would be great if this is working.
Vaeltaja
Two Eyed Hopeful
Posts: 76
Joined: Sun Sep 15, 2019 4:54 am

Re: Improved DHR Unreal 4 Engine Universal fix [Released-V1.

Post by Vaeltaja »

Great work DJ-RK and thank you!

Havevn't got the time yet to try the solutions for Gravel's sky issue but I check it with updated fix as soon as I have the time.
User avatar
Losti
Golden Eyed Wiseman! (or woman!)
Posts: 1545
Joined: Tue Sep 17, 2019 5:30 am

Re: Improved DHR Unreal 4 Engine Universal fix [Released-V1.

Post by Losti »

Ok some first results from here. THis is completely killing any performance and is also not really working. Also without having any shader RegEx active from the universal fix. I have skipped the HUD thing for the first time, only have tried the autodepth thing.

I will do some testing with your autodepth things allready in the fix but uncommented and set the formula manually. Lets see what the game tells me ref. performance here.

//EDIT1: WORKING !! ("your autodepth things allready in the fix but uncommented and set the formula manually")

//EDIT2:

Change matrix by key is working!

DJ_RK formula with constants added:

float4 CBMatrix = IniParams.Load (int2 (47,0));
// search this in a light PS shader
r0.zw = cb1 [CBMatrix.x] .xz * float2 (z, z);
r0.z = cb1 [CBMatrix.x] .y + r0.z;
r0.w = -cb1 [CBMatrix.x] .w + r0.w;
r0.w = 1 / r0.w;
r0.z = r0.z + r0.w;
return r0.z;

in the ini file:
; AutoConvergenceCB matrix
x47 = 57
,
,
,

in the ini file key section

[Key_SwithAutoConvergenceCB matrix]
key =h
type = cycle
x47 = 51, 53, 57, 61, 65, 69

the user will notice if this is working or not ^^

But we need a more legant version here....

//EDIT3:

The game "The Beast Inside" needs a reverse correction of the convergence. For near objects, the convergence is increased rather than reduced. For distant objects reduced rather than increased. But generally it works very well. I'm going to spend more days doing that sort of universal thing, or at least making keyboard shortcuts capable of adjusting Auto Convergence. I am grateful for any help !!

//EDIT4:

Ill continue the next days. But if we can not manage the performance impact with your formula (DJ) the key changes are the only thing we can do here? Why performance impact happens?

But if this will need a huge amount of time to beeing solved, we can simply skip this and use key adjustment for auto convergence ^^ ... even if this is not elegant ^^
User avatar
DJ-RK
Sharp Eyed Eagle!
Posts: 398
Joined: Thu Sep 19, 2019 8:13 pm

Re: Improved DHR Unreal 4 Engine Universal fix [Released-V1.

Post by DJ-RK »

Ok, try this one: https://www.mediafire.com/file/2ciguaep ... _AC_v2.zip

Before I was matching every shader that performed a depth scaling function, which would have a few different matches. I've now made my regex do so only for directional lighting shaders, which there is usually only ever one active at a time. This is what I originally used for JFO, although I am a bit concerned that there might be some games that don't always have a directional lighting shader active at all times... but let's just give this a try for now and see how well it works before worrying about possible incompatibilities.

I've also simplified my formula a bit, which should reduce the amount of instructions processed.

Unfortunately I no longer have the ability to test this, because my one month subscription to Origin Premier Access expired today, which is how I was playing Jedi Fallen Order, and my library for UE4 games isn't quite as expansive as yours.

If performance doesn't get better with this, then unfortunately that's the best that can be done for now for an automatic detection script. I've spoken with DSS on Discord about a feature that would be the ideal solution to this, but since that doesn't exist yet we got to make do with what we got. So yeah, if performance is still abysmal after this, then using a function key to cycle through the different values is the only way to do it without a further performance hit, although I worry that there are too many values to cycle through and that using key will be unwieldy.
User avatar
skyrimer
Certif-Eyed!
Posts: 514
Joined: Sun Sep 22, 2013 11:43 am

Re: Improved DHR Unreal 4 Engine Universal fix [Released-V1.

Post by skyrimer »

Really love watching the two of our local geniouses working together, huge thanks to you both Losti and DJ RK, I'm sure the new universal fix is going to be a real masterpiece.
ASUS PG278QR Monitor
Windows 10 1809
AMD Ryzen 5 3600 @3.60ghz
Kingston HyperX Predator DDR4 3200 PC4-25600 16GB 2x8GB CL16
MSI B450 Gaming Plus MAX
Corsair RM650 650W 80 Plus Gold
SSD M.2 2280 500GB
Gigabyte 2080 ti gaming oc
VR: Pimax 8k & Index controllers
User avatar
Losti
Golden Eyed Wiseman! (or woman!)
Posts: 1545
Joined: Tue Sep 17, 2019 5:30 am

Re: Improved DHR Unreal 4 Engine Universal fix [Released-V1.

Post by Losti »

DJ-RK wrote:Ok, try this one: https://www.mediafire.com/file/2ciguaep ... _AC_v2.zip

Before I was matching every shader that performed a depth scaling function, which would have a few different matches. I've now made my regex do so only for directional lighting shaders, which there is usually only ever one active at a time. This is what I originally used for JFO, although I am a bit concerned that there might be some games that don't always have a directional lighting shader active at all times... but let's just give this a try for now and see how well it works before worrying about possible incompatibilities.

I've also simplified my formula a bit, which should reduce the amount of instructions processed.

Unfortunately I no longer have the ability to test this, because my one month subscription to Origin Premier Access expired today, which is how I was playing Jedi Fallen Order, and my library for UE4 games isn't quite as expansive as yours.

If performance doesn't get better with this, then unfortunately that's the best that can be done for now for an automatic detection script. I've spoken with DSS on Discord about a feature that would be the ideal solution to this, but since that doesn't exist yet we got to make do with what we got. So yeah, if performance is still abysmal after this, then using a function key to cycle through the different values is the only way to do it without a further performance hit, although I worry that there are too many values to cycle through and that using key will be unwieldy.
Thank you again for this one, ill try this if i am back home. Its late today :-)
User avatar
Losti
Golden Eyed Wiseman! (or woman!)
Posts: 1545
Joined: Tue Sep 17, 2019 5:30 am

Re: Improved DHR Unreal 4 Engine Universal fix [Released-V1.

Post by Losti »

Ok, so the performance does not really change, but it's better. The problem now, as you've already suggested, is that these shaders are not always active, so AutoConvergence does not always work. But I have another idea. I have analyzed the ConstantBuffer used in your formula. These are the same DHR uses in some Decal formulas for the correct depth calculation. That is a decisive advantage. This constant buffer often differs little from game to game and the essential is that the W-register always has the same value -0.00000000999999994. I use this for the automatic detection of the right matrix for decal correction in the extended DHR-RegEx for decals. This also shows that there are not many options for this, just like with the Decal Shaders, which was in more than 15 tested games always CB1, with the numbers
[57]
[53]
[51]
[61]
[65]
The Jedi formula and the current implementation of it works great for all the games I've tested so far, if the correct CB number is set (apart from The Beast Inside, I have to check, here the convergence adjustment is somehow inverted).
Since every game I've tested has used the RegEx 09_Lights2 or 10_Lights3 at least once, where I've also made the entries for the autoconvergence from the Jedi game, here we can transfer the CB1 values ​​to the custom shader (auto_convergence.hlsl). There, the correct CB number can be selected depending on the value CB1 [XX] .w.

I asked Masterotaku. I know how to copy CB values ​​from one shader to another, but not how to use them in a custom shader. He told me he did this in the last two fixes he has releases, after some stupid questions I understood the procedure. I try to implement this tomorrow and then report on the functionality and perfromance. If we are lucky, the auto convergence works for many games than, I'm looking forward to the performance. Ill check back here to report!
User avatar
DJ-RK
Sharp Eyed Eagle!
Posts: 398
Joined: Thu Sep 19, 2019 8:13 pm

Re: Improved DHR Unreal 4 Engine Universal fix [Released-V1.

Post by DJ-RK »

Yeah, I was trying to keep all the resource capturing contained within the autoconvergence.ini file for the sake of having it be completely autonomous and isolated to itself, meaning if a person were to leave the autoconvergence shader disabled in the d3dx.ini file that absolutely no instructions would be processed and have 0 performance impact. Sadly that seems to come at too high of a performance cost when in use, so yeah, the next logical step is to integrate that into the regexes that are already being used. I don't want to be messing around with the inner workings of your regexes, so that's better left up to you. I've given you the template, you can make it work! ;)
User avatar
Losti
Golden Eyed Wiseman! (or woman!)
Posts: 1545
Joined: Tue Sep 17, 2019 5:30 am

Re: Improved DHR Unreal 4 Engine Universal fix [Released-V1.

Post by Losti »

DJ-RK wrote:Yeah, I was trying to keep all the resource capturing contained within the autoconvergence.ini file for the sake of having it be completely autonomous and isolated to itself, meaning if a person were to leave the autoconvergence shader disabled in the d3dx.ini file that absolutely no instructions would be processed and have 0 performance impact. Sadly that seems to come at too high of a performance cost when in use, so yeah, the next logical step is to integrate that into the regexes that are already being used. I don't want to be messing around with the inner workings of your regexes, so that's better left up to you. I've given you the template, you can make it work! ;)
"I've given you the template, you can make it work!" Yeah, thank you so much! Let's see when I find time, it is in principle not a lot of effort, but then everything has to be tested in different games. At the moment I have to work longer. Maybe that's what's up to the weekend.
User avatar
Losti
Golden Eyed Wiseman! (or woman!)
Posts: 1545
Joined: Tue Sep 17, 2019 5:30 am

Re: Improved DHR Unreal 4 Engine Universal fix [Released-V1.

Post by Losti »

Sometimes we do not see the forest for the trees. Everything is available regarding the AutoConvegenc integration in the JEDI fix and that is logical. You have to transfer the CB1 from a shader to the Custom Shader, otherwise you can not use CB1 [XX] in the formula, I'm an ideot. So we can check directly in the custom shader of the auto convergence, whether CB1 [XX] .w corresponds to the value -0.00000000999999994, fortunately this is always the same as in the DECAL shaders. Works wonderfully !!! Thank you DJ_RK !!! Also for the AutoDepthHUD.

Code: Select all

if (cb1[51].w == -0.00000000999999994)
{
  r0.zw = cb1[51].xz * float2(z,z);
  r0.z = cb1[51].y + r0.z;
  r0.w = -cb1[51].w + r0.w;
}
if (cb1[53].w == -0.00000000999999994)
{
  r0.zw = cb1[53].xz * float2(z,z);
  r0.z = cb1[53].y + r0.z;
  r0.w = -cb1[53].w + r0.w;
}
if (cb1[57].w == -0.00000000999999994)
{
  r0.zw = cb1[57].xz * float2(z,z);
  r0.z = cb1[57].y + r0.z;
  r0.w = -cb1[57].w + r0.w;
}
if (cb1[61].w == -0.00000000999999994)
{
  r0.zw = cb1[61].xz * float2(z,z);
  r0.z = cb1[61].y + r0.z;
  r0.w = -cb1[61].w + r0.w;
}
if (cb1[65].w == -0.00000000999999994)
{
  r0.zw = cb1[65].xz * float2(z,z);
  r0.z = cb1[65].y + r0.z;
  r0.w = -cb1[65].w + r0.w;
}

  r0.w = 1 / r0.w;
  r0.z = r0.z + r0.w;
  return r0.z;
The performance is reduced by about 5-10% with AutoDepthHUD (crosshair). This is primarily due to the fact that there is no fixed shader for where the Depth Buffer is sourced and where then you can use maxcopies = 1. But that does not work in a universal fix. The same applies to the AutoConvergence. This again needs 5-10% performance based on the frame rate. Together, about 10-20% performance is reduced. You have to live with it, or you do not use either of these two functions. That is the decision of the user. I will rename the NO HUD Verson and present it as PERFROMANCE version, without HUD fix and without AUTOCONVERGENCE. It is up to each one to decide what he uses. I think so that you have to increase the hardware for 3D, if you want to experience the whole. But that is a user thing.

The problem with the originally assumed nengative correction for "The Beas Within" in relation to the autoconvergence is also partly solved. The game just does not work well with the formula. I'll check the original place in the Light Shader tomorrow. Maybe there is something different. The stuff works quite well if you adjust the values for MIN, MAX and HARD MAX convergence. Should I find no cause for the not working autodepth, then I will install keys to customize the three values.

In summary, the whole thing works really well, DJ, your formula for UE4 is a masterpiece that you found out. I tried to find a formula for HeavyRain, but all I've achieved is a change in convergence withing some milli seconds between MAX and MIN value .- (
User avatar
DJ-RK
Sharp Eyed Eagle!
Posts: 398
Joined: Thu Sep 19, 2019 8:13 pm

Re: Improved DHR Unreal 4 Engine Universal fix [Released-V1.

Post by DJ-RK »

That's a very good observation, and indeed a smart solution. Nicely done!

If you have a hard time finding the scaling formula in Heavy Rain, but you have access to an inverse projection matrix, you can always try using the following z to w formula:

float4 tmp = mul(inv_projection, float4(0, 0, z, 1));
return tmp.z / tmp.w;

Good luck!
User avatar
Losti
Golden Eyed Wiseman! (or woman!)
Posts: 1545
Joined: Tue Sep 17, 2019 5:30 am

Re: Improved DHR Unreal 4 Engine Universal fix [Released-V1.

Post by Losti »

DJ-RK wrote:That's a very good observation, and indeed a smart solution. Nicely done!

If you have a hard time finding the scaling formula in Heavy Rain, but you have access to an inverse projection matrix, you can always try using the following z to w formula:

float4 tmp = mul(inv_projection, float4(0, 0, z, 1));
return tmp.z / tmp.w;

Good luck!
Yes, I have already tried this but it does not work, but I have found a note regarding the MAX conv MIN Conv change in the DSS scrips .... I have to find time to deal with it. Currently the UE4 Uinversal FiX 2:

It is not that easy to implement it universally and without much effort on the part of the user. But I did a good part of the way. I'm trying to put everything together and adapt it to the games. Generally everything works great but there are some special cases to consider. I'm working on it.

I have to admit, this AutoConvergence from DSS is a huge asset to 3D gaming. If everything is properly configured, that is a masterpiece !!! And you, DJ_RK, provided that for UE4 game, that's awesome! This gives a completely new feeling!

When I look at the files from DSS I am again overwhelmed by his ability.
User avatar
Losti
Golden Eyed Wiseman! (or woman!)
Posts: 1545
Joined: Tue Sep 17, 2019 5:30 am

Re: Improved DHR Unreal 4 Engine Universal fix [Released-V1.

Post by Losti »

I am currently working on the finals here, i have decided to introduce the old HELP screen DHR was using. Tracking all things that are eneabled, set or disabled BUT in RealTime, jut an impression:

Image

Image

of course this can be toggle ON and OFF ^^
User avatar
Losti
Golden Eyed Wiseman! (or woman!)
Posts: 1545
Joined: Tue Sep 17, 2019 5:30 am

Re: Improved DHR Unreal 4 Engine Universal fix [Released-V1.

Post by Losti »

Ok i have finalized the work here, its released with V 1.1 at the blog.

- adding AutoConvergence (THANK DSS for the scripts an THANK DJ_RK for the UE4 depth formula!!!!
- auto crosshair do not need a game depending scaling anymore (THANK DJ_RK for the UE4 depth formula!!!!)
- Added OnScreenDisplaay for tracking current setup of the fix and tracking changes by key
- Added AutoDepth options that let you define the beginnign of AutoDepth HUD
- providing 3 versions for you, if you dont are about HUD-Depth and or AutoConvergence to save performance

Keys added or changed:

Read section @ the BlogPost: Notes on the user interface/HUD – OnScreenDisplay (OSD)
F1 Disable/Enable OSD

Read section @ the BlogPost: Notes on the user interface/HUD – (Auto)-Depth-Function
NUMPAD + enable / disable AutoConvegence
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 (

Read section @ the BlogPost: Notes on the user interface/HUD – Auto-Convergence-Function
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


https://helixmod.blogspot.com/2019/12/u ... fix-2.html

Just install and see the OSD, that will tell you all the things !
User avatar
Losti
Golden Eyed Wiseman! (or woman!)
Posts: 1545
Joined: Tue Sep 17, 2019 5:30 am

Re: Improved DHR Unreal 4 Engine Universal fix [Released-V1.

Post by Losti »

This information is in addition to that in the blog post. Since this is too much for me there, I outsource this post as extra info and only give a link to it in the blog post.

I wanted to explain again in more detail what the adaptation option for the automatic depth of the HUD / UI introduced in version 1.1 is, because maybe not everyone understood what it was all about and in general, as in the universal fix, the AutoDepth HUD / UI works.

In an individual fix, texture hashes are often used, which can be individually moved into the automatic depth after identifying them, but without the remaining elements that are drawn by a shader. In the case of the auto-depth crosshair, this would be e.g. the texture of the crosshair. Unfortunately, this is not universally possible, the hash names of the textures are never the same. Fortunately, the UE4 engine uses a number of shader files whose hash is the same. This makes it possible to add a universal auto depth for them. I added about 20 such files to the fix, so a large number of games should have the ability to adjust the interface depth when the fix is ​​installed. However, since not every element should be moved to the automatic depth, the range that is to be used for the AutoDepth is limited in each HUD shader. The image is divided into 4 areas from the middle (0). This is -Y (the lower part of the screen), + Y (the upper part of the Screen), -X (the left part of the screen) and + X (the right part of the screen). In the HUD shader is determined which area should be moved to the auto-depth and what the depth of the remaining areas should be (static depth).

To explain how the picture is divided I made a sketch. The numbers on the sides stand for percent and, as can be seen in the sketch, this always applies to -Y and + Y as well as -X and + X. So there are 4 areas in which you can adjust the depth individually. Left, right, up and down. The default setting of the AutoDepth function moves everything from 50% of the respective area to the automatic depth. Everything else that is greater than 50% is moved into the depth that is set with the NUMPAD-DIVIDE key.

Image


In the next picture I have fictitiously painted in interface elements like minimap, chat window or something else. These are the pink boxes. These should preferably not be in the automatic depth. This becomes clear in the sketch because the blue frame does not touch the interface elements.

Image


However, if an interface element is larger than 50% (default) of the half of the screen, then this is partially pushed into the automatic depth. You can recognize this from the fact that parts of the relevant interface element change diagonally from the static depth to the automatic depth. You can see this schematically shown in sketch 3. In this case, the start of the automatic depth of the lower half of the screen would have to be reduced to 30% using the buttons specified above, so that the interface element is not drawn in.

Image

Ok, and now I hope you understand what I have built the auto depth adjustment for. Depending on the game, you can change the start of the automatic depth of the interface. If you set all 4 values to 100%, then e.g. the complete interface in automatic depth. This can also be desired and cool in some games. Depending on the size of the interface or some elements in the game, it makes sense to be able to choose an adjustment for the starting point for the automatic depth. You can see which values are currently set in the OSD (F1).


.
.
.
.


Now there is a tutorial on how you can persuade HUD shaders that are not included in the universal fix to adopt the behavior of the other shaders, i.e. how to insert the automatic depth and the static depth here.


.
.
.

....to be continued
Last edited by Losti on Sun Nov 01, 2020 12:36 pm, edited 1 time in total.
User avatar
amorphis
One Eyed Hopeful
Posts: 22
Joined: Thu Jun 13, 2019 3:39 pm

Re: Improved DHR Unreal 4 Engine Universal fix [Released-V1.

Post by amorphis »

Thanks a lot Losti and DJ-RK for keeping universal fixes alive and updated. And DJ-RK autoconvergence and autodepth is a great feature. Thanks again to all the talented guys who spend their valuable time for Universal awesomeness. :D
User avatar
Losti
Golden Eyed Wiseman! (or woman!)
Posts: 1545
Joined: Tue Sep 17, 2019 5:30 am

Re: Improved DHR Unreal 4 Engine Universal fix [Released-V1.

Post by Losti »

I have made some cosmetic changes for the OSD and added a key for you to select the auto convergence speed change (ALT+NUMPAD3). I have cleaned up the versions an providing 4 versions now, i have also extended the fix post for more information, fixing my a bit rush for this post @ the blog from yesterday!

This are the new versions:

This is the standard version of the fix providing you all the things like Auto-Depth Hud and Auto-Convergence - Performance lost 20 %:
UNREAL_Engine_4_UNIVERSAL-FIX_2_V1.11

This is a version that will give you Auto-Convergence but NO Hud-Depth fix - Performance lost 10 %:
UNREAL_Engine_4_UNIVERSAL-FIX_2_1.11_NoHudDepthButAutoConv

This is a version that will give you a STATIC-Hud-Depth fix and NO Auto-Convergence - Performance lost 0 %:
UNREAL_Engine_4_UNIVERSAL-FIX_2_1.11_StaticHudDepthNoAutoConv

This is a version that will give you NO Hud-Depth fix and NO Auto-Convergence - Performance lost 0 % - Use this if something is completely messed up with the User-Interface caused by the shaders applied:
UNREAL_Engine_4_UNIVERSAL-FIX_2_1.11_NoHudDepthNoAutoConv


I think / hope i am done here !!! :-) for NOW!
User avatar
ToThePoint
Two Eyed Hopeful
Posts: 53
Joined: Wed May 01, 2019 11:46 pm

Re: Improved DHR Unreal 4 Engine Universal fix [Released-V1.

Post by ToThePoint »

Losti, DJ-RK et al. Guys, I'm simply blown away by your incredible work on this updated universal fix for UE4. I tried it on Moons of Madness. Before fix, total mess. After fix, totally sublime. So far, no blemishes at all with this particular game. It has to be said, that the on screen menu showing depth and convergence options is an excellent addition and really does add a refined touch to this UE4 uni fix. Just amazing.
Intel Core i7 6850k @ 3.6 Ghz (Liquid Cooled: Corsair Hydro H115i), 2x GTX 1080 Ti, HB SLI @ x16x16 (Air Cooled), GTX 1060 Dedicated PhysX, 32Gb RAM Kingston Predator
Asus X-99 Deluxe II Motherboard, Corsair Obsidian 1000D Super Tower, Win7 Pro (442.19), Win8.1 (441.66), Ubuntu, Rog Swift PG27VQ 3D (1440p), HTC Vive
User avatar
Losti
Golden Eyed Wiseman! (or woman!)
Posts: 1545
Joined: Tue Sep 17, 2019 5:30 am

Re: Improved DHR Unreal 4 Engine Universal fix [Released-V1.

Post by Losti »

ToThePoint wrote:Losti, DJ-RK et al. Guys, I'm simply blown away by your incredible work on this updated universal fix for UE4. I tried it on Moons of Madness. Before fix, total mess. After fix, totally sublime. So far, no blemishes at all with this particular game. It has to be said, that the on screen menu showing depth and convergence options is an excellent addition and really does add a refined touch to this UE4 uni fix. Just amazing.
Nice to read those comments thanks !

Yeah, hard work behind all the things done by the shaderhackers.

The damn OSD kills a weekend for me, im hapy that this is usefull. The code is a bit outdated i see in comparison to DSS new files for overlay messages but thats what i was used to :-) So this was killing some more time than expected. NEVER delete the ".bin" files in the ShaderFixes folder, otherwise the game needs 5 mins to start or crash on startup ^^ Just a side note.
User avatar
ToThePoint
Two Eyed Hopeful
Posts: 53
Joined: Wed May 01, 2019 11:46 pm

Re: Improved DHR Unreal 4 Engine Universal fix [Released-V1.

Post by ToThePoint »

Losti wrote:The damn OSD kills a weekend for me, im hapy that this is usefull. The code is a bit outdated i see in comparison to DSS new files for overlay messages but thats what i was used to :-) So this was killing some more time than expected. NEVER delete the ".bin" files in the ShaderFixes folder, otherwise the game needs 5 mins to start or crash on startup ^^ Just a side note.
Sorry to hear that you'd lost an entire weekend trying to get that HUD sorted out, since I can appreciate that there's no way that you can get the time back, but it is a very neat addition and it's really appreciated. Yep, I'll certainly make sure to avoid deleting any "bin" files. I'm guessing that you learnt that by hard experience!

[Off topic] I wanted to further discuss shaderhacker funding at some point over the holiday period. Granted, it's often a dicey subject, but I'd appreciate any thoughts that you and other shaderhackers and of course the wider 3D Vision community might have on this subject, should anyone actually wish to put forward any of their thoughts about it.

Anyhow, thanks again Losti for everything that you've done up until now. Maybe you can take a break over Christmas. Maybe. :)
Intel Core i7 6850k @ 3.6 Ghz (Liquid Cooled: Corsair Hydro H115i), 2x GTX 1080 Ti, HB SLI @ x16x16 (Air Cooled), GTX 1060 Dedicated PhysX, 32Gb RAM Kingston Predator
Asus X-99 Deluxe II Motherboard, Corsair Obsidian 1000D Super Tower, Win7 Pro (442.19), Win8.1 (441.66), Ubuntu, Rog Swift PG27VQ 3D (1440p), HTC Vive
User avatar
Losti
Golden Eyed Wiseman! (or woman!)
Posts: 1545
Joined: Tue Sep 17, 2019 5:30 am

Re: Improved DHR Unreal 4 Engine Universal fix [Released-V1.

Post by Losti »

The bin files are cached files and the OSD custom shaders needs minutes to compile :-) Thats all.

Regarding the donations: Just do what you think is good for you, its all voluntary. I think we dont need a discussion about it. If you like a game fixed or fixed with an Universal fix just think about if this is worth to put out some donation. If everybody just send 1-5 € per game he is play with a fix, any shaderhacker would have a nice side income .-) But this is a dream that will never came true :-|.

Hey .... "Maybe you can take a break over Christmas." ..... for sure !!!
Vaeltaja
Two Eyed Hopeful
Posts: 76
Joined: Sun Sep 15, 2019 4:54 am

Re: Improved DHR Unreal 4 Engine Universal fix [Released-V1.

Post by Vaeltaja »

This fix and Shenmue 3 work together beautifully. I removed all the post process crap with this mod: https://www.nexusmods.com/shenmue3/mods/2

I also added some sharpening and now it looks like a true sequel to Shenmue saga. This gives me same kind of feeling when I first time played Shenmue 1 with Dreamcast using crt monitor. I love that Yu Suzuki kept his vision and didn't modernize this too much - now it feels like a return to home after many, many years. This is easily the best game of this year for me.

Great work shaderhackers, thank you!
User avatar
ToThePoint
Two Eyed Hopeful
Posts: 53
Joined: Wed May 01, 2019 11:46 pm

Re: Improved DHR Unreal 4 Engine Universal fix [Released-V1.

Post by ToThePoint »

Losti wrote:Regarding the donations: Just do what you think is good for you, its all voluntary. I think we dont need a discussion about it. If you like a game fixed or fixed with an Universal fix just think about if this is worth to put out some donation. If everybody just send 1-5 € per game he is play with a fix, any shaderhacker would have a nice side income .-) But this is a dream that will never came true :-|.
I hear you. If I may though, allow me to briefly summarize my suggestion in a PM to you in the next few days. See what you think, but as you rightly say, ultimately it's all voluntary.
Losti wrote:Hey .... "Maybe you can take a break over Christmas." ..... for sure !!!
Good to know. You've earned it! Cheers.
Intel Core i7 6850k @ 3.6 Ghz (Liquid Cooled: Corsair Hydro H115i), 2x GTX 1080 Ti, HB SLI @ x16x16 (Air Cooled), GTX 1060 Dedicated PhysX, 32Gb RAM Kingston Predator
Asus X-99 Deluxe II Motherboard, Corsair Obsidian 1000D Super Tower, Win7 Pro (442.19), Win8.1 (441.66), Ubuntu, Rog Swift PG27VQ 3D (1440p), HTC Vive
User avatar
Losti
Golden Eyed Wiseman! (or woman!)
Posts: 1545
Joined: Tue Sep 17, 2019 5:30 am

Re: Improved DHR Unreal 4 Engine Universal fix [Released-V1.

Post by Losti »

The fix was updated to Version 1.12, this adds some additional shaders for the HUD/UI that may can be found in some games (like Life Is Strange 2) and separates PS form CS corrections in the RegEx to catch the depth buffer corretly. There was a writing ERROR for the AutoConvergenceSpeed Change showing in the OSD for the key, its corrected. NOTHING MORE !! Please ignore writing error in the OSD headline for the word "Setting" (its written Settigs" .... i dont want to reupload all the things only because of this ^^)

NOTE: The version displayed in the OSD for the fix is still 1.1 => the last caracter is cuttet of, so its 1.12, dont wonder!

If you current games are working fine, you do not need any update. For further games, use the new version.

ENJOY!
User avatar
Losti
Golden Eyed Wiseman! (or woman!)
Posts: 1545
Joined: Tue Sep 17, 2019 5:30 am

Re: Improved DHR Unreal 4 Engine Universal fix [Released-V1.

Post by Losti »

I have updated the fix on the recent findings for more AutoConvergence support.

I have also added the following hints to the discription:
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! ("Basic instructions to disable a wrong shader")
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.
User avatar
Losti
Golden Eyed Wiseman! (or woman!)
Posts: 1545
Joined: Tue Sep 17, 2019 5:30 am

Re: Improved DHR Unreal 4 Engine Universal fix [Released-V1.

Post by Losti »

Reupload of Version 1.13 because of wrong SBS ini files. Please ReDownload if you have downloaded before 08.01.2020. If you dont use a stereo mode next to 3D-Vision, you dont need to redownload.

Thank you Oneofthe8devilz for reporting !!
Scarhead
One Eyed Hopeful
Posts: 31
Joined: Sat Sep 21, 2019 4:21 am

Re: Improved DHR Unreal 4 Engine Universal fix [Released-V1.

Post by Scarhead »

thebigdogma wrote:Fantastic work Losti!

A few screens of Darksiders Genesis to display the S3D love... :D

Hi,
I try to get Darksiders Genesis working in 3D and almost found settings that are fine for my eyes.
But I can't get rid of that black square with my mouse cursor and it's with static depth.
And I found no way to save my settings.

Could you tell me what settings you use and how to fix the broken cursor?

Thx
You do not have the required permissions to view the files attached to this post.
User avatar
Losti
Golden Eyed Wiseman! (or woman!)
Posts: 1545
Joined: Tue Sep 17, 2019 5:30 am

Re: Improved DHR Unreal 4 Engine Universal fix [Released-V1.

Post by Losti »

Scarhead wrote:
thebigdogma wrote:Fantastic work Losti!

A few screens of Darksiders Genesis to display the S3D love... :D

Hi,
I try to get Darksiders Genesis working in 3D and almost found settings that are fine for my eyes.
But I can't get rid of that black square with my mouse cursor and it's with static depth.
And I found no way to save my settings.

Could you tell me what settings you use and how to fix the broken cursor?

Thx
I dont know why but I uploaded UNIVERSAL FIX 1.13 without mouse depth correction. I am a bit stupid ^^ But as it seems you have mouse in depth? So you dont Need to wait until i update the fix....

Ähm please open the mouse.hlsl and sarch for this lines:

//if (!result.w)
// result.w = 1;

//if (mask)
//result.w = 0;

Remove the // here from the first two lines and see what the courser in game is looking like. If this will not help, also uncomment the second two lines.

Mouse Courser may be in static depth all the time, or the Depth buffer grapping is not working. It scales with the HUD Depth.
I can have a look @ this game later on today. And i will bring back the mouse courser Depth to the universal fix ^^
Scarhead
One Eyed Hopeful
Posts: 31
Joined: Sat Sep 21, 2019 4:21 am

Re: Improved DHR Unreal 4 Engine Universal fix [Released-V1.

Post by Scarhead »

Losti wrote:
I dont know why but I uploaded UNIVERSAL FIX 1.13 without mouse depth correction. I am a bit stupid ^^ But as it seems you have mouse in depth? So you dont Need to wait until i update the fix....

Ähm please open the mouse.hlsl and sarch for this lines:

//if (!result.w)
// result.w = 1;

//if (mask)
//result.w = 0;

Remove the // here from the first two lines and see what the courser in game is looking like. If this will not help, also uncomment the second two lines.

Mouse Courser may be in static depth all the time, or the Depth buffer grapping is not working. It scales with the HUD Depth.
I can have a look @ this game later on today. And i will bring back the mouse courser Depth to the universal fix ^^
The // was already removed in my mouse.hlsl. If I add // to "if (mask)" the cursor disappears completely, if I add it to "if (!result.w)" there is not change, it has still to much seperation and a black square around.
But thanks for looking into it.
User avatar
Losti
Golden Eyed Wiseman! (or woman!)
Posts: 1545
Joined: Tue Sep 17, 2019 5:30 am

Re: Improved DHR Unreal 4 Engine Universal fix [Released-V1.

Post by Losti »

Scarhead wrote:
Losti wrote:
I dont know why but I uploaded UNIVERSAL FIX 1.13 without mouse depth correction. I am a bit stupid ^^ But as it seems you have mouse in depth? So you dont Need to wait until i update the fix....

Ähm please open the mouse.hlsl and sarch for this lines:

//if (!result.w)
// result.w = 1;

//if (mask)
//result.w = 0;

Remove the // here from the first two lines and see what the courser in game is looking like. If this will not help, also uncomment the second two lines.

Mouse Courser may be in static depth all the time, or the Depth buffer grapping is not working. It scales with the HUD Depth.
I can have a look @ this game later on today. And i will bring back the mouse courser Depth to the universal fix ^^
The // was already removed in my mouse.hlsl. If I add // to "if (mask)" the cursor disappears completely, if I add it to "if (!result.w)" there is not change, it has still to much seperation and a black square around.
But thanks for looking into it.
Can you please try this ?

https://helixmod.blogspot.com/2020/01/d ... nesis.html

Please uninstall prev. Versions, i have added an adapted version for this game at the blog, follow the link, also added an AutoDepth Crosshair. Its not 100 % cool but better than static. This is because no suitible DepthBuffer Shader is present!
Last edited by Losti on Mon Jan 13, 2020 1:14 pm, edited 1 time in total.
User avatar
Losti
Golden Eyed Wiseman! (or woman!)
Posts: 1545
Joined: Tue Sep 17, 2019 5:30 am

Re: Improved DHR Unreal 4 Engine Universal fix [Released-V1.

Post by Losti »

The UNIVERSAL FIX 2 gets an upgrade adding Auto Depth Mouse Courser (not cool for any game but NOT ANYMORE just at full depth!!!) AND I bring back Mouse Courser Depth .... dont ask me why but in V1.13 i was using a not depth and outdated custom shader for the mouse.... SORRY!!!

I have also added some trouble shooting things ref. crashes in trouble shooting section.

https://helixmod.blogspot.com/2019/12/u ... fix-2.html
Scarhead
One Eyed Hopeful
Posts: 31
Joined: Sat Sep 21, 2019 4:21 am

Re: Improved DHR Unreal 4 Engine Universal fix [Released-V1.

Post by Scarhead »

Losti wrote:
Can you please try this ?

https://helixmod.blogspot.com/2020/01/d ... nesis.html

Please uninstall prev. Versions, i have added an adapted version for this game at the blog, follow the link, also added an AutoDepth Crosshair. Its not 100 % cool but better than static. This is because no suitible DepthBuffer Shader is present!
That works fine!
Fantastic to be honest.

Great job!
You do not have the required permissions to view the files attached to this post.
Vaeltaja
Two Eyed Hopeful
Posts: 76
Joined: Sun Sep 15, 2019 4:54 am

Re: Improved DHR Unreal 4 Engine Universal fix [Released-V1.

Post by Vaeltaja »

Octopath Traveler works great with the fix but you have to turn off "corner shadow" option from the game's graphics options, otherwise shadows look darker for left eye.
User avatar
Losti
Golden Eyed Wiseman! (or woman!)
Posts: 1545
Joined: Tue Sep 17, 2019 5:30 am

Re: Improved DHR Unreal 4 Engine Universal fix [Released-V1.

Post by Losti »

Vaeltaja wrote:Octopath Traveler works great with the fix but you have to turn off "corner shadow" option from the game's graphics options, otherwise shadows look darker for left eye.
HM, didnt have this problem here, push convergence arround 2000 - 3000, may you want to disable bloom lights that are a bit incorrect, than add this at the end if the d3dx.ini

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;DISABLE A SHADER
[ShaderOverride_DISABLE_1]
hash=9af16cffe1158f2f
handling=skip
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;DISABLE A SHADER
Vaeltaja
Two Eyed Hopeful
Posts: 76
Joined: Sun Sep 15, 2019 4:54 am

Re: Improved DHR Unreal 4 Engine Universal fix [Released-V1.

Post by Vaeltaja »

Losti wrote:
Vaeltaja wrote:Octopath Traveler works great with the fix but you have to turn off "corner shadow" option from the game's graphics options, otherwise shadows look darker for left eye.
HM, didnt have this problem here, push convergence arround 2000 - 3000, may you want to disable bloom lights that are a bit incorrect, than add this at the end if the d3dx.ini

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;DISABLE A SHADER
[ShaderOverride_DISABLE_1]
hash=9af16cffe1158f2f
handling=skip
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;DISABLE A SHADER
Ok, I'll try that convergence setting. I disabled bloom yesterday, and fog also and some other post process crap. :)
Post Reply

Return to “Nvidia 3D Vision Fixes, Solutions and Troubleshooting”