Shadow

gfx.shadow.reset

Client

Restores all shadow settings to the values the engine started with

Syntax

local status = gfx.shadow.reset()

Shadow settings are also restored automatically when the session ends.

  • Automatic — leaving the server restores the startup values, no manual cleanup is required.
  • Manual — call this to offer a restore defaults option, for example in a graphics settings menu.
  • Scope — covers the directional atlas, positional atlas, filter qualities and 2D shadow texture.

Parameters

No parameters are accepted by this function

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

Restore all shadow settings
gfx.shadow.reset()
Apply a quality preset and restore it later
-- Apply a high quality preset
gfx.shadow.set_directional_atlas_size(8192)
gfx.shadow.set_directional_filter_quality(gfx.shadow.quality.HIGH)
gfx.shadow.set_positional_filter_quality(gfx.shadow.quality.HIGH)

-- Back to the engine defaults
gfx.shadow.reset()

On this page