-
-
Notifications
You must be signed in to change notification settings - Fork 241
Description
Passes that render to the provided writeBuffer currently have to set a special needsSwap flag to true. This tells the EffectComposer that the writeBuffer must be swapped with the readBuffer before the next pass can be executed. In reality, though, almost all passes render to the writeBuffer. Passes that don't do it are special cases: TexturePass, RenderPass, ClearPass, MaskPass, ClearMaskPass and SavePass.
Three of these passes, namely the TexturePass, RenderPass and ClearPass, can easily be changed to render to the writeBuffer. The other two passes,ClearMaskPass and SavePass, are the only ones that can't render to the writeBuffer.
To reduce boilerplate code, the default value of the needsSwap flag should be inverted. Then, only the special passes that deviate from the usual input-output flow need to change the flag. It might also be a good idea to rename the readBuffer and writeBuffer to inputBuffer and outputBuffer to further clarify their purpose.