API

Class LatticePluginMaterial

Material plugin to add hardware accelerated lattice support

Hierarchy (View Summary)

Index
  • Returns a list of custom shader code fragments to customize the shader.

    Parameters

    • shaderType: string

      "vertex" or "fragment"

    • shaderLanguage: any = ShaderLanguage.GLSL

      The shader language to use.

    Returns
        | {
            CUSTOM_VERTEX_DEFINITIONS: string;
            CUSTOM_VERTEX_UPDATE_POSITION: string;
        }
        | null

    null if no code to be added, or a list of pointName => code.

  • Gets the description of the uniforms to add to the ubo (if engine supports ubos) or to inject directly in the vertex/fragment shaders (if engine does not support ubos)

    Parameters

    • shaderLanguage: ShaderLanguage = ShaderLanguage.GLSL

      The shader language to use.

    Returns {
        fragment?: string;
        ubo: { arraySize?: number; name: string; size: number; type: string }[];
        vertex?: string;
    }

    the description of the uniforms

  • Defines if the plugin supports the specified shader language

    Parameters

    • shaderLanguage: ShaderLanguage

      defines the shader language to check

    Returns boolean

    true if supported, false otherwise