import { AssetBase } from '@awayjs/core'; import { TextureBase } from '@awayjs/renderer'; import { MaterialBase } from '../MaterialBase'; /** * MethodBase provides an abstract base method for shading methods, used by compiled passes to compile * the final shading program. */ export declare class MethodBase extends AssetBase { _textures: Array; _owners: Array; _counts: Array; /** * Create a new MethodBase object. */ constructor(); /** * Cleans up any resources used by the current object. */ dispose(): void; iAddOwner(owner: MaterialBase): void; iRemoveOwner(owner: MaterialBase): void; /** * */ iAddTexture(texture: TextureBase): void; /** * */ iRemoveTexture(texture: TextureBase): void; /** * Marks the shader program as invalid, so it will be recompiled before the next render. * * @internal */ invalidateShaderProgram(): void; /** * Copies the state from a MethodBase object into the current object. */ copyFrom(method: MethodBase): void; } import { AbstractionBase } from '@awayjs/core'; import { ShaderRegisterCache, ShaderRegisterData, ShaderRegisterElement } from '@awayjs/stage'; import { _Render_RenderableBase, ShaderBase, ChunkVO } from '@awayjs/renderer'; import { _IShader_Method } from './_IShader_Method'; /** * _Shader_MethodBase provides an abstract base method for shading methods, used by compiled passes to compile * the final shading program. */ export declare class _Shader_MethodBase extends AbstractionBase implements _IShader_Method { chunkVO: ChunkVO; /** * Create a new _Shader_MethodBase object. */ init(method: MethodBase, shader: ShaderBase): void; _isUsed(): boolean; _usesTangentSpace(): boolean; /** * Initializes the properties for a MethodVO, including register and texture indices. * * @param methodVO The MethodVO object linking this method with the pass currently being compiled. * * @internal */ _initVO(chunkVO: ChunkVO): void; /** * Initializes unchanging shader constants using the data from a MethodVO. * * @param methodVO The MethodVO object linking this method with the pass currently being compiled. * * @internal */ _initConstants(): void; /** * Resets the compilation state of the method. * * @internal */ _reset(chunkVO: ChunkVO): void; /** * Resets the method's state for compilation. * * @internal */ _cleanCompilationData(): void; /** * Get the vertex shader code for this method. * @param vo The MethodVO object linking this method with the pass currently being compiled. * @param regCache The register cache used during the compilation. * * @internal */ _getVertexCode(registerCache: ShaderRegisterCache, sharedRegisters: ShaderRegisterData): string; /** * @inheritDoc */ _getFragmentCode(targetReg: ShaderRegisterElement, registerCache: ShaderRegisterCache, sharedRegisters: ShaderRegisterData): string; /** * Sets the render state for this method. * * @param methodVO The MethodVO object linking this method with the pass currently being compiled. * @param stage The Stage object currently used for rendering. * * @internal */ _activate(): void; /** * Sets the render state for a single renderable. * * @param vo The MethodVO object linking this method with the pass currently being compiled. * @param renderable The renderable currently being rendered. * @param stage The Stage object currently used for rendering. * @param camera The camera from which the scene is currently rendered. * * @internal */ _setRenderState(renderState: _Render_RenderableBase): void; /** * Clears the render state for this method. * @param vo The MethodVO object linking this method with the pass currently being compiled. * @param stage The Stage object currently used for rendering. * * @internal */ _deactivate(): void; } //# sourceMappingURL=MethodBase.d.ts.map