[Release] Misc. emulators with depth buffer access

  • Posts: 46
4 months 2 weeks ago - 4 months 2 weeks ago #41 by Boulotaur2024

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.
https://imgur.com/S4iQEL9
https://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...
The following user(s) said Thank You: goCHIEFgo

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

  • Posts: 12
4 months 2 weeks ago #42 by goCHIEFgo
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.

  • Posts: 12
4 months 2 weeks ago #43 by goCHIEFgo
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.

  • Posts: 46
4 months 1 week ago #44 by Boulotaur2024
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.

  • Posts: 1
4 months 6 days ago #45 by spaulding

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.

  • Posts: 5
3 months 4 weeks ago - 3 months 4 weeks ago #46 by HenrikoMagnifico
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
The following user(s) said Thank You: goCHIEFgo

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

  • Posts: 1
3 months 3 weeks ago #47 by YOBAWO
can anyone help me why it both detect opengl & dx11?

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

  • Posts: 12
3 months 2 weeks ago - 3 months 2 weeks ago #48 by goCHIEFgo
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.

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

  • Posts: 12
3 months 2 weeks ago #49 by goCHIEFgo
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.

  • Posts: 5
3 months 2 weeks ago #50 by HenrikoMagnifico
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.

  • Posts: 12
3 months 2 weeks ago #51 by goCHIEFgo
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.

  • Posts: 83
2 months 1 week ago #52 by Niko of Death
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.

  • Posts: 40
2 months 3 days ago - 2 months 3 days ago #53 by Nerrel
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.

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