[Release] Misc. emulators with depth buffer access
- Boulotaur2024
- Topic Author
Good idea for the feature request. They have a lot of business going on though, not sure it's in their top priorities to make reshade compatible...otherman wrote: Meanwhile, in dolphin shaders not seam to have any effect; suggestions?
Good idea anyway.
Please post a screenshot and something more explicite. "It doesn't work" is a little vague...
Did you check if you have depth working with "Display depth shader" ? You might want to increase the SSAO radius too if it's too weak depending on games
Yes the code has been updated obviously but I didn't have time to keep up with Marty's latest work (I'm at work now).Drakonas wrote: Has the code been updated to prevent this?
He probably changed the "texcoord" attribute name into something else. Check out the "struct VSOUT" definition, there is a float2 that represents texture coordinates. You'll have to adapt my code and use that name (instead of "texcoord") in the "PS_ResizeDepth" too (where you got the compile error)
Please Log in or Create an account to join the conversation.
- Niko of Death
Still not getting any depth buffer in pcsx2 with latest dll, here are my gsdx settings if it matters: i.imgur.com/QdewLVb.pngBoulotaur2024 wrote:
No, I removed every trace of D3D11 code path because it was poorly implemented, it was just meant as a POC.Niko of Death wrote: Is this still working with the latest PCSX2 build? I'm trying to use it with games that did work on the old DX11 build to no avail on the latest nightly. I have an AMD card if it matters.
Stick to OpenGL even if I know you're AMD user (I am one too - I feel your pain)
Thanks for the heads up, I totally forgot about rpcs3.WicketW wrote: I don't know if this is new news but reshade works with RPCS3 now in OpenGL. I get a crash when exiting and the game I'm playing glitches out when hooked but I do get depth buffer access. It'd be great if someone would look into what's causing the crashes and if the depth buffer implementation can be improved.
Will try tomorrow. I never used it. Not sure my CPU can handle it but we'll see.
EDIT :
Yeah it works, I get a crash too when I exit rpcs3. Not much of a big problem anyways (somehow the hook for glDeleteTextures fails and crashes... I have no idea why...)
The depth buffer doesn't render too well , there's something like a grid pattern... I tried many things but to no avail. It's beta software anyway (though very good)
EDIT : might have something to do with MSAA used internally in some games
You can see I added a few options in the new OpenGL pane that Crosire created last week. It should be easier to configure
Also added a few tooltips to make it even easier. Imgui is sooo cool ;p
(I'm using resolution listed on the status bar, scaling mode 1, emulator mode pcsx2)
Please Log in or Create an account to join the conversation.
- Drakonas
Well I changed texcoord to uv, and it does compile. But now it seems that the RT shader just breaks whenever I enable it in Reshade. If it's enabled on boot, no shaders (including RT) load at all, even when I enable them after the game has started. It even prevents games from booting sometimes, and I have to disable the shader after I boot the game, then reenable it to get the game to unfreeze.Boulotaur2024 wrote: Check out the "struct VSOUT" definition, there is a float2 that represents texture coordinates.
If I have a different shader loaded on boot, then turn on RT shader, it loads but does not pick up the depth buffer at all (entire screen is grey when I turn on the debug view option), even though it is detecting the buffer resolution in the OpenGL tab in Reshade.
Not sure what else to do other than ask you or MartyMcFly for looking at the code for this, because I think this is something out of my hands. Regards.
Please Log in or Create an account to join the conversation.
- Boulotaur2024
- Topic Author
otherman wrote: Meanwhile, in dolphin shaders not seam to have any effect; suggestions?
Yo, very sorry for sounding sceptical but this afternoon at work (my PC has a GTX 750) I saw exactly what you described with the shaders having no effect...
And it turns out I happily introduced a regression with the format of the depth buffer texture I changed lately. Now I understand why Crosire didn't propagate that "depth_format" variable further like I did : it completely breaks on NVIDIA (my fault for not testing Dolphin with NVIDIA hardware)... but... not on AMD
Those differences between vendors are sooo annoying. I guess AMD is the culprit for staying so behind in terms of OpenGL. Well the API is old now, why bother...
So I made the changes just now : if it's NVIDIA I'll stick to GL_DEPTH24_STENCIL8 and if it's AMD I'll keep the "depth_format" since otherwise Project64 doesn't work at all on AMD.
I updated the binaries in the OP with the fix described above, please try again. Sorry for the inconveniences.
Not sure it's also going to fix Drakonas problem (Drakonas do you have an NVIDIA card ?) but it's worth a try
Niko of Death wrote: Still not getting any depth buffer in pcsx2 with latest dll, here are my gsdx settings if it matters: i.imgur.com/QdewLVb.png
(I'm using resolution listed on the status bar, scaling mode 1, emulator mode pcsx2)
Ok. What game(s) are you trying to play ? Some games might be completely incompatible.
Did you follow the instructions ? Did you try to increase the depth output in .fxh files ?
Do you switch to fullscreen or windows to apply changes after choosing "pcsx2" in the dropdown list in the OpenGL tab ?
Please Log in or Create an account to join the conversation.
- Niko of Death
I've tried it with Dragon Quest V and Smackdown: Here Comes the Pain (the latter of which I know worked before).Boulotaur2024 wrote: Ok. What game(s) are you trying to play ? Some games might be completely incompatible.
Did you follow the instructions ? Did you try to increase the depth output in .fxh files ?
Do you switch to fullscreen or windows to apply changes after choosing "pcsx2" in the dropdown list in the OpenGL tab ?
I currently am using
float depth = tex2Dlod(DepthBuffer, float4(texcoord, 0, 0)).x * 100000;
and
float depth = tex2Dlod(sDepthBufferTex, float4(uv, 0, 0)).x * 100000;
Here's my opengl32.log if it helps pastebin.com/NHLwDDZC
Please Log in or Create an account to join the conversation.
- Boulotaur2024
- Topic Author
Niko of Death wrote: ...
Working fine here (on NVIDIA GTX 660) :
abload.de/img/dqv8kqb.jpg
abload.de/img/wwiukbp.jpg (Stretch mode to 4)
Not sure what you are doing. I know you have an AMD card.
I've been testing & developping for months with an (old) AMD card too.
Could it be that "new" AMD cards do not have the same drivers or...
Please Log in or Create an account to join the conversation.
- otherman
It works as expected with ppsspp.
Notebook with i7 cpu and gf 930m here (with intel gpu disabled, to avoid conflict).
Please Log in or Create an account to join the conversation.
- Boulotaur2024
- Topic Author
otherman wrote: ...
Do you have anything showing here ?
You can try this build too :
mega.nz/#!vQ8mQALI!NxVGQas4oR5pLOiScy7VAW6Ww4H7bHs_3weHHoHkCIg
Please Log in or Create an account to join the conversation.
- JBeckman
Boulotaur2024 wrote:
Niko of Death wrote: ...
Working fine here (on NVIDIA GTX 660) :
abload.de/img/dqv8kqb.jpg
abload.de/img/wwiukbp.jpg (Stretch mode to 4)
Not sure what you are doing. I know you have an AMD card.
I've been testing & developping for months with an (old) AMD card too.
Could it be that "new" AMD cards do not have the same drivers or...
If it's older than the 7000 series the driver situation gets pretty complicated yeah though with how complex these are I couldn't begin to say what's been altered and then there's the differences between the current supported Windows 7 and Windows 10 drivers and how extensively the various modules and components have changed over the years.
EDIT: Onboard could be a problem too before that got unified depending on which partners bothered to reliably update drivers frequently.
Please Log in or Create an account to join the conversation.
- Drakonas
Well that definitely fixed the shaders not loading problem, however there's one other bug to be squashed.Boulotaur2024 wrote: I updated the binaries in the OP with the fix described above, please try again. Sorry for the inconveniences.
Not sure it's also going to fix Drakonas problem (Drakonas do you have an NVIDIA card ?) but it's worth a try
Running a render resolution of 1920x1584, Dolphin's 3x rendering option, works great! Finally! The depth buffer is aligned and there are no more issues that I had previously. There's one issue though, which arises when I want to use Dolphin-Ishiiruka's "Auto (Window Size)" render scale. It misaligned the buffer again.
Dolphin Ishiiruka, the more prevalent version of Dolphin (games run much faster in general due to its integration of more modern optimization functions and utilization of higher end GPU functions, and it has more visual features), has an option to render the game at a size "Auto (Window Size)", instead of a direct scale of the original game resolution. So instead of 1920x1584 for 3x, the game renders at 1920x1080. That's 504x1920 pixels not being rendered! For reference, 1920x1080 is 2,073,600 pixels, and the extra pixels in the 3x option is 967,680. That's nearly an extra 1/3 of the size of the screen! The end result is a massive performance increase, with little to no visual artifacts (I've never seen any)
Ishiiruka is the emulator version of Dolphin mentioned on MartyMcFly's official Discord. I really think if you could squash this bug that would be amazing to allow lower-performing cards like my GTX 1070 to run perfectly with the shader. I only get a little slowdown in certain areas with the shader at 1920x1584 resolution. I get no slowdown when I enable the shader at 1920x1080 resolution, but the buffer is still misaligned.
Thanks for your fast fix!
Here's an example screenshot:
Please Log in or Create an account to join the conversation.
- Niko of Death
I'm using an RX 580. As long as your card is a 7000 series or later there shouldnt be any major issues with the drivers. Could you show me your emulation/gsdx settings? I honestly have no idea what could be causing this.Boulotaur2024 wrote:
Niko of Death wrote: ...
Working fine here (on NVIDIA GTX 660) :
abload.de/img/dqv8kqb.jpg
abload.de/img/wwiukbp.jpg (Stretch mode to 4)
Not sure what you are doing. I know you have an AMD card.
I've been testing & developping for months with an (old) AMD card too.
Could it be that "new" AMD cards do not have the same drivers or...
Please Log in or Create an account to join the conversation.
- MokouPrice
also no depth buffer access at all
Please Log in or Create an account to join the conversation.
- otherman
Please Log in or Create an account to join the conversation.
- Boulotaur2024
- Topic Author
Ok I made some changes and here we go, I think I got it right : it should be working fine with "Auto (Window Size)" in Ishiiruka now.Drakonas wrote: Dolphin has an option to render the game at a size "Auto (Window Size)", instead of a direct scale of the original game resolution.
If you got the depth buffer stuck (frozen) after ALT tabbing, just select another depth buffer in the new "Depth buffers" list and go back to the main one
Right now I have a GTX 660 but my AMD card is a Radeon HD7950 (2013) and yeah I think we use the same drivers anyways.Niko of Death wrote: I'm using an RX 580. As long as your card is a 7000 series or later there shouldnt be any major issues with the drivers. Could you show me your emulation/gsdx settings? I honestly have no idea what could be causing this.
So I'm just as confused as you.
I'm using 100% DEFAULT settings. I redownloaded everything after your post to make sure I was not missing something obvious.
But no, it should work from the get-go, even without tweaking the .fxh files ("Display Depth" is the most suitable tool for that).
Oh, I see you have "Hardware hacks" enabled, I don't think this is a good idea...
You might want to try with the new build. You can now select from a list of depth buffers just like other APIs. Not sure it can help but I'm lost otherwise....
EDIT : as a last resort you could always debug and set a breakpoint line 1536 to see if you get any _selectedDepthBuffer. Something could break a lot earlier too. Debug is the best way to know why it doesn't work. I see you can compile from source so... why not
Yes absolutely, the game uses like 10 buffers (amazing considering it's a PS2 -maybe PCSX2 does something wrong too I don't know-)MokouPrice wrote: I use it to play timesplitter future perfect, lots of flickering and mouse injector cannot detect the game
also no depth buffer access at all
so it's hard to retrieve it.
... But if you are lucky you can see that you can get it showing sometimes
Please Log in or Create an account to join the conversation.
- Niko of Death
Boulotaur2024 wrote:
I built from your latest source, still nothing. The opengl depth list is completely empty (see i.imgur.com/U2Dbq1t.png , in DQV)Drakonas wrote:
Right now I have a GTX 660 but my AMD card is a Radeon HD7950 (2013) and yeah I think we use the same drivers anyways.Niko of Death wrote: I'm using an RX 580. As long as your card is a 7000 series or later there shouldnt be any major issues with the drivers. Could you show me your emulation/gsdx settings? I honestly have no idea what could be causing this.
So I'm just as confused as you.
I'm using 100% DEFAULT settings. I redownloaded everything after your post to make sure I was not missing something obvious.
But no, it should work from the get-go, even without tweaking the .fxh files ("Display Depth" is the most suitable tool for that).
Oh, I see you have "Hardware hacks" enabled, I don't think this is a good idea...
You might want to try with the new build. You can now select from a list of depth buffers just like other APIs. Not sure it can help but I'm lost otherwise....
EDIT : as a last resort you could always debug and set a breakpoint line 1536 to see if you get any _selectedDepthBuffer. Something could break a lot earlier too. Debug is the best way to know why it doesn't work. I see you can compile from source so... why not
Here's my opengl32.log with debug version: pastebin.com/ynzk2Wxn
Please Log in or Create an account to join the conversation.
- Nerrel
Boulotaur2024 and Gonetz did a great job of getting ReShade to work with N64 games via GlideN64. The plugin should now be compatible with almost any effect; I put together a demo of a few depth buffer effects in action:
Please Log in or Create an account to join the conversation.
- acknowledge
Please Log in or Create an account to join the conversation.
- goCHIEFgo
https://imgur.com/S4iQEL9
https://imgur.com/CTzIK8i
Please Log in or Create an account to join the conversation.
- Boulotaur2024
- Topic Author
reshade.me/forum/general-discussion/5442...s?limitstart=0#35113
Like I said in OP, yes I will eventually.acknowledge wrote: Will this special build finally merge into reshade main branch?
I don't know if Crosire is ok with that.
Please Log in or Create an account to join the conversation.
- goCHIEFgo
Please Log in or Create an account to join the conversation.