CascadedShadowGenerator

Hierarchy

Implements

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

Find examples in Playground
  • Creates a Cascaded Shadow Generator object. A ShadowGenerator is the required tool to use the shadows. Each directional light casting shadows needs to use its own ShadowGenerator. Documentation : https://doc.babylonjs.com/babylon101/cascadedShadows

    Parameters

    • mapSize: number

      The size of the texture what stores the shadows. Example : 1024.

    • light: DirectionalLight

      The directional light object generating the shadows.

    • Optional usefulFloatFirst: boolean

      By default the generator will try to use half float textures but if you need precision (for self shadowing for instance), you can use this option to enforce full float texture.

    Returns CascadedShadowGenerator

Properties

customShaderOptions

Find examples in Playground
customShaderOptions: ICustomShaderOptions

Gets or sets the custom shader name to use

enableSoftTransparentShadow

Find examples in Playground
enableSoftTransparentShadow: boolean

Enables or disables shadows with varying strength based on the transparency When it is enabled, the strength of the shadow is taken equal to mesh.visibility If you enabled an alpha texture on your material, the alpha value red from the texture is also combined to compute the strength: mesh.visibility * alphaTexture.a Note that by definition transparencyShadow must be set to true for enableSoftTransparentShadow to work!

forceBackFacesOnly

Find examples in Playground
forceBackFacesOnly: boolean

If true the shadow map is generated by rendering the back face of the mesh instead of the front face. This can help with self-shadowing as the geometry making up the back of objects is slightly offset. It might on the other hand introduce peter panning.

frustumEdgeFalloff

Find examples in Playground
frustumEdgeFalloff: number

Controls the extent to which the shadows fade out at the edge of the frustum

onAfterShadowMapRenderMeshObservable

Find examples in Playground
onAfterShadowMapRenderMeshObservable: Observable<Mesh>

Observable triggered after a mesh is rendered in the shadow map. Can be used to update internal effect state (that you can get from the onAfterShadowMapRenderObservable)

onAfterShadowMapRenderObservable

Find examples in Playground
onAfterShadowMapRenderObservable: Observable<Effect>

Observable triggered after the shadow is rendered. Can be used to restore internal effect state

onBeforeShadowMapRenderMeshObservable

Find examples in Playground
onBeforeShadowMapRenderMeshObservable: Observable<Mesh>

Observable triggered before a mesh is rendered in the shadow map. Can be used to update internal effect state (that you can get from the onBeforeShadowMapRenderObservable)

onBeforeShadowMapRenderObservable

Find examples in Playground
onBeforeShadowMapRenderObservable: Observable<Effect>

Observable triggered before the shadow is rendered. Can be used to update internal effect state

penumbraDarkness

Find examples in Playground
penumbraDarkness: number

Gets or sets the actual darkness of the soft shadows while using PCSS filtering (value between 0. and 1.)

stabilizeCascades

Find examples in Playground
stabilizeCascades: boolean

Sets this to true if you want that the edges of the shadows don't "swimm" / "shimmer" when rotating the camera. The trade off is that you lose some precision in the shadow rendering when enabling this setting.

Static CLASSNAME

Find examples in Playground
CLASSNAME: string

Name of the CSM class

Static Readonly DEFAULT_CASCADES_COUNT

Find examples in Playground
DEFAULT_CASCADES_COUNT: number

Defines the default number of cascades used by the CSM.

Static Readonly FILTER_BLURCLOSEEXPONENTIALSHADOWMAP

Find examples in Playground
FILTER_BLURCLOSEEXPONENTIALSHADOWMAP: number

Shadow generator mode ESM: Blurred Exponential Shadow Mapping using the inverse of the exponential preventing edge artifacts on steep falloff. (http://developer.download.nvidia.com/presentations/2008/GDC/GDC08_SoftShadowMapping.pdf)

Static Readonly FILTER_BLUREXPONENTIALSHADOWMAP

Find examples in Playground
FILTER_BLUREXPONENTIALSHADOWMAP: number

Shadow generator mode ESM: Blurred Exponential Shadow Mapping. (http://developer.download.nvidia.com/presentations/2008/GDC/GDC08_SoftShadowMapping.pdf)

Static Readonly FILTER_CLOSEEXPONENTIALSHADOWMAP

Find examples in Playground
FILTER_CLOSEEXPONENTIALSHADOWMAP: number

Shadow generator mode ESM: Exponential Shadow Mapping using the inverse of the exponential preventing edge artifacts on steep falloff. (http://developer.download.nvidia.com/presentations/2008/GDC/GDC08_SoftShadowMapping.pdf)

Static Readonly FILTER_EXPONENTIALSHADOWMAP

Find examples in Playground
FILTER_EXPONENTIALSHADOWMAP: number

Shadow generator mode ESM: Exponential Shadow Mapping. (http://developer.download.nvidia.com/presentations/2008/GDC/GDC08_SoftShadowMapping.pdf)

Static Readonly FILTER_NONE

Find examples in Playground
FILTER_NONE: number

Shadow generator mode None: no filtering applied.

Static Readonly FILTER_PCF

Find examples in Playground
FILTER_PCF: number

Shadow generator mode PCF: Percentage Closer Filtering benefits from Webgl 2 shadow samplers. Fallback to Poisson Sampling in Webgl 1 (https://developer.nvidia.com/gpugems/GPUGems/gpugems_ch11.html)

Static Readonly FILTER_PCSS

Find examples in Playground
FILTER_PCSS: number

Shadow generator mode PCSS: Percentage Closering Soft Shadow. benefits from Webgl 2 shadow samplers. Fallback to Poisson Sampling in Webgl 1 Contact Hardening

Static Readonly FILTER_POISSONSAMPLING

Find examples in Playground
FILTER_POISSONSAMPLING: number

Shadow generator mode Poisson Sampling: Percentage Closer Filtering. (Multiple Tap around evenly distributed around the pixel are used to evaluate the shadow strength)

Static Readonly MAX_CASCADES_COUNT

Find examples in Playground
MAX_CASCADES_COUNT: number

Defines the maximum number of cascades used by the CSM.

Static Readonly MIN_CASCADES_COUNT

Find examples in Playground
MIN_CASCADES_COUNT: number

Defines the minimum number of cascades used by the CSM.

Static Readonly QUALITY_HIGH

Find examples in Playground
QUALITY_HIGH: number

Reserved for PCF and PCSS Highest Quality.

Execute PCF on a 5*5 kernel improving a lot the shadow aliasing artifacts.

Execute PCSS with 32 taps blocker search and 64 taps PCF.

Static Readonly QUALITY_LOW

Find examples in Playground
QUALITY_LOW: number

Reserved for PCF and PCSS The lowest quality but the fastest.

Execute PCF on a 1*1 kernel.

Execute PCSS with 16 taps blocker search and 16 taps PCF.

Static Readonly QUALITY_MEDIUM

Find examples in Playground
QUALITY_MEDIUM: number

Reserved for PCF and PCSS Good tradeoff for quality/perf cross devices

Execute PCF on a 3*3 kernel.

Execute PCSS with 16 taps blocker search and 32 taps PCF.

Accessors

autoCalcDepthBounds

Find examples in Playground
  • get autoCalcDepthBounds(): boolean
  • set autoCalcDepthBounds(value: boolean): any
  • Gets or sets the autoCalcDepthBounds property.

    When enabled, a depth rendering pass is first performed (with an internally created depth renderer or with the one you provide by calling setDepthRenderer). Then, a min/max reducing is applied on the depth map to compute the minimal and maximal depth of the map and those values are used as inputs for the setMinMaxDistance() function. It can greatly enhance the shadow quality, at the expense of more GPU works. When using this option, you should increase the value of the lambda parameter, and even set it to 1 for best results.

    Returns boolean

  • Gets or sets the autoCalcDepthBounds property.

    When enabled, a depth rendering pass is first performed (with an internally created depth renderer or with the one you provide by calling setDepthRenderer). Then, a min/max reducing is applied on the depth map to compute the minimal and maximal depth of the map and those values are used as inputs for the setMinMaxDistance() function. It can greatly enhance the shadow quality, at the expense of more GPU works. When using this option, you should increase the value of the lambda parameter, and even set it to 1 for best results.

    Parameters

    • value: boolean

    Returns any

autoCalcDepthBoundsRefreshRate

Find examples in Playground
  • get autoCalcDepthBoundsRefreshRate(): number
  • set autoCalcDepthBoundsRefreshRate(value: number): any
  • 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... Note that if you provided your own depth renderer through a call to setDepthRenderer, you are responsible for setting the refresh rate on the renderer yourself!

    Returns 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... Note that if you provided your own depth renderer through a call to setDepthRenderer, you are responsible for setting the refresh rate on the renderer yourself!

    Parameters

    • value: number

    Returns any

bias

Find examples in Playground
  • get bias(): number
  • set bias(bias: number): any
  • Gets the bias: offset applied on the depth preventing acnea (in light direction).

    Returns number

  • Sets the bias: offset applied on the depth preventing acnea (in light direction).

    Parameters

    • bias: number

    Returns any

blurBoxOffset

Find examples in Playground
  • get blurBoxOffset(): number
  • set blurBoxOffset(value: number): any
  • Gets the blur box offset: offset applied during the blur pass. Only useful if useKernelBlur = false

    Returns number

  • Sets the blur box offset: offset applied during the blur pass. Only useful if useKernelBlur = false

    Parameters

    • value: number

    Returns any

blurKernel

Find examples in Playground
  • get blurKernel(): number
  • set blurKernel(value: number): any
  • Gets the blur kernel: kernel size of the blur pass. Only useful if useKernelBlur = true

    Returns number

  • Sets the blur kernel: kernel size of the blur pass. Only useful if useKernelBlur = true

    Parameters

    • value: number

    Returns any

blurScale

Find examples in Playground
  • get blurScale(): number
  • set blurScale(value: number): any
  • Gets the blur scale: scale of the blurred texture compared to the main shadow map. 2 means half of the size.

    Returns number

  • Sets the blur scale: scale of the blurred texture compared to the main shadow map. 2 means half of the size.

    Parameters

    • value: number

    Returns any

cascadeBlendPercentage

Find examples in Playground
  • get cascadeBlendPercentage(): number
  • set cascadeBlendPercentage(value: number): any
  • Gets or sets the percentage of blending between two cascades (value between 0. and 1.). It defaults to 0.1 (10% blending).

    Returns number

  • Gets or sets the percentage of blending between two cascades (value between 0. and 1.). It defaults to 0.1 (10% blending).

    Parameters

    • value: number

    Returns any

contactHardeningLightSizeUVRatio

Find examples in Playground
  • get contactHardeningLightSizeUVRatio(): number
  • set contactHardeningLightSizeUVRatio(contactHardeningLightSizeUVRatio: number): any
  • Gets the Light Size (in shadow map uv unit) used in PCSS to determine the blocker search area and the penumbra size. Using a ratio helps keeping shape stability independently of the map size.

    It does not account for the light projection as it was having too much instability during the light setup or during light position changes.

    Only valid if useContactHardeningShadow is true.

    Returns number

  • Sets the Light Size (in shadow map uv unit) used in PCSS to determine the blocker search area and the penumbra size. Using a ratio helps keeping shape stability independently of the map size.

    It does not account for the light projection as it was having too much instability during the light setup or during light position changes.

    Only valid if useContactHardeningShadow is true.

    Parameters

    • contactHardeningLightSizeUVRatio: number

    Returns any

darkness

Find examples in Playground
  • get darkness(): number
  • set darkness(value: number): any

debug

Find examples in Playground
  • get debug(): boolean
  • set debug(dbg: boolean): any
  • Gets or sets the debug flag. When enabled, the cascades are materialized by different colors on the screen.

    Returns boolean

  • Gets or sets the debug flag. When enabled, the cascades are materialized by different colors on the screen.

    Parameters

    • dbg: boolean

    Returns any

depthClamp

Find examples in Playground
  • get depthClamp(): boolean
  • set depthClamp(value: boolean): any
  • Gets or sets the depth clamping value.

    When enabled, it improves the shadow quality because the near z plane of the light frustum don't need to be adjusted to account for the shadow casters far away.

    Note that this property is incompatible with PCSS filtering, so it won't be used in that case.

    Returns boolean

  • Gets or sets the depth clamping value.

    When enabled, it improves the shadow quality because the near z plane of the light frustum don't need to be adjusted to account for the shadow casters far away.

    Note that this property is incompatible with PCSS filtering, so it won't be used in that case.

    Parameters

    • value: boolean

    Returns any

depthScale

Find examples in Playground
  • get depthScale(): number
  • set depthScale(value: number): any
  • Gets the depth scale used in ESM mode.

    Returns number

  • Sets the depth scale used in ESM mode. This can override the scale stored on the light.

    Parameters

    • value: number

    Returns any

filter

Find examples in Playground
  • get filter(): number
  • set filter(value: number): any
  • Gets the current mode of the shadow generator (normal, PCF, ESM...). The returned value is a number equal to one of the available mode defined in ShadowMap.FILTER_x like _FILTER_NONE

    Returns number

  • Sets the current mode of the shadow generator (normal, PCF, ESM...). The returned value is a number equal to one of the available mode defined in ShadowMap.FILTER_x like _FILTER_NONE

    Parameters

    • value: number

    Returns any

filteringQuality

Find examples in Playground
  • get filteringQuality(): number
  • set filteringQuality(filteringQuality: number): any
  • Gets the PCF or PCSS Quality. Only valid if usePercentageCloserFiltering or usePercentageCloserFiltering is true.

    Returns number

  • Sets the PCF or PCSS Quality. Only valid if usePercentageCloserFiltering or usePercentageCloserFiltering is true.

    Parameters

    • filteringQuality: number

    Returns any

freezeShadowCastersBoundingInfo

Find examples in Playground
  • get freezeShadowCastersBoundingInfo(): boolean
  • set freezeShadowCastersBoundingInfo(freeze: boolean): any
  • Enables or disables the shadow casters bounding info computation. If your shadow casters don't move, you can disable this feature. If it is enabled, the bounding box computation is done every frame.

    Returns boolean

  • Enables or disables the shadow casters bounding info computation. If your shadow casters don't move, you can disable this feature. If it is enabled, the bounding box computation is done every frame.

    Parameters

    • freeze: boolean

    Returns any

lambda

Find examples in Playground
  • get lambda(): number
  • set lambda(value: number): any
  • Gets or set the lambda parameter. This parameter is used to split the camera frustum and create the cascades. It's a value between 0. and 1.: If 0, the split is a uniform split of the frustum, if 1 it is a logarithmic split. For all values in-between, it's a linear combination of the uniform and logarithm split algorithm.

    Returns number

  • Gets or set the lambda parameter. This parameter is used to split the camera frustum and create the cascades. It's a value between 0. and 1.: If 0, the split is a uniform split of the frustum, if 1 it is a logarithmic split. For all values in-between, it's a linear combination of the uniform and logarithm split algorithm.

    Parameters

    • value: number

    Returns any

maxDistance

Find examples in Playground
  • get maxDistance(): number
  • Gets the maximal distance used in the cascade break computation

    Returns number

minDistance

Find examples in Playground
  • get minDistance(): number
  • Gets the minimal distance used in the cascade break computation

    Returns number

normalBias

Find examples in Playground
  • get normalBias(): number
  • set normalBias(normalBias: number): any
  • Gets the normalBias: offset applied on the depth preventing acnea (along side the normal direction and proportinal to the light/normal angle).

    Returns number

  • Sets the normalBias: offset applied on the depth preventing acnea (along side the normal direction and proportinal to the light/normal angle).

    Parameters

    • normalBias: number

    Returns any

numCascades

Find examples in Playground
  • get numCascades(): number
  • set numCascades(value: number): any
  • Gets or set the number of cascades used by the CSM.

    Returns number

  • Gets or set the number of cascades used by the CSM.

    Parameters

    • value: number

    Returns any

shadowCastersBoundingInfo

Find examples in Playground
  • Gets or sets the shadow casters bounding info. If you provide your own shadow casters bounding info, first enable freezeShadowCastersBoundingInfo so that the system won't overwrite the bounds you provide

    Returns BoundingInfo

  • Gets or sets the shadow casters bounding info. If you provide your own shadow casters bounding info, first enable freezeShadowCastersBoundingInfo so that the system won't overwrite the bounds you provide

    Parameters

    Returns any

shadowMaxZ

Find examples in Playground
  • get shadowMaxZ(): number
  • set shadowMaxZ(value: number): any
  • Gets the shadow max z distance. It's the limit beyond which shadows are not displayed. It defaults to camera.maxZ

    Returns number

  • Sets the shadow max z distance.

    Parameters

    • value: number

    Returns any

transparencyShadow

Find examples in Playground
  • get transparencyShadow(): boolean
  • set transparencyShadow(value: boolean): any

useBlurCloseExponentialShadowMap

Find examples in Playground
  • get useBlurCloseExponentialShadowMap(): boolean
  • set useBlurCloseExponentialShadowMap(value: boolean): any

useBlurExponentialShadowMap

Find examples in Playground
  • get useBlurExponentialShadowMap(): boolean
  • set useBlurExponentialShadowMap(value: boolean): any

useCloseExponentialShadowMap

Find examples in Playground
  • get useCloseExponentialShadowMap(): boolean
  • set useCloseExponentialShadowMap(value: boolean): any

useContactHardeningShadow

Find examples in Playground
  • get useContactHardeningShadow(): boolean
  • set useContactHardeningShadow(value: boolean): any

useExponentialShadowMap

Find examples in Playground
  • get useExponentialShadowMap(): boolean
  • set useExponentialShadowMap(value: boolean): any

useKernelBlur

Find examples in Playground
  • get useKernelBlur(): boolean
  • set useKernelBlur(value: boolean): any
  • Gets whether the blur pass is a kernel blur (if true) or box blur. Only useful in filtered mode (useBlurExponentialShadowMap...)

    Returns boolean

  • Sets whether the blur pass is a kernel blur (if true) or box blur. Only useful in filtered mode (useBlurExponentialShadowMap...)

    Parameters

    • value: boolean

    Returns any

usePercentageCloserFiltering

Find examples in Playground
  • get usePercentageCloserFiltering(): boolean
  • set usePercentageCloserFiltering(value: boolean): any

usePoissonSampling

Find examples in Playground
  • get usePoissonSampling(): boolean
  • set usePoissonSampling(value: boolean): any

Static IsSupported

Find examples in Playground
  • get IsSupported(): boolean
  • Support test.

    Returns boolean

Methods

addShadowCaster

Find examples in Playground
  • Helper function to add a mesh and its descendants to the list of shadow casters.

    Parameters

    • mesh: AbstractMesh

      Mesh to add

    • Optional includeDescendants: boolean

      boolean indicating if the descendants should be added. Default to true

    Returns ShadowGenerator

    the Shadow Generator itself

bindShadowLight

Find examples in Playground
  • bindShadowLight(lightIndex: string, effect: Effect): void
  • Binds the shadow related information inside of an effect (information like near, far, darkness... defined in the generator but impacting the effect).

    Parameters

    • lightIndex: string

      Index of the light in the enabled light list of the material owning the effect

    • effect: Effect

      The effect we are binfing the information for

    Returns void

dispose

Find examples in Playground
  • dispose(): void

forceCompilation

Find examples in Playground
  • forceCompilation(onCompiled?: function, options?: Partial<object>): void
  • Forces all the attached effect to compile to enable rendering only once ready vs. lazyly compiling effects.

    Parameters

    • Optional onCompiled: function

      Callback triggered at the and of the effects compilation

    • Optional options: Partial<object>

      Sets of optional options forcing the compilation with different modes

    Returns void

forceCompilationAsync

Find examples in Playground
  • forceCompilationAsync(options?: Partial<object>): Promise<void>
  • Forces all the attached effect to compile to enable rendering only once ready vs. lazyly compiling effects.

    Parameters

    • Optional options: Partial<object>

      Sets of optional options forcing the compilation with different modes

    Returns Promise<void>

    A promise that resolves when the compilation completes

getCascadeMaxExtents

Find examples in Playground
  • Gets a cascade maximum extents

    Parameters

    • cascadeIndex: number

      index of the cascade

    Returns Nullable<Vector3>

    the maximum cascade extents

getCascadeMinExtents

Find examples in Playground
  • Gets a cascade minimum extents

    Parameters

    • cascadeIndex: number

      index of the cascade

    Returns Nullable<Vector3>

    the minimum cascade extents

getCascadeProjectionMatrix

Find examples in Playground
  • Gets the projection matrix corresponding to a given cascade

    Parameters

    • cascadeNum: number

      cascade to retrieve the projection matrix from

    Returns Nullable<Matrix>

    the cascade projection matrix

getCascadeTransformMatrix

Find examples in Playground
  • Gets the transformation matrix corresponding to a given cascade

    Parameters

    • cascadeNum: number

      cascade to retrieve the transformation matrix from

    Returns Nullable<Matrix>

    the cascade transformation matrix

getCascadeViewMatrix

Find examples in Playground
  • Gets the view matrix corresponding to a given cascade

    Parameters

    • cascadeNum: number

      cascade to retrieve the view matrix from

    Returns Nullable<Matrix>

    the cascade view matrix

getClassName

Find examples in Playground
  • getClassName(): string

getDarkness

Find examples in Playground
  • getDarkness(): number
  • Returns the darkness value (float). This can only decrease the actual darkness of a shadow. 0 means strongest and 1 would means no shadow.

    Returns number

    the darkness.

getLight

Find examples in Playground

getShadowMap

Find examples in Playground

getShadowMapForRendering

Find examples in Playground

getTransformMatrix

Find examples in Playground
  • getTransformMatrix(): Matrix

isReady

Find examples in Playground
  • isReady(subMesh: SubMesh, useInstances: boolean, isTransparent: boolean): boolean
  • Determine wheter the shadow generator is ready or not (mainly all effects and related post processes needs to be ready).

    Parameters

    • subMesh: SubMesh

      The submesh we want to render in the shadow map

    • useInstances: boolean

      Defines wether will draw in the map using instances

    • isTransparent: boolean

      Indicates that isReady is called for a transparent subMesh

    Returns boolean

    true if ready otherwise, false

prepareDefines

Find examples in Playground
  • prepareDefines(defines: any, lightIndex: number): void
  • Prepare all the defines in a material relying on a shadow map at the specified light index.

    Parameters

    • defines: any

      Defines of the material we want to update

    • lightIndex: number

      Index of the light in the enabled light list of the material

    Returns void

recreateShadowMap

Find examples in Playground
  • recreateShadowMap(): void

removeShadowCaster

Find examples in Playground
  • Helper function to remove a mesh and its descendants from the list of shadow casters

    Parameters

    • mesh: AbstractMesh

      Mesh to remove

    • Optional includeDescendants: boolean

      boolean indicating if the descendants should be removed. Default to true

    Returns ShadowGenerator

    the Shadow Generator itself

serialize

Find examples in Playground
  • serialize(): any

setDarkness

Find examples in Playground
  • Sets the darkness value (float). This can only decrease the actual darkness of a shadow.

    Parameters

    • darkness: number

      The darkness value 0 means strongest and 1 would means no shadow.

    Returns ShadowGenerator

    the shadow generator allowing fluent coding.

setDepthRenderer

Find examples in Playground
  • Sets the depth renderer to use when autoCalcDepthBounds is enabled.

    Note that if no depth renderer is set, a new one will be automatically created internally when necessary.

    You should call this function if you already have a depth renderer enabled in your scene, to avoid doing multiple depth rendering each frame. If you provide your own depth renderer, make sure it stores linear depth!

    Parameters

    • depthRenderer: Nullable<DepthRenderer>

      The depth renderer to use when autoCalcDepthBounds is enabled. If you pass null or don't call this function at all, a depth renderer will be automatically created

    Returns void

setMinMaxDistance

Find examples in Playground
  • setMinMaxDistance(min: number, max: number): void
  • Sets the minimal and maximal distances to use when computing the cascade breaks.

    The values of min / max are typically the depth zmin and zmax values of your scene, for a given frame. If you don't know these values, simply leave them to their defaults and don't call this function.

    Parameters

    • min: number

      minimal distance for the breaks (default to 0.)

    • max: number

      maximal distance for the breaks (default to 1.)

    Returns void

setTransparencyShadow

Find examples in Playground

splitFrustum

Find examples in Playground
  • splitFrustum(): void
  • Create the cascade breaks according to the lambda, shadowMaxZ and min/max distance properties, as well as the camera near and far planes. This function is automatically called when updating lambda, shadowMaxZ and min/max distances, however you should call it yourself if you change the camera near/far planes!

    Returns void

Static Parse

Find examples in Playground
  • Parses a serialized ShadowGenerator and returns a new ShadowGenerator.

    Parameters

    • parsedShadowGenerator: any

      The JSON object to parse

    • scene: Scene

      The scene to create the shadow map for

    Returns ShadowGenerator

    The parsed shadow generator

Generated using TypeDoc