web api instance method
WebGL2RenderingContext: samplerParameter[if]() method
Available in workers
The WebGL2RenderingContext.samplerParameter[if]() methods
of the WebGL 2 API set
WebGLSampler parameters.
Syntax
samplerParameteri(sampler, pname, param)
samplerParameterf(sampler, pname, param)
Parameters
-
sampler- : A
WebGLSamplerobject.
- : A
-
pname- : A
GLenumspecifying which parameter to set. Possible values:gl.TEXTURE_COMPARE_FUNC- : A
GLenumspecifying the texture comparison function.
- : A
gl.TEXTURE_COMPARE_MODE- : A
GLenumspecifying the texture comparison mode.
- : A
gl.TEXTURE_MAG_FILTER- : A
GLenumspecifying the texture magnification filter.
- : A
gl.TEXTURE_MAX_LOD- : A
GLfloatspecifying the maximum level-of-detail value.
- : A
gl.TEXTURE_MIN_FILTER- : A
GLenumspecifying the texture minification filter
- : A
gl.TEXTURE_MIN_LOD- : A
GLfloatspecifying the minimum level-of-detail value.
- : A
gl.TEXTURE_WRAP_R- : A
GLenumspecifying the texture wrapping function for the texture coordinate r.
- : A
gl.TEXTURE_WRAP_S- : A
GLenumspecifying the texture wrapping function for the texture coordinate s.
- : A
gl.TEXTURE_WRAP_T- : A
GLenumspecifying the texture wrapping function for the texture coordinate t.
- : A
- : A
-
param
Return value
None (undefined).
Examples
const sampler = gl.createSampler();
gl.samplerParameteri(sampler, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
Specifications
SpecificationsStandards references are available on the canonical MDN page.
Browser compatibility
Browser compatibilityCompatibility data is available on the canonical MDN page.