MDN self-hosted library · e01.org

WebGLRenderingContext: sampleCoverage() method

Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.

js
gl.enable(gl.SAMPLE_COVERAGE);
gl.sampleCoverage(0.5, false);
js
gl.getParameter(gl.SAMPLE_COVERAGE_VALUE); // 0.5
gl.getParameter(gl.SAMPLE_COVERAGE_INVERT); // false