Depth buffer detection modifications

  • pyewacket
More
4 years 6 months ago - 4 years 6 months ago #1221 by pyewacket Replied by pyewacket on topic Depth buffer detection modifications

thalixte wrote: However, can you show me the "statistics" tab ?


Sure. Here u go: prntscr.com/pp83m2

This is when R is active: prntscr.com/pp84j7
Last edit: 4 years 6 months ago by pyewacket.
The topic has been locked.
  • thalixte
  • Topic Author
More
4 years 6 months ago - 4 years 6 months ago #1222 by thalixte Replied by thalixte on topic Depth buffer detection modifications
Can you please send me a save for this location ?

Just tested the SOTTR benchmark with and without Reshade in 1080p, exclusive fullscreen mode, Reshade performance mode, only adaptative sharpen enabled, with the latest build i made from the master branch (including the latest Crosire's commits), and i see no difference. The benchmark results are the same...
Last edit: 4 years 6 months ago by thalixte.
The topic has been locked.
  • sajittarius
More
4 years 6 months ago #1223 by sajittarius Replied by sajittarius on topic Depth buffer detection modifications
Very strange, Reshade on or off, none of those screenshots show maxed out GPU or CPU. Odd that you are not solid 60fps, lol
The topic has been locked.
  • pyewacket
More
4 years 6 months ago - 4 years 6 months ago #1224 by pyewacket Replied by pyewacket on topic Depth buffer detection modifications

thalixte wrote: Can you please send me a save for this location ?

Just tested the SOTTR benchmark with and without Reshade in 1080p, exclusive fullscreen mode, Reshade performance mode, only adaptative sharpen enabled, with the latest build i made from the master branch (including the latest Crosire's commits), and i see no difference. The benchmark results are the same...


Just in case you'll want it for whatever reason, but it's not needed for you to check this anymore, for the reasons below: mega.nz/#!jhsUjaYZ!pkQOq9gl_Pg-mLXBcLyZkAGGks3Xs0MOfqyNbqtXA2o

Map with location: prntscr.com/ppj0dr

So i did a lot of testing and i think i came to some kind of conclusion finally. The main culprit in case of SOTTR seems to be the Reshade's version.

SOTTR
prntscr.com/ppm37g - latest official Reshade.
prntscr.com/ppm7b4 - clean.
prntscr.com/ppmih0 - latest discord build.
prntscr.com/ppmklt - 4.3.1.139 build i got from this thread some time ago, mainly i was using this one in my games recently.

Unfortunately it's not that clear in ACO as in SOTTR.

Please pay attention to frametime graph.

prntscr.com/pplxst - clean.
prnt.sc/ppm8rm - latest official build.
prntscr.com/ppldyj - latest discord build Reshade.

Official build is noticeably better, it might not look that way in those screenshots, but in motion the difference is there, compared to community iterations from this thread or discord, but still not perfect. I mean, it's not working, but still noticeably taxing performance, doesn't really make sense, does it? I.e. Freestyle doesn't behave that way in ACO for me, as soon as you turn off the preset the performance goes back to normal. I hope this will be helpful in some way to ppl who make Reshade builds, but if not, at least i figured it out for myself.

@thalixte Could u please upload the dxgi.dll you used in your SOTTR benchmark?
Last edit: 4 years 6 months ago by pyewacket.
The topic has been locked.
  • pyewacket
More
4 years 6 months ago - 4 years 6 months ago #1225 by pyewacket Replied by pyewacket on topic Depth buffer detection modifications
NV jusr released new drivers with Reshade support: www.guru3d.com/files-details/geforce-441...driver-download.html

But on top that there's a stand alone sharpness filter controlled through CP now, i tested it and it doesn't induce any performance hit which is simply amazing, i can now play ACO at butter smooth 60fps locked without Reshade. :) imgur.com/PGA3y95

Plus gpu scaling sounds very interesting and promising.
Last edit: 4 years 6 months ago by pyewacket.
The topic has been locked.
  • thalixte
  • Topic Author
More
4 years 6 months ago - 4 years 6 months ago #1226 by thalixte Replied by thalixte on topic Depth buffer detection modifications

pyewacket wrote:
@thalixte Could u please upload the dxgi.dll you used in your SOTTR benchmark?


Thks ;) Here is the last build i tried:
mega.nz/#!ilITBaKY!Xn9NSpl_WpdvRl9_VIo9i17dY0uzYcN9xIFtvaCM5t4
Last edit: 4 years 6 months ago by thalixte.
The topic has been locked.
  • sajittarius
More
4 years 6 months ago - 4 years 6 months ago #1227 by sajittarius Replied by sajittarius on topic Depth buffer detection modifications
BTW, i tested new Nvidia support of Reshade injected with Freestyle (Geforce Experience), it works pretty well (even with Vulkan)! Was able to use ReShade in Wolfenstein Youngblood and The Surge 2, both Vulkan games. Only supports a specific subset of shaders (looks like they do a hash check of the shaders), but it's much better than nothing.
Last edit: 4 years 6 months ago by sajittarius.
The topic has been locked.
  • lowenz
More
4 years 6 months ago - 4 years 6 months ago #1228 by lowenz Replied by lowenz on topic Depth buffer detection modifications
Any suggestions for Thief Deadly Shadows and Deux Ex Invisible War?
With the Crosire D3D8to9 wrapper the normal maps are somehow visible:

[img


Those 2 games can benefit in a terrific way of the RTGI by Marty....but now it's impossible as they actually crash due to some issue enabling it (surely related to the partial DB reconstruction).
Last edit: 4 years 6 months ago by lowenz.
The topic has been locked.
  • crosire
More
4 years 6 months ago #1229 by crosire Replied by crosire on topic Depth buffer detection modifications
There is no such thing as partial DB reconstruction. Either you have one or you don't. If you see normals, but no depth it just means it is reversed, so set "RESHADE_DEPTH_INPUT_IS_REVERSED" to the opposite (the default is "1", so that would be "0").
The topic has been locked.
  • lowenz
More
4 years 6 months ago - 4 years 6 months ago #1230 by lowenz Replied by lowenz on topic Depth buffer detection modifications
Depth buffer is shown correctly in the "start" level ("DX" classic logo screen in Invisible War / "THIEF" word in Deadly Shadows).
So the settings are already correct.

The problem is in-game: the Depth Buffer seems totally "flattened out"!
Same spot, far plane set to 10 (it's the only way to see the player arm/weapon)

[img


[img



As you can see the settings are already right but somehow the DB range is "compressed".
Without drawing the weapon to help "see" the depth the scene DB is there but almost "flat" !
Last edit: 4 years 6 months ago by lowenz.
The topic has been locked.
  • lowenz
More
4 years 6 months ago - 4 years 6 months ago #1231 by lowenz Replied by lowenz on topic Depth buffer detection modifications
Deus Ex Invisible War:

[img


[img


You can see the weapon in the depth screen, and the rest is flattened....

MXAO and other depth-dependent shaders freeze the game.
Last edit: 4 years 6 months ago by lowenz.
The topic has been locked.
  • crosire
More
4 years 6 months ago - 4 years 6 months ago #1232 by crosire Replied by crosire on topic Depth buffer detection modifications
You can change the far plane (via RESHADE_DEPTH_LINEARIZATION_FAR_PLANE).
Last edit: 4 years 6 months ago by crosire.
The topic has been locked.
  • lowenz
More
4 years 6 months ago - 4 years 6 months ago #1233 by lowenz Replied by lowenz on topic Depth buffer detection modifications

crosire wrote: You can change the far plane (via RESHADE_DEPTH_LINEARIZATION_FAR_PLANE).

I know, actually it's the only way to obtain the image with the weapon visible as you see above :D (1000->10)

But it's not usable, shaders crash and as I said all the values are flattened (1000=black->10=grey but always flatten) no matter the far plane value.

DXIW and TDS are the only games showing these strange behaviours (Unreal 2 and UT 2004 work like a charm with the d3d9 wrapper).
Last edit: 4 years 6 months ago by lowenz.
The topic has been locked.
  • lowenz
More
4 years 6 months ago - 4 years 6 months ago #1234 by lowenz Replied by lowenz on topic Depth buffer detection modifications
The "Best" result is with value: 5

[img


This is the problem.....it's something related to the value range and type of the buffer.
Last edit: 4 years 6 months ago by lowenz.
The topic has been locked.
  • thalixte
  • Topic Author
More
4 years 6 months ago - 4 years 6 months ago #1235 by thalixte Replied by thalixte on topic Depth buffer detection modifications
@Lowenz,
I think that i know where the problem comes from :) . Have you ticked the option called "Fix for user weapon or cockpit" in the DX9 tab ? This option forces the viewport to have less depth, so the depth values aret flettened. I introduced this option in order to fix z-fighting issues in some games, especially [strike]UE4[/strike] UT3. It works if applied on a specific depth buffer (generally the last one, which is the depth buffer where the weapon or cockpit is drawn, for instance in [strike]UE4[/strike] UT3). But if it is applied to the depth buffer since the very first draw, all the depth buffer can be flattened.

Try to untick "Fix for user weapon or cockpit" in the DX9 tab. If it is un tick, remobe the DX9_buffer_detection section in the Resahde.ini file, and repply your settings.
Last edit: 4 years 6 months ago by thalixte.
The following user(s) said Thank You: JBeckman
The topic has been locked.
  • JBeckman
More
4 years 6 months ago #1236 by JBeckman Replied by JBeckman on topic Depth buffer detection modifications
That's nifty, interesting to know what that setting does too for reference.
Would have assumed a D3D8 issue in older games or a wrapper problem if turned into D3D9/D3D11/Vulkan via various tools though z-flickering can be a problem and I suppose for depth and effects it's going to be even worse if applying a full-screen shader and it acts up.
The topic has been locked.
  • lowenz
More
4 years 6 months ago #1237 by lowenz Replied by lowenz on topic Depth buffer detection modifications

thalixte wrote: @Lowenz,
I think that i know where the problem comes from :) . Have you ticked the option called "Fix for user weapon or cockpit" in the DX9 tab ? This option forces the viewport to have less depth, so the depth values aret flettened. I introduced this option in order to fix z-fighting issues in some games, especially UE4. It works if applied on a specific depth buffer (generally the last one, which is the depth buffer where the weapon or cockpit is drawn, for instance in UE4). But if it is applied to the depth buffer since the very first draw, all the depth buffer can be flattened.

Try to untick "Fix for user weapon or cockpit" in the DX9 tab. If it is un tick, remobe the DX9_buffer_detection section in the Resahde.ini file, and repply your settings.

Problem is, it's NOT activated in DXIW and TDS.
The topic has been locked.
  • thalixte
  • Topic Author
More
4 years 6 months ago #1238 by thalixte Replied by thalixte on topic Depth buffer detection modifications

lowenz wrote:

thalixte wrote: @Lowenz,
I think that i know where the problem comes from :) . Have you ticked the option called "Fix for user weapon or cockpit" in the DX9 tab ? This option forces the viewport to have less depth, so the depth values aret flettened. I introduced this option in order to fix z-fighting issues in some games, especially UE4. It works if applied on a specific depth buffer (generally the last one, which is the depth buffer where the weapon or cockpit is drawn, for instance in UE4). But if it is applied to the depth buffer since the very first draw, all the depth buffer can be flattened.

Try to untick "Fix for user weapon or cockpit" in the DX9 tab. If it is un tick, remobe the DX9_buffer_detection section in the Resahde.ini file, and repply your settings.

Problem is, it's NOT activated in DXIW and TDS.


What is the content of your Reshade.ini ? For me it really sounds like a viewport pb...
The topic has been locked.
  • thalixte
  • Topic Author
More
4 years 6 months ago - 4 years 6 months ago #1239 by thalixte Replied by thalixte on topic Depth buffer detection modifications

JBeckman wrote: That's nifty, interesting to know what that setting does too for reference.
Would have assumed a D3D8 issue in older games or a wrapper problem if turned into D3D9/D3D11/Vulkan via various tools though z-flickering can be a problem and I suppose for depth and effects it's going to be even worse if applying a full-screen shader and it acts up.


The option is not enabled by default, and normally, not in standard mode, and concerns only d3d9. The z-fighting issue i mentioned, for instance in [strike]UE4[/strike] UT3 is that the weapon depth buffer can go down the scene depth buffer (as if the depth vars of the scene and the weapon have the same value).So, to ensure that the depth buffer associated with the weapon is always at the top (aka, the nearest from the player), i modify the viewport before the rendering occurs.

EDIT: the title for which i added this option was UT3, not UE4 (as i said, it is only for d3d9).
Last edit: 4 years 6 months ago by thalixte.
The topic has been locked.
  • lowenz
More
4 years 6 months ago - 4 years 6 months ago #1240 by lowenz Replied by lowenz on topic Depth buffer detection modifications

thalixte wrote: What is the content of your Reshade.ini ? For me it really sounds like a viewport pb...


TDS / DXIW reshade.ini ( It's a d3d8to9-wrapped game with Crosire wrapper )

[GENERAL]
CurrentPresetPath=E:\Thief - Deadly Shadows\System\RS4.ini
ScreenshotPath=E:\Thief - Deadly Shadows\System
PerformanceMode=0
NoFontScaling=1
TextureSearchPaths=C:\ReShade 4\Textures
ScreenshotIncludePreset=0
EffectSearchPaths=C:\ReShade 4\Shaders
ShowFrameTime=0
TutorialProgress=4
NoReloadOnInit=0
PreprocessorDefinitions=RESHADE_DEPTH_LINEARIZATION_FAR_PLANE=5,RESHADE_DEPTH_INPUT_IS_UPSIDE_DOWN=0,RESHADE_DEPTH_INPUT_IS_REVERSED=0,RESHADE_DEPTH_INPUT_IS_LOGARITHMIC=0
ScreenshotFormat=1
ShowClock=0
ShowFPS=0
ShowScreenshotMessage=1
ClockFormat=0
SaveWindowState=0
NewVariableUI=0
ScreenshotSaveBefore=0

[INPUT]
KeyReload=0,0,0,0
KeyEffects=35,0,0,0
InputProcessing=2
KeyScreenshot=44,0,0,0
KeyMenu=36,0,0,0

[STYLE]
GrabRounding=0.000000
Alpha=1.000000
FPSScale=1.000000
FrameRounding=0.000000
ChildRounding=0.000000
PopupRounding=0.000000
WindowRounding=0.000000
ScrollbarRounding=0.000000
TabRounding=4.000000
EditorStyleIndex=0
ColFPSText=1.000000,1.000000,0.784314,1.000000
Font=
FontSize=13
EditorFont=
EditorFontSize=13
StyleIndex=2

[DX9_BUFFER_DETECTION]
DisableINTZ=0
PreserveDepthBuffer=1
PreserveDepthBufferIndex=0
AutoPreserve=1
SourceEngineFix=0
FocusOnBestOriginalDepthstencilSource=0
BruteForceFix=0
Last edit: 4 years 6 months ago by lowenz.
The topic has been locked.
We use cookies
We use cookies on our website. Some of them are essential for the operation of the forum. You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.