API

Class PBRCustomMaterial

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: ShaderAlbedoParts

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

    • Optionaloptions: any

      options to compile the shader

    Returns string

    the shader name

  • Disposes the material

    Parameters

    • OptionalforceDisposeEffect: boolean

      specifies if effects should be forcefully disposed

    • OptionalforceDisposeTextures: boolean

      specifies if textures should be forcefully disposed

    Returns void