Shadow
gfx.shadow.set_canvas_texture_size
ClientSets the size of the 2D shadow texture
Syntax
local status = gfx.shadow.set_canvas_texture_size(
size
)Only 2D light shadows are affected.
- Shared — the texture is shared by every 2D light with shadows.
- 3D lights — not affected, see
gfx.shadow.set_directional_atlas_sizeandgfx.shadow.set_positional_atlas_size. - Default —
2048.
Parameters
| Type | Name | Description |
|---|---|---|
int | size | Texture size in pixels Must be between 256 and 16384, values that are not a power of two are rounded up to the next oneAn error is raised if the value is out of range |
Returns
| Type | Name | Description |
|---|---|---|
bool | status | true on successful execution, false otherwise |
Examples
gfx.shadow.set_canvas_texture_size(4096)