API

Interface ShaderSamplerDecl

A sampler declaration: WGSL identifier and the bound texture's sample type.

interface ShaderSamplerDecl {
    comparison?: boolean;
    name: string;
    sampleType?: "depth" | "float" | "unfilterable-float";
    viewDimension?: "2d" | "2d-array";
}
Index
comparison?: boolean

Bind a hardware comparison sampler (sampler_comparison) for depth compare / PCF filtering. Implies a depth texture. Default false.

name: string
sampleType?: "depth" | "float" | "unfilterable-float"
viewDimension?: "2d" | "2d-array"

Texture view dimension. Default "2d". Use "2d-array" for layered maps such as cascaded-shadow (CSM) depth arrays.