Share the same texture uniform input and WebGLRenderTarget

It is not possible to use a texture to read and write from/into a framebuffer in the same frame. The WebGL spec considers this as an invalid operation.

In three.js terms that means you can use the texture property of a render target as a input texture (e.g. material.map = renderTarget.texture) and also use the render target as the render destination (meaning renderer.setRenderTarget( renderTarget )) in the same frame.

2 Likes