import { TextureBase } from '@awayjs/renderer'; import { DiffuseBasicMethod, _Shader_DiffuseBasicMethod } from './DiffuseBasicMethod'; /** * DiffuseGradientMethod is an alternative to DiffuseBasicMethod in which the shading can be modulated with a gradient * to introduce color-tinted shading as opposed to the single-channel diffuse strength. This can be used as a crude * approximation to subsurface scattering (for instance, the mid-range shading for skin can be tinted red to similate * scattered light within the skin attributing to the final colour) */ export declare class DiffuseGradientMethod extends DiffuseBasicMethod { private _gradient; static assetType: string; /** * @inheritDoc */ get assetType(): string; /** * A texture that contains the light colour based on the angle. This can be used to change the light colour * due to subsurface scattering when the surface faces away from the light. */ get gradient(): TextureBase; set gradient(value: TextureBase); /** * Creates a new DiffuseGradientMethod object. * @param gradient A texture that contains the light colour based on the angle. This can be used to change * the light colour due to subsurface scattering when the surface faces away from the light. */ constructor(gradient: TextureBase); } import { ShaderRegisterCache, ShaderRegisterData, ShaderRegisterElement } from '@awayjs/stage'; import { _Render_RenderableBase, ChunkVO } from '@awayjs/renderer'; import { LightingShader } from '../shaders/LightingShader'; /** * _Shader_DiffuseGradientMethod is an alternative to _Shader_DiffuseBasicMethod in which the shading can be modulated with a gradient * to introduce color-tinted shading as opposed to the single-channel diffuse strength. This can be used as a crude * approximation to subsurface scattering (for instance, the mid-range shading for skin can be tinted red to similate * scattered light within the skin attributing to the final colour) */ export declare class _Shader_DiffuseGradientMethod extends _Shader_DiffuseBasicMethod { private _gradient; /** * Creates a new _Shader_DiffuseGradientMethod object. * @param gradient A texture that contains the light colour based on the angle. This can be used to change * the light colour due to subsurface scattering when the surface faces away from the light. */ init(method: DiffuseGradientMethod, shader: LightingShader): void; _initVO(chunkVO: ChunkVO): void; /** * @inheritDoc */ _initConstants(): void; /** * @inheritDoc */ _getFragmentPreLightingCode(registerCache: ShaderRegisterCache, sharedRegisters: ShaderRegisterData): string; /** * @inheritDoc */ _getFragmentCodePerLight(lightDirReg: ShaderRegisterElement, lightColReg: ShaderRegisterElement, registerCache: ShaderRegisterCache, sharedRegisters: ShaderRegisterData): string; /** * @inheritDoc */ _activate(): void; /** * @inheritDoc */ _setRenderState(renderState: _Render_RenderableBase): void; } //# sourceMappingURL=DiffuseGradientMethod.d.ts.map