import { DiffuseBasicMethod } from './DiffuseBasicMethod'; import { DiffuseCompositeMethod } from './DiffuseCompositeMethod'; /** * DiffuseCelMethod provides a shading method to add diffuse cel (cartoon) shading. */ export declare class DiffuseCelMethod extends DiffuseCompositeMethod { private _levels; private _smoothness; static assetType: string; /** * @inheritDoc */ get assetType(): string; /** * Creates a new DiffuseCelMethod 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. */ constructor(levels?: number, smoothness?: number, baseMethod?: DiffuseBasicMethod | DiffuseCompositeMethod); /** * The amount of shadow gradations. */ get levels(): number; set levels(value: number); /** * The smoothness of the edge between 2 shading levels. */ get smoothness(): number; set smoothness(value: number); } import { ShaderRegisterCache, ShaderRegisterData } from '@awayjs/stage'; import { LightingShader } from '../shaders/LightingShader'; import { _Shader_LightingCompositeMethod } from './CompositeMethodBase'; /** * _Shader_DiffuseCelMethod provides a shading method to add diffuse cel (cartoon) shading. */ export declare class _Shader_DiffuseCelMethod extends _Shader_LightingCompositeMethod { private _method; private _shader; private _clampDataRegister; private _clampDataIndex; /** * Creates a new _Shader_DiffuseCelMethod 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: DiffuseCelMethod, shader: LightingShader): void; /** * @inheritDoc */ _initConstants(): void; /** * @inheritDoc */ _cleanCompilationData(): void; /** * @inheritDoc */ _getFragmentPreLightingCode(registerCache: ShaderRegisterCache, sharedRegisters: ShaderRegisterData): string; /** * @inheritDoc */ _activate(): void; /** * Snaps the diffuse shading of the wrapped method to one of the levels. * @param vo The MethodVO used to compile the current shader. * @param t The register containing the diffuse strength in the "w" component. * @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 clampDiffuse; } //# sourceMappingURL=DiffuseCelMethod.d.ts.map