Class FrameGraphObjectRendererTask
Hierarchy (View Summary)
- FrameGraphTaskMultiRenderTarget
- FrameGraphObjectRendererTask
Index
Constructors
Properties
Accessors
Methods
Constructors
constructor
-
new FrameGraphObjectRendererTask(
name: string,
frameGraph: FrameGraph,
scene: Scene,
options?: any,
existingObjectRenderer?: ObjectRenderer,
): FrameGraphObjectRendererTaskConstructs 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: anyThe options of the object renderer.
OptionalexistingObjectRenderer: ObjectRendererAn existing object renderer to use (optional). If provided, the options parameter will be ignored.
Returns FrameGraphObjectRendererTask
- name: string
Properties
Optionaldependencies
The (texture) dependencies of the task (optional).
depth Test
If depth testing should be enabled (default is true).
Optionaldepth Texture
The depth attachment texture where the objects will be rendered (optional).
depth Write
If depth writing should be enabled (default is true).
disable Shadows
If shadows should be disabled (default is false).
is Main Object Renderer
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.
object List
The list of objects to render.
on After Task Execute
An observable that is triggered after the task is executed.
on Before Task Execute
An observable that is triggered before the task is executed.
on Textures Allocated Observable
An observable that is triggered after the textures have been allocated.
Readonlyoutput Depth Texture
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!
Readonlyoutput Texture
The output texture. This texture will point to the same texture than the targetTexture property. Note, however, that the handle itself will be different!
resolve MSAA Colors
If true, targetTexture will be resolved at the end of the render pass, if this/these texture(s) is/are MSAA (default: true)
resolve MSAA Depth
If true, depthTexture will be resolved at the end of the render pass, if this texture is provided and is MSAA (default: false).
Optionalshadow Generators
The shadow generators used to render the objects (optional).
target Texture
The target texture(s) where the objects will be rendered.
Accessors
camera
-
get camera(): Camera
Gets or sets the camera used to render the objects.
Returns Camera
-
set camera(camera: Camera): void
Parameters
- camera: Camera
Returns void
disabled
-
get disabled(): boolean
Whether the task is disabled.
Returns boolean
-
set disabled(value: boolean): void
Parameters
- value: boolean
Returns void
disable Image Processing
-
get disableImageProcessing(): boolean
If image processing should be disabled (default is false). false means that the default image processing configuration will be applied (the one from the scene)
Returns boolean
-
set disableImageProcessing(value: boolean): void
Parameters
- value: boolean
Returns void
enable Bounding Box Rendering
-
get enableBoundingBoxRendering(): boolean
Enables the rendering of bounding boxes for meshes (still subject to Mesh.showBoundingBox or scene.forceShowBoundingBoxes). Default is true.
Returns boolean
-
set enableBoundingBoxRendering(value: boolean): void
Parameters
- value: boolean
Returns void
enable Outline Rendering
-
get enableOutlineRendering(): boolean
Enables the rendering of outlines/overlays for meshes (still subject to Mesh.renderOutline/Mesh.renderOverlay). Default is true.
Returns boolean
-
set enableOutlineRendering(value: boolean): void
Parameters
- value: boolean
Returns void
force Layer Mask Check
-
get forceLayerMaskCheck(): boolean
Forces checking the layerMask property even if a custom list of meshes is provided (ie. if renderList is not undefined). Default is true.
Returns boolean
-
set forceLayerMaskCheck(value: boolean): void
Parameters
- value: boolean
Returns void
name
-
get name(): string
The name of the task.
Returns string
-
set name(value: string): void
The name of the task.
Parameters
- value: string
Returns void
object Renderer
-
The object renderer used to render the objects.
Returns ObjectRenderer
oit Pass Count
-
get oitPassCount(): number
Defines the number of passes to use for Order Independent Transparency (default is 5).
Returns number
-
set oitPassCount(value: number): void
Parameters
- value: number
Returns void
passes
-
get passes(): IFrameGraphPass[]
Gets the passes of the task.
Returns IFrameGraphPass[]
passes Disabled
-
get passesDisabled(): IFrameGraphPass[]
Gets the disabled passes of the task.
Returns IFrameGraphPass[]
render Alpha Test Meshes
-
get renderAlphaTestMeshes(): boolean
Defines if alpha test meshes should be rendered (default is true). Always subject to the renderMeshes property, though.
Returns boolean
-
set renderAlphaTestMeshes(value: boolean): void
Parameters
- value: boolean
Returns void
render Depth Only Meshes
-
get renderDepthOnlyMeshes(): boolean
Defines if depth only meshes should be rendered (default is true). Always subject to the renderMeshes property, though.
Returns boolean
-
set renderDepthOnlyMeshes(value: boolean): void
Parameters
- value: boolean
Returns void
render Meshes
-
get renderMeshes(): boolean
Defines if meshes should be rendered (default is true).
Returns boolean
-
set renderMeshes(value: boolean): void
Parameters
- value: boolean
Returns void
render Opaque Meshes
-
get renderOpaqueMeshes(): boolean
Defines if opaque meshes should be rendered (default is true). Always subject to the renderMeshes property, though.
Returns boolean
-
set renderOpaqueMeshes(value: boolean): void
Parameters
- value: boolean
Returns void
render Particles
-
get renderParticles(): boolean
Defines if particles should be rendered (default is true).
Returns boolean
-
set renderParticles(value: boolean): void
Parameters
- value: boolean
Returns void
render Sprites
-
get renderSprites(): boolean
Defines if sprites should be rendered (default is true).
Returns boolean
-
set renderSprites(value: boolean): void
Parameters
- value: boolean
Returns void
render Transparent Meshes
-
get renderTransparentMeshes(): boolean
Defines if transparent meshes should be rendered (default is true). Always subject to the renderMeshes property, though.
Returns boolean
-
set renderTransparentMeshes(value: boolean): void
Parameters
- value: boolean
Returns void
use OIT For Transparent Meshes
-
get useOITForTransparentMeshes(): boolean
Defines if Order Independent Transparency should be used for transparent meshes (default is false).
Returns boolean
-
set useOITForTransparentMeshes(value: boolean): void
Parameters
- value: boolean
Returns void
Methods
dispose
-
Disposes of the task.
Returns void
get Class Name
-
Gets the current class name
Returns string
the class name
init Async
-
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.
is Ready
-
Checks if the task is ready to be executed.
Returns boolean
True if the task is ready to be executed, else false.
record
-
record(
skipCreationOfDisabledPasses?: boolean,
additionalExecute?: (context: FrameGraphRenderContext) => void,
): FrameGraphRenderPassRecords the object renderer task into the frame graph.
Parameters
- skipCreationOfDisabledPasses: boolean = false
defines whether disabled passes should be skipped
OptionaladditionalExecute: (context: FrameGraphRenderContext) => voiddefines an optional callback executed by the pass
Returns FrameGraphRenderPass
the recorded render pass
- skipCreationOfDisabledPasses: boolean = false
set Output Layer And Face Indices
-
Sets the output layer and face indices for multi-target rendering.
Parameters
- indices: LayerAndFaceIndex[]
The array of layer and face indices.
Returns void
- indices: LayerAndFaceIndex[]
Task used to render objects to a texture.