Hi,
What's the best way to handle drastic changes in scene charateristics with the new MTLFXTemporalDenoisedScaler?
Let's say a visible object of the scene radically changes its material properties. I can modify the albedo and roughness textures consequently. But I suspect the history will be corrupted. Blending visual information between the new frame and the previous ones might be a nonsense.
I guess the problem should be the same when objects appear or disappear instantly.
Is the upsacler manage these events for us (by lowering blending), or should we use the reactive or the denoise strength mask or something like that to handle them?
Following up on my prior reply: for the cases you described, the answer is to use the scaler's history-reset property. Set it to true on the frame where the prior history is no longer applicable. The scaler will then discard accumulated state before evaluating the next frame.
MTLFXTemporalScaler(non-denoised, iOS 16+ / macOS 13+):resetonMTLFXTemporalScalerBase. https://developer.apple.com/documentation/metalfx/mtlfxtemporalscalerbase/resetMTLFXTemporalDenoisedScaler(denoised, iOS 26+ / macOS 26+):shouldResetHistoryonMTLFXTemporalDenoisedScalerBase. https://developer.apple.com/documentation/metalfx/mtlfxtemporaldenoisedscalerbase/shouldresethistory