I guess it’s more correct to say that the drawing buffer has an alpha channel when you set the flag to true. But yes, eventually this enables a real composition of the canvas with its background defined by the web page.
It seems this is an issue of how FXAA works. I suggest you study the semantic of the define FXAA_GREEN_AS_LUMA:
It seems there is no AA on transparent pixels with no color. Whatever setting you choose.
BTW: What is your reason for setting preserveDrawingBuffer to true?
This is not applicable to the current example, but I wanted the fiddle to represent our code one-to-one. In our application we are using preserveDrawingBuffer: true to be able to take screenshots of the canvas at a given point in time by doing: canvas.toDataURL('image/png').
Setting preserveDrawingBuffer: false didn’t allow us to capture the screenshot of the canvas using toDataURL. Is having this set to truea performance concern?
As I understand it, this is not something that can be done with FXAA since it works by blending colors together. When you have transparent pixels there’s no way for the shader to know what the color behind the image is, so it cannot perform blending.