molstar
Version:
A comprehensive macromolecular library.
77 lines (76 loc) • 3.2 kB
TypeScript
/**
* Copyright (c) 2019-2025 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>
* @author Ludovic Autin <ludovic.autin@gmail.com>
* @author Gianluca Tomasello <giagitom@gmail.com>
*/
import { WebGLContext } from '../../mol-gl/webgl/context';
import { Texture } from '../../mol-gl/webgl/texture';
import { ParamDefinition as PD } from '../../mol-util/param-definition';
import { RenderTarget } from '../../mol-gl/webgl/render-target';
import { ICamera } from '../../mol-canvas3d/camera';
import { Scene } from '../../mol-gl/scene';
import { PostprocessingProps } from './postprocessing';
export declare const SsaoParams: {
samples: PD.Numeric;
multiScale: PD.Mapped<PD.NamedParams<PD.Normalize<unknown>, "off"> | PD.NamedParams<PD.Normalize<{
levels: PD.Normalize<{
radius: number;
bias: number;
}>[];
nearThreshold: number;
farThreshold: number;
}>, "on">>;
radius: PD.Numeric;
bias: PD.Numeric;
blurKernelSize: PD.Numeric;
blurDepthBias: PD.Numeric;
resolutionScale: PD.Numeric;
color: PD.Color;
transparentThreshold: PD.Numeric;
};
export type SsaoProps = PD.Values<typeof SsaoParams>;
export declare class SsaoPass {
private readonly webgl;
static isEnabled(props: PostprocessingProps): boolean;
static isTransparentEnabled(scene: Scene, props: SsaoProps): boolean;
readonly target: RenderTarget;
private readonly framebuffer;
private readonly blurFirstPassFramebuffer;
private readonly blurSecondPassFramebuffer;
private readonly downsampledDepthTargetOpaque;
private readonly downsampleDepthRenderableOpaque;
private readonly depthHalfTargetOpaque;
private readonly depthHalfRenderableOpaque;
private readonly depthQuarterTargetOpaque;
private readonly depthQuarterRenderableOpaque;
private readonly downsampledDepthTargetTransparent;
private readonly downsampleDepthRenderableTransparent;
private readonly depthHalfTargetTransparent;
private readonly depthHalfRenderableTransparent;
private readonly depthQuarterTargetTransparent;
private readonly depthQuarterRenderableTransparent;
readonly ssaoDepthTexture: Texture;
readonly ssaoDepthTransparentTexture: Texture;
private readonly depthBlurProxyTexture;
private depthTextureOpaque;
private depthTextureTransparent;
private readonly renderable;
private readonly blurFirstPassRenderable;
private readonly blurSecondPassRenderable;
private nSamples;
private blurKernelSize;
private texSize;
private ssaoScale;
private calcSsaoScale;
private levels;
private getDepthTexture;
private getTransparentDepthTexture;
constructor(webgl: WebGLContext, width: number, height: number, packedDepth: boolean, depthTextureOpaque: Texture, depthTextureTransparent: Texture);
setSize(width: number, height: number): void;
reset(): void;
update(camera: ICamera, scene: Scene, props: SsaoProps, illuminationMode?: boolean): void;
render(camera: ICamera): void;
}