The EXT_texture_filter_anisotropic
extension is part of the WebGL API and exposes two constants for anisotropic filtering (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 Using Extensions in the WebGL tutorial.
Constants
ext.MAX_TEXTURE_MAX_ANISOTROPY_EXT
- This is the
pname
argument to thegl.getParameter()
call, and it returns the maximum available anisotropy. ext.TEXTURE_MAX_ANISOTROPY_EXT
- This is the
pname
argument to thegl.getTexParameter()
andgl.texParameterf()
/gl.texParameteri()
calls and sets the desired maximum anisotropy for a texture.
Examples
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); }
Specifications
Specification | Status | Comment |
EXT_texture_filter_anisotropicThe definition of 'EXT_texture_filter_anisotropic' in that specification. | Recommendation | Initial definition. |
Browser compatibility
The compatibility table in 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.
Update compatibility data on GitHub
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
EXT_texture_filter_anisotropic
|
Chrome Full support 34 Full support 34 Full support 35 Prefixed' Implemented with the vendor prefix: WEBKIT_ |
Edge Full support 12 Full support 12 Full support 79 Prefixed' Implemented with the vendor prefix: WEBKIT_ |
Firefox
Full support 47 |
IE
Full support 11 |
Opera Full support 21 Full support 21 Full support 22 Prefixed' Implemented with the vendor prefix: WEBKIT_ |
Safari
Full support 7 |
WebView Android Full support 37 Full support 37 Full support 37 Prefixed' Implemented with the vendor prefix: WEBKIT_ |
Chrome Android Full support 34 Full support 34 Full support 35 Prefixed' Implemented with the vendor prefix: WEBKIT_ |
Firefox Android
Full support 47 |
Opera Android Full support 21 Full support 21 Full support 22 Prefixed' Implemented with the vendor prefix: WEBKIT_ |
Safari iOS
Full support 7 |
Samsung Internet Android Full support 3.0 Full support 3.0 Full support 4.0 Prefixed' Implemented with the vendor prefix: WEBKIT_ |
Legend
- Full support
- Full support
- Requires a vendor prefix or different name for use.'
- Requires a vendor prefix or different name for use.
See also
EXT_texture_filter_anisotropic by Mozilla Contributors is licensed under CC-BY-SA 2.5.