The TAARenderingPipeline has stopped working since version 8.24.1 when using a MultiRenderTarget in the pipeline. I have tested on 8.25.0 and above but still encounter the issue. It works as expected on versions prior to 8.24.0.
This playground demonstrates the issue. Commenting out the line which adds the MultiRenderTarget to the camera makes TAA apply as expected.
Iāve noticed that there still appears to be an issue with TAA when both a Multi Render Target and a Post Process is used. The sandbox demonstrates the problem. Seems like any post process causes it.
Hmm, I see. Needing to have the TAA first in the pipeline seems to not work with my edge rendering technique.
The screenshots are an example of a post process edge detection shader which prior to version 8.24, worked quite nicely with the TAA, but it appears that since this is a post process technique it is no longer captured by the TAA shader.
Iāve included a playground with a simplified version of the edge detection shader that shows that the TAA isnāt able to anti-alias the edges themselves.
Additional bonus: you can also set taa.disableOnCameraMove = false; to keep TAA even if the camera moves, as the new options get rid of the ghosting effect (see Babylon.js docs).
Sorry to continue to bother you about this. Iāve noticed that there is potentially a bug in the reprojectHistory mechanism that causes a ātoo much recursionā error to occur sometimes.
It happens here when I comment out the line that adds the standard material:
And it happens here when I add TAA before the meshes are created:
Another thing Iāve noticed, which is not necessarily a bug but itās inconvenient, is that reprojectHistory breaks materials that use layout (location = 1) as an output because presumably the motion vector texture is bound to that location and causes a conflict.
There is a reentrancy issue with the default scene material and material plugins when the material plugins are registered before the default material is created. The easiest way to resolve this issue is to create this material immediately after creating the scene by executing scene.defaultMaterial;:
Pre-pass rendering must be enabled to generate the motion vector texture, so it will use (at least) one additional texture for this. You will need to take this into account if you want to generate an additional output texture yourself.
Hi, sorry to revisit this. There still seems to be an issue with Material Plugins and reproject history, or perhaps Iām misunderstanding something. If you comment out line 23 here the material behaves correctly but with it enabled it is like the plugin material isnāt applied at all.