API

Class CustomMaterial

Customized material

Hierarchy (View Summary)

Index
_createdShaderName: string

Name of the shader

_customAttributes: string[]

List of the custom attributes

_customUniform: string[]

List of custom uniforms

_newSamplerInstances: { [name: string]: Texture }

Instances of the new sampler objects

_newUniformInstances: { [name: string]: any }

Instances of the new uniform objects

_newUniforms: string[]

Names of the new uniforms

CustomParts: ShaderSpecialParts

Custom shader structure

FragmentShader: string

Fragment shader string

VertexShader: string

Vertex shader string

ShaderIndexer: number = 1

Index for each created shader

  • Builds the material

    Parameters

    • shaderName: string

      name of the shader

    • uniforms: string[]

      list of uniforms

    • uniformBuffers: string[]

      list of uniform buffers

    • samplers: string[]

      list of samplers

    • defines: any

      list of defines

    • Optionalattributes: string[]

      list of attributes

    Returns string

    the shader name