Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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.

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

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).

share|improve this answer
add comment

GPU Gems 2 has a chapter about atmospheric scattering. It's available online at
http://http.developer.nvidia.com/GPUGems2/gpugems2_chapter16.html
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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.