WebGLSampler
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since September 2021.
WebGL 2 API 的 WebGLSampler
接口存储一系列采样参数,供 WebGLTexture
在着色器中访问。
当使用 WebGLSampler
对象时,有以下 WebGL2RenderingContext
相关方法:
示例
创建 WebGLSampler
对象
在本例中,gl
必须是一个 WebGL2RenderingContext
对象。因为 WebGLSampler
在 WebGL 1 中是不可用的。
js
var sampler = gl.createSampler();
规范
Specification |
---|
WebGL 2.0 Specification # 3.3 |
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
WebGLSampler |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.