interface, represents material interface

Hierarchy

  • Material

Methods

  • add Image sampler, after what you'll can get acess to Image and sampler in shader by formula: ImageIndex = i * 2. samplerIndex = i * 2 + 1. Where i is Image index in Images list (which you can get by getImages call). Note that you need to export Images samplers in shader manually and sampler name in name must match with sampler name in material.

    Parameters

    Returns void

  • adds shader Parameter to Parameters list, after what you'll can get access to this Parameter in shader by it's name. Type of Parameter in shader will match with type of Parameter, except int, float, vector2, vector3, this types will be replaces on Vec4, which x component will have needed value, other components will be filled by garbage.

    Parameters

    Returns void

  • find Parameter by name

    Parameters

    • name: string

      name

    Returns Parameter

    Parameter or null

  • Returns string

    material name

  • Returns Vector<string>

    list of samplers name

  • removes Image from list (if exist). Will be ignored if effect was activated.

    Parameters

    • sampler: string

      sampler name

    Returns void

  • removes Parameter from list.

    Parameters

    Returns void

  • sets render state

    Parameters

    • state: State

      render state

    Returns void

  • set material geometry topology.

    Parameters

    • topology: GeometryTopology

      geometry topology type.Can be trianglesList, linesList, pointsList. Default: trianglesList

    Returns void