title: Use WebGL texture as a Three.js Texture map
body: <p>I have a scene with plane which should use WebGL texture (created using <code>gl.createTexture()</code>) as a map for material. Basically, it doesn't matter how this texture will be used, I just need to find a way to pass it to the <code>ShaderMaterial</code> with certain uniform. WebGL texture updates every frame.</p>
  
  <p>The texture is rendered in context of other canvas element and can be used in that context like this:</p>
  
  <pre><code>var imageLocation = gl.getUniformLocation(program, "u_image");
  gl.uniform1i(imageLocation, 0);
  gl.activeTexture(gl.TEXTURE0);
  gl.bindTexture(gl.TEXTURE_2D, targetTexture1);
  </code></pre>
  
  <p>I've already tried <a href="https://stackoverflow.com/questions/29325906/can-you-use-raw-webgl-textures-with-three-js?rq=1">this solution</a>. But it seems like <code>THREE.Texture()</code> doesn't grab data from raw WebGL texture.</p>