3 Comments

FXAA in XNA

This might prove useful to someone. This is an XNA implementation of Timothy Lottes’ FXAA algorithm.

Here it is.

I’d tried it a while back (perhaps before he released his final version), and was never able to get good results – aesthetically or performance-wise.

I’m not sure what was different this time, but it really is nearly a “drop in” component. It took less than an hour to get it up and running on the PC and Xbox, and maybe 15 minutes to put it in my game. It looks good and is fast.

The default “quality” preset costs about 1.5ms on my GeForce GT 240, and the console version costs about 1ms on the Xbox 360.

I haven’t really played around with tweaking the values – I’ve just left everything at the suggested defaults. I’m using “green as luminance” for simplicity.

The only changes required were for the Xbox. XNA doesn’t support texture samplers with an exponent bias (as far as I can tell), so a small change needs to be made to the shader that adds a few divisions by constant values. Minor perf impact.

Here are two examples without FXAA (on the left) and with FXAA (on the right).

Advertisements

3 comments on “FXAA in XNA

  1. Excellent work. I have been looking around for a solution to this exact problem, i can’t thank you enough. Ever since I switched to using a deferred rendering system, I have noticed pixels everywhere.

    When I get it working, I’ll do a video.

    You are very kind.

  2. Cool, looking forward to seeing your results! FXAA is far from perfect, but it’s a decent compromise for deferred rendering…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Just another WordPress site

Just another WordPress.com site

The Space Quest Historian

Adventure game blogs, Let's Plays, live streams, and more

Harebrained Schemes

Developer's blog for IceFall Games

kosmonaut's blog

3d GFX and more

Halogenica

Turn up the rez!

bitsquid: development blog

Developer's blog for IceFall Games

Game Development by Sean

Developer's blog for IceFall Games

Lost Garden

Developer's blog for IceFall Games

Memories

Developer's blog for IceFall Games

Casey's Blog

Developer's blog for IceFall Games

Blog

Developer's blog for IceFall Games

Rendering Evolution

Developer's blog for IceFall Games

Simon schreibt.

Developer's blog for IceFall Games

Dev & Techno-phage

Do Computers Dream of Electric Developper?

- Woolfe -

Developer's blog for IceFall Games

Fabio Ferrara

Game Developer

Clone of Duty: Stonehenge

First Person Shooter coming soon to the XBOX 360

Low Tide Productions

Games and other artsy stuff...

BadCorporateLogo

Just another WordPress.com site

Sipty's Writing

Take a look inside the mind of a game developer.

%d bloggers like this: