Interface IMaterialUserData

interface IMaterialUserData {
    __envIntensity?: number;
    __importData?: any;
    __isVariation?: boolean;
    __needsSourceBuffer?: boolean;
    __sourceBlob?: IFile;
    __sourceBuffer?: ArrayBuffer;
    _clearcoatTint?: {
        enableTint?: boolean;
        ior?: number;
        thickness?: number;
        tintColor?: string | number | Color;
    };
    _customBumpMap?: null | ITexture;
    _customBumpScale?: number;
    _fragmentClippingExt?: {
        clipEnabled?: boolean;
        clipInvert?: boolean;
        clipMode?: FragmentClippingMode;
        clipParams?: Vector4 | Vector4Tuple;
        clipPosition?: Vector4 | Vector4Tuple;
    };
    _hasCustomBump?: boolean;
    _noiseBumpMat?: {
        bumpNoiseParams?: Vector2Tuple | Vector2;
        bumpScale?: number;
        flakeClamp?: number;
        flakeFallOffParams?: Vector3 | Vector3Tuple;
        flakeParams?: Vector4 | Vector4Tuple;
        flakeRadius?: number;
        flakeScale?: number;
        hasBump?: boolean;
        useColorFlakes?: boolean;
    };
    cloneCount?: number;
    cloneId?: string;
    disposeOnIdle?: boolean;
    forcedLinearDepth?: number;
    gBufferData?: {
        materialId?: number;
        tonemapEnabled?: boolean;
        [key: string]: any;
    };
    inverseAlphaMap?: boolean;
    pluginsDisabled?: boolean;
    postTonemap?: boolean;
    renderToDepth?: boolean;
    renderToGBuffer?: boolean;
    rootPath?: string;
    runtimeMaterial?: boolean;
    separateEnvMapIntensity?: boolean;
    setDirty?: ((options?) => void);
    ssaoCastDisabled?: boolean;
    ssaoDisabled?: boolean;
    sscsDisabled?: boolean;
    ssreflDisabled?: boolean;
    ssreflNonPhysical?: boolean;
    uuid?: string;
    [key: string]: any;
}

Hierarchy (view full)

Indexable

[key: string]: any

Properties

__envIntensity?: number
__importData?: any

extra arbitrary data saved by the importer that can be used by the plugins (like gltf material variants)

__isVariation?: boolean
__needsSourceBuffer?: boolean

This can be set to true in the importer to indicate that the source buffer should be loaded and cached in the userdata during processRaw

__sourceBlob?: IFile

Cached source blob for the asset

__sourceBuffer?: ArrayBuffer

Cached source buffer for the asset (only cached when __needsSourceBuffer is set)

_clearcoatTint?: {
    enableTint?: boolean;
    ior?: number;
    thickness?: number;
    tintColor?: string | number | Color;
}

Type declaration

  • Optional enableTint?: boolean
  • Optional ior?: number
  • Optional thickness?: number
  • Optional tintColor?: string | number | Color
_customBumpMap?: null | ITexture
_customBumpScale?: number
_fragmentClippingExt?: {
    clipEnabled?: boolean;
    clipInvert?: boolean;
    clipMode?: FragmentClippingMode;
    clipParams?: Vector4 | Vector4Tuple;
    clipPosition?: Vector4 | Vector4Tuple;
}

Type declaration

_hasCustomBump?: boolean
_noiseBumpMat?: {
    bumpNoiseParams?: Vector2Tuple | Vector2;
    bumpScale?: number;
    flakeClamp?: number;
    flakeFallOffParams?: Vector3 | Vector3Tuple;
    flakeParams?: Vector4 | Vector4Tuple;
    flakeRadius?: number;
    flakeScale?: number;
    hasBump?: boolean;
    useColorFlakes?: boolean;
}

Type declaration

  • Optional bumpNoiseParams?: Vector2Tuple | Vector2
  • Optional bumpScale?: number
  • Optional flakeClamp?: number
  • Optional flakeFallOffParams?: Vector3 | Vector3Tuple
  • Optional flakeParams?: Vector4 | Vector4Tuple
  • Optional flakeRadius?: number
  • Optional flakeScale?: number
  • Optional hasBump?: boolean
  • Optional useColorFlakes?: boolean
cloneCount?: number
cloneId?: string
disposeOnIdle?: boolean

Automatically dispose material when not used by any object in the scene

Default

true
forcedLinearDepth?: number

Force a depth value in GBuffer. This is useful to force center values like 0 to the depth.

gBufferData?: {
    materialId?: number;
    tonemapEnabled?: boolean;
    [key: string]: any;
}

Type declaration

  • [key: string]: any
  • Optional materialId?: number
  • Optional tonemapEnabled?: boolean

    Default

    true
    
inverseAlphaMap?: boolean
pluginsDisabled?: boolean

General flag to disable multiple plugins on the material at once, like SSAO, SSR, Bloom etc.

postTonemap?: boolean

Deprecated

Use postTonemap.tonemapEnabled instead. This is kept because used in old files.

renderToDepth?: boolean

Same as renderToGBuffer but for depth only, not normal or flags etc

renderToGBuffer?: boolean
rootPath?: string
runtimeMaterial?: boolean
separateEnvMapIntensity?: boolean
setDirty?: ((options?) => void)

Type declaration

Deprecated

ssaoCastDisabled?: boolean

Cast SSAO on other objects. if casting is not working when this is false, ensure render to depth is true, like for transparent objects

ssaoDisabled?: boolean

Disable SSAOPlugin for this material.

sscsDisabled?: boolean

For SSCSPlugin

ssreflDisabled?: boolean

For SSRPlugin

ssreflNonPhysical?: boolean

For SSRPlugin

uuid?: string

Generated using TypeDoc