EXT_texture_filter_anisotropic 扩展属于 WebGL API 和暴露了 2 个常量为 AF (各向异性过滤) .

AF improves the quality of mipmapped texture access when viewing a textured primitive at an oblique angle. Using just mipmapping, these lookups have a tendency to average to grey.

WebGL extensions are available using the WebGLRenderingContext.getExtension() method. For more information, see also 使用扩展 WebGL 教程 .

可用性: This extension is available to both, WebGL1 and WebGL2 上下文。

常量

ext.MAX_TEXTURE_MAX_ANISOTROPY_EXT
这是 pname 自变量到 gl.getParameter() call, and it returns the maximum available anisotropy.
ext.TEXTURE_MAX_ANISOTROPY_EXT
这是 pname 自变量到 gl.getTexParameter() and gl.texParameterf() / gl.texParameteri() calls and sets the desired maximum anisotropy for a texture.

范例

var texture = gl.createTexture();
gl.bindTexture(gl.TEXTURE_2D, texture);
var ext = (
  gl.getExtension('EXT_texture_filter_anisotropic') ||
  gl.getExtension('MOZ_EXT_texture_filter_anisotropic') ||
  gl.getExtension('WEBKIT_EXT_texture_filter_anisotropic')
);
if (ext){
  var max = gl.getParameter(ext.MAX_TEXTURE_MAX_ANISOTROPY_EXT);
  gl.texParameterf(gl.TEXTURE_2D, ext.TEXTURE_MAX_ANISOTROPY_EXT, max);
}
					

规范

规范 状态 注释
EXT_texture_filter_anisotropic
The definition of 'EXT_texture_filter_anisotropic' in that specification.
推荐 初始定义。

浏览器兼容性

更新 GitHub 上的兼容性数据
桌面 移动
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
EXT_texture_filter_anisotropic Chrome Yes
Yes
Yes Prefixed
Prefixed Implemented with the vendor prefix: WEBKIT_
Edge ≤18 Firefox 17 IE ? Opera Yes
Yes
Yes Prefixed
Prefixed Implemented with the vendor prefix: WEBKIT_
Safari ? WebView Android Yes
Yes
Yes Prefixed
Prefixed Implemented with the vendor prefix: WEBKIT_
Chrome Android Yes
Yes
Yes Prefixed
Prefixed Implemented with the vendor prefix: WEBKIT_
Firefox Android ? Opera Android Yes
Yes
Yes Prefixed
Prefixed Implemented with the vendor prefix: WEBKIT_
Safari iOS ? Samsung Internet Android Yes
Yes
Yes Prefixed
Prefixed Implemented with the vendor prefix: WEBKIT_

图例

完整支持

完整支持

兼容性未知 ?

兼容性未知

要求使用供应商前缀或不同名称。

要求使用供应商前缀或不同名称。

另请参阅

元数据

  • 最后修改: