PostProcessing out of sync

I’ve always noticed a small delay on postprocessing that leads to visible artifacts when composing the images. This is what happens, with a dramatic exaggeration due to slowed fps, added for emphasis and laughs:

On higher FPS and slow motion it’s okay, but with slower framerates and faster motion things get awkward.

Any ideas of what could be causing this lack of sync? This is a PostProcessing pipeline using a variation of the old OceanPP, with scene.enableDepthRenderer and a PassPostProcess.

I’m guessing the depth buffer is not properly synced and uses the previous frame instead of the current one, but I’ve no idea how that could happen.

Spector is your best friend here :slight_smile:

Maybe the depth renderer creates its texture after you use it in a shader, in effect using the previous one and not the current one. But if you are using the depth buffer in a post process that should not happen… That’s why Spector may help finding the problem.