import { MethodEvent } from '../events/MethodEvent'; import { MaterialBase } from '../MaterialBase'; import { MethodBase } from './MethodBase'; /** * CompositeMethodBase provides a base class for diffuse methods that wrap a diffuse method to alter the * calculated diffuse reflection strength. */ export declare class CompositeMethodBase extends MethodBase { protected _onShaderInvalidatedDelegate: (event: MethodEvent) => void; protected _baseMethod: MethodBase; /** * The base diffuse method on which this method's shading is based. */ get baseMethod(): MethodBase; set baseMethod(value: MethodBase); /** * Creates a new CompositeMethodBase object. * * @param modulateMethod The method which will add the code to alter the base method's strength. It needs to have the signature clampDiffuse(t:ShaderRegisterElement, regCache:ShaderRegisterCache):string, in which t.w will contain the diffuse strength. * @param baseMethod The base diffuse method on which this method's shading is based. */ constructor(baseMethod?: MethodBase); protected createBaseMethod(): MethodBase; iAddOwner(owner: MaterialBase): void; iRemoveOwner(owner: MaterialBase): void; /** * @inheritDoc */ dispose(): void; /** * Called when the base method's shader code is invalidated. */ private onShaderInvalidated; } import { AbstractionBase } from '@awayjs/core'; import { ShaderRegisterCache, ShaderRegisterData, ShaderRegisterElement } from '@awayjs/stage'; import { _Render_RenderableBase, ChunkVO } from '@awayjs/renderer'; import { LightingShader } from '../shaders/LightingShader'; import { _IShader_LightingMethod } from './_IShader_LightingMethod'; import { _IShader_Method } from './_IShader_Method'; /** * _Shader_CompositeMethodBase provides a base class for diffuse methods that wrap a diffuse method to alter the * calculated diffuse reflection strength. */ export declare class _Shader_CompositeMethodBase extends AbstractionBase implements _IShader_Method { protected _baseChunk: _IShader_Method; chunkVO: ChunkVO; /** * Creates a new _Shader_CompositeMethodBase object. * * @param modulateMethod The method which will add the code to alter the base method's strength. It needs to have the signature clampDiffuse(t:ShaderRegisterElement, regCache:ShaderRegisterCache):string, in which t.w will contain the diffuse strength. * @param baseMethod The base diffuse method on which this method's shading is based. */ init(method: CompositeMethodBase, shader: LightingShader): void; _isUsed(): boolean; _usesTangentSpace(): boolean; /** * @inheritDoc */ _initVO(chunkVO: ChunkVO): void; /** * @inheritDoc */ _initConstants(): void; /** * @inheritDoc */ _activate(): void; /** * @inheritDoc */ _setRenderState(renderState: _Render_RenderableBase): void; /** * @inheritDoc */ _deactivate(): void; /** * @inheritDoc */ _getVertexCode(registerCache: ShaderRegisterCache, sharedRegisters: ShaderRegisterData): string; /** * @inheritDoc */ _getFragmentCode(targetReg: ShaderRegisterElement, registerCache: ShaderRegisterCache, sharedRegisters: ShaderRegisterData): string; /** * @inheritDoc */ _reset(chunkVO: ChunkVO): void; /** * @inheritDoc */ _cleanCompilationData(): void; } /** * LightingCompositeBase provides a base class for diffuse methods that wrap a diffuse method to alter the * calculated diffuse reflection strength. */ export declare class _Shader_LightingCompositeMethod extends _Shader_CompositeMethodBase implements _IShader_LightingMethod { _totalLightColorReg: ShaderRegisterElement; _modulateFunction: (targetReg: ShaderRegisterElement, registerCache: ShaderRegisterCache, sharedRegisters: ShaderRegisterData) => string; /** * @inheritDoc */ _getFragmentPreLightingCode(registerCache: ShaderRegisterCache, sharedRegisters: ShaderRegisterData): string; /** * @inheritDoc */ _getFragmentCodePerLight(lightDirReg: ShaderRegisterElement, lightColReg: ShaderRegisterElement, registerCache: ShaderRegisterCache, sharedRegisters: ShaderRegisterData): string; /** * @inheritDoc */ _getFragmentCodePerProbe(cubeMapReg: ShaderRegisterElement, weightRegister: string, registerCache: ShaderRegisterCache, sharedRegisters: ShaderRegisterData): string; } //# sourceMappingURL=CompositeMethodBase.d.ts.map