Skip to content

Postprocessing example #77

Answered by CodyJasonBennett
Nek asked this question in Q&A
Discussion options

You must be logged in to vote

You can create a full-screen postprocessing effect by rendering to a mesh with a triangle geometry that doesn't regard camera or model transforms. It will thus be incompatible with frustum culling, but this is a practice you can apply to any graphics library to save on fragment cost (very important for mobile, pmndrs/postprocessing does this).

https://codesandbox.io/s/react-ogl-postprocessing-ct013j

Portals allow you to render JSX into objects in or outside of react but also notably modify scene and other state from hooks like useOGL and useFrame, so you can build an intelligent effects composer from components and use the state model to create inputs/outputs.

To be honest, I wouldn't rec…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Nek
Comment options

Answer selected by Nek
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants