Marty McFly's Ambient Obscurance (MXAO) with IL
- Martigen
Woohoo! Thanks Marty.Marty McFly wrote: Updated MXAO to 1.5.7r
Changelog:
-removed Sample Randomization, performance uncomparably lower because of cache misses
-removed bayer16x16.png dependancy, results in higher quality of AO
-changed blur weight calculation, heavily inspired from GFSDK
-added per pixel normals, this is a test
-various code restructurements for higher performance
-changed AO blur for better visuals and sharper AO result
-a lot more I probably forgot
Now where's that github link (I keep forgetting to bookmark it)...
EDIT: not on github, but on page 1 thanks. Is it going to get merged?
- Marty McFly
- Topic Author
- Sunesha
- genstar
- Sunesha
- Sunesha
The first thing I noticed, yes it seem to run with better performance. But my text was looking weird. So put on debug and found what happening
However inside the game I think it worked out well with bMXAOPerPixelNormalsEnable enabled. Though I wanna test this more. When usually play this game I have MXAO bind to key that turn off when I am in the HQ part as their is a lot gui and MXAO doesnt add anything.
I really like the new debug IL and AO interface.
Also what's awesome, the swinging grass looks awesome now. It blends in very good. This I didnt manage in other versions. Also there is often trees in the background that looked very pixely(is that word?). They look awesome now and doesnt grab your eye. As the rendering distance is very low in XCOM 2, I use AO FADE Start of 0.11 and fade out .31.
Also I dont feel need to bump blursharpness to 2, it works very well just 1
Ok I spent some time get it to look nice in XCOM 2. I just say WOW. I did a very performance settings with IL it only chewed 10fps from me, If remember correctly similar setings with other MXAO was chewing about 15 fps
Pictures
My settings:
#define bMXAOIndirectLightingEnable 1 //[0 or 1] Enables Indirect Lighting calculation. Will cause a major fps hit.
#define fMXAOIndirectLightingAmount 3.2 //[0.0 to 8.0] Linearly increases IL intensity.
#define fMXAOIndirectLightingSaturation 1.2 //[0.0 to 3.0] Boosts IL saturation for more pronounced effect.
#define fMXAOSampleRadius 6.5 //[0.5 to 20.0] Sample radius of GI, higher values drop performance. Heavily depending on game, GTASA: 10 = GTA V: 40ish
#define iMXAOSampleCount 24 //[16 to 254] 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 iMXAOBayerDitherLevel 7 //[2 to 8] 2^ditherlevel: size of AO sampling pattern size. Lower values mean less distinctive sample dirs and haloing.
#define fMXAONormalBias 0.2 //[0.0 to 0.4] Normals bias to reduce self-occlusion of surfaces that have a low angle to each other.
#define bMXAOPerPixelNormalsEnable 1 //[0 or 1] TEST! Enables per pixel normals derived from color input so surfaces get some relief instead of being 100% flat.
#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 bMXAOBoundaryCheckEnable 1 //[0 or 1] Enables screen boundary check for samples. Can be useful to remove odd behaviour with too high sample radius / objects very close to camera. It comes with a slight fps drop.
#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.0 to 3.0] AO sharpness, higher means more sharp geometry edges but noisier AO, less means smoother AO but blurry in the distance.
#define fMXAOBlurSteps 2 //[2 to 7] Offset count for AO smoothening. Higher means more smooth AO but also blurrier AO.
#define fMXAOMipLevelIL 2 //[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 0 //[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.
//custom variables, depleted after Framework implementation.
#define AO_FADE____START 0.15 //[0.0 to 1.0] Depth at which AO starts to fade out. 0.0 = camera, 1.0 = sky. Must be lower than AO fade end.
#define AO_FADE____END 0.31 //[0.0 to 1.0] Depth at which AO completely fades out. 0.0 = camera, 1.0 = sky. Must be higher than AO fade start.
#define MXAO_TOGGLEKEY 0x90 //SPACEBAR
I really look forward to have it in Reshade 3 in future.
- Sunesha
Also in my never ending hope, NO Deus EX Human Revolution just work in pause menu. Only driver enforced HBAO works that you have to hex edit to work correctly.
- Marty McFly
- Topic Author
- WSH303
preprocessor error: redefinition of "RESHADE_DEPTH_LINEARIZATION_FAR_PLANE"
Am I doing it wrong ?
- Sunesha
I do not say is bad one. It works in the game. I will try it out bit more though. I just noticed that text looked weird directly. The text looks weird with just AO as it overlays on it. But I think there is nothing to do. Though my viewer people noticed that my game looks very nice. Also testing without other shader tools is hard to reevaluate. I am so used with nice contrast, colors and sharpening so game looks so plainMarty McFly wrote: Yeah well the per pixel normals grab whatever's onscreen so it also embosses your HUD, if visible^^ Reflective Bumpmapping does the same. As I said, it's a test.
I am though super happy. it looks better with the small details like grass and tree branches and that without costing more and even costing less performance
XCOM2 is bad candidate as it over lays tons gui stuff. I am curious, so I gonna try the new MXAO in Witcher 3 later in the week. I share my thoughts then.
- Sunesha
My settings, tried to match hbao+ ao intensity.
#define bMXAOIndirectLightingEnable 1 //[0 or 1] Enables Indirect Lighting calculation. Will cause a major fps hit.
#define fMXAOIndirectLightingAmount 3.5 //[0.0 to 8.0] Linearly increases IL intensity.
#define fMXAOIndirectLightingSaturation 1.2 //[0.0 to 3.0] Boosts IL saturation for more pronounced effect.
#define fMXAOSampleRadius 6.5 //[0.5 to 20.0] Sample radius of GI, higher values drop performance. Heavily depending on game, GTASA: 10 = GTA V: 40ish
#define iMXAOSampleCount 32 //[16 to 254] Amount of MXAO samples. Higher means more accurate and less noisy AO at the cost of fps.
#define bMXAOSmartSamplingEnable 0 //[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 iMXAOBayerDitherLevel 7 //[2 to 8] 2^ditherlevel: size of AO sampling pattern size. Lower values mean less distinctive sample dirs and haloing.
#define fMXAONormalBias 0.2 //[0.0 to 0.4] Normals bias to reduce self-occlusion of surfaces that have a low angle to each other.
#define bMXAOPerPixelNormalsEnable 0 //[0 or 1] TEST! Enables per pixel normals derived from color input so surfaces get some relief instead of being 100% flat.
#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 bMXAOBoundaryCheckEnable 1 //[0 or 1] Enables screen boundary check for samples. Can be useful to remove odd behaviour with too high sample radius / objects very close to camera. It comes with a slight fps drop.
#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.0 to 3.0] AO sharpness, higher means more sharp geometry edges but noisier AO, less means smoother AO but blurry in the distance.
#define fMXAOBlurSteps 3 //[2 to 7] Offset count for AO smoothening. Higher means more smooth AO but also blurrier AO.
#define fMXAOMipLevelIL 2 //[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 0 //[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 1 //[0 or 1] Enables raw AO/IL output for debugging and tuning purposes.
//custom variables, depleted after Framework implementation.
#define AO_FADE____START 0.6 //[0.0 to 1.0] Depth at which AO starts to fade out. 0.0 = camera, 1.0 = sky. Must be lower than AO fade end.
#define AO_FADE____END 0.9 //[0.0 to 1.0] Depth at which AO completely fades out. 0.0 = camera, 1.0 = sky. Must be higher than AO fade start.
#define MXAO_TOGGLEKEY 0x20 //SPACEBAR
PICTURES
- Sunesha
- Marty McFly
- Topic Author
For radii like these you can have boundary check unchecked (man my choice of words...) to get a lil more performance.
- Sunesha
Marty McFly wrote: Hm, considering that these AO implementations use the internal data and don't need normals etc precomputed, these are good numbers, I guess.
For radii like these you can have boundary check unchecked (man my choice of words...) to get a lil more performance.
Good to know. I kinda keep boundray check ckecked(using your words ) just because it helped me once, So now I leave it on, but will start checking it more later. I think MXAO did better than HBAO+ and game was built it in.
Though in this scene there wasn't much for IL todo.
- Marty McFly
- Topic Author
- Sunesha
- Marty McFly
- Topic Author
EDIT: Seems like the presence of other AO shaders screws up the rest. Idk how. So the new shader works if I use MXAO 1.2 along with it, one of the two is fucked up.
- Sunesha
- Martigen
What does Crosire say? I mean, does the issue lie in Resahde's compilation or the code itself?Marty McFly wrote: Apparently it is the case in the older shaders as well, just the old code did by accident not show this behaviour. Welp.
EDIT: Seems like the presence of other AO shaders screws up the rest. Idk how. So the new shader works if I use MXAO 1.2 along with it, one of the two is fucked up.
We needs it in 3.0! *throws sex, drugs and rock & roll at screen*
- Estebanium
I tried MXAO in Skyrim with ENB, but I got some really strange results. I copied Reshade to Skyrim folder and aktivated the dll in the enblocal.ini:
[PROXY]
EnableProxyLibrary=true
InitProxyFunctions=false
ProxyLibrary=ReShade32.dll
It is working ingame but it seems like it is not working very well. I have silhouettes of the ambient occlusion at the wrong position. So every five to ten seconds the screen is flickering, resulting in the first image. Then the screen turns to normal and it looks like it is working.
If you move your head then the AO silhouettes are at the wrong position, they move with the rotation of the camera, resulting in the second image. Any ideas?