import { EventDispatcher } from '@awayjs/core'; import { Stage, ShaderRegisterCache, ShaderRegisterData } from '@awayjs/stage'; import { _Render_RenderableBase, _Render_ElementsBase, _Render_MaterialBase, IPass, ShaderBase } from '@awayjs/renderer'; /** * PassBase provides an abstract base class for material shader passes. A material pass constitutes at least * a render call per required renderable. */ export declare class PassBase extends EventDispatcher implements IPass { protected _renderMaterial: _Render_MaterialBase; protected _renderElements: _Render_ElementsBase; protected _stage: Stage; protected _shader: ShaderBase; private _preserveAlpha; private _forceSeparateMVP; get shader(): ShaderBase; /** * Indicates whether the output alpha value should remain unchanged compared to the material's original alpha. */ get preserveAlpha(): boolean; set preserveAlpha(value: boolean); /** * Indicates whether the screen projection should be calculated by forcing a separate scene matrix and * view-projection matrix. This is used to prevent rounding errors when using multiple passes with different * projection code. */ get forceSeparateMVP(): boolean; set forceSeparateMVP(value: boolean); /** * Creates a new PassBase object. */ constructor(renderMaterial: _Render_MaterialBase, renderElements: _Render_ElementsBase); /** * Marks the shader program as invalid, so it will be recompiled before the next render. */ invalidate(): void; /** * Cleans up any resources used by the current object. * @param deep Indicates whether other resources should be cleaned up, that could potentially be shared across different instances. */ dispose(): void; /** * Renders the current pass. Before calling pass, activatePass needs to be called with the same index. * @param pass The pass used to render the renderable. * @param renderable The IRenderable object to draw. * @param stage The Stage object used for rendering. * @param entityCollector The EntityCollector object that contains the visible scene data. * @param viewProjection The view-projection matrix used to project to the screen. This is not the same as * camera.viewProjection as it includes the scaling factors when rendering to textures. * * @internal */ _setRenderState(renderState: _Render_RenderableBase): void; /** * Sets the render state for the pass that is independent of the rendered object. This needs to be called before * calling pass. Before activating a pass, the previously used pass needs to be deactivated. * @param stage The Stage object which is currently used for rendering. * @param camera The camera from which the scene is viewed. * @private */ _activate(): void; /** * Clears the render state for the pass. This needs to be called before activating another pass. * @param stage The Stage used for rendering * * @private */ _deactivate(): void; _includeDependencies(shader: ShaderBase): void; _initConstantData(): void; _getVertexCode(registerCache: ShaderRegisterCache, sharedRegisters: ShaderRegisterData): string; _getFragmentCode(registerCache: ShaderRegisterCache, sharedRegisters: ShaderRegisterData): string; _getPostAnimationFragmentCode(registerCache: ShaderRegisterCache, sharedRegisters: ShaderRegisterData): string; _getNormalVertexCode(registerCache: ShaderRegisterCache, sharedRegisters: ShaderRegisterData): string; _getNormalFragmentCode(registerCache: ShaderRegisterCache, sharedRegisters: ShaderRegisterData): string; } //# sourceMappingURL=PassBase.d.ts.map