Why use react-postprocessing instead of three/examples/jsm/postprocessing
masterWhile Three.js provides built-in post-processing examples, react-postprocessing (via the underlying postprocessing library) offers several advantages:
- Performance: Uses an
EffectPassto merge effects, reducing render operations. - GPU Optimization: Uses a single triangle to fill the screen, which is more efficient for modern GPU rasterization and GPGPU passes than the traditional quad approach.
- Blending: Every effect can choose its own blend function.
- Anti-aliasing: Supports WebGL2 MSAA (multi-sample anti-aliasing) by default for high-performance, crisp results without jagged edges.
- Gamma Correction: Supports gamma correction out of the box.