API

Class PBRAnisotropicConfiguration

Plugin that implements the anisotropic component of the PBR material

Hierarchy (View Summary)

Index
direction: Vector2 = ...

Defines if the effect is along the tangents, bitangents or in between. By default, the effect is "stretching" the highlights along the tangents.

doNotSerialize: boolean = false

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

intensity: number = 1

Defines the anisotropy strength (between 0 and 1) it defaults to 1.

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.

isEnabled: boolean

Defines if the anisotropy is enabled in the material.

legacy: boolean

Defines if the anisotropy is in legacy mode for backwards compatibility before 6.4.0.

Stores the anisotropy values in a texture. rg is direction (like normal from -1 to 1) b is a intensity

  • 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