Anti-Aliased Image

Ok so looking through the 4.0.2 SDK samples it seems that the anti-aliasing technique is sub-pixel jittering, I’ve looked through the technique, understand it and implemented it in my little test app and it works fine.

The problem is that it’s an accumulation technique that works over a number of frames, so when I render directly to a file the image receives no anti-aliasing as I’m only rendering one frame. Is the only way to get around this to render multiple frames before I save to a file ? Or is there a better technique I could be using.

I realise that’s an open question probably with a lot of answers so I guess what I’m asking is, is there another simple/quick technique I can implement ?

With progressive rendering you’ll get the benefit of antialiasing basically for free because each sample should pick some other subpixel location and gets perfect coverage over time.

If your rendering is finished in a single frame you could fallback to the usual post-processing antialiasing techniques used in rasterization.

You would normally apply things like FXAA (search the web for its shader code) to the tone-mapped low dynamic range image as a post-process for example. That won’t work in HDR because very bright pixels e.g. from lights will always result in sharp edges.

Ok thanks, yeah FXAA is something I’m very familiar with and have implemented before in my company’s main renderer, was just wondering if there were ray-trace specific techniques.

If you don’t want to render multiple frames, you’re also free to put a for-loop in your ray-gen program and shoot a bunch of rays through each pixel in a single launch. In that case you can also distribute the subpixel samples using, for example, stratified sampling, which will converge faster than the pure random sampling we use in the SDK.