WebGLSampler
注意:此功能在 Web Workers 中可用。
WebGLSampler 接口是 WebGL 2 API 的一部分,用于在着色器内部存储 WebGLTexture 访问的采样参数。
在使用 WebGLSampler 对象时,WebGL2RenderingContext 的以下方法非常有用:
示例
创建 WebGLSampler 对象
在此示例中,gl 必须是一个 WebGL2RenderingContext。WebGL 1 中不提供 WebGLSampler 对象。
js
const sampler = gl.createSampler();
规范
| 规范 |
|---|
| WebGL 2.0 规范 # 3.3 |
浏览器兼容性
加载中…