Dolphin, the GameCube and Wii emulator - Forums

Full Version: Pascal glitchers RTGI
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

Duckman

So I've been messing around with Metroid prime trilogy in Primehack Dolphin. Works great. Also installed upscaled textures, and reshade. Everything works fine. Now i instaled Pascal Glitchers "ray tracing" shader and it kiiiiiinda works, but not properly. I get weird results. Like ambient oclusion being kind of offset from where it is supposed to be. Is there any experience among you about setting it up, or advice about emulator setting for proper RT implementation?
So, first of all, we can't help you with a fork. They are going to do whatever they want to do so if you want help with prime hack, please se whatever support they themselves have.

Duckman Wrote:advice about emulator setting for proper RT implementation?

[Image: captainamerica_withchair-1.gif]

Spoiler:
Sooo.... let's set some things straight here. There is no "proper RT implementation" for Metroid Prime Trilogy. Not without someone doing a source port of MPT to a new engine, at least, which... actually has been done before for a couple of games but it is an EXTREME amount of work and it would require some AMAZING reverse engineering work and you are more likely to be struck by lighting in the middle of a bright sunny day, three times in a row, than for it to happen just by waiting.

What you are talking about, injecting RT into a scene after the fact, is the very definition of NOT proper. The "Pascal Glitchers Screen-Space Ray Traced Global Illumination", as shown by the full name, is screen space. To simplify it, that means it lives not within the game's engine, but within the graphics card. Anything the the graphics card gets the screenspace shader injectoor can use, which is what allows it to add raytracing without the aforementioned porting to another engine bit above, but there is a lot, a LOT LOT, that it is missing out on by doing this method. And of course, how well a specific game will work with it depends heavily on how the game is originally coded - some games don't cull or optimize as heavily and thus leave more information for an injector to pick up on. And some will even do render passes that make them completely unable to work with injection whatsoever. Raytracing injection, as with any other kind of shader injection, is very YMMV.

Metroid Prime Trilogy is not outright impossible to add raytracing to with this methods, but it's not kind to them, not even remotely. Prime AGGRESSIVELY culls objects and elements in the world, literally just outside the 4:3 or 16:9 view of the screen. There is very, very little to work with here. Even Prime 1 widescreen hacks have to alter culling in the game to prevent things from vanishing into nothing at the edges of the screen! So if you want to make the screenspace RT better, start with culling reduction game cheats / game patches. Note it will make the game more demanding, as the emulated wii is going to be demanding more from the host system. Now there's also the issue of the graphics API and/or the graphics drivers optimising out data that the injector might want but, you can cross that bridge if you come to it!

The next issue this kind of injection can face is pulling proper depth information from screenspace. Since it doesn't have access to worldspace, an injectors ability to determine depth and the accuracy of that depth information is just... whatever the game happens to give it, really. Since depth information didn't really matter on the GameCube and Wii, it is very VERY common for either no depth information to be passed on, or for "incorrect" (worked for their usecase, didn't need more accuracy) depth information to be present. I'm pretty sure the latter is what you are encountering and that is why the AO is not aligned. I'm not sure, there's a lot of factors. I haven't done this kind of thing in a while so I'm not super equipped to help, but there are lots of post effect shader groups out there doing their best to staple all manner of crazy effects into GameCube games, you should find and ask them about any hacks they are using to address this.

....and well, that's probably where you should be asking these questions in the first place. A forum dedicated to reshade or something would be far more knowledgeable about injection hacks such as these than anyone here! Just remember to temper your expectations, it is never going to be a true, proper RT implementation, and there will always be bugs and quirks. But if you can accept that and embrace the hackiness, you can get a lot of fun and cool effects from toying with injection!
(07-20-2020, 01:15 PM)MayImilae Wrote: [ -> ]So, first of all, we can't help you with a fork. They are going to do whatever they want to do so if you want help with prime hack, please se whatever support they themselves have.


[Image: captainamerica_withchair-1.gif]

Spoiler:
Sooo.... let's set some things straight here. There is no "proper RT implementation" for Metroid Prime Trilogy. Not without someone doing a source port of MPT to a new engine, at least, which... actually has been done before for a couple of games but it is an EXTREME amount of work and it would require some AMAZING reverse engineering work and you are more likely to be struck by lighting in the middle of a bright sunny day, three times in a row, than for it to happen just by waiting.

What you are talking about, injecting RT into a scene after the fact, is the very definition of NOT proper. The "Pascal Glitchers Screen-Space Ray Traced Global Illumination", as shown by the full name, is screen space. To simplify it, that means it lives not within the game's engine, but within the graphics card. Anything the the graphics card gets the screenspace shader injectoor can use, which is what allows it to add raytracing without the aforementioned porting to another engine bit above, but there is a lot, a LOT LOT, that it is missing out on by doing this method. And of course, how well a specific game will work with it depends heavily on how the game is originally coded - some games don't cull or optimize as heavily and thus leave more information for an injector to pick up on. And some will even do render passes that make them completely unable to work with injection whatsoever. Raytracing injection, as with any other kind of shader injection, is very YMMV.

Metroid Prime Trilogy is not outright impossible to add raytracing to with this methods, but it's not kind to them, not even remotely. Prime AGGRESSIVELY culls objects and elements in the world, literally just outside the 4:3 or 16:9 view of the screen. There is very, very little to work with here. Even Prime 1 widescreen hacks have to alter culling in the game to prevent things from vanishing into nothing at the edges of the screen! So if you want to make the screenspace RT better, start with culling reduction game cheats / game patches. Note it will make the game more demanding, as the emulated wii is going to be demanding more from the host system. Now there's also the issue of the graphics API and/or the graphics drivers optimising out data that the injector might want but, you can cross that bridge if you come to it!

The next issue this kind of injection can face is pulling proper depth information from screenspace. Since it doesn't have access to worldspace, an injectors ability to determine depth and the accuracy of that depth information is just... whatever the game happens to give it, really. Since depth information didn't really matter on the GameCube and Wii, it is very VERY common for either no depth information to be passed on, or for "incorrect" (worked for their usecase, didn't need more accuracy) depth information to be present. I'm pretty sure the latter is what you are encountering and that is why the AO is not aligned. I'm not sure, there's a lot of factors. I haven't done this kind of thing in a while so I'm not super equipped to help, but there are lots of post effect shader groups out there doing their best to staple all manner of crazy effects into GameCube games, you should find and ask them about any hacks they are using to address this.

....and well, that's probably where you should be asking these questions in the first place. A forum dedicated to reshade or something would be far more knowledgeable about injection hacks such as these than anyone here! Just remember to temper your expectations, it is never going to be a true, proper RT implementation, and there will always be bugs and quirks. But if you can accept that and embrace the hackiness, you can get a lot of fun and cool effects from toying with injection!

you cant even get the depth buffer to work so all effects like DOF,MXAO SSR will not work. unless there is a way to get reshades depth buffer to work with dolphin. I tried all back ends and i could never get it to display other then half white and blue.
(07-20-2020, 02:25 PM)domjam Wrote: [ -> ]you cant even get the depth buffer to work so all effects like DOF,MXAO SSR will not work. unless there is a way to get reshades depth buffer to work with dolphin. I tried all back ends and i could never get it to display other then half white and blue.


I don't know much about reshade but from what I heard, there was a way to "suggest" a buffer to the program?

Regardless, a slight spoiler, but I'm working on something related to this. Not going to make any promises but users who watch the development work may see something in the near future.
(07-21-2020, 11:06 AM)iwubcode Wrote: [ -> ]I don't know much about reshade but from what I heard, there was a way to "suggest" a buffer to the program?

Regardless, a slight spoiler, but I'm working on something related to this.  Not going to make any promises but users who watch the development work may see something in the near future.

No idea. I spent the whole day trying to figure out how to get Reshade to work along side Special Ks mod when in HDR mode with dolphin when running a game.  and i got it to work. but getting the depth buffer is unknown to me. I only no how to set it up when it is compatible with the game you are running. not how to make it compatible. that shit is out of my reach.