Stencil buffer in WebGL
问题 How I can use to stencil buffer for my easiest program? I have read many different themes about it, but I not found a detailed guide about it. I want to cut out for hole each side in a created tetrahedron. Please explain to me step by step use stencil buffer? Link for my program 回答1: To use the stencil buffer you have to first request it when you create the webgl context const gl = someCanvasElement.getContext('webgl', {stencil: true}); Then you turn on the stencil test gl.enable(gl.STENCIL