[Release] Misc. emulators with depth buffer access

  • Boulotaur2024
  • Topic Author
More
4 years 6 months ago - 4 years 6 months ago #41 by Boulotaur2024 Replied by Boulotaur2024 on topic [Release] Misc. emulators with depth buffer access

goCHIEFgo wrote: I've been trying to get Dolphin working but it always cuts the depth buffer at the bottom of the screen, regardless of window size, rez, fullscreen, Dolphin/Ishiiruka. So the shaders are all misaligned.
imgur.com/S4iQEL9
imgur.com/CTzIK8


Ok, sorry.

I think there's an issue with wide resolutions ("UHD" ?).
Some people on Reddit reported siimilar issues with extra wide res (3840x2160 or 2560x1440) :
www.reddit.com/r/emulation/comments/ci3z...s_rt_shader/ev5stgy/

Looking at your screens I'm assuming you have a really wide resolution too.
I have no idea why it doesn't work though and without said hardware it's hard to tell...
Last edit: 4 years 6 months ago by Boulotaur2024.
The following user(s) said Thank You: goCHIEFgo

Please Log in or Create an account to join the conversation.

  • goCHIEFgo
More
4 years 6 months ago #42 by goCHIEFgo Replied by goCHIEFgo on topic [Release] Misc. emulators with depth buffer access
Wow, there you go, windowed, stretch to window aspect ratio did it, as noted by the redditor. That was all. You might be right about it being Ultra Wide then.
I thought I had tried every combination of res, window, fullscreen and aspect ratio, but apparently not. Thanks dude!
The following user(s) said Thank You: Boulotaur2024

Please Log in or Create an account to join the conversation.

  • goCHIEFgo
More
4 years 6 months ago #43 by goCHIEFgo Replied by goCHIEFgo on topic [Release] Misc. emulators with depth buffer access
Now I can move on to the two games I really want this for, that don't work: Pokemon Colosseum and XD: Gale of Darkness. For some reason the only time I get any apparent access to the buffers are when the Pokemon are first introduced in a battle. Nothing in the overworld. This is getting very specific though, so I don't expect you to work your magic just for those two. Anyways, for this one I've tried every combination of the OPENGL window that includes your own features in reshade. Manual buffer detect seems to find the right buffer, but still gives me nothing.

Also, you don't think there's a way to change anything in the way reshade handles alignment of the shaders that you could do the same for rotating with Citra?

Btw, I did try just starting dolphin in 1080p desktop res and it gave me the same result of misaligned shaders - really confusing. Dolphin can detect my monitor is UW? wt

Please Log in or Create an account to join the conversation.

  • Boulotaur2024
  • Topic Author
More
4 years 6 months ago #44 by Boulotaur2024 Replied by Boulotaur2024 on topic [Release] Misc. emulators with depth buffer access
goCHIEFgo, sorry for the delayed reply.
Yes I'm getting the same results as you : no depth buffer at all until a fight starts (a Pokemon "battle" : :lol: ?) and then a few models end up showing normals...
Nothing I can do, the game emulation may very well be glitchy (I see black lines on the ground). Ask the devs

I submitted a pull request to Reshade Github for all the work I have done so far :
github.com/crosire/reshade/pull/153

I'm not planning to work on it further : it is ready to be merged (if positively reviewed of course)
Working and syncing with Gonetz (gliden64 developper) was a cool experience. Now I'll probably move on to something else :]
The following user(s) said Thank You: acknowledge

Please Log in or Create an account to join the conversation.

  • spaulding
More
4 years 6 months ago #45 by spaulding Replied by spaulding on topic [Release] Misc. emulators with depth buffer access

Boulotaur2024 wrote:
Notes for MartyMcFly's RT shader :

As I obviously cannot redistribute MartyMcFly's RT shader[/li]. Here is what you have to do to fix alignment issue :

  • (You should have downloaded my modified qUINT shaders - see above)
  • Open qUINT_rt.fx and replace "linear_depth" by "linear_depth_resized" throughout the shader file
  • Add the following new pass :
void PS_ResizeDepth(in VSOUT v, out float4 color : SV_Target0)
{
	color = tex2D(qUINT::sDepthBufferTex, v.uv).x;
}
  • And call it this way, at the end of the shader file (it has to be the first pass)
pass
{
	VertexShader = PostProcessVS;
	PixelShader = PS_ResizeDepth;
	RenderTarget = qUINT::DepthBufferTexResized;
}


Can you be more precise? Where should I put these passes exactly? (I'm not a developer but would love to try that shader with dolphin)

Please Log in or Create an account to join the conversation.

  • HenrikoMagnifico
More
4 years 6 months ago - 4 years 6 months ago #46 by HenrikoMagnifico Replied by HenrikoMagnifico on topic [Release] Misc. emulators with depth buffer access
I've contacted ReShade support and they sent me this message; reshade.me/forum/shader-suggestions/5879...er-handling-in-citra

Basically, it's a short configuration edit for ReShade.fhx which flips the depth buffer 90 degrees to hopefully help display the depth buffer correctly in Citra. However, I have not even managed to get to the state you displayed in the beginning of the thread, with Link sitting on his bed inside his house in Kokiri Forest and clearly displaying depth buffer information. I've followed all the steps correctly, I think. It just shows a white and black bar which is split in the middle of the screen vertically. Any idea why it's not working for me?

This is what it looks like when I enable DisplayDepth.fx in Citra with all the proper ReShade.ini settings;


Thanks,
Henriko
Last edit: 4 years 6 months ago by HenrikoMagnifico.
The following user(s) said Thank You: goCHIEFgo

Please Log in or Create an account to join the conversation.

  • YOBAWO
More
4 years 5 months ago #47 by YOBAWO Replied by YOBAWO on topic [Release] Misc. emulators with depth buffer access
can anyone help me why it both detect opengl & dx11?

Please Log in or Create an account to join the conversation.

  • goCHIEFgo
More
4 years 5 months ago - 4 years 5 months ago #48 by goCHIEFgo Replied by goCHIEFgo on topic [Release] Misc. emulators with depth buffer access
Cool dude, I had kinda given up on Citra. I had some interesting results following this. I managed to have the buffer turned 90° but the wrong direction, now it's 180° (upside down). Buffer Upside Down flips the buffer horizontally at that point. Not to mention the misalignment issues even if they were the right angle.

My Displaydepth does indeed show the buffer turned 180° degrees, but the Quint fx won't follow along. Weirdly however, the MXAO fx that comes with any installation of reshade does change 90° to 180. Look at this:

Upper left corner, QUINT MXAO at a 90° angle, MXAO at a 180° angle.

This was originally what I wanted to explore with Citra, this proves that it's all down to some adjustment in the alignment in the .fx files themselves, surely. Unlikely to be solved unless someone who actually knows how to do this stuff comes along again though.
Last edit: 4 years 5 months ago by goCHIEFgo.

Please Log in or Create an account to join the conversation.

  • goCHIEFgo
More
4 years 5 months ago #49 by goCHIEFgo Replied by goCHIEFgo on topic [Release] Misc. emulators with depth buffer access
Henriko, have you activated the Alt. depth buffer detection method under "OpenGL"?
Also, when using Displaydepth, make sure you use global preprocessor definitions, given you have edited those in your ini.

Please Log in or Create an account to join the conversation.

  • HenrikoMagnifico
More
4 years 5 months ago #50 by HenrikoMagnifico Replied by HenrikoMagnifico on topic [Release] Misc. emulators with depth buffer access
I have. You're using the 64-bit DLL linked in the post right?

Please Log in or Create an account to join the conversation.

  • goCHIEFgo
More
4 years 5 months ago #51 by goCHIEFgo Replied by goCHIEFgo on topic [Release] Misc. emulators with depth buffer access
I can't remember if it was 32 or 64, but I know I used the dlls linked by Boulotaur. Maybe try other games to see if it's just the one your playing?

Please Log in or Create an account to join the conversation.

  • Niko of Death
More
4 years 4 months ago #52 by Niko of Death Replied by Niko of Death on topic [Release] Misc. emulators with depth buffer access
The master opengl code had a lot of changes made to it, I know you aren't planning to add to this anymore, but would it be possible to get a proper merge with the current master?

Please Log in or Create an account to join the conversation.

  • Nerrel
More
4 years 4 months ago - 4 years 4 months ago #53 by Nerrel Replied by Nerrel on topic [Release] Misc. emulators with depth buffer access
Unfortunately GlideN64 has a major problem when using ReShade on an Nvidia card. I had the issue over a year ago but switched to AMD and forgot all about it.

The issue is that objects covered with grayscale alpha textures go transparent, usually in indoor areas. Link's hat and shield are grayscale textures with alpha:


The milk bar and observatory are great examples, the wood and stair textures are grayscales.



(I filled one example texture, the wood trim on the walls, with a red background to show the transparency)


Loading a savestate resolves the problem (the milk bar on the right was loaded from a state and looks normal). Not only that, but it stays fixed the entire session, so whatever is going wrong seems to be only at startup.

It doesn't seem to matter which shaders are active or whether shaders are installed at all, just having the opengl32.dll triggers it. Others on my Discord with Nvidia cards have confirmed that it happens the same for them (I never saw a trace of this issue on AMD). This probably has to be fixed on the GlideN64 side but Gonetz may not understand what ReShade is doing to cause the problem. Any thoughts on what's going wrong? And if not, let me know so I can go ahead and pass it on to Gonetz.
Last edit: 4 years 4 months ago by Nerrel.

Please Log in or Create an account to join the conversation.

  • silaspokemon
More
4 years 2 weeks ago #54 by silaspokemon Replied by silaspokemon on topic [Release] Misc. emulators with depth buffer access
Hello there, just wondering, does this still work on Dolphin? I followed all the steps, but it's misaligned. I even reset and reinstalled my entire Dolphin, multiple times just to make sure it was completely latest version vanilla. imgur.com/a/ItB7V7s

Please Log in or Create an account to join the conversation.

  • Siggs
More
4 years 2 weeks ago - 4 years 2 weeks ago #55 by Siggs Replied by Siggs on topic [Release] Misc. emulators with depth buffer access
Hi all, just joined to ask for some advice about this awesome work...completely new to Reshade, I'm using it with Redream.

I followed all the instructions but I can't seem to see any depth effects when ingame. Not specifically for Marty's shaders, but anything; goes for the default AOshader, and DoF doesn't seem to work either. But that's not bothering me. The Reshade install was fresh, for me to try this out.

I suspect it's not specifically tied to these files, but does anyone know why I might not be getting depth information in reshade at all? And if I need to provide any info or logs, what ones are needed. Cheers :)
Last edit: 4 years 2 weeks ago by Siggs.

Please Log in or Create an account to join the conversation.

  • Nerrel
More
4 years 1 week ago - 4 years 1 week ago #56 by Nerrel Replied by Nerrel on topic [Release] Misc. emulators with depth buffer access
Boulotaur2024, would it be possible to get updates for the dlls based on the newer ReShade versions if you have time? Marty's newer RT shaders require 4.5 and your build doesn't seem compatible with them (though the build lists itself as 5.0.0.65)

Siggs wrote: I followed all the instructions but I can't seem to see any depth effects when ingame. Not specifically for Marty's shaders, but anything; goes for the default AOshader, and DoF doesn't seem to work either. But that's not bothering me. The Reshade install was fresh, for me to try this out.


I'm not at all sure if this applies at all to redream, but for GlideN64 the "force default depth buffer" box has to be checked in the OpenGL tab...
Last edit: 4 years 1 week ago by Nerrel.

Please Log in or Create an account to join the conversation.

  • Siggs
More
4 years 5 days ago #57 by Siggs Replied by Siggs on topic [Release] Misc. emulators with depth buffer access

Nerrel wrote:

Siggs wrote: I followed all the instructions but I can't seem to see any depth effects when ingame. Not specifically for Marty's shaders, but anything; goes for the default AOshader, and DoF doesn't seem to work either. But that's not bothering me. The Reshade install was fresh, for me to try this out.


I'm not at all sure if this applies at all to redream, but for GlideN64 the "force default depth buffer" box has to be checked in the OpenGL tab...


I've tried that ticked and unticked, with no success. I removed my Nvidia profile forced AA thinking that was effecting it, reloaded Reshade several times etc, still nothing :(

It installed correctly, runs, and the extra qUINT shaders show up. But no AO effects on that, or the default plugin

Please Log in or Create an account to join the conversation.

  • Nerrel
More
4 years 4 days ago - 4 years 4 days ago #58 by Nerrel Replied by Nerrel on topic [Release] Misc. emulators with depth buffer access
Crosire, I didn't think to check the default builds but GlideN64 depth is working in them now- I assume this means everything Boulotaur2024 did is merged in?

I just wanted to confirm it since I wasn't sure if there are any special settings needed anymore (the "force default depth buffer" option isn't there but doesn't seem needed). Thanks
Last edit: 4 years 4 days ago by Nerrel.

Please Log in or Create an account to join the conversation.

  • crosire
More
4 years 3 days ago #59 by crosire Replied by crosire on topic [Release] Misc. emulators with depth buffer access
The force default depth buffer option is still there, just more hidden: Since you can now select individual buffers manually, selecting the buffer with the adress 0x00000000 does the same thing (this is also still translated to the respective option in ReShade.ini).
The only thing not merged from the pull request is automatic depth buffer scaling, but it's not something I have currently plans to merge due to the emulator-specific nature.
The following user(s) said Thank You: Nerrel

Please Log in or Create an account to join the conversation.

  • Zombeaver
More
3 years 11 months ago - 3 years 11 months ago #60 by Zombeaver Replied by Zombeaver on topic [Release] Misc. emulators with depth buffer access
I'm not sure if this is the right place to post this but I've encountered a bug when using Reshade with PCSX2.

If both dxgi.dll and opengl32.dll are present alongside PCSX2 (which has access to use both, and which of the two is preferred is dependent on the game) using the Direct3D 11 renderer works fine and hooks into dxgi.dll as expected, you can pause and go to the video plugin section and there are no issues. When using the OpenGL renderer, however, content can be started and it will function normally but if you pause the emulation and then go to the video plugin section the app will crash.

This can be avoided by renaming dxgi.dll to d3d11.dll, which will still work if using the Direct3D 11 renderer, however it doesn't get hooked properly (on launch) until you force it to do a renderer refresh (pressing F9 twice).

Both dxgi.dll and opengl32.dll can be side by side and work as expected in 4.4.2. The issue seems to have started in 4.5.0.

In summary:

1) 4.5.0+ causes a crash if both dxgi.dll and opengl32.dll are present, GL content is started and then attempting to change the video plugin settings; doesn't happen if dxgi.dll is named d3d11.dll instead

2) d3d11.dll doesn't get hooked when using the Direct3D 11 renderer unless you do a renderer refresh while content is running

EDIT: I should mention, this problem isn't present with the version of opengl32.dll available in this thread either. It's the one in the standard ReShade release that I'm talking about. Sorry, this probably isn't the right place for this :unsure: I'll post it in troubleshooting.
Last edit: 3 years 11 months ago by Zombeaver.

Please Log in or Create an account to join the conversation.

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.