Downloads

This is an update of my previous work, with the source code and projects refactored and cleaned up. I don't get paid to work on this, and I don't have much time to spend on it, so the demos are not very polished. Think of them as proof-of-concept demos. The source code is published under the BSD license (not counting any third-party libraries I'm using), so you are free to do what you want with it.

The source code zip comes with a Readme.rtf. I don't like writing documentation, but I don't like repeating myself a few hundred times either, so read the Readme!

Card-specific issues with the GLSL shaders:

  • ATI cards do not support sampler2DRect in GLSL, so the current grass and HDR implementations don't work on ATI cards. The demos should still run, but HDR rendering will be disabled and the grass billboards may not render properly. You should be able to fix this by changing the textures to be power-of-two textures.
  • Radeon 9600-level cards do not support loops in GLSL unless the compiler can unroll them. This means that the scattering shaders won't work on these cards unless you change nSamples and fSamples from uniform variables to constants. (This is very easy to change, but you must change it in each of the scattering vertex shaders.)
  • GeForce FX-level cards do not have enough registers for the scattering shaders when the loop is unrolled. This means that nSamples and fSamples must be uniform parameters in the scattering shaders for them to work on this card.
  • Although HDR rendering works on GeForce FX cards, they don't support features like alpha test or blend in floating-point buffers, so for now HDR is only enabled for the GeForce 6000 series.
  • All nVidia cards exhibit very noticeable visual artifacts in the Mie scattering (the glow in and around the sun). The problem does not exist on the Radeon 9600. Even the guys at nVidia couldn't help me with this one when we were working on the GPU Gems 2 article.

Project Downloads