How to render to a texture.| webgl2fundamentals.org
Using independent indices| webgl2fundamentals.org