Vital.sandbox
GFXFog

gfx.fog.set_depth_end

Client

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


Syntax

local status = gfx.fog.set_depth_end(value)

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

  • Depth mode required — calling this function in any other fog mode will have no effect
  • Recommended usage — set depth_end greater than depth_begin to define a valid and visible fog transition range

Parameters

TypeNameDescription
floatvalueDepth end value to be applied
Sets the distance from the camera at which depth-based fog reaches full density. Geometry beyond this distance will be completely obscured by fog

Returns

TypeNameDescription
boolstatustrue on successful execution, or false on failure

Examples

Fully obscure geometry beyond 200 units
--Fully obscure geometry beyond 200 units
gfx.fog.set_depth_end(200.0)

On this page