files/en-us/web/api/webglsampler/index.md
{{APIRef("WebGL")}}{{AvailableInWorkers}}
The WebGLSampler interface is part of the WebGL 2 API and stores sampling parameters for {{domxref("WebGLTexture")}} access inside of a shader.
{{InheritanceDiagram}}
When working with WebGLSampler objects, the following methods of the {{domxref("WebGL2RenderingContext")}} are useful:
WebGLSampler objectin this example, gl must be a {{domxref("WebGL2RenderingContext")}}. WebGLSampler objects are not available in WebGL 1.
const sampler = gl.createSampler();
{{Specifications}}
{{Compat}}