Class GBufferPlugin

G-Buffer Plugin

Adds a pre-render pass to render the g-buffer(depth+normal+flags) to render target(s) that can be used as gbuffer and for postprocessing.

Hierarchy (View Summary)

Constructors

Properties

_dirty: boolean = false
_viewer?: ThreeViewer
_viewerListeners: PartialRecord<
    | "dispose"
    | "*"
    | "update"
    | "preRender"
    | "postRender"
    | "preFrame"
    | "postFrame"
    | "addPlugin"
    | "removePlugin"
    | "renderEnabled"
    | "renderDisabled",
    (e: IViewerEvent) => void,
> = {}
bufferType: TextureDataType
constructor: typeof AViewerPluginSync & typeof AViewerPlugin
depthTextureType: 1012 | 1014 | 1015 = UnsignedIntType
enabled: boolean = true
isPrimaryGBuffer: boolean
material?: GBufferMaterial
passId: "gbuffer" = 'gbuffer'
renderDepthTexture: boolean = false
renderFlagsBuffer: boolean = true
textures: Texture[] = []
uiConfig?: UiObjectConfig = undefined
unpackExtension: MaterialExtension = ...
OldPluginType?: string
PluginType: "GBuffer" = 'GBuffer'

Accessors

Methods

  • Parameters

    • material: {
          defines: Record<string, undefined | string | number>;
          needsUpdate?: boolean;
          uniforms: { [p: string]: IUniform };
      }

    Returns this

    use unpackExtension instead, it adds the same uniforms and defines