Engine API Reference - v2.25.0-beta.0
    Preparing search index...

    Class LightingParams

    Lighting parameters, allow configuration of the global lighting parameters. For details see Clustered Lighting.

    Index
    atlasSplit: number[] | null = 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: 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.

    • get areaLightRectEnabled(): boolean

      Gets whether clustered lighting supports area lights of rectangular shape.

      Returns boolean

    • set areaLightRectEnabled(value: boolean): void

      Sets whether clustered lighting supports area lights of rectangular shape (LIGHTSHAPE_RECT). The lit shaders only include the code of the enabled area light shapes, so disabling the shapes a scene does not use makes them faster to compile, most noticeably on Windows. Area lights of a disabled shape are rendered as punctual lights. Only used when LightingParams#areaLightsEnabled is true. Defaults to true.

      Parameters

      • value: boolean

      Returns void

    • get cookieAtlasResolution(): number

      Gets the resolution of the atlas texture storing all non-directional cookie textures.

      Returns number

    • 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

    • get maxLights(): number

      Gets the maximum number of lights the clustered lighting can use in a single frame.

      Returns number

    • set maxLights(value: number): void

      Sets the maximum number of lights the clustered lighting can use in a single frame. Lights over this limit are ignored, and a warning is reported.

      Values up to 255 store the light index in the light grid using 8 bits, larger values use 16 bits and so double the size of the texture the grid is stored in. Defaults to 255.

      Parameters

      • value: number

      Returns void

    • get shadowAtlasResolution(): number

      Gets the resolution of the atlas texture storing all non-directional shadow textures.

      Returns number

    • 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