GPUDevice: phương thức createSampler()

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

Note: This feature is available in Web Workers.

Phương thức createSampler() của giao diện GPUDevice tạo một GPUSampler, điều khiển cách shader biến đổi và lọc dữ liệu tài nguyên texture.

Cú pháp

js
createSampler(descriptor)

Tham số

descriptor Optional

Đối tượng mô tả sampler cần tạo.

Giá trị trả về

Một thể hiện GPUSampler.

Đặc tả

Specification
WebGPU
# dom-gpudevice-createsampler

Tương thích trình duyệt