threepipe
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

1 год назад
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. ```