Creates a new instance of VarianceShadowMapDecodeClassicMaterialContent for variance shadow mapping. This material content handles the decoding and rendering of variance shadow maps, which provide soft shadows with reduced aliasing compared to traditional shadow mapping techniques.
The name identifier for this material
Configuration options for the material
Index of the color attachment containing depth information from DepthEncodeMaterialContent
Index of the color attachment containing squared depth information
Optional
depthOptional camera component used for depth rendering. If not provided, uses the current render pass camera
Whether to enable debug visualization showing areas outside depth map in debug color
Whether to apply lighting calculations. When false, renders original material color except in shadow areas
Whether to enable morphing/blend shape support
Whether to enable skeletal animation support
Array of exactly 2 render passes containing the encoded depth information (depth and squared depth)
Protected
__definitionsProtected
__materialProtected
__semanticsCollection of tags associated with this object
Static
AllowableStatic
DebugStatic
DepthStatic
DepthStatic
Readonly
InvalidInvalid object UID constant
Static
IsStatic
LightStatic
MinimumStatic
ShadowStatic
SquareStatic
TextureProtected
Static
Optional
__glProtected
Static
__tmp_Protected
Static
__tmp_Static
currentCurrent maximum object count for UID generation
Static
materialStatic
zStatic
zGets the shader semantics information array for this material.
Array of shader semantics information
Sets the depth camera component used for shadow map generation. This camera defines the light's perspective for shadow mapping calculations.
The camera component representing the light's view for shadow mapping
Checks if this material supports lighting calculations.
True if lighting is enabled
Checks if this material supports morph target animation.
True if morphing is enabled
Checks if this material supports skeletal animation.
True if skinning is enabled
Gets the unique object identifier
The object's UID
Gets the pixel shader object associated with this material.
The pixel shader object or undefined if not set
Gets the unique name of this object
The unique name string
Gets the vertex shader object associated with this material.
The vertex shader object or undefined if not set
Internal
Copies tag data from another RnObject instance to this object
The source RnObject to copy tags from
Sets internal rendering parameters for the material on a per-material basis. This method configures shader uniforms and parameters specific to variance shadow mapping, including camera matrices, depth information, and various rendering features like skinning and morphing.
The rendering parameters object
WebGL-specific rendering arguments containing entity, camera, and rendering context
Whether this is the first time setting parameters for this material
The material instance being rendered
The WebGL shader program to configure
This method handles:
The method optimizes performance by caching zNear and zFar values to avoid unnecessary uniform updates.
Sets internal setting parameters to GPU for WebGL per primitive. This method should be overridden by derived classes to provide specific parameter handling.
Object containing material, shader program, firstTime flag, and rendering arguments
Sets internal setting parameters to GPU for WebGL per shader program. This method should be overridden by derived classes to provide specific parameter handling.
Object containing material, shader program, firstTime flag, and rendering arguments
Sets internal setting parameters to GPU for WebGPU. This method should be overridden by derived classes to provide specific parameter handling.
Object containing material and WebGPU rendering arguments
Protected
doPerforms shader reflection to extract semantics information from vertex and pixel shaders.
The vertex shader object for WebGL
The pixel shader object for WebGL
The vertex shader object for WebGPU
The pixel shader object for WebGPU
Array of shader definitions
Array of shader semantics information
Checks if this object has all the specified tags with exactly matching values
Object containing tag names as keys and expected values
True if all specified tags exist with matching values, false otherwise
Checks if the object's combined tag string contains all the provided search strings. This allows for flexible searching within tag names and values.
Array of strings that must all be present in the combined tag string
True if all strings are found in the combined tag string, false otherwise
Protected
setProtected
setSets lighting information uniforms in the shader.
The WebGL shader program
Array of light components
The material instance
Whether to set uniform values
Sets morph target animation uniforms in the shader.
The WebGL shader program
The mesh component
The primitive containing morph targets
Optional
blendShapeComponent: BlendShapeComponentThe blend shape component containing weights
Protected
setSets the normal transformation matrix uniform in the shader.
The WebGL shader program
The normal transformation matrix
Protected
setProtected
setSets the projection matrix uniform in the shader.
The WebGL shader program
The camera component
Whether rendering in VR mode
The display index for VR rendering
Sets the shader semantics information array for this material.
Array of shader semantics information to set
Protected
setSets skeletal animation uniforms in the shader.
The WebGL shader program
Whether to set uniform values
Optional
skeletalComponent: SkeletalComponentThe skeletal component containing bone data
Protected
setProtected
setSets view-related uniforms including view matrix and camera position.
The WebGL shader program
The camera component
Whether rendering in VR mode
The display index for VR rendering
Protected
setSets the world transformation matrix uniform in the shader.
The WebGL shader program
The world transformation matrix
Protected
setupSets up basic rendering information including matrices, camera, and lighting.
WebGL rendering arguments
The WebGL shader program
Whether this is the first time setup
The material instance
The camera component class
Attempts to set a tag on this object. If the tag already exists, it will be replaced.
The tag object containing the name and value to set
True if the tag was successfully set, false if the tag name contains invalid characters
Attempts to set a unique name for this object
The desired unique name
If true, appends UID to make name unique when conflicts occur; if false, fails on conflict
True if the name was successfully set, false if there was a conflict and toAddNameIfConflict was false
Static
_resetStatic
getRetrieves a material node by its unique identifier.
The unique identifier of the material node
The material node instance
Static
getStatic
getStatic
searchSearches for the first object that has a specific tag with the given value
The tag name to search for
The tag value to match
WeakRef to the first matching object, or undefined if not found
Abstract base class for material content that provides common functionality for material rendering. This class handles shader semantics, rendering setup, and GPU parameter management for materials.