threepipe
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

GBufferPlugin.md 1.0KB

před 1 rokem
1234567891011121314151617181920212223242526272829303132
  1. ---
  2. prev:
  3. text: 'NormalBufferPlugin'
  4. link: './NormalBufferPlugin'
  5. next:
  6. text: 'SSAOPlugin'
  7. link: './SSAOPlugin'
  8. ---
  9. # GBufferPlugin
  10. [//]: # (todo: image)
  11. [Example](https://threepipe.org/examples/#gbuffer-plugin/) —
  12. [Source Code](https://github.com/repalash/threepipe/blob/master/src/plugins/pipeline/GBufferPlugin.ts) —
  13. [API Reference](https://threepipe.org/docs/classes/GBufferPlugin.html)
  14. GBuffer Plugin adds a pre-render pass to the render manager and renders depth+normals to a target and some customizable flags to another. The multiple render target and textures can be accessed by other plugins throughout the rendering pipeline to create effects like SSAO, SSR, etc.
  15. ```typescript
  16. import {ThreeViewer, GBufferPlugin} from 'threepipe'
  17. const viewer = new ThreeViewer({...})
  18. const gBufferPlugin = viewer.addPluginSync(new GBufferPlugin())
  19. const gBuffer = gBufferPlugin.target;
  20. const normalDepth = gBufferPlugin.normalDepthTexture;
  21. const gBufferFlags = gBufferPlugin.flagsTexture;
  22. ```