API

Class DetailMapConfiguration

Hierarchy (View Summary)

Index
bumpLevel: number = 1

Defines how strong the bump effect from the detail map is Bigger values mean stronger effect

diffuseBlendLevel: number = 1

Defines how strongly the detail diffuse/albedo channel is blended with the regular diffuse/albedo texture Bigger values mean stronger blending

doNotSerialize: boolean = false

Specifies if the material plugin should be serialized, true to skip serialization

markAllDefinesAsDirty: () => void

Helper function to mark defines as being dirty.

name: string

Defines the name of the plugin

priority: number = 500

Defines the priority of the plugin. Lower numbers run first.

registerForExtraEvents: boolean = false

Indicates that this plugin should be notified for the extra events (HasRenderTargetTextures / FillRenderTargetTextures / HardBindForSubMesh)

resolveIncludes: boolean = false

Indicates that any #include directive in the plugin code must be replaced by the corresponding code.

roughnessBlendLevel: number = 1

Defines how strongly the detail roughness channel is blended with the regular roughness value Bigger values mean stronger blending. Only used with PBR materials

isEnabled: boolean

Enable or disable the detail map on this material

normalBlendMethod: number

The method used to blend the bump and detail normals together

The detail texture of the material.

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

    Parameters

    • _shaderType: string

      "vertex" or "fragment"

    • _shaderLanguage: ShaderLanguage = ShaderLanguage.GLSL

      The shader language to use.

    Returns Nullable<{ [pointName: string]: string }>

    null if no code to be added, or a list of pointName => code. Note that pointName can also be a regular expression if it starts with a !. In that case, the string found by the regular expression (if any) will be replaced by the code provided.

  • 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)

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

    the description of the uniforms

  • Checks whether the detail map textures are ready for the sub mesh.

    Parameters

    • defines: MaterialDetailMapDefines

      defines the material defines to inspect

    • scene: Scene

      defines the scene to use for readiness checks

    • engine: AbstractEngine

      defines the engine to use for readiness checks

    Returns boolean

    true if the detail map is ready