Vital.sandbox
GFXFog

gfx.fog.set_depth_curve

Client

The depth curve to be set for the fog post-processing effect


Syntax

local status = gfx.fog.set_depth_curve(value)

Only available when the fog mode is set to depth mode. Refer gfx.fog.set_mode to configure the active fog mode.

Parameters

TypeNameDescription
floatvalueDepth curve value to be applied
Controls the rate at which fog density increases between the depth begin and end points. Higher values cause fog to build up more aggressively near the end distance, while lower values spread the transition more evenly

Returns

TypeNameDescription
boolstatustrue on successful execution, or false on failure

Examples

Apply an aggressive fog falloff toward the far end
--Apply an aggressive fog falloff toward the far end
gfx.fog.set_depth_curve(1.5)

On this page