Engine API Reference - v2.6.1
    Preparing search index...

    Interface ShaderDesc

    The description of the shader used by the ShaderMaterial.

    interface ShaderDesc {
        attributes?: {};
        fragmentCode?: string;
        shaderLanguage?: string;
        uniqueName: string;
        vertexCode?: string;
    }
    Index

    Properties

    attributes?: {}

    Object detailing the mapping of vertex shader attribute names to semantics SEMANTIC_*. This enables the engine to match vertex buffer data as inputs to the shader. Defaults to undefined, which generates the default attributes.

    fragmentCode?: string

    The fragment shader code.

    shaderLanguage?: string

    The language used by the shader source. Can be:

    Defaults to SHADERLANGUAGE_GLSL.

    uniqueName: string

    Unique name for the shader. If a shader with this name already exists, it will be returned instead of a new shader instance.

    vertexCode?: string

    The vertex shader code.