evanw / lightgl.js

A lightweight WebGL library
MIT License
1.52k stars 146 forks source link

Add option to attach a stencil buffer to textures. #14

Open marcosscriven opened 11 years ago

marcosscriven commented 11 years ago

While I was implementing an image-based CSG algorithm in WebGL, I needed to be able to render to a texture with stencil tests.

I've added a boolean option to add a stencil to the texture, which of course defaults to the original behaviour if not set.

Have also updated the associated documentation comment.