Marty McFly's Ambient Obscurance (MXAO) with IL
- Elimina
- DeMondo
Marty McFly wrote: I did various changes and tests over time, not all turned out to be good, so here's what I find when looking through the file:
-changed the falloff formula so the samples are now better used. This has the side effect that AO radius looks now much larger, 1.0r sample radius of say 10.0 has same visual result of 1.1r with sample radius of about 3-4. However settings with same visual result run faster now, especially noticeable for large scale AO.
-changed the blending formula, AO does not kill off IL anymore and vice versa. I think these screenshots show it very well. I didn't use the best scene but it should show that the white door now illuminates the rest while on the old AO code, the IL gets killed away even though I use a stronger IL setting.
-changed the smart sampling formula. Now the far areas don't have a ridiculous low sampling amount anymore which made lower end settings flicker in far areas because you had like 4 samples
-changed the sample distribution a tiny bit so the AO looks better on low sample count.
-changed the sample randomization code for both better sample distribution and less noise so it doesn't need so much more blurring than before. On low sample counts the AO shadowing keeps its shape now, the old code diffused it away.
-tiny change in the AO blurring (actually I just increased the offset) that makes blur smoother now by a small margin
-small fix that reduces the z artifacts with low precision mode almost to 0 so there is no real reason anymore to use high precision
-simplified code of blur tap detection, might improve fps by a little margin but I doubt it will be noticeable
in short: AO looks better, runs faster, features do their job better.
DOWNLOAD
>> Thanks Marty for your awesome work!
- mindu
- Marty McFly
- Topic Author
float depth=blabla;
depth = somelargeformula;
return depth;
Between the first and the second line, add a line
depth = 1-depth;
and set the far plane (that one parameter with the long ass name) to 1000.0.
I do exactly that on V and it looks like this:
scontent-frt3-1.xx.fbcdn.net/t31.0-8/fr/...jpg?efg=eyJpIjoidCJ9
- mindu
- jas01
- genstar
- Marty McFly
- Topic Author
- Elimina
Marty McFly wrote: Custom builds, custom problems. Change shader order and make sure AO runs before DoF.
He is using the in-game DoF, not Reshades. He is trying to get the AO to not bleed, which is impossible when using in game effects
- Marty McFly
- Topic Author
Its the same one noticed on GTA V, i tested with another AO method (you know which) and it works fine, shakes a bit but works fine, while MXAO is all noisy and broken.
Here's two screenshots: i.imgur.com/Sl0Pvz7.jpg (AO amount = 2.0)
i.imgur.com/IW3rIXi.jpg (AO Amount = 4.0)
Game is DX10/11 x64
- Marty McFly
- Topic Author
0.1 and 0.2 looks fine more or less, it still looks a bit weird.
- vfxninjaeditor
Is there any way I can get this working with Reshade 2.0? I know that this is standalone and such but I would love to know if anyone has had success with getting it to work along with all the standard Reshade effects. Since Reshade 3.0 release date is unknown I would love to get MXAO working in 2.0 till then.
- Marty McFly
- Topic Author
- Kuniyo
I've been testing MXAO in DS3 and so far I've only had really nice results but I was wondering about the depth buffer, it is used for MXAO right?
Normally you can't use the depth buffer in online games as far as I know and Reshade disables it automatically when it detects a connection, doesn't it?
Well that doesn't seem the case for MXAO because the depth buffer stays active even when going online, isn't that dangerous?
I don't want to get banned or get my friends banned if I ever give them my preset or just show them some stuff.
The reason I asked is because in some places in DS3 there is a lot of smoke, but I can see objects through that smoke REALLY clearly with MXAO on, but off I cannot see through the smoke at all.
I'm asking because these kinds of things can be abused in online games like CS:GO.
Can anyone shed some light on this? Maybe I'm just wrong and paranoid hehe
I'm still kinda new to this scene, but I'm learning and loving it
And thank you (Marty MCFly) for MXAO, it really looks amazing! and the performance hit was much better than I was expecting.
- Marty McFly
- Topic Author
- Swartz27
I also have a proposal for you. Is there a way I may privately contact you? I can't seem to find a private message system on this message board.
- turtlevan
Using the current config, AO everywhere looks great, but grass looks crazy
#define fMXAOAmbientOcclusionAmount 2.0 //[0.0 to 2.0] Linearly increases AO intensity. Can cause pitch black clipping if set too high.
#define bMXAOIndirectLightingEnable 1 //[0 or 1] Enables Indirect Lighting calculation. Will cause a major fps hit.
#define fMXAOIndirectLightingAmount 8.0 //[0.0 to 8.0] Linearly increases IL intensity.
#define fMXAOIndirectLightingSaturation 0.1 //[0.0 to 3.0] Boosts IL saturation for more pronounced effect.
#define fMXAOSampleRadius 50.0 //[0.5 to 10.0] Sample radius of GI, higher values drop performance.
#define iMXAOSampleCount 74 //[5 to 150] Amount of MXAO samples. Higher means more accurate and less noisy AO at the cost of fps.
#define bMXAOSmartSamplingEnable 1 //[0 or 1] Enables smart sample count reduction for far areas. May look ugly when low sample count (16 or less) is used, turn it off then.
#define fMXAOSampleRandomization 0.25 //[0.0 to 1.0] Breaks up the dither pattern a bit if sample spiral gets too visible (low samples and/or high radius). Needs stronger blurring though.
#define fMXAONormalBias 0.2 //[0.05 to 0.4] Normals bias to reduce self-occlusion of surfaces that have a low angle to each other.
#define bMXAOBackfaceCheckEnable 1 //[0 or 1] For indirect lighting only! Enables back face check so surfaces facing away from the source position don't cast light. It comes with a slight fps drop.
#define bMXAOPerPixelNormalsEnable 1 //[0 or 1] Enables fake per pixel normals embossed from colors. My version is edge aware and distance stable. Adds more detail but may look comic-like. Best for old games.
#define bMXAOLowPrecisionEnable 1 //[0 or 1] Enables lower bit mode for AO source texture (R32F vs R16F). This will improve performance but may introduce some artifacts at distant objects.
#define fMXAOBlurSharpness 1.0 //[0.00 to 2.0] AO sharpness, higher means more sharp geometry edges but noisier AO, less means smoother AO but blurry in the distance.
#define fMXAOBlurSteps 4 //[2 to 7] Offset count for AO smoothening. Higher means more smooth AO but also blurrier AO.
#define fMXAOSizeScale 0.5 //[0.5 to 1.0] Resolution scale in which AO is being calculated.
#define fMXAOMipLevelIL 1 //[0 to 4] Miplevel of IL texture. 0 = fullscreen, 1 = 1/2 screen width/height, 2 = 1/4 screen width/height and so forth.
#define fMXAOMipLevelAO 1 //[0 to 2] Miplevel of AO texture. 0 = fullscreen, 1 = 1/2 screen width/height, 2 = 1/4 screen width/height and so forth. Best results: IL MipLevel = AO MipLevel + 2
#define bMXAODebugViewEnable 0 //[0 or 1] Enables raw AO/IL output for debugging and tuning purposes.
edit:
Also, i found maybe a bug. Does this mxao need a minimum darkness area to where it doesn't apply? The really dark areas in the palm trees and other tree turn whiteish - grey when mxao is turned on. I checked in shader for a 'black / min darkness threshold"
- Marty McFly
- Topic Author