Cloud Rendering Sample Updated

Published on August 31 , 2014

This release is the update to the previously published cloud rendering sample and features a number of important improvements:

  • Better lighting model
    • Light attenuation in the body of the cloud is now computed using the 3D lattice. Attenuation is computed by ray marching the cloud density field stored in another 3D lattice. Compared to the original method, this new approach gives more accurate results and is less computationally expensive
    • Real-time shading model has been reworked and now incorporates better approximation for single and multiple scattering as well as for ambient light
  • New particle generation algorithm
    • The algorithm now uses cloud density 3D lattice to emit particles in voxels with non-zero density
  • Performance improvements
    • Only one fetch from a 3D texture instead of four is now required to load the pre-computed scattering from the look-up table
    • Computing light attenuation does not require tiling and particle rasterization
    • Particle sorting is performed entirely on the GPU and does not require sorting empty cells and serializing them using the geometry shader

There will be a chapter in the upcoming GPU Pro 6 that will thoroughly describe the technique. The full sample source code is available on GitHub. It can also be downloaded using this direct link

Below are some images generated by the sample:

This short video clip also demonstrates the technique:


Product and Performance Information


Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserverd for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804