Class FrameGraphDepthOfFieldTask
Hierarchy (View Summary)
- FrameGraphTask
- FrameGraphDepthOfFieldTask
Constructors
constructor
-
new FrameGraphDepthOfFieldTask(
name: string,
frameGraph: FrameGraph,
blurLevel?: ThinDepthOfFieldEffectBlurLevel,
hdr?: boolean,
): FrameGraphDepthOfFieldTaskConstructs a depth of field task.
Parameters
- name: string
The name of the task.
- frameGraph: FrameGraph
The frame graph this task belongs to.
- blurLevel: ThinDepthOfFieldEffectBlurLevel = ThinDepthOfFieldEffectBlurLevel.Low
The blur level of the depth of field effect (default: ThinDepthOfFieldEffectBlurLevel.Low).
- hdr: boolean = false
Whether the depth of field effect is HDR.
Returns FrameGraphDepthOfFieldTask
- name: string
Properties
camera
The camera used to render the scene.
Optionaldependencies
The (texture) dependencies of the task (optional).
Readonlydepth Of Field
The depth of field effect.
depth Sampling Mode
The sampling mode to use for the depth texture.
depth Texture
The depth texture to use for the depth of field effect. Should store camera space depth (Z coordinate).
Readonlyhdr
Whether the depth of field effect is applied on HDR textures. When true, the depth of field effect will use a higher precision texture format (half float or float). Else, it will use unsigned byte.
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 Texture
The output texture of the depth of field effect.
source Sampling Mode
The sampling mode to use for the source texture.
source Texture
The source texture to apply the depth of field effect on.
Optionaltarget Texture
The target texture to render the depth of field effect to.
Accessors
alpha Mode
-
get alphaMode(): number
The alpha mode to use when applying the depth of field effect.
Returns number
-
set alphaMode(mode: number): void
Parameters
- mode: number
Returns void
disabled
-
get disabled(): boolean
Whether the task is disabled.
Returns boolean
-
set disabled(value: boolean): void
Parameters
- value: boolean
Returns void
name
-
get name(): string
The name of the task.
Returns string
-
set name(name: string): void
The name of the task.
Parameters
- name: string
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[]
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 any
True if the task is ready to be executed, else false.
record
-
Records the task in the frame graph. Use this function to add content (render passes, ...) to the task.
Returns void
Task which applies a depth of field effect.