Interface IComputeShaderOptions
interface IComputeShaderOptions {
bindingsMapping: ComputeBindingMapping;
defines?: string[];
entryPoint?: string;
processFinalCode?: Nullable<(code: string) => string>;
useExplicitComputePipelineLayout?: boolean;
}
bindingsMapping: ComputeBindingMapping;
defines?: string[];
entryPoint?: string;
processFinalCode?: Nullable<(code: string) => string>;
useExplicitComputePipelineLayout?: boolean;
}
Index
Properties
bindings Mapping
list of bindings mapping (key is property name, value is binding location) Must be provided because browsers don't support reflection for wgsl shaders yet (so there's no way to query the binding/group from a variable name) TODO: remove this when browsers support reflection for wgsl shaders
Optionaldefines
defines?: string[]
The list of defines used in the shader
Optionalentry Point
entryPoint?: string
The name of the entry point in the shader source (default: "main")
Optionalprocess Final Code
If provided, will be called with the shader code so that this code can be updated before it is compiled by the GPU
Optionaluse Explicit Compute Pipeline Layout
useExplicitComputePipelineLayout?: boolean
If true, the engine should create an explicit pipeline layout for this compute shader instead of using an automatic layout.
Defines the options associated with the creation of a compute shader.