API

Interface CustomPostProcessTaskConfig

Application-defined fullscreen color pass, using the built-in post-process binding convention.

interface CustomPostProcessTaskConfig {
    alphaMode?: PostProcessAlphaMode;
    clear?: boolean;
    extraTextures?: readonly RenderTarget[];
    extraTextureWGSL?: WgslSource;
    fragmentWGSL: WgslSource;
    name?: string;
    sourceSamplingMode?: PostProcessSamplingMode;
    sourceTexture: RenderTarget;
    targetTexture?: RenderTarget | null;
    uniformByteLength?: number;
    uniformWGSL?: WgslSource;
    viewport?: NormalizedViewport | null;
    writeUniforms?: (data: Float32Array) => void;
}

Hierarchy (View Summary)

Index
clear?: boolean

Clear the target before drawing. Set false when several viewport passes share a target.

extraTextures?: readonly RenderTarget[]

Borrowed, filterable single-sample color targets, in binding order.

extraTextureWGSL?: WgslSource

Declare additional texture_2d<f32> inputs at group 0 / bindings 2 + i.

fragmentWGSL: WgslSource

WGSL defining fn applyPostProcess(color: vec4f, uv: vec2f) -> vec4f.

name?: string
sourceSamplingMode?: PostProcessSamplingMode
sourceTexture: RenderTarget
targetTexture?: RenderTarget | null
uniformByteLength?: number

Uniform payload size in bytes; allocation is rounded up to 16 bytes.

uniformWGSL?: WgslSource

Uniform declarations at group 0 / binding 2 + extraTextures.length (2 without extras).

viewport?: NormalizedViewport | null
writeUniforms?: (data: Float32Array) => void

Fill reusable, zeroed float storage on record and task.updateUniforms().