API

Interface IComputeEffectCreationOptions

Options to be used when creating a compute effect.

interface IComputeEffectCreationOptions {
    defines: any;
    entryPoint?: string;
    onCompiled: Nullable<(effect: ComputeEffect) => void>;
    onError: Nullable<(effect: ComputeEffect, errors: string) => void>;
    processFinalCode?: Nullable<(code: string) => string>;
    useExplicitComputePipelineLayout?: boolean;
}
Index
defines: any

Define statements that will be set in the shader.

entryPoint?: string

The name of the entry point in the shader source (default: "main")

onCompiled: Nullable<(effect: ComputeEffect) => void>

Callback that will be called when the shader is compiled.

onError: Nullable<(effect: ComputeEffect, errors: string) => void>

Callback that will be called if an error occurs during shader compilation.

processFinalCode?: Nullable<(code: string) => string>

If provided, will be called with the shader code so that this code can be updated before it is compiled by the GPU

useExplicitComputePipelineLayout?: boolean

If true, the engine should create an explicit pipeline layout for the compute effect instead of using an automatic layout.