← Lab index
THREE.JS / WEBGL EXTENSION BOUNDARY

Clip vertices in the vertex stage.

This focused contract keeps the official example's essential path: enable WEBGL_clip_cull_distance, opt a ShaderMaterial into clip-distance output, and move a vertex-space plane with a time uniform while the fragment shader preserves vertex colors.

This route claims the installed WebGLRenderer, extension probe and enable call, deterministic 600-vertex colored triangle fixture, gl_ClipDistance[0] vertex output, material.extensions.clipCullDistance, time-uniform animation, pause/manual phase controls, reset, and teardown. The official Math.random stream, Stats panel, exact page/pixel composition, device/compiler matrix, extension behavior outside this browser, and whole-example fidelity remain separate.

Source: official three.js WebGL clip-cull distance example.