molstar
Version:
A comprehensive macromolecular library.
72 lines (71 loc) • 3.02 kB
TypeScript
/**
* Copyright (c) 2019-2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
*
* @author Alexander Rose <alexander.rose@weirdbyte.de>
* @author Áron Samuel Kovács <aron.kovacs@mail.muni.cz>
*/
import { WebGLContext } from '../../mol-gl/webgl/context';
import { ParamDefinition as PD } from '../../mol-util/param-definition';
import { RenderTarget } from '../../mol-gl/webgl/render-target';
import { DrawPass } from './draw';
import { ICamera } from '../../mol-canvas3d/camera';
import { Color } from '../../mol-util/color';
export declare const PostprocessingParams: {
occlusion: PD.Mapped<PD.NamedParams<PD.Normalize<unknown>, "off"> | PD.NamedParams<PD.Normalize<{
samples: number;
radius: number;
bias: number;
blurKernelSize: number;
}>, "on">>;
outline: PD.Mapped<PD.NamedParams<PD.Normalize<unknown>, "off"> | PD.NamedParams<PD.Normalize<{
scale: number;
threshold: number;
}>, "on">>;
antialiasing: PD.Mapped<PD.NamedParams<PD.Normalize<unknown>, "off"> | PD.NamedParams<PD.Normalize<{
edgeThreshold: number;
maxSearchSteps: number;
}>, "smaa"> | PD.NamedParams<PD.Normalize<{
edgeThresholdMin: number;
edgeThresholdMax: number;
iterations: number;
subpixelQuality: number;
}>, "fxaa">>;
};
export declare type PostprocessingProps = PD.Values<typeof PostprocessingParams>;
export declare class PostprocessingPass {
private webgl;
static isEnabled(props: PostprocessingProps): boolean;
readonly target: RenderTarget;
private readonly outlinesTarget;
private readonly outlinesRenderable;
private readonly randomHemisphereVector;
private readonly ssaoFramebuffer;
private readonly ssaoBlurFirstPassFramebuffer;
private readonly ssaoBlurSecondPassFramebuffer;
private readonly ssaoDepthTexture;
private readonly ssaoDepthBlurProxyTexture;
private readonly ssaoRenderable;
private readonly ssaoBlurFirstPassRenderable;
private readonly ssaoBlurSecondPassRenderable;
private nSamples;
private blurKernelSize;
private readonly renderable;
private ssaoScale;
private calcSsaoScale;
constructor(webgl: WebGLContext, drawPass: DrawPass);
setSize(width: number, height: number): void;
private updateState;
render(camera: ICamera, toDrawingBuffer: boolean, transparentBackground: boolean, backgroundColor: Color, props: PostprocessingProps): void;
}
export declare class AntialiasingPass {
private drawPass;
static isEnabled(props: PostprocessingProps): boolean;
readonly target: RenderTarget;
private readonly fxaa;
private readonly smaa;
constructor(webgl: WebGLContext, drawPass: DrawPass);
setSize(width: number, height: number): void;
private _renderFxaa;
private _renderSmaa;
render(camera: ICamera, toDrawingBuffer: boolean, props: PostprocessingProps): void;
}