API

Class FrameGraphGeometryRendererTask

Task used to render geometry to a set of textures.

Hierarchy (View Summary)

Index
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).

dontRenderWhenMaterialDepthWriteIsDisabled: boolean = true

Indicates if a mesh shouldn't be rendered when its material has depth write disabled (default is true).

geometryAlbedoTexture: FrameGraphTextureHandle

The albedo output texture. Will point to a valid texture only if that texture has been requested in textureDescriptions!

geometryIrradianceTexture: FrameGraphTextureHandle

The irradiance output texture. Will point to a valid texture only if that texture has been requested in textureDescriptions!

geometryLinearVelocityTexture: FrameGraphTextureHandle

The linear velocity output texture. Will point to a valid texture only if that texture has been requested in textureDescriptions! Built-in CPU/GPU particles write neutral velocity (0, 0); their motion is not represented.

geometryLocalPositionTexture: FrameGraphTextureHandle

The position (in local space) output texture. Will point to a valid texture only if that texture has been requested in textureDescriptions!

geometryMeshBlendTagTexture: FrameGraphTextureHandle

The packed, single-sample R8UI mesh-blending tag output texture for WebGL2 and WebGPU.

Opaque, alpha-tested, and caller-selected transparent meshes are supported.

geometryNormViewDepthTexture: FrameGraphTextureHandle

The normalized depth (in view space) output texture. Will point to a valid texture only if that texture has been requested in textureDescriptions! The normalization is (d - near) / (far - near), where d is the depth value in view space and near and far are the near and far planes of the camera.

geometryObjectIdTexture: FrameGraphTextureHandle

The object ID output texture. Will point to a valid texture only if that texture has been requested in textureDescriptions! RGBA unsigned byte textures store 24-bit IDs, while RED unsigned byte textures store 8-bit IDs. Decode RED values with round(value * 255.0).

geometryReflectivityTexture: FrameGraphTextureHandle

The reflectivity output texture. Will point to a valid texture only if that texture has been requested in textureDescriptions!

geometryScreenDepthTexture: FrameGraphTextureHandle

The depth (in screen space) output texture. Will point to a valid texture only if that texture has been requested in textureDescriptions!

geometryVelocityTexture: FrameGraphTextureHandle

The velocity output texture. Will point to a valid texture only if that texture has been requested in textureDescriptions! Built-in CPU/GPU particles write neutral velocity (0.5, 0.5); their motion is not represented.

geometryViewDepthTexture: FrameGraphTextureHandle

The depth (in view space) output texture. Will point to a valid texture only if that texture has been requested in textureDescriptions!

geometryViewNormalTexture: FrameGraphTextureHandle

The normal (in view space) output texture. Will point to a valid texture only if that texture has been requested in textureDescriptions!

geometryWorldNormalTexture: FrameGraphTextureHandle

The normal (in world space, encoded from [-1, 1] to [0, 1]) output texture. Will point to a valid texture only if that texture has been requested in textureDescriptions!

geometryWorldPositionTexture: FrameGraphTextureHandle

The position (in world space) output texture. Will point to a valid texture only if that texture has been requested in textureDescriptions!

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

samples: number = 1

The number of samples to use for the output textures (default is 1).

shadowGenerators?: FrameGraphShadowGeneratorTask[] = []

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

size: { height: number; width: number } = ...

The size of the output textures (default is 100% of the back buffer texture size).

sizeIsPercentage: boolean = true

Whether the size is a percentage of the back buffer size (default is true).

targetTexture: any

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

The list of texture descriptions used by the geometry renderer task.

  • get meshBlendTagProvider(): any

    Provides the packed mesh-blending tag written for each rendered mesh.

    Tags must be 0 or contain a group ID between 1 and 63 in their low six bits. Tag 0 disables mesh blending. By default, meshes use their meshBlendingTag property. Instances and thin instances use the source mesh tag. The provider runs in the render hot path and receives the source mesh for instanced draws. It should avoid allocations and return a consistent value for a mesh during a render.

    Returns any

  • set meshBlendTagProvider(value: any): void
  • Excludes the given skinned mesh from computing bones velocities. Computing bones velocities can have a cost. The cost can be saved by calling this function and by passing the skinned mesh to ignore.

    Parameters

    • skinnedMesh: AbstractMesh

      The mesh containing the skeleton to ignore when computing the velocity map.

    Returns void

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

  • Removes the given skinned mesh from the excluded meshes to integrate bones velocities while rendering the velocity map.

    Parameters

    • skinnedMesh: AbstractMesh

      The mesh containing the skeleton that has been ignored previously.

    Returns void

    excludeSkinnedMesh to exclude a skinned mesh from bones velocity computation.