Im looking into how to clear several attachments of a WebGLRenderTarget
. ChatGPT says its possible but it gives an extremely low level example using the gl
context.
const t = new WebGLRenderTarget(1,1,{count:2})
renderer.setRenderTarget(t)
renderer.setClearColor(color1)
// ??
renderer.setClearColor(color2)
// ??
Alternatively i could draw a full screen quad and tell it to write different things to different attachments. I am curious how much is this slower than clear()
?