IMeshBlendingPostProcessOptions | Babylon.js API documentation

API
Babylon.js API documentation
    Preparing search index...

    Interface IMeshBlendingPostProcessOptions

    Options used to create a mesh-blending post process.

    interface IMeshBlendingPostProcessOptions {
        allowEmptySourceTexture?: boolean;
        attributeNames?: string[];
        baseColorTexture?: BaseTexture;
        blockCompilation?: boolean;
        camera?: Nullable<Camera>;
        debugMode?: MeshBlendDebugMode;
        defines?: Nullable<string | string[]>;
        depthTexture: BaseTexture;
        depthType?: MeshBlendDepthType;
        effectWrapper?: ThinMeshBlendingPostProcess;
        engine?: AbstractEngine;
        extraInitializations?: (useWebGPU: boolean, list: Promise<any>[]) => void;
        extraInitializationsAsync?: () => Promise<void>;
        fragmentShader?: string;
        height?: number;
        indexParameters?: any;
        meshBlendTagTexture: BaseTexture;
        name?: string;
        onCompiled?: Nullable<(effect: Effect) => void>;
        onError?: (effect: Effect, errors: string) => void;
        quality?: MeshBlendQuality;
        radiusClasses?: readonly [
            IMeshBlendRadiusDefinition,
            IMeshBlendRadiusDefinition,
            IMeshBlendRadiusDefinition,
            IMeshBlendRadiusDefinition,
        ];
        reusable?: boolean;
        samplerNames?: string[];
        samplers?: Nullable<string[]>;
        samplingMode?: number;
        shaderLanguage?: ShaderLanguage;
        size?: number | { height: number; width: number };
        slopeFactor?: number;
        textureFormat?: number;
        textureType?: number;
        uniformBuffers?: Nullable<string[]>;
        uniformNames?: string[];
        uniforms?: Nullable<string[]>;
        useAsPostProcess?: boolean;
        useShaderStore?: boolean;
        vertexShader?: string;
        vertexUrl?: string;
        width?: number;
    }

    Hierarchy (View Summary)

    Index
    allowEmptySourceTexture?: boolean

    Sets this property to true if the fragment shader doesn't use a textureSampler texture (default: false).

    attributeNames?: string[]

    Attributes to use in the shader (default: ["position"])

    baseColorTexture?: BaseTexture

    Optional linear base-color/albedo geometry texture aligned with SceneColor.

    When omitted, shadow estimation is compiled out.

    blockCompilation?: boolean

    If the shader should not be compiled immediately. (default: false)

    camera?: Nullable<Camera>

    The camera that the post process will be attached to (default: null)

    debugMode?: MeshBlendDebugMode

    Debug visualization to compile into the shader. Off renders the final blended result.

    defines?: Nullable<string | string[]>

    Defines to use in the shader

    depthTexture: BaseTexture

    The view-depth or screen-depth texture aligned with the packed tag texture.

    depthType?: MeshBlendDepthType

    Representation stored in the depth texture.

    Optional caller-owned thin mesh-blending effect wrapper. A wrapper can be attached to only one classic post process at a time.

    Engine to use to create the effect

    extraInitializations?: (useWebGPU: boolean, list: Promise<any>[]) => void

    Defines additional code to call to prepare the shader code

    extraInitializationsAsync?: () => Promise<void>

    Additional async code to run before preparing the effect

    fragmentShader?: string

    Fragment shader for the effect

    height?: number

    The height of the texture created for this post process. This parameter (and width) is only used when passing a value for the 5th parameter (options) to the PostProcess constructor function. If you use a PostProcessOptions for the 3rd parameter of the constructor, size is used instead of width and height.

    indexParameters?: any
    The index parameters to be used for babylons include syntax "#include[0..varyingCount]". (default: undefined) See usage in babylon.blurPostProcess.ts and kernelBlur.vertex.fx
    meshBlendTagTexture: BaseTexture

    The packed R8UI mesh-blending tag texture.

    name?: string

    The friendly name of the effect (default: "effectWrapper")

    onCompiled?: Nullable<(effect: Effect) => void>

    Callback when effect is compiled

    onError?: (effect: Effect, errors: string) => void

    Callback when there is an error compiling the effect

    Compile-time quality variant.

    Radius definitions indexed by packed radius class. Exactly four definitions are required.

    reusable?: boolean

    If the post process can be reused on the same frame. (default: false)

    samplerNames?: string[]

    Texture sampler names to use in the shader

    samplers?: Nullable<string[]>

    Alias for samplerNames. Note that if it is provided, it takes precedence over samplerNames.

    samplingMode?: number

    The sampling mode to be used by the shader (default: Constants.TEXTURE_NEAREST_SAMPLINGMODE)

    shaderLanguage?: ShaderLanguage

    The language the shader is written in (default: GLSL)

    size?: number | { height: number; width: number }

    The size of the post process texture. It is either a ratio to downscale or upscale the texture create for this post process, or an object containing width and height values. Default: 1

    slopeFactor?: number

    Contact-slope narrowing factor. A value of 1 disables narrowing.

    textureFormat?: number

    Format of the texture created for this post process (default: TEXTUREFORMAT_RGBA)

    textureType?: number

    Type of the texture created for this post process (default: Constants.TEXTURETYPE_UNSIGNED_BYTE)

    uniformBuffers?: Nullable<string[]>

    The list of uniform buffers used in the shader (if any)

    uniformNames?: string[]

    Uniforms to use in the shader

    uniforms?: Nullable<string[]>

    Alias for uniformNames. Note that if it is provided, it takes precedence over uniformNames.

    useAsPostProcess?: boolean

    If the effect should be used as a post process (default: false). If true, the effect will be created with a "scale" uniform and a "textureSampler" sampler

    useShaderStore?: boolean

    Use the shader store instead of direct source code

    vertexShader?: string

    Vertex shader for the effect (default: "postprocess")

    vertexUrl?: string

    Alias for vertexShader

    width?: number

    The width of the texture created for this post process. This parameter (and height) is only used when passing a value for the 5th parameter (options) to the PostProcess constructor function. If you use a PostProcessOptions for the 3rd parameter of the constructor, size is used instead of width and height.