@awayjs/renderer
Version:
Renderer for AwayJS
55 lines • 2.81 kB
TypeScript
import { ShaderRegisterCache, ShaderRegisterData } from '@awayjs/stage';
import { IPass } from './IPass';
import { ShaderBase } from './ShaderBase';
import { _Render_MaterialBase } from './_Render_MaterialBase';
import { _Render_RenderableBase } from './_Render_RenderableBase';
/**
* _Render_MaterialPassBase provides an abstract base class for material shader passes. A material pass constitutes at least
* a render call per required renderable.
*/
export declare class _Render_MaterialPassBase extends _Render_MaterialBase implements IPass {
_shader: ShaderBase;
get shader(): ShaderBase;
get numUsedStreams(): number;
get numUsedTextures(): number;
_includeDependencies(shader: ShaderBase): void;
/**
* Marks the shader program as invalid, so it will be recompiled before the next render.
*/
invalidate(): void;
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;
_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=_Render_MaterialPassBase.d.ts.map