Movatterモバイル変換


[0]ホーム

URL:


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

GPUTexture: format 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.

Theformat read-only property of theGPUTexture interface represents the format of theGPUTexture.

This is set via theformat property in the descriptor object passed into the originatingGPUDevice.createTexture() call.

Value

An enumerated value. See the specification'sTexture formats section for all the possible values. Also seeTier 1 and Tier 2 texture formats.

Examples

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

Specifications

Specification
WebGPU
# dom-gputexture-format

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2026 Movatter.jp