Questions about postprocessing in webgpu

There is a new way to use postprocessing in three/webgpu. It’s very different from the old version. We now use class Postprocessing, I have some questions about how to achieve the same function like before.

  1. In the old version, there are 2 RenderTargets(RTs) in EffectComposor, the 2 RTs can be reuse in many passes, unless we need more other RTs. In the webgpu version, is there a way like that?
  2. In some pass, we need use the result of last pass to render some other things. For example, in the old version, readBuffer is A, writeBuffer is B, we render some thing in RenderTarget C with A, then compsite C and A to B. I found some node using hook updateBefore, but when I try this, the order of rendering is not like expecting, A is rendered twice, and C is render before all passes.

I’m still “catching up” on the new WebGPU post-processing myself, so I don’t have all the answers here. But one thing I’ll point out is that the new system doesn’t always require separate passes for separate effects, so that’s a big performance improvement over the old system. A single pass can be composed from multiple effect nodes.

Of course there are some effects that require multiple passes and different buffers, hopefully someone else can answer on how that works now.

1 Like

Yes, it’s really a big improvement. All my app, all passes have been composed to a single pass except two passes that need some other buffers, it turns out a error result. I don’t know how to do something between the two passes.