I’m having a bit of an issue combining the left for dead temporal AA with transparent items drawn afterwards.
Since the transparent items pose a sorting issue and their motion is fairly complex, I want to exclude them from TAA. The shader for the transparent items will just use screen space derivatives to make the transparent objects perfectly anti-aliased anyway.
So, top image, TAA disabled. You can see the opaque parts miss AA, but the green dashed line has AA applied inherently by the shader.
The middle image shows the same with TAA enabled (after all rendering.) I disabled the animation for the screenshots, so there are no artifacts visible now. But in motion, the artifacts appear.
So then I decided to move the TAA in between the opaque rendering and the green overlay line (drawn at queue 3000, Transparent.) This is the bottom image. Somehow the green overlay line doesn’t seem to be drawn after the TAA at all, but there is a weak shimmer of it still visible.
The TAA in question calculates a velocity buffer OnPostRender. The color is blended with the previous frame in OnRenderImage (which is set to ImageEffectOpaque.) Storing the current frame for usage in the next frame is done in the same pass using mrt.
I’ve looked at Z-buffer and color blending issues, but that doesn’t seem to be the problem. Am I missing something here? By the still visible shimmer, it seems that the green overlay is rendered either in the current frame or in the previous frame. Since blending and frame storage happen in the same pass, that should not be possible.
