self:set_shadow_mode

Client

Sets the shadow rendering mode of the directional light


Syntax

local status = self:set_shadow_mode(
    mode
)

Parameters

TypeNameDescription
intmodeShadow mode enum value — refer to light.directional.shadow_mode

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

Enable 4-split cascade shadows on a directional light
local entity = light.directional.create()

entity:set_shadow_mode(light.directional.shadow_mode.PARALLEL_4_SPLITS)

On this page