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
| Name | Type | Description |
|---|---|---|
| cascades | int | From 0 to 4. With 0, the sun casts no shadows. The default on PC is 4. |
| resolution | int | Pixels per side of the shadow map: a power of two from 512 to 8192. The default on PC is 4096. |
| soft | bool | true 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)Note
resolution must be valid even with 0 cascades. Values outside the limits raise an error.