@threepipe/webgi-plugins
Version:
WebGi - Realistic Rendering Plugins for ThreePipe.
45 lines • 2.1 kB
TypeScript
import { BufferGeometry, Camera, GBufferRenderPass, ICamera, IObject3D, IRenderManager, IScene, IUniform, MaterialExtension, PipelinePassPlugin, Scene, ShaderMaterial, Texture, TextureDataType, ThreeViewer, WebGLRenderer, WebGLRenderTarget } from 'threepipe';
export type VelocityBufferPluginTarget = WebGLRenderTarget;
export type VelocityBufferPluginPass = GBufferRenderPass<'velocityBuffer', VelocityBufferPluginTarget>;
/**
* Velocity Buffer Plugin
*
* Adds a pre-render pass to render the normal buffer to a render target that can be used for postprocessing.
* @category Plugins
*/
export declare class VelocityBufferPlugin extends PipelinePassPlugin<VelocityBufferPluginPass, 'velocityBuffer'> {
readonly passId = "velocityBuffer";
static readonly PluginType = "VelocityBuffer";
static readonly OldPluginType = "VelocityBufferPlugin";
target?: VelocityBufferPluginTarget;
texture?: Texture;
readonly material: SSVelocityMaterial;
readonly bufferType: TextureDataType;
protected _createTarget(recreate?: boolean): void;
protected _disposeTarget(): void;
protected _createPass(): any;
protected readonly _attachToTaa: boolean;
constructor(bufferType?: TextureDataType, enabled?: boolean, _attachToTaa?: boolean);
onAdded(viewer: ThreeViewer): void;
onRemove(viewer: ThreeViewer): void;
unpackExtension: MaterialExtension;
setDirty(): void;
protected _beforeRender(scene: IScene, camera: ICamera, renderManager: IRenderManager): boolean;
}
declare module 'threepipe' {
interface IMaterialUserData {
[VelocityBufferPlugin.PluginType]?: {
/**
* Disables rendering to the velocity buffer.
*/
disabled?: boolean;
};
}
}
export declare class SSVelocityMaterial extends ShaderMaterial {
constructor();
extraUniformsToUpload: Record<string, IUniform>;
private _previousWorldMatrices;
onBeforeRender(_r: WebGLRenderer, _s: Scene, _c: Camera, _geometry: BufferGeometry, object: IObject3D): void;
}
//# sourceMappingURL=VelocityBufferPlugin.d.ts.map