I'm attempting to transfer the Bokeh2 Depth of Field effect to an effect composer pass. Every time I try to run it, I encounter the following error:
glDrawElements: Source and destination textures of the draw are the same.
Below is the render function code snippet:
render: function ( renderer, writeBuffer, readBuffer, delta, maskActive ) {
renderer.clear();
// Render scene into texture
this.scene.overrideMaterial = null;
renderer.render( this.scene, this.camera, this.rtTextureColor, true );
// Render depth into texture
this.scene.overrideMaterial = this.material_depth;
renderer.render( this.scene, this.camera, this.rtTextureDepth, true );
// Render bokeh composite
renderer.render( this.scene, this.camera );
}