API

Class FrameGraphVolumetricLightingTask

A frame graph task that performs volumetric lighting.

Hierarchy (View Summary)

Index
dependencies?: Set<FrameGraphTextureHandle>

The (texture) dependencies of the task (optional).

depthTexture: FrameGraphTextureHandle

The depth texture used for volumetric lighting calculations. It must be the depth texture used to generate targetTexture.

enableExtinction: boolean

Whether to enable extinction in the volumetric lighting effect (default: false). Read-only property set in the constructor.

light: DirectionalLight

The directional light used for volumetric lighting.

lightingVolumeMesh: FrameGraphObjectList

The mesh representing the lighting volume. This is the mesh that will be rendered to create the volumetric lighting effect.

lightingVolumeTexture?: any

The lighting volume texture (optional). If not provided, a new texture will be created, with the same size, format and type as targetTexture. This is the texture that will store the volumetric lighting information, before being blended to targetTexture.

onAfterTaskExecute: Observable<FrameGraphTask> = ...

An observable that is triggered after the task is executed.

onBeforeTaskExecute: Observable<FrameGraphTask> = ...

An observable that is triggered before the task is executed.

onTexturesAllocatedObservable: Observable<FrameGraphRenderContext> = ...

An observable that is triggered after the textures have been allocated.

outputTexture: FrameGraphTextureHandle

The output texture of the task. It will be the same as targetTexture.

sourceSamplingMode: any = Constants.TEXTURE_BILINEAR_SAMPLINGMODE

The sampling mode to use when blending the volumetric lighting texture with targetTexture.

targetTexture: FrameGraphTextureHandle

The target texture to which the volumetric lighting will be applied.

  • Returns whether volumetric lighting is supported by the engine.

    Parameters

    • engine: AbstractEngine

      The engine to check for volumetric lighting support.

    • enableExtinction: boolean = false

      Whether the extinction/dual-source blending path will be used.

    Returns any

    True if volumetric lighting is supported, false otherwise.