Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. Web APIs
  3. GPUTexture
  4. sampleCount

GPUTexture: sampleCount property

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 insecure contexts (HTTPS), in some or allsupporting browsers.

Note: This feature is available inWeb Workers.

ThesampleCount read-only property of theGPUTexture interface represents the sample count of theGPUTexture.

This is set via thesampleCount property in the descriptor object passed into the originatingGPUDevice.createTexture() call. If omitted, this defaults to 1.

Value

A number. Possible values are:

  • 1
  • 4, which indicates a multi-sampled texture.

Examples

js
// …const depthTexture = device.createTexture({  size: [canvas.width, canvas.height],  format: "depth24plus",  usage: GPUTextureUsage.RENDER_ATTACHMENT,});console.log(depthTexture.sampleCount); // 1

Specifications

Specification
WebGPU
# dom-gputexture-samplecount

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2026 Movatter.jp