import { DirectionalLight, Light } from "@aura3d/scene";
import { type Bounds3 } from "./Geometry";
import { type RenderItem } from "./ForwardPass";
import { type RenderDeviceDiagnostics } from "./RenderDevice";
import { type RenderPassContext } from "./RenderPass";
import { ShadowMap } from "./ShadowMap";
import { type ShadowPassReason } from "./ShadowPass";
import { type ShaderLibrary } from "./ShaderLibrary";
export interface CascadeSplitOptions {
    readonly cascadeCount: number;
    readonly near: number;
    readonly far: number;
    readonly lambda?: number;
}
export interface CascadeSplit {
    readonly index: number;
    readonly near: number;
    readonly far: number;
}
export interface CascadedShadowMapsOptions extends CascadeSplitOptions {
    readonly size?: number;
    readonly bias?: number;
    readonly filter?: ShadowMap["filterKernel"]["mode"];
    readonly pcfRadius?: number;
    readonly pcfSamples?: number;
    readonly label?: string;
}
export interface ShadowCascade {
    readonly index: number;
    readonly split: CascadeSplit;
    readonly shadowMap: ShadowMap;
}
export type ShadowCameraVec3 = readonly [number, number, number];
export interface ShadowCameraFrustumOptions {
    readonly position: ShadowCameraVec3;
    readonly target: ShadowCameraVec3;
    readonly up?: ShadowCameraVec3;
    readonly fovYRadians: number;
    readonly aspect: number;
}
export interface ShadowCameraFitOptions {
    readonly camera: ShadowCameraFrustumOptions;
    readonly lightDirection: ShadowCameraVec3;
    readonly casters: readonly RenderItem[];
    readonly receivers?: readonly RenderItem[];
    readonly padding?: number;
    readonly stabilize?: boolean;
}
export interface LightSpaceBounds {
    readonly min: ShadowCameraVec3;
    readonly max: ShadowCameraVec3;
}
export interface ShadowCameraFit {
    readonly cascadeIndex: number;
    readonly split: CascadeSplit;
    readonly mapSize: number;
    readonly texelSize: number;
    readonly lightDirection: ShadowCameraVec3;
    readonly basis: {
        readonly right: ShadowCameraVec3;
        readonly up: ShadowCameraVec3;
        readonly forward: ShadowCameraVec3;
    };
    readonly frustumCornersWorld: readonly ShadowCameraVec3[];
    readonly casterBoundsWorld: Bounds3 | null;
    readonly receiverBoundsWorld: Bounds3 | null;
    readonly combinedBoundsWorld: Bounds3;
    readonly lightSpaceBounds: LightSpaceBounds;
    readonly centerLightSpace: ShadowCameraVec3;
    readonly snappedCenterLightSpace: ShadowCameraVec3;
    readonly stableOffsetLightSpace: ShadowCameraVec3;
    readonly orthographic: {
        readonly left: number;
        readonly right: number;
        readonly bottom: number;
        readonly top: number;
        readonly near: number;
        readonly far: number;
    };
    readonly casterCount: number;
    readonly receiverCount: number;
}
export declare class CascadedShadowMaps {
    private readonly cascades;
    constructor(options: CascadedShadowMapsOptions);
    static computeSplits(options: CascadeSplitOptions): readonly CascadeSplit[];
    get cascadeCount(): number;
    getCascades(): readonly ShadowCascade[];
    computeStableCameraFits(options: ShadowCameraFitOptions): readonly ShadowCameraFit[];
    resize(size: number): CascadedShadowMaps;
    dispose(): void;
}
export interface CascadedShadowPassOptions {
    readonly light: Light | null;
    readonly casters: readonly RenderItem[];
    readonly cascades: CascadedShadowMaps;
    readonly shaderLibrary?: ShaderLibrary;
}
export interface CascadeShadowPassResult {
    readonly index: number;
    readonly split: CascadeSplit;
    readonly rendered: boolean;
    readonly reason: ShadowPassReason;
    readonly casterCount: number;
    readonly skippedTransparentCasters: number;
    readonly diagnostics: RenderDeviceDiagnostics;
    readonly shadowMap: ShadowMap;
}
export interface CascadedShadowPassResult {
    readonly rendered: boolean;
    readonly cascades: readonly CascadeShadowPassResult[];
}
export declare class CascadedShadowPass {
    private readonly options;
    private lastResult;
    constructor(options: CascadedShadowPassOptions);
    execute(context: RenderPassContext): CascadedShadowPassResult;
    getLastResult(): CascadedShadowPassResult | null;
}
export declare function supportsCascadedShadowLight(light: Light | null): light is DirectionalLight;
//# sourceMappingURL=CascadedShadowMaps.d.ts.map