
Mirror Engine API / LightingParams
Class: LightingParams
Lighting parameters, allow configuration of the global lighting parameters. For details see Clustered Lighting.
Properties
atlasSplit
atlasSplit: null | number[] = null;
Atlas textures split description, which applies to both the shadow and cookie texture atlas. Defaults to null, which enables to automatic split mode. For details, see Configuring Atlas Split.
debugLayer
debugLayer: number
Layer ID of a layer to contain the debug rendering of clustered lighting. Defaults to undefined, which disables the debug rendering. Debug rendering is only included in the debug version of the engine.
areaLightsEnabled
Get Signature
get areaLightsEnabled(): boolean
Gets whether clustered lighting supports area lights.
Returns
boolean
Set Signature
set areaLightsEnabled(value: boolean): void
Sets whether clustered lighting supports area lights. Defaults to false.
Parameters
value
boolean
Returns
void
cells
Get Signature
get cells(): Vec3
Gets the number of cells along each world space axis the space containing lights is subdivided into.
Returns
Set Signature
set cells(value: Vec3): void
Sets the number of cells along each world space axis the space containing lights is
subdivided into. Defaults to [10, 3, 10]
.
Parameters
value
Returns
void
cookieAtlasResolution
Get Signature
get cookieAtlasResolution(): number
Gets the resolution of the atlas texture storing all non-directional cookie textures.
Returns
number
Set Signature
set cookieAtlasResolution(value: number): void
Sets the resolution of the atlas texture storing all non-directional cookie textures. Defaults to 2048.
Parameters
value
number
Returns
void
cookiesEnabled
Get Signature
get cookiesEnabled(): boolean
Gets whether clustered lighting supports cookie textures.
Returns
boolean
Set Signature
set cookiesEnabled(value: boolean): void
Sets whether clustered lighting supports cookie textures. Defaults to false.
Parameters
value
boolean
Returns
void
maxLightsPerCell
Get Signature
get maxLightsPerCell(): number
Gets the maximum number of lights a cell can store.
Returns
number
Set Signature
set maxLightsPerCell(value: number): void
Sets the maximum number of lights a cell can store. Defaults to 255.
Parameters
value
number
Returns
void
shadowAtlasResolution
Get Signature
get shadowAtlasResolution(): number
Gets the resolution of the atlas texture storing all non-directional shadow textures.
Returns
number
Set Signature
set shadowAtlasResolution(value: number): void
Sets the resolution of the atlas texture storing all non-directional shadow textures. Defaults to 2048.
Parameters
value
number
Returns
void
shadowsEnabled
Get Signature
get shadowsEnabled(): boolean
Gets whether clustered lighting supports shadow casting.
Returns
boolean
Set Signature
set shadowsEnabled(value: boolean): void
Sets whether clustered lighting supports shadow casting. Defaults to true.
Parameters
value
boolean
Returns
void
shadowType
Get Signature
get shadowType(): number
Gets the type of shadow filtering used by all shadows.
Returns
number
Set Signature
set shadowType(value: number): void
Sets the type of shadow filtering used by all shadows. Can be:
- SHADOW_PCF1_32F
- SHADOW_PCF3_32F
- SHADOW_PCF5_32F
- SHADOW_PCF1_16F
- SHADOW_PCF3_16F
- SHADOW_PCF5_16F
Defaults to SHADOW_PCF3_32F
Parameters
value
number
Returns
void