Depth buffer detection modifications
- pyewacket
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
- thalixte
- Topic Author
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...
- sajittarius
- pyewacket
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?
- pyewacket
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.
- thalixte
- Topic Author
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
- sajittarius
- lowenz
With the Crosire D3D8to9 wrapper the normal maps are somehow visible:
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).
- crosire
- lowenz
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)
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" !
- lowenz
You can see the weapon in the depth screen, and the rest is flattened....
MXAO and other depth-dependent shaders freeze the game.
- crosire
- lowenz
I know, actually it's the only way to obtain the image with the weapon visible as you see above (1000->10)crosire wrote: You can change the far plane (via RESHADE_DEPTH_LINEARIZATION_FAR_PLANE).
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).
- lowenz
This is the problem.....it's something related to the value range and type of the buffer.
- thalixte
- Topic Author
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.
- JBeckman
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.
- lowenz
Problem is, it's NOT activated in DXIW and TDS.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.
- thalixte
- Topic Author
lowenz wrote:
Problem is, it's NOT activated in DXIW and TDS.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.
What is the content of your Reshade.ini ? For me it really sounds like a viewport pb...
- thalixte
- Topic Author
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).
- lowenz
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