API

Class FrameGraphSelectionOutlineLayerTask

Task which applies a selection outline effect to a texture.

Hierarchy

  • FrameGraphBaseLayerTask
    • FrameGraphSelectionOutlineLayerTask
Index
dependencies?: Set<FrameGraphTextureHandle>

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

depthTexture: any

The depth texture to use when rendering the selection outline layer. It must store the scene depth in camera view space Z, normalized or not. If not normalized, the storeCameraSpaceZ option must be passed to the constructor. Required only when layer.useDepthOcclusion is true and layer.occlusionStrength is greater than zero.

layer: ThinSelectionOutlineLayer

The selection outline layer object. Use this object to update the selection outline layer properties (e.g. intensity, blur kernel size).

layerTexture?: any

The layer texture to render the effect into. If not provided, a default texture will be created.

objectRendererTask: FrameGraphObjectRendererTask

The object renderer task used to render the objects in the texture to which the layer will be applied. This is needed because the layer may have to inject code in the rendering manager used by object renderer task.

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 (same as targetTexture, but the handle will be different).

targetTexture: FrameGraphTextureHandle

The target texture to apply the effect layer to. The effect will be blended with the contents of this texture.

  • This function is called once after the task has been added to the frame graph and before the frame graph is built for the first time. This allows you to initialize asynchronous resources, which is not possible in the constructor.

    Returns Promise<unknown>

    A promise that resolves when the initialization is complete.