import * as THREE from 'three/webgpu'; import type { FloatUniform, Vec2Uniform } from './splat-material-types'; import type { SplatShInputs, Vec3Uniform } from './splat-material-types'; /** Capacity-sized memory added by the experimental projection cache. */ export declare const PROJECTED_SPLAT_BYTES_PER_SLOT = 52; /** Count plus dispatch and indexed-draw argument buffers. */ export declare const PROJECTED_SPLAT_FIXED_BYTES: number; export interface ProjectedSplatBuffers { /** Clip-space center, indexed by the gathered work-buffer slot. */ readonly clipCenters: THREE.StorageBufferAttribute; /** major.xy, minor.xy in drawing-buffer pixels. */ readonly axes: THREE.StorageBufferAttribute; /** opacity compensation, adjusted stddev, packed color or visibility, cached sort key. */ readonly parameters: THREE.StorageBufferAttribute; /** Dense work-buffer indices, one entry per visible splat. */ readonly visibleIndices: THREE.StorageBufferAttribute; /** Atomic visible count written by projection. */ readonly visibleCount: THREE.StorageBufferAttribute; /** `[ceil(visibleCount / 256), 1, 1]`. */ readonly dispatchArgs: THREE.IndirectStorageBufferAttribute; /** Indexed indirect args: six indices and the GPU-visible instance count. */ readonly drawArgs: THREE.IndirectStorageBufferAttribute; } /** * Projects and footprint-culls a gathered unified work buffer exactly once per * splat. The dense list, sort key and indirect arguments never cross the CPU. */ export declare class ProjectedSplatPipeline { static readonly WORKGROUP_SIZE = 256; readonly buffers: ProjectedSplatBuffers; readonly packedColor = false; private readonly renderer; private readonly modelView; private readonly projection; private readonly resetPass; private readonly projectPass; private readonly compactPass; private readonly finalizePass; private readonly mirrors; private disposed; projectionDispatches: number; constructor(options: { renderer: THREE.WebGPURenderer; capacity: number; centers: THREE.StorageBufferAttribute; colors: THREE.StorageBufferAttribute; covarianceA: THREE.StorageBufferAttribute; covarianceB: THREE.StorageBufferAttribute; focal: Vec2Uniform; viewport: Vec2Uniform; maxStdDev: FloatUniform; minSplatSizePx: FloatUniform; antialias: FloatUniform; projectedLowPassVariance: FloatUniform; compensateProjectedLowPass: FloatUniform; dofFocusDistance: FloatUniform; dofAperture: FloatUniform; /** SuperSplat-style diameter cull in px (0 = off). */ minPixelSize: number; /** SuperSplat-style opacity × area cull (0 = off). */ minContribution: number; sortMetric: 'depth' | 'radial'; }); prepare(modelView: THREE.Matrix4, projection: THREE.Matrix4, activeCount: number): void; readVisibleCount(): Promise; dispose(): void; } export declare function estimateProjectedSplatSteadyBytes(capacity: number): number; export declare function estimateProjectedSplatPeakBytes(capacity: number): number; /** Texture-backed counterpart used by an unmodified standalone SplatMesh. */ export declare class StandaloneProjectedSplatPipeline { private readonly renderer; readonly buffers: ProjectedSplatBuffers; /** True when this projector packed SH into `parameters.z`. */ readonly packedColor: boolean; private readonly modelView; private readonly projection; private readonly resetPass; private readonly projectPass; private readonly finalizePass; private readonly mirrors; private disposed; projectionDispatches: number; constructor(renderer: THREE.WebGPURenderer, options: { capacity: number; sourceIndex: THREE.StorageBufferAttribute; centersTexture: THREE.DataTexture; colorsTexture: THREE.DataTexture; covarianceATexture: THREE.DataTexture; covarianceBTexture: THREE.DataTexture; dataTextureWidth: number; focal: Vec2Uniform; viewport: Vec2Uniform; maxStdDev: number; minSplatSizePx: number; antialias: boolean; projectedLowPassVariance: number; compensateProjectedLowPass: boolean; dofFocusDistance: FloatUniform; dofAperture: FloatUniform; maxAspect: number; lodAlpha: boolean; minPixelSize: number; minContribution: number; sortMetric: 'depth' | 'radial'; localCameraPosition: Vec3Uniform; sh: SplatShInputs | null; }); prepare(modelView: THREE.Matrix4, projection: THREE.Matrix4, activeCount: number): void; readVisibleCount(): Promise; dispose(): void; }