
4. Real-Time Volumetric Cloudscapes 107
Figure 4.14. The “base” cloud shape with coverage applied.
Here is how it looks in code:
// Cloud coverage is stored in weather data ’ s red channel .
float cloud_coverage = weather_data . r ;
// Use remap to apply the cloud coverage attribute .
float base_cloud_with_coverage = Remap ( base_cloud ,
cloud_coverage , 1.0 , 0.0 , 1.0) ;
// Multiply the result by the cloud coverage attribute so
// that smaller clouds are lighter and more aesthetically
// pleasing .
base_cloud_with_coverage ∗= cloud_coverage ;
The result of these steps is shown in Figure 4.14. The base cloud is still low
detail but it is beginning to