[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Public WebGL] Antialiasing being disabled on some Mac OS hardware
I agree with Ken that FXAA isn't an appropriate MSAA replacement in all cases, but it's an intriguing thought nonetheless.
One interesting approach is that the nature of FXAA and friends means that if you really wanted it a developer could add it to their WebGL app without the need for browser support. It could also be reasonable to inject a Post-process AA method into almost any WebGL canvas via a browser extension. I've actually looked into building something like that before and it appears that the biggest stumbling block is detecting when a frame is finished and about to be presented to the screen, which is the point that you want to run your AA pass. You can reasonably guess at when that will happen by shoving some hooks into setTimeout/requestAnimationFrame (which is what extensions like Ben Vanik's WebGL Inspector are forced to do), but that won't catch things like rendering that's triggered by mouse or keyboard input. Still, it would be appropriate for most apps, and if we could get a "about to present" event from the browser it could be made 100% reliable.
Of course, a browser extension isn't as desirable as having built-in support for a feature, and it doesn't address the desire to have deeper access to hardware AA methods, but it could function as a useful stop-gap solution for individuals who are willing to make the visual trade-offs involved.
PS: For anyone on the mailing list not familiar with FXAA read up on it here
. Or check out a similar technique, SMAA