import { _Render_ElementsBase, _Render_RenderableBase, ShaderBase, _Render_MaterialBase } from '@awayjs/renderer'; import { Stage } from '@awayjs/stage'; import { ILightingPass } from '../passes/ILightingPass'; /** * ShaderBase keeps track of the number of dependencies for "named registers" used across a pass. * Named registers are that are not necessarily limited to a single method. They are created by the compiler and * passed on to methods. The compiler uses the results to reserve usages through RegisterPool, which can be removed * each time a method has been compiled into the shader. * * @see RegisterPool.addUsage */ export declare class LightingShader extends ShaderBase { private _lightingPass; private _pointLightFragmentConstants; private _pointLightVertexConstants; private _dirLightFragmentConstants; private _dirLightVertexConstants; private _numProbeRegisters; private _includeCasters; /** * The first index for the fragment constants containing the light data. */ lightFragmentConstantIndex: number; /** * The starting index if the vertex constant to which light data needs to be uploaded. */ lightVertexConstantIndex: number; /** * Indices for the light probe diffuse textures. */ lightProbeDiffuseIndices: Array; /** * Indices for the light probe specular textures. */ lightProbeSpecularIndices: Array; /** * The index of the fragment constant containing the weights for the light probes. */ probeWeightsIndex: number; numDirectionalLights: number; numPointLights: number; numLightProbes: number; usesLightFallOff: boolean; usesShadows: boolean; /** * Indicates whether the shader uses any lights. */ usesLights: boolean; /** * Indicates whether the shader uses any light probes. */ usesProbes: boolean; /** * Indicates whether the lights uses any specular components. */ usesLightsForSpecular: boolean; /** * Indicates whether the probes uses any specular components. */ usesProbesForSpecular: boolean; /** * Indicates whether the lights uses any diffuse components. */ usesLightsForDiffuse: boolean; /** * Indicates whether the probes uses any diffuse components. */ usesProbesForDiffuse: boolean; /** * Creates a new MethodCompilerVO object. */ constructor(renderElements: _Render_ElementsBase, renderMaterial: _Render_MaterialBase, lightingPass: ILightingPass, stage: Stage); _includeDependencies(): void; /** * * * @param renderable * @param stage * @param camera */ _setRenderState(renderable: _Render_RenderableBase): void; /** * Reset all the indices to "unused". */ protected _initRegisterIndices(): void; /** * Compile the code for the methods. */ protected _compileDependencies(): void; /** * Provides the code to provide shadow mapping. */ private _compileShadowCode; /** * Compiles the shading code for directional and point lights. */ private _compileLightCode; /** * Compiles shading code for light probes. */ private _compileLightProbeCode; /** * Updates constant data render state used by the lights. This method is optional for subclasses to implement. */ private updateLights; /** * Updates constant data render state used by the light probes. This method is optional for subclasses to implement. */ private updateProbes; } //# sourceMappingURL=LightingShader.d.ts.map