Class FrameGraphCascadedShadowGeneratorTask
Hierarchy (View Summary)
- FrameGraphShadowGeneratorTask
- FrameGraphCascadedShadowGeneratorTask
Index
Constructors
Properties
Accessors
Methods
Constructors
constructor
-
new FrameGraphCascadedShadowGeneratorTask(
name: string,
frameGraph: FrameGraph,
): FrameGraphCascadedShadowGeneratorTaskCreates a new shadow generator task.
Parameters
- name: string
The name of the task.
- frameGraph: FrameGraph
The frame graph the task belongs to.
Returns FrameGraphCascadedShadowGeneratorTask
- name: string
Properties
Optionaldependencies
The (texture) dependencies of the task (optional).
Optionaldepth Texture
The depth texture used by the autoCalcDepthBounds feature (optional if autoCalcDepthBounds is set to false). This texture is used to compute the min/max depth bounds of the scene to setup the cascaded shadow generator. The texture should contain either “view,” “normalized view,” or “screen” depth values - if possible, connect “normalized view,” or “screen” for best performance. Warning: Do not set a texture if you are not using the autoCalcDepthBounds feature, to avoid generating a depth texture that will not be used.
depth Texture Type
The type of the depth texture used by the autoCalcDepthBounds feature.
object List
The object list that generates shadows.
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 shadow map texture.
Readonlyshadow Generator
The shadow generator.
Accessors
auto Calc Depth Bounds
-
get autoCalcDepthBounds(): boolean
Gets or sets a value indicating whether the shadow generator should automatically calculate the depth bounds.
Returns boolean
-
set autoCalcDepthBounds(value: boolean): void
Parameters
- value: boolean
Returns void
auto Calc Depth Bounds Refresh Rate
-
get autoCalcDepthBoundsRefreshRate(): number
Defines the refresh rate of the min/max computation used when autoCalcDepthBounds is set to true Use 0 to compute just once, 1 to compute on every frame, 2 to compute every two frames and so on...
Returns number
-
set autoCalcDepthBoundsRefreshRate(value: number): void
Parameters
- value: number
Returns void
bias
-
get bias(): number
The bias to apply to the shadow map.
Returns number
-
set bias(value: number): void
Parameters
- value: number
Returns void
camera
-
get camera(): Camera
Gets or sets the camera used to generate the shadow generator.
Returns Camera
-
set camera(camera: Camera): void
Parameters
- camera: Camera
Returns void
cascade Blend Percentage
-
get cascadeBlendPercentage(): number
Gets or sets the cascade blend percentage.
Returns number
-
set cascadeBlendPercentage(value: number): void
Parameters
- value: number
Returns void
darkness
-
get darkness(): number
The darkness of the shadows.
Returns number
-
set darkness(value: number): void
Parameters
- value: number
Returns void
debug
-
get debug(): boolean
Gets or sets a value indicating whether the shadow generator should display the cascades.
Returns boolean
-
set debug(value: boolean): void
Parameters
- value: boolean
Returns void
depth Clamp
-
get depthClamp(): boolean
Gets or sets a value indicating whether the shadow generator should use depth clamping.
Returns boolean
-
set depthClamp(value: boolean): void
Parameters
- value: boolean
Returns void
disabled
-
get disabled(): boolean
Whether the task is disabled.
Returns boolean
-
set disabled(value: boolean): void
Parameters
- value: boolean
Returns void
enable Soft Transparent Shadow
-
get enableSoftTransparentShadow(): boolean
Enables or disables shadows with varying strength based on the transparency
Returns boolean
-
set enableSoftTransparentShadow(value: boolean): void
Parameters
- value: boolean
Returns void
filter
-
get filter(): number
The filter to apply to the shadow map.
Returns number
-
set filter(value: number): void
Parameters
- value: number
Returns void
filtering Quality
-
get filteringQuality(): number
The filtering quality to apply to the filter.
Returns number
-
set filteringQuality(value: number): void
Parameters
- value: number
Returns void
lambda
-
get lambda(): number
Gets or sets the lambda parameter of the shadow generator.
Returns number
-
set lambda(value: number): void
Parameters
- value: number
Returns void
light
-
get light(): IShadowLight
The light to generate shadows from.
Returns IShadowLight
-
set light(value: IShadowLight): void
Parameters
- value: IShadowLight
Returns void
map Size
-
get mapSize(): number
The size of the shadow map.
Returns number
-
set mapSize(value: number): void
Parameters
- value: number
Returns void
name
-
get name(): string
The name of the task.
Returns string
-
set name(value: string): void
Parameters
- value: string
Returns void
normal Bias
-
get normalBias(): number
The normal bias to apply to the shadow map.
Returns number
-
set normalBias(value: number): void
Parameters
- value: number
Returns void
num Cascades
-
get numCascades(): number
The number of cascades.
Returns number
-
set numCascades(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[]
shadow Max Z
-
get shadowMaxZ(): number
Gets or sets the maximum shadow Z value.
Returns number
-
set shadowMaxZ(value: number): void
Parameters
- value: number
Returns void
stabilize Cascades
-
get stabilizeCascades(): boolean
Gets or sets a value indicating whether the shadow generator should stabilize the cascades.
Returns boolean
-
set stabilizeCascades(value: boolean): void
Parameters
- value: boolean
Returns void
transparency Shadow
-
get transparencyShadow(): boolean
Gets or sets the ability to have transparent shadow
Returns boolean
-
set transparencyShadow(value: boolean): void
Parameters
- value: boolean
Returns void
use Float32 Texture Type
-
get useFloat32TextureType(): boolean
If true, the shadow map will use a 32 bits float texture type (else, 16 bits float is used if supported).
Returns boolean
-
set useFloat32TextureType(value: boolean): void
Parameters
- value: boolean
Returns void
use Opacity Texture For Transparent Shadow
-
get useOpacityTextureForTransparentShadow(): boolean
If this is true, use the opacity texture's alpha channel for transparent shadows instead of the diffuse one
Returns boolean
-
set useOpacityTextureForTransparentShadow(value: boolean): void
Parameters
- value: boolean
Returns void
use Red Texture Format
-
get useRedTextureFormat(): boolean
If true, the shadow map will use a red texture format (else, a RGBA format is used).
Returns boolean
-
set useRedTextureFormat(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
-
Records the task in the frame graph. Use this function to add content (render passes, ...) to the task.
Returns void
StaticIs Cascaded Shadow Generator
-
IsCascadedShadowGenerator(
task: FrameGraphShadowGeneratorTask,
): task is FrameGraphCascadedShadowGeneratorTaskChecks if a shadow generator task is a cascaded shadow generator task.
Parameters
- task: FrameGraphShadowGeneratorTask
The task to check.
Returns task is FrameGraphCascadedShadowGeneratorTask
True if the task is a cascaded shadow generator task, else false.
- task: FrameGraphShadowGeneratorTask
Task used to generate a cascaded shadow map from a list of objects.