Capítulo 473 de 859
Represents the default shadow implementation for lighting nodes.
Constructor
| Signature |
|---|
new ShadowNode( light : Light, shadow : LightShadow ) |
Properties
| Property | Description |
|---|---|
.depthLayer : number (readonly) | This index can be used when overriding setupRenderTarget with a RenderTarget Array to specify the depth layer. |
.isShadowNode : boolean (readonly) | This flag can be used for type testing. |
.shadow : LightShadow | The light shadow which defines the properties light's shadow. |
.shadowMap : RenderTarget | A reference to the shadow map which is a render target. |
.vsmMaterialHorizontal : NodeMaterial | Only relevant for VSM shadows. Node material which is used to render the second VSM pass. |
.vsmMaterialVertical : NodeMaterial | Only relevant for VSM shadows. Node material which is used to render the first VSM pass. |
.vsmShadowMapHorizontal : RenderTarget | Only relevant for VSM shadows. Render target for the second VSM render pass. |
.vsmShadowMapVertical : RenderTarget | Only relevant for VSM shadows. Render target for the first VSM render pass. |
Methods
| Method | Description |
|---|---|
.dispose() | Frees the internal resources of this shadow node. |
.getShadowFilterFn( type : number ) : function | Returns the shadow filtering function for the given shadow type. |
.renderShadow( frame : NodeFrame ) | Renders the shadow. The logic of this function could be included into ShadowNode#updateShadow however more specialized shadow nodes might require a custom shadow map r… |
.setup( builder : NodeBuilder ) : ShaderCallNodeInternal | The implementation performs the setup of the output node. An output is only produces if shadow mapping is globally enabled in the renderer. |
.setupShadow( builder : NodeBuilder ) : Node.<vec3> | Setups the shadow output node. |
.setupShadowCoord( builder : NodeBuilder, shadowPosition : Node.<vec3> ) : Node.<vec3> | Setups the shadow coordinates. |
.setupShadowFilter( builder : NodeBuilder, inputs : Object ) : Node.<float> | Setups the shadow filtering. |
.updateBefore( frame : NodeFrame ) | The implementation performs the update of the shadow map if necessary. |
.updateShadow( frame : NodeFrame ) | Updates the shadow. |
.vsmPass( renderer : Renderer ) | For VSM additional render passes are required. |