import { TextureBase } from '@awayjs/renderer'; import { MethodBase, _Shader_MethodBase } from './MethodBase'; /** * DiffuseBasicMethod provides the default shading method for Lambert (dot3) diffuse lighting. */ export declare class DiffuseBasicMethod extends MethodBase { private _multiply; _texture: TextureBase; private _ambientColor; private _ambientColorR; private _ambientColorG; private _ambientColorB; private _color; private _colorR; private _colorG; private _colorB; _pIsFirstLight: boolean; static assetType: string; /** * @inheritDoc */ get assetType(): string; /** * Set internally if diffuse color component multiplies or replaces the ambient color */ get multiply(): boolean; set multiply(value: boolean); /** * The color of the diffuse reflection when not using a texture. */ get color(): number; set color(value: number); /** * The texture to use to define the diffuse reflection color per texel. */ get texture(): TextureBase; set texture(value: TextureBase); /** * Creates a new DiffuseBasicMethod object. */ constructor(); /** * @inheritDoc */ dispose(): void; /** * @inheritDoc */ copyFrom(method: MethodBase): void; } import { ShaderRegisterCache, ShaderRegisterData, ShaderRegisterElement } from '@awayjs/stage'; import { _Render_RenderableBase, _Shader_TextureBase, ChunkVO } from '@awayjs/renderer'; import { LightingShader } from '../shaders/LightingShader'; import { _IShader_Method } from './_IShader_Method'; /** * _Shader_DiffuseBasicMethod provides the default shading method for Lambert (dot3) diffuse lighting. */ export declare class _Shader_DiffuseBasicMethod extends _Shader_MethodBase implements _IShader_Method { protected _method: DiffuseBasicMethod; protected _shader: LightingShader; protected _texture: _Shader_TextureBase; private _ambientColor; private _ambientColorR; private _ambientColorG; private _ambientColorB; private _color; private _colorR; private _colorG; private _colorB; _pIsFirstLight: boolean; private _ambientColorRegister; private _diffuseColorRegister; _totalLightColorReg: ShaderRegisterElement; _modulateFunction: (targetReg: ShaderRegisterElement, registerCache: ShaderRegisterCache, sharedRegisters: ShaderRegisterData) => string; /** * Creates a new _Shader_DiffuseBasicMethod object. */ init(method: DiffuseBasicMethod, shader: LightingShader): void; onClear(): void; /** * */ onInvalidate(): void; _isUsed(): boolean; _initVO(chunkVO: ChunkVO): void; /** * @inheritDoc */ _initConstants(): void; /** * @inheritDoc */ _cleanCompilationData(): void; /** * @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; /** * @inheritDoc */ _getFragmentCode(targetReg: ShaderRegisterElement, registerCache: ShaderRegisterCache, sharedRegisters: ShaderRegisterData): string; /** * Generate the code that applies the calculated shadow to the diffuse light * @param methodVO The MethodVO object for which the compilation is currently happening. * @param regCache The register cache the compiler is currently using for the register management. */ _applyShadow(regCache: ShaderRegisterCache, sharedRegisters: ShaderRegisterData): string; /** * @inheritDoc */ _activate(): void; /** * Updates the diffuse and ambient color data used by the render state. */ private _updateProperties; /** * @inheritDoc */ _setRenderState(renderState: _Render_RenderableBase): void; } //# sourceMappingURL=DiffuseBasicMethod.d.ts.map