import { SpecularBasicMethod } from './SpecularBasicMethod'; import { SpecularCompositeMethod } from './SpecularCompositeMethod'; /** * SpecularCelMethod provides a shading method to add specular cel (cartoon) * shading. */ export declare class SpecularCelMethod extends SpecularCompositeMethod { private _smoothness; private _specularCutOff; static assetType: string; /** * @inheritDoc */ get assetType(): string; /** * The smoothness of the highlight edge. */ get smoothness(): number; set smoothness(value: number); /** * The threshold at which the specular highlight should be shown. */ get specularCutOff(): number; set specularCutOff(value: number); /** * Creates a new SpecularCelMethod object. * @param specularCutOff The threshold at which the specular highlight * should be shown. * @param smoothness The smoothness of the highlight edge. * @param baseMethod An optional specular method on which the cartoon * shading is based. If ommitted, SpecularBasicMethod is used. */ constructor(specularCutOff?: number, smoothness?: number, baseMethod?: SpecularBasicMethod | SpecularCompositeMethod); } import { ShaderRegisterCache, ShaderRegisterData } from '@awayjs/stage'; import { LightingShader } from '../shaders/LightingShader'; import { _Shader_LightingCompositeMethod } from './CompositeMethodBase'; /** * _Shader_SpecularCelMethod provides a shading method to add specular cel * (cartoon) shading. */ export declare class _Shader_SpecularCelMethod extends _Shader_LightingCompositeMethod { private _method; private _shader; private _cutoffDataRegister; private _cutoffDataIndex; /** * Creates a new DiffuseCelChunk object. * @param levels The amount of shadow gradations. * @param baseMethod An optional diffuse method on which the cartoon shading * is based. If omitted, DiffuseBasicMethod is used. */ init(method: SpecularCelMethod, shader: LightingShader): void; /** * @inheritDoc */ _activate(): void; /** * @inheritDoc */ _cleanCompilationData(): void; /** * Snaps the specular shading strength of the wrapped method to zero or one, depending on whether or not it exceeds the specularCutOff * @param vo The MethodVO used to compile the current shader. * @param t The register containing the specular strength in the "w" component, and either the half-vector or the reflection vector in "xyz". * @param regCache The register cache used for the shader compilation. * @param sharedRegisters The shared register data for this shader. * @return The AGAL fragment code for the method. */ private clampSpecular; /** * @inheritDoc */ _getFragmentPreLightingCode(registerCache: ShaderRegisterCache, sharedRegisters: ShaderRegisterData): string; } //# sourceMappingURL=SpecularCelMethod.d.ts.map