Im trying to understand how to write a shader in three.js with multiple buffers by converting a shader from shaderwith. I found this example:
https://codepen.io/lickedwindows/pen/jGOLJr
But when I run it with the newest version of Three.js I run into the errors:
“THREE.WebGLRenderer.render(): the renderTarget argument has been
removed. Use .setRenderTarget() instead.”
“THREE.WebGLRenderer.render(): the forceClear argument has been
removed. Use .clear() instead.”
Im trying to change this but cannot figure out how to do it. How can I change this code into the correct one that compiles with the most recent version of three.js
Basically I want to find a boilerplate for writing multibuffer shaders in three.js
//Create 2 buffer textures
textureA = new THREE.WebGLRenderTarget(window.innerWidth, window.innerHeight, { minFilter: THREE.LinearFilter, magFilter: THREE.NearestFilter });
textureB = new THREE.WebGLRenderTarget(window.innerWidth, window.innerHeight, { minFilter: THREE.LinearFilter, magFilter: THREE.NearestFilter });