M MY Multiplayer: Wiki
Side
Kind

engineSetShadows

Client

Sets up the sun's shadows: how many cascades, their resolution and whether their edges are soft.

bool engineSetShadows(int cascades, int resolution [, bool soft = true])

Parameters

NameTypeDescription
cascadesintFrom 0 to 4. With 0, the sun casts no shadows. The default on PC is 4.
resolutionintPixels per side of the shadow map: a power of two from 512 to 8192. The default on PC is 4096.
softbooltrue softens the shadows' edges, false keeps them hard.default true

Returns

true if the setting was applied, false if the renderer is not running.

The setting applies to the whole client and stays after the resource stops.

Example

engineSetShadows(2, 2048, false)
Noteresolution must be valid even with 0 cascades. Values outside the limits raise an error.

See also