Sampler

Sampler object used to sample textures in a shader.

Constructors

new Sampler(options: SamplerOptions): Sampler

Properties

binding

binding: number

canvas

canvas: HTMLCanvasElement

canvasFormat

canvasFormat: GPUTextureFormat

context

gpuSampler

gpuSampler: GPUSampler

label

label: string

samplerOptions

samplerOptions: GPUSamplerDescriptor

visibility

visibility: number

Methods

getDevice

getDevice(): Promise<GPUDevice>

setCanvas

setCanvas(canvas: HTMLCanvasElement): void

setDevice

setDevice(d: GPUDevice): void

setLabel

setLabel(label: string): void

updateSampler

updateSampler(options: GPUSamplerDescriptor): Promise<void>

You are viewing the beta docs. You may find the legacy docs more helpful.