@threepipe/webgi-plugins
Version:
WebGi - Realistic Rendering Plugins for ThreePipe.
61 lines • 2.45 kB
TypeScript
import { ExtendedShaderPass, GBufferPlugin, GBufferUpdater, GBufferUpdaterContext, IMaterial, IMaterialUserData, IPassID, IPipelinePass, IWebGLRenderer, MaterialExtension, PipelinePassPlugin, ThreeViewer, UiObjectConfig, Vector4, WebGLMultipleRenderTargets, WebGLRenderTarget } from 'threepipe';
declare const passId = "bloom";
type BloomPassId = typeof passId;
/**
* Bloom Plugin
*
* Adds HDR Bloom post-processing effect to the scene
* @category Plugins
*/
export declare class BloomPlugin extends PipelinePassPlugin<BloomPluginPass<BloomPassId>, BloomPassId> implements GBufferUpdater {
static readonly PluginType = "Bloom";
static readonly OldPluginType = "BloomPlugin";
readonly passId = "bloom";
readonly materialExtension: MaterialExtension;
protected _createPass(): BloomPluginPass<"bloom">;
protected _pass?: BloomPluginPass<BloomPassId>;
dependencies: (typeof GBufferPlugin)[];
onAdded(viewer: ThreeViewer): void;
private _onPluginAdd;
onRemove(viewer: ThreeViewer): void;
updateGBufferFlags(data: Vector4, c: GBufferUpdaterContext): void;
uiConfig: UiObjectConfig;
static AddBloomData(material: IMaterial, params?: IMaterialUserData['Bloom'], setDirty?: boolean): IMaterialUserData['Bloom'] | null;
/**
* This uiConfig is added to each material by extension
* @param material
* @private
*/
private _getUiConfig;
}
export declare class BloomPluginPass<Tid extends IPassID> extends ExtendedShaderPass implements IPipelinePass<Tid> {
uiConfig?: UiObjectConfig;
before: string[];
after: string[];
required: string[];
readonly passId: Tid;
constructor(pid: Tid, maxIntensity?: number);
prefilter: Vector4;
threshold: number;
softThreshold: number;
intensity: number;
backgroundBloom: boolean;
bloomIterations: number;
private _currentIterations;
radius: number;
power: number;
private _thresholdsUpdated;
bloomDebug: boolean;
private _weights;
render(renderer: IWebGLRenderer, writeBuffer?: WebGLMultipleRenderTargets | WebGLRenderTarget | null, readBuffer?: WebGLMultipleRenderTargets | WebGLRenderTarget, deltaTime?: number, maskActive?: boolean): void;
private _updateWeights;
}
declare module 'threepipe' {
interface IMaterialUserData {
[BloomPlugin.PluginType]?: {
enable?: boolean;
};
}
}
export {};
//# sourceMappingURL=BloomPlugin.d.ts.map