API

Class FrameGraphObjectRendererTask

Task used to render objects to a texture.

Hierarchy (View Summary)

Index
  • Constructs a new object renderer task.

    Parameters

    • name: string

      The name of the task.

    • frameGraph: FrameGraph

      The frame graph the task belongs to.

    • scene: Scene

      The scene the frame graph is associated with.

    • Optionaloptions: any

      The options of the object renderer.

    • OptionalexistingObjectRenderer: ObjectRenderer

      An existing object renderer to use (optional). If provided, the options parameter will be ignored.

    Returns FrameGraphObjectRendererTask

dependencies?: Set<FrameGraphTextureHandle>

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

depthTest: boolean = true

If depth testing should be enabled (default is true).

depthTexture?: any

The depth attachment texture where the objects will be rendered (optional).

depthWrite: boolean = true

If depth writing should be enabled (default is true).

disableShadows: boolean = false

If shadows should be disabled (default is false).

isMainObjectRenderer: boolean = false

Sets this property to true if this task is the main object renderer of the frame graph. It will help to locate the main object renderer in the frame graph when multiple object renderers are used. This is useful for the inspector to know which object renderer to use for additional rendering features like wireframe rendering or frustum light debugging. It is also used to determine the main camera used by the frame graph: this is the camera used by the main object renderer.

objectList: FrameGraphObjectList

The list of objects to render.

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.

outputDepthTexture: FrameGraphTextureHandle

The output depth attachment texture. This texture will point to the same texture than the depthTexture property if it is set. Note, however, that the handle itself will be different!

outputTexture: FrameGraphTextureHandle

The output texture. This texture will point to the same texture than the targetTexture property. Note, however, that the handle itself will be different!

resolveMSAAColors: boolean = true

If true, targetTexture will be resolved at the end of the render pass, if this/these texture(s) is/are MSAA (default: true)

resolveMSAADepth: boolean = false

If true, depthTexture will be resolved at the end of the render pass, if this texture is provided and is MSAA (default: false).

shadowGenerators?: FrameGraphShadowGeneratorTask[] = []

The shadow generators used to render the objects (optional).

targetTexture: any

The target texture(s) where the objects will be rendered.

  • 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.

  • Records the object renderer task into the frame graph.

    Parameters

    • skipCreationOfDisabledPasses: boolean = false

      defines whether disabled passes should be skipped

    • OptionaladditionalExecute: (context: FrameGraphRenderContext) => void

      defines an optional callback executed by the pass

    Returns FrameGraphRenderPass

    the recorded render pass

  • Sets the output layer and face indices for multi-target rendering.

    Parameters

    • indices: LayerAndFaceIndex[]

      The array of layer and face indices.

    Returns void