glodrei
Version:
useful add-ons for react-three-fiber
15 lines (12 loc) • 450 B
text/mdx
title: ScreenQuad
sourcecode: src/core/ScreenQuad.tsx
```jsx
<ScreenQuad>
<myMaterial />
</ScreenQuad>
```
A triangle that fills the screen, ideal for full-screen fragment shader work (raymarching, postprocessing).
👉 [Why a triangle?](https://www.cginternals.com/en/blog/2018-01-10-screen-aligned-quads-and-triangles.html)
👉 [Use as a post processing mesh](https://medium.com/@luruke/simple-postprocessing-in-three-js-91936ecadfb7)