Cloud Rendering Options

struct CloudRenderingOptions

These values control the rendering of clouds.

The table below includes the variables which can have the greatest effect in regards to visual fidelity, which will usually cause an increase in performance.

Performance Impact of Cloud Rendering Variables


Very High


Very High


Very High


Very High


Very High


Very High



RenderGridX + Y








Public Functions

base::Variant GetDefaultValue(uint64_t Enum) const
std::pair<base::Variant, base::Variant> GetValueRange(uint64_t Enum) const
base::Variant GetValue(uint64_t Enum) const
bool SetValue(uint64_t Enum, base::Variant value)
void WriteSettings(platform::core::Settings &settings)
void ReadSettings(platform::core::Settings &settings)
void SaveToFile(const std::string &fn)
void LoadFromFile(const std::string &fn)
void SaveToText(platform::crossplatform::TextOutput &ofs)
void LoadFromText(platform::crossplatform::TextInput &input)

Public Members

int MaximumCubemapResolution

Resolution to draw full-detail cloud buffer. Value should be a power of 2, typically 1/4 of screen width.

float CrepuscularRayStrength

Strength of crepuscular rays(godrays)

uint3 GodraysGrid

Grid size for the crepuscular(godrays) grid.

int MaxPrecipitationParticles

Maximum number of particles to render for precipitation.

float PrecipitationRadiusMetres

Radius over which to draw precipitation particles.

float RainFallSpeedMS

Speed of raindrops in m/s.

float RainDropSizeMm

Size of raindrops in mm.

float SnowFallSpeedMS

Speed of snowflakes in m/s.

float SnowFlakeSizeMm

Size of snowflakes in mm.

float PrecipitationWindEffect

Strength of wind effect on rain/snow.

float PrecipitationWaver

Strength of waver/sway of precipitation. Less noticeable for rain.

float PrecipitationWaverTimescaleS

Timescale in seconds of waver of precipitation.

float PrecipitationThresholdKm

Thickness of cloud required in to produce precipitation in Km.

bool AutomaticRainbowPosition

Whether the rainbow follows the antisolar/antilunar point, or is manually set.

float RainbowElevation

If the automatic positioning is disabled, this sets the elevation of the rainbow.

float RainbowAzimuth

If the automatic positioning is disabled, this sets the azimuth of the rainbow.

float RainbowIntensity

Controls the overall brightness of the rainbow.

float RainbowDepthPoint

The point at which the rainbow intersects the terrain.

bool AllowOccludedRainbow

Whether trueSKY should generate rainbows regardless of light occlusion.

bool AllowLunarRainbow

Whether trueSKY should generate rainbows using the moon’s light.

float EdgeNoisePersistence

Persistence of edge noise texture.

int EdgeNoiseFrequency

Frequency of edge noise texture.

int EdgeNoiseTextureSize

Size of edge noise texture.

float EdgeNoiseWavelengthKm

Wavelength of edge noise effect.

int WorleyTextureSize

Size of the 3D cell-noise texture used to generate clouds. Larger values use more GPU memory.

float CellNoiseWavelengthKm

Wavelength of cell noise effect.

float MaxFractalAmplitudeKm

Strength of edge noise effect.

float MaxCloudDistanceKm

Maximum distance to render clouds. Maximum value should be half of WindowScaleKm.

float RenderGridXKm

Minimum grid width for raytracing. Only in STANDARD_RENDERING RenderingMode.

float RenderGridZKm

Minimum grid height for raytracing. Only in STANDARD_RENDERING RenderingMode.

RenderingMode RaytraceMode

Method that the renderer will use to raytrace these clouds. Default option is DISTANCE_FIELD_STEP.

LightingMode lightingMode

Method that the renderer will use for clouds lighting. Default is STANDARD_LIGHTING

int DefaultNumSlices

Deprecated from 4.3 onwards. The number of raytracing steps to take when rendering clouds, larger values are slower to render.

int DefaultAmortization

If the cost of rendering is spread over frames. For 1, all pixels are drawn every frame, for amortization 2, it’s 2x2, etc.

int AtmosphericsAmortization

Same as DefaultAmortization but for atmospheric effects.

vec3 WindSpeedMS

Global wind speed in metres per second. Affects the movement and churn of the clouds.

bool RealTimeWind

Determines if Wind should use game time or real time for calculations.

float CloudThresholdDistanceKm

A heuristic distance to discard near depths from depth interpolation, improving accuracy of upscaling.

float CloudDepthTemporalAlpha

The alpha for temporal blending of the solid depth buffer into the buffer used for cloud rendering. If 1.0, update is instant.

float DirectLight

The amount of direct light to be used for rendering.

float IndirectLight

The amount of indirect or secondary light to be used for rendering.

float AmbientLight

The amount of ambient light to be used for rendering.

float Extinction

The amount of light scattered per metre - larger values produce darker clouds, default 0.05.

float MieAsymmetry

Mie scattering eccentricity.

float MinimumStarPixelSize

Smallest pixel width to use drawing stars.

float StarBrightness

Brightness multiplier for stars.

float CosmicBackgroundBrightness

Brightness multiplier for cosmic background.

int MaximumStarMagnitude

Largest magnitude of star to draw. Larger magnitudes are dimmer.

float VirgaNearThresholdKm

Minimum distance from the camera to draw virga (rain streaks)

vec3 CloudTint

Colour tint for all clouds. Only in VARIABLE_STEP_GRID.

vec2 WindowScaleKm

Scale of the cloud window in Km.

int2 WindowGrid

Size of the cloud window grid (number of steps) TODO: Does this need to be here? Or just have it in CloudWindow.

int2 PrecipitationGridDivisor

Divisor for the precipitation grid.

uint HighDetailMultiplier

Multiplier for grid density. Only in VARIABLE_STEP_GRID.

float HighDetailRangeKm

Range at which to apply increased grid steps. Only in VARIABLE_STEP_GRID.

float CloudShadowConstant
float CloudShadowMultiplier
float CloudShadowStrength

Strength of cloud shadow from 0-1.

VolumeUpdateMode volumeUpdateMode
bool IntegerPseudorandomNoise
bool DoCloudRaytraceLighting
int RaysPerVoxel
int MaxRayRecursionDepth
float NearCloudExtinctionPerKm = 4.0f
int2 SignedDistanceFieldDivisor

Divisor for the precipitation grid.

uint64_t checksum = 0

Public Static Functions

static uint64_t GetEnum(const char *txt_utf8)
enum simul::clouds::RenderingMode


enum simul::clouds::LightingMode


enum simul::clouds::VolumeUpdateMode


enumerator NEVER
enumerator SMOOTH
enumerator FULL
enumerator LAYERS