I want to add some nice atmospheric scattering to my 3D game engine but I am very concerned with conserving resources. I am not very familiar with how its done but can someone please give me some suggestions how to achieve this effect without using too many resources? For example, should I use precomputed or real time atmospheric scattering. Also is the effect worth it without HDR or is it practically needed.
HDR isn't always necessary. A lot of the time you can get away with compressing your output values in the pixel shader. Essentially you're just doing the tone-mapping in a single pass, so you have HDR rendering without a wide pixel buffer. This makes it trickier to know what values you should use for the tone-mapping, and certainly makes it tough to do a localised effect. However if you use feedback from the previous frame, you can adjust the values over time, and that can actually aid the visual effect as it looks like an eye adjusting to the brightness changes over time.
Doesn't work well with anything multi-pass, including alpha-blending, unless you special case those (if you're using alpha-to-coverage, it's not too bad, though you'll be linearly blending values which have been non-linearly mapped into RGB space).
GPU Gems 2 has a chapter about atmospheric scattering. It's available online at
I have no experience with it so can't really answer your question further :o\
Edited to add: GPU gems 1,2 and 3 (and the CG programming guide, which ain't bad either) are available in their entirety over at NVidia's site. They're pretty nice.