import { type Atmosphere } from "./atmosphere.js"; import { type DirectionalLight } from "@babylonjs/core/Lights/directionalLight.pure.js"; import { type IColor3Like, type IVector3Like } from "@babylonjs/core/Maths/math.like.js"; import { Observable } from "@babylonjs/core/Misc/observable.pure.js"; import { RenderTargetTexture } from "@babylonjs/core/Materials/Textures/renderTargetTexture.pure.js"; /** * The transmittance LUT can be used to get the radiance from an external light source arriving a given point, accounting for atmospheric scattering. */ export declare class TransmittanceLut { /** * Listen to this observer to know when the LUT data has been updated. * This is typically infrequent (once at startup), but also happens whenever the atmosphere's properties change. */ readonly onUpdatedObservable: Observable; private readonly _atmosphere; private _lutData; private _renderTarget; private _effectWrapper; private _effectRenderer; private _isDirty; private _isDisposed; private _needsReadPixels; /** * True if the LUT has been rendered. */ get isDirty(): boolean; /** * The render target that contains the transmittance LUT. * @throws if the LUT has been disposed. */ get renderTarget(): RenderTargetTexture; /** * True if the LUT data has been read back from the GPU. */ get hasLutData(): boolean; /** * Constructs the {@link TransmittanceLut}. * @param atmosphere - The atmosphere that owns this LUT. */ constructor(atmosphere: Atmosphere); /** * Gets the transmittance of an external light through the atmosphere to a point specified by its distance to the planet center and its geocentric normal. * The result is always a linear space color. * @param directionToLight - The direction to the light source. * @param pointRadius - The distance from the origin to the point. * @param pointGeocentricNormal - The normal of the point. * @param result - The color to write the result to. * @returns The result color. */ getTransmittedColorToRef(directionToLight: IVector3Like, pointRadius: number, pointGeocentricNormal: IVector3Like, result: T): T; /** * Derives light color from the transmittance at a point specified by its distance to the planet center and its geocentric normal. * @param light - The light to update. * @param pointRadius - The distance from the origin to the point. * @param pointGeocentricNormal - The normal of the point. */ updateLightParameters(light: DirectionalLight, pointRadius: number, pointGeocentricNormal: IVector3Like): void; /** * Renders the LUT if needed. * @returns true if the LUT was rendered. */ render(): boolean; /** * Reads back the LUT data from the GPU if a readback is pending. * @internal */ readPixelsAsync(): Promise; /** * Marks the LUT as needing to be rendered. */ markDirty(): void; /** * Disposes the LUT and its resources. */ dispose(): void; }