Scatterer icon indicating copy to clipboard operation
Scatterer copied to clipboard

Scatterer's TAA interferes with HDR in TUFX

Open JonnyOThan opened this issue 3 years ago • 7 comments

When scatterer's TAA is enabled, HDR in TUFX is much less effective:

Scatterer not installed; HDR & Bloom on: no scatterer, HDR and bloom on

Scatterer installed, TAA off, HDR & Bloom on: scatterer taa off, hdr   bloom on

Scatterer installed, TAA on (default), HDR & Bloom on: scatterer taa, hdr and bloom on

JonnyOThan avatar Sep 11 '22 14:09 JonnyOThan

Can you just use tufx's taa in that case?

LGhassen avatar Sep 11 '22 15:09 LGhassen

Yes, and that's what I do, but this was reported as a bug in the tufx forum thread. I might take a look if I get tired of VR stuff.

JonnyOThan avatar Sep 11 '22 17:09 JonnyOThan

Ok well two things come to mind: the textures scatterer uses as flip flop buffers for TAA may not be 16bit (not sure about this I may have a switch for this), and the order operations are done may be so that the screen copy is done before bloom is applied, then antialiased results are copied to the screen after bloom is applied, removing it. I haven't checked to confirm these ideas.

LGhassen avatar Sep 12 '22 08:09 LGhassen

My hunch is the first thing: a render target somewhere isn't being created as HDR when necessary. If I enable scatterer's TAA and turn the bloom threshold way down, the bloom still functions.

JonnyOThan avatar Sep 12 '22 12:09 JonnyOThan

It appears to be the case https://github.com/LGhassen/Scatterer/blob/master/scatterer/Effects/AntiAliasing/TemporalAntiAliasing.cs#L162

Jus add an if(camera.hdr) and change argb32 to argbhalf in that case.

And btw you didn't have issues with taa in vr?

LGhassen avatar Sep 12 '22 13:09 LGhassen

Good question, I'm pretty sure I'm only using TUFX's version of TAA which supports multiple eyes. For reference: https://github.com/LGhassen/Scatterer/blob/3124f0cbaa051d77bdfb548bcc2ee054f8b36411/scatterer/Effects/AntiAliasing/TemporalAntiAliasing.cs#L28 vs https://github.com/shadowmage45/TUFX/blob/db7c97f8dd00968a954c92a29e1677100a1c3ab9/Plugin/TUFX/PostProcessing/Effects/TemporalAntialiasing.cs#L73

JonnyOThan avatar Sep 12 '22 15:09 JonnyOThan

Yeah VR was the last thing on my mind when I adapted this 😅

LGhassen avatar Sep 12 '22 16:09 LGhassen