Marty McFly's Ambient Obscurance (MXAO) with IL
- ShoterXX
- jmx777
- Marty McFly
- Topic Author
robgrab wrote: Whoa! What's this?
Raytraced AO. There's 2 major ways of calculating AO:
- Sampling depth buffer in a 2D pattern, calculate view positions of those points and check if they lie inside a certain view space radius to our center sample. Very fast and easy to do. MXAO does this, HBAO+, HBAO, Alchemy AO. Might miss some occluders because only their closest point to camera is considered so thick objects that might extend into acceptance radius are discarded.
- Raytraced AO. Based on a center pos, certain rays into world are followed, their onscreen position calculated, from that + depth buffer the actual position of objects reconstructed and if it's close enough to ray pos, AO registered. This is much slower to compute because you need to operate in 3D space, reproject on screen, project back and so on. But it doesn't miss any occluders and looks much much better. The minimum cost of performance is very high though.
MXAO is option #1, I attempted to write a SSAO that works according to option #2. The noise is because in a 2D pattern it's very easy to find a uniform sample distribution so AO gets smooth with a low sample count already. As with option #2 you never know beforehand where your sample will be onscreen, it's much noisier. That's why real raytracers have noisy image even after several minutes of computing and MXAO with >100 samples can give you perfectly smooth result in realtime. Engines like Brigade engine have had a lot of brainpower spent on sample algorithms that converge quickly so it's not an easy feat. While this new AO looks definitely better than MXAO, it needs insane sample counts to be as smooth as MXAO, hence a lot of blurring is required. I'm thinking about a median filter as most of the supreme quality is eroded after blurring.
- Dwill0328
- robgrab
- Chavolatra
- Nerrel
It can, but it depends on the emulator and it can get really complicated.Chavolatra wrote: This Shader work in Emulators ???
I've been able to get MXAO working in the newest version of GLideN64 but there's a strange offset that I don't know how to fix:
The shading is a certain number of pixels too low to match up with the objects. Gonetz said this is probably due to the fact that MXAO is taking data from FBO, which might be scaled or altered in some way. Using the depth buffer instead would solve that, but Reshade apparently can't do that. Corsire mentioned that MXAO can control scaling itself, but is it capable of fixing this problem?
The issue isn't just that the AO is offset vertically, but that it also seems to lag behind the camera movement. If I move (in this case to the right side of the screen), you can see that the MXAO shading is lagging behind horizontally now:
MXAO worked perfectly in the last release of GLideN64, but the changes to the plugin since then seem to have made it very hard if not impossible to get the effect to work. If there's no way to resolve this with MXAO, the only option for AO in N64 games might be to use the old version of GlideN64.
- Chavolatra
- Marty McFly
- Topic Author
- Chavolatra
- Nerrel
Marty McFly wrote: There's no issue with MXAO, it's ReShade that's the issue here.
Looks like I might have to just give up on it. There doesn't seem to be a workaround other than forcing Reshade to use the depth buffer instead FBO.
Chavolatra wrote: i have interest in PCSX2(PS2) and CEMU(WIIU) emulators . Do you know if works or dont ????
It doesn't work in Cemu, at least it didn't when I tried it, but that's not a big deal since most Wii U games have ambient occlusion already. MXAO would probably look a lot better, but unless you remove the built-in AO somehow you'd be applying MXAO on top of Nintendo's AO and it would probably look bad.
As a general rule, it probably won't work in most emulators. I was surprised that I could get it running in GlideN64 at all, and even in that case it didn't last long before getting broken.
- jmx777
Keep with the good work!
- Uncle Crassius
- Dwill0328
Oh and how exactly do you enable SSIL? It says i can enable it in the preprocessor definitions section but i don't see any command for it
MXAO makes deadpool look absolutely SICK. Coolest thing i've ever seen. This is the default MXAO setting. I cut the mxao in half and softened it a bit for the main game but here is a screenshot of the opening scene with/without mxao
screenshotcomparison.com/comparison/123384
screenshotcomparison.com/comparison/123385
- Marty McFly
- Topic Author
- robgrab
- Dwill0328
- robgrab
- Marty McFly
- Topic Author
Obviously the quality and the accuracy of the shading isn't very good but hey, we're only computing 1/16 of the image here, solutions like HBAO+ run fullscreen and look like this.
- Sunesha
Awesome. That will help a lot when squeezing things I agree it looks real nice for that amount of squeezing.Marty McFly wrote: Did some work on upscaling the AO to fullres when using a sizescale < 1. The new filter I've devised will probably replace the current blur filter, just need to do some benchmarking. What it does? Well, see yourself, that's MXAO with Size Scale 0.25 (meaning that only 6.25% of pixels are processed):
Obviously the quality and the accuracy of the shading isn't very good but hey, we're only computing 1/16 of the image here, solutions like HBAO+ run fullscreen and look like this.
Thanks for putting time on this, I use this function when do downsampling.