MDN self-hosted library · e01.org

EXT_polygon_offset_clamp: polygonOffsetClampEXT() method

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

js
const ext = gl.getExtension("EXT_polygon_offset_clamp");

gl.enable(gl.POLYGON_OFFSET_FILL);
ext.polygonOffsetClampEXT(2, 3, 0.001);
js
gl.getParameter(gl.POLYGON_OFFSET_FACTOR); // 2
gl.getParameter(gl.POLYGON_OFFSET_UNITS); // 3
gl.getParameter(ext.POLYGON_OFFSET_CLAMP_EXT); // 0.0010000000474974513