TL;DR: I’m looking for a way to get a ~2ms SSAO pass on PS4 at 1080p that isn’t super dithered without TemporalAA.
I’m working on a project that relies heavily on SSAO for local shadows and I’ve run into a bit of a problem. We can only run a single pass of SSAO on our PS4 build for performance as well as FXAA rather than Temporal - a bad combination for the default settings of the SSAO shader. Here’s an example (I’ve blown up the image 2x):
As you can see the 4x4 pattern used for temporal AA smoothing is very obvious here. I took the liberty of checking out PostProcessAmbientOcclusion.usf to see if there was anything I could mess with to change the bluring settings and I happened upon ths:
// AO_SAMPLE_QUALITY = 0 : no AO sampling, only upsampling
// AO_SAMPLE_QUALITY = 1 : no dither/per pixel randomization
// AO_SAMPLE_QUALITY = 2 : efficient high frequency 4x4 pattern without jitter for TemporalAA
// AO_SAMPLE_QUALITY = 3 : efficient high frequency 4x4 pattern with jitter for TemporalAA
I set the default to 1 and recompiled. I had a number of compile errors regarding a variable “bDebugLookups”. I wasn’t sure if that variable even existed anymore so I commented out everything the would have run if that was set to true and I was able to get the shader compiled, netting me this:
I haven’t checked the frame time difference yet, but it definitely removed the 4x4 pattern. However, I’m getting some seriously weird ghosting problems with AO now:
Is there something obvious I missed here? Is there a better way to remove the dependency on TemporalAA from SSAO? I would gladly sacrifice detail or resolution over the dithered look. This is all on 4.12.3