User Guide (Version 1.13)

Common.Cloud Shader

The Common.Cloud shader is used exclusively for 3D clouds. It uses per-vertex gradient lighting and takes the sun, cloud and viewer positions into account. Gradient lighting interpolates between the bright color, which is calculated from the HDR Sun color multiplier, and the dark color, which is calculated from the HDR Sky color multiplier. In addition, rim lighting is also applied on a per-pixel basis to capture the effects of light scattering seen when looking at clouds being lit by the sun from behind.

3D clouds use soft clipping to gradually fade in and out at the near and far clipping plane. This prevents rendering artifacts in the far distance and flickering due to cloud particles entering and leaving the view cone near the camera during a flythrough. Additionally, clouds blend softly against opaque scene geometry.

Shader Parameters


Defines the angular attenuation factor for rim lighting. The smaller the value the more widespread the rim lighting effect for clouds (partially) covering the sun becomes from the viewer's point of view.

Default value: 30


Defines how much to scale rim lighting. Higher values increase the glow of cloud edges.

Default value: 1


Defines the slope of the ramp function used to blend in rim lighting. Higher values create harder transitions.

Default value: 1


Defines the cloud's opacity threshold value below which the rim lighting effect is applied. Higher thresholds cause the rim lighting to grow inward.

Default value: 0.4


Controls brightness of clouds in high dynamic range image format (HDR) (relative to low dynamic range image format (LDR)).

Default value: 1

On this page: