rhodonite
    Preparing search index...

    Class ShadowMapDecodeClassicMaterialContent

    Material content class for decoding shadow maps using the classic shadow mapping technique. This class handles the rendering of shadow maps with proper depth comparison and shadow factor calculations. It supports morphing, skinning, lighting, and debugging modes for comprehensive shadow rendering functionality.

    Hierarchy (View Summary)

    Index

    Constructors

    • Creates a new instance of ShadowMapDecodeClassicMaterialContent. This constructor initializes the shadow mapping material with comprehensive configuration options for various rendering features and sets up the necessary shader semantics for shadow decoding.

      Parameters

      • engine: Engine

        The engine instance

      • materialName: string

        The unique name identifier for this material

      • options: {
            colorAttachmentsNumber: number;
            isDebugging: boolean;
            isLighting: boolean;
            isMorphing: boolean;
            isSkinning: boolean;
        }

        Configuration object containing rendering feature flags and settings

        • colorAttachmentsNumber: number

          Index of the color attachment containing encoded depth data

        • isDebugging: boolean

          Enables debug visualization showing areas outside depth map coverage

        • isLighting: boolean

          Enables lighting calculations (when false, shows original colors except in shadows)

        • isMorphing: boolean

          Enables morphing/blend shape animation support

        • isSkinning: boolean

          Enables skeletal animation support

      • encodedDepthRenderPass: RenderPass

        The render pass containing depth information from DepthEncodeMaterialContent

      Returns ShadowMapDecodeClassicMaterialContent

    Properties

    __definitions: string = ''
    __materialName: string
    __semantics: ShaderSemanticsInfo[] = []
    _engine?: Engine

    The engine instance this material content is associated with

    _tags: RnTags = {}

    Collection of tags associated with this object

    shaderType: EnumIO = ShaderType.VertexAndPixelShader
    __tmp_vector2: MutableVector2 = ...
    __tmp_vector4: MutableVector4 = ...
    AllowableDepthError: ShaderSemanticsEnum = ...

    Shader semantic for defining the allowable depth error tolerance in shadow calculations

    currentMaxObjectCount: number = 0

    Current maximum object count for UID generation

    DebugColorFactor: ShaderSemanticsEnum = ...

    Shader semantic for the debug color factor used in debugging mode

    DepthTexture: ShaderSemanticsEnum = ...

    Shader semantic for the depth texture containing encoded depth information

    InvalidObjectUID: -1

    Invalid object UID constant

    IsPointLight: ShaderSemanticsClass = ...

    Shader semantic indicating whether the light source is a point light

    materialNodes: AbstractMaterialContent[] = []
    NonShadowAlpha: ShaderSemanticsEnum = ...

    Shader semantic for controlling the alpha value in non-shadowed regions

    ShadowAlpha: ShaderSemanticsEnum = ...

    Shader semantic for controlling the alpha value in shadowed regions

    ShadowColorFactor: ShaderSemanticsEnum = ...

    Shader semantic for controlling the color factor applied to shadowed areas

    zFarInner: ShaderSemanticsClass = ...

    Shader semantic for the far clipping plane distance of the inner camera

    zNearInner: ShaderSemanticsClass = ...

    Shader semantic for the near clipping plane distance of the inner camera

    Accessors

    • get objectUID(): number

      Gets the unique object identifier

      Returns number

      The object's UID

    • get pixelShaderityObject(): ShaderityObject | undefined

      Gets the pixel shader object associated with this material.

      Returns ShaderityObject | undefined

      The pixel shader object or undefined if not set

    • get uniqueName(): string

      Gets the unique name of this object

      Returns string

      The unique name string

    • get vertexShaderityObject(): ShaderityObject | undefined

      Gets the vertex shader object associated with this material.

      Returns ShaderityObject | undefined

      The vertex shader object or undefined if not set

    Methods

    • Internal

      Sets internal shader parameters specific to this material on a per-material basis. This method handles the configuration of shadow mapping parameters, camera settings, and various rendering components such as skinning, lighting, and morphing. It optimizes performance by caching frequently used values and only updating them when necessary.

      Parameters

      • params: {
            args: RenderingArgWebGL;
            engine: Engine;
            material: Material;
            shaderProgram: WebGLProgram;
        }

        Configuration object containing all necessary rendering parameters

        • args: RenderingArgWebGL

          WebGL-specific rendering arguments containing render state and components

          This method is called internally during the rendering pipeline

        • engine: Engine
        • material: Material

          The material instance being configured

        • shaderProgram: WebGLProgram

          The WebGL shader program to configure

      Returns void

    • Performs shader reflection to extract semantics information from vertex and pixel shaders.

      Parameters

      • engine: Engine
      • vertexShader: ShaderityObject

        The vertex shader object for WebGL

      • pixelShader: ShaderityObject

        The pixel shader object for WebGL

      • vertexShaderWebGpu: ShaderityObject

        The vertex shader object for WebGPU

      • pixelShaderWebGpu: ShaderityObject

        The pixel shader object for WebGPU

      • definitions: string[]

        Array of shader definitions

      Returns ShaderSemanticsInfo[]

      Array of shader semantics information

    • Checks whether this object has a tag with the specified name

      Parameters

      • tagName: string

        The name of the tag to check for

      Returns boolean

      True if the tag exists (value is not null/undefined), false otherwise

    • Checks if this object has a tag with the specified name and value

      Parameters

      • tagName: string

        The tag name to match

      • tagValue: string

        The tag value to match

      Returns boolean

      True if the object has a matching tag, 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.

      Parameters

      • stringArray: string[]

        Array of strings that must all be present in the combined tag string

      Returns boolean

      True if all strings are found in the combined tag string, false otherwise

    • Attempts to set a tag on this object. If the tag already exists, it will be replaced.

      Parameters

      • tag: Tag

        The tag object containing the name and value to set

      Returns boolean

      True if the tag was successfully set, false if the tag name contains invalid characters

    • Attempts to set a unique name for this object

      Parameters

      • name: string

        The desired unique name

      • toAddNameIfConflict: boolean

        If true, appends UID to make name unique when conflicts occur; if false, fails on conflict

      Returns boolean

      True if the name was successfully set, false if there was a conflict and toAddNameIfConflict was false

    • Validates that a tag string contains only allowed characters (alphanumeric and underscore)

      Parameters

      • val: string

        The string to validate

      Returns boolean

      True if the string contains only valid characters, false if it contains invalid characters

    • Searches for the first object that has a specific tag with the given value

      Parameters

      • tag: string

        The tag name to search for

      • value: string

        The tag value to match

      Returns WeakRef<RnObject> | undefined

      WeakRef to the first matching object, or undefined if not found