const ext = gl.getExtension("WEBGL_depth_texture");
gl.texImage2D(
gl.TEXTURE_2D,
0,
gl.DEPTH_COMPONENT,
512,
512,
0,
gl.DEPTH_COMPONENT,
gl.UNSIGNED_SHORT,
null,
);WEBGL_depth_texture extension / notebook
WEBGL_depth_texture extension
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.