GBufferPlugin
Example — Source Code — API Reference
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.
typescript
import {ThreeViewer, GBufferPlugin} from 'threepipe'
const viewer = new ThreeViewer({...})
const gBufferPlugin = viewer.addPluginSync(new GBufferPlugin())
const gBuffer = gBufferPlugin.target;
const normalDepth = gBufferPlugin.normalDepthTexture;
const gBufferFlags = gBufferPlugin.flagsTexture;