Namespaces

Variants
Actions

Anti-aliasing with FXAA

From Cycling '74 Wiki
Revision as of 17:22, 24 October 2013 by Rob@robtherich.org (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Rendering an OpenGL scene to a texture (RTT) offers many advantages to refine the look of your output, however it comes at the cost of losing hardware anti-aliasing (eg jit.window @fsaa 1 has no effect on the output).

Fortunately, there is an easy solution. Simply pass the final output texture through an FXAA shader. http://en.wikipedia.org/wiki/Fast_approximate_anti-aliasing

The patch shown below demonstrates this technique.

fxaa1.png

Downsample

If you're still not satisfied with the AA, you can refine further by rendering your scene to a texture at double resolution, and downsampling using filtering before applying the FXAA.

fxaa2.png

Patches and the FXAA shader are attached.

Media:fxaa-examples.zip