Is there a way in WebGL to quickly invert the stencil buffer?
问题 I'm using WebGL 1.0. I drew a circle to the stencil buffer, and now I want to use this stencil buffer multiple times without clearing it. The first time I use it, I enable stencil testing with: gl.enable(GL.STENCIL_TEST); Then, I perform my drawing to the color buffer. After this, at some later date, I want to draw again , but this time I want to clip to the inverse of what is in the stencil buffer. I know that I can draw to the stencil buffer again, but since I didn't use gl.stencilOp(GL