import { NdcFillingTriangle } from './ndcfillingtriangle'; import { BlitPass } from './blitpass'; /** * This rendering pass specialized the blit pass by enforcing program-based blitting with a custom debug program. * * The debug pass can be used as follows: * ``` * this.blit.framebuffer = this.intermediateFBO; * this.blit.frame(this.defaultFBO, null, null); * ``` * * This pass also provides some basic debugging facilities, such as blitting the input as linearized depth (packed or * not packed) etc. An additional WebGL program will be initialized when a debug mode is specified for the first time. * The default program blit remains untouched in order to keep it as minimal as possible. */ export declare class DebugPass extends BlitPass { /** @see {@link debug} */ protected _debug: DebugPass.Mode; /** * Uniform for passing the debug mode to the specialized blit program. */ protected _uDebugMode: WebGLUniformLocation | undefined; /** * Uniform used to pass near and far data to the specialized blit program for linearization. */ protected _uLinearize: WebGLUniformLocation | undefined; /** * If provided, depth will be linearized when depth data is blitted. */ protected _near: GLfloat; protected _far: GLfloat; /** * Used to create (on-demand) the blit program for program based blitting. This function can be specialized, e.g., * for creating custom blit passes such as the `DebugPass` {@link DebugPass}. This method assumes the program to be * undefined. */ protected createProgram(): boolean; /** */ initialize(ndcTriangle?: NdcFillingTriangle): boolean; /** * Specializes this pass's uninitialization. Program and geometry resources are released (if allocated). Cached * uniform and attribute locations are invalidated. */ uninitialize(): void; /** * Specify a debug mode for blitting @see {@link Blitpass.Debug}. If the debug mode is set to anything except * `Debug.None` for the first time, a specialized debug program will be created, initialized, and used for blit. */ set debug(mode: DebugPass.Mode); /** * If linearized is enabled, depth buffer blitting will use this near value for linearization. */ set near(near: GLfloat | undefined); /** * If linearized is enabled, depth buffer blitting will use this far value for linearization. */ set far(far: GLfloat | undefined); } export declare namespace DebugPass { enum Mode { None = 0, Depth = 1, DepthLinear = 2, DepthPacked = 3, DepthLinearPacked = 4 } }