@stereograph/teiaviewer - v18.12.0-dev
    Preparing search index...

    Class BatchedMaterial

    Hierarchy

    • (Anonymous class)<typeof Material, this> & Material<this>
      • BatchedMaterial
    Index

    Constructors

    • Returns BatchedMaterial

    Properties

    customProgramCacheKey: () => string & () => string = ...

    In case onBeforeCompile is used, this callback can be used to identify values of settings used in onBeforeCompile, so three.js can reuse a cached shader or recompile the shader as needed.

    onBeforeCompile: (parameters: WebGLProgramParametersWithUniforms) => void & (
        parameters: WebGLProgramParametersWithUniforms,
        renderer: WebGLRenderer,
    ) => void = ...

    An optional callback that is executed immediately before the shader program is compiled. This function is called with the shader source code as a parameter. Useful for the modification of built-in materials, but the recommended approach moving forward is to use WebGPURenderer with the new Node Material system and [TSL]https://github.com/mrdoob/three.js/wiki/Three.js-Shading-Language. Unlike properties, the callback is not supported by .clone(), .copy() and .toJSON(). This callback is only supported in WebGLRenderer (not WebGPURenderer).

    WebGL program parameters

    WebGLRenderer context that is initializing the material

    Accessors

    Methods

    • Parameters

      Returns void

    • Parameters

      • parameters: WebGLProgramParametersWithUniforms

      Returns void

    • Frees the GPU-related resources allocated by this instance. Call this method whenever this instance is no longer used in your app.

      Material textures must be disposed of by the dispose() method of Texture.

      Returns void

    • Parameters

      Returns void