import { WebGLRenderer, WebGLRenderTarget, WebGLCubeRenderTarget, Scene, Camera, CubeCamera, OrthographicCamera, Mesh, Matrix3, Matrix4 } from 'three'; /** * Resources needed for fisheye rendering. * Created once and reused across frames, or created temporarily for snapshots. */ export interface FisheyeResources { cubeRenderTarget: WebGLCubeRenderTarget; cubeCamera: CubeCamera; fisheyeScene: Scene; orthoCamera: OrthographicCamera; planeMesh: Mesh; tempMatrix4: Matrix4; tempMatrix3: Matrix3; } /** * Update CubeCamera's near/far clipping planes. * Call this when camera near/far changes (low frequency operation). */ export declare function updateFisheyeClippingPlanes(resources: FisheyeResources, near: number, far: number): void; export interface CreateFisheyeResourcesParams { /** Resolution for each face of the cube map */ cubeResolution: number; /** Field of view in degrees (typically 180 for fisheye) */ fov: number; /** Near clipping plane */ near?: number; /** Far clipping plane */ far?: number; } export interface RenderFisheyeToTargetParams { gl: WebGLRenderer; scene: Scene; camera: Camera; renderTarget: WebGLRenderTarget; resources: FisheyeResources; } /** * Create all resources needed for fisheye rendering. * These resources should be reused across frames for efficiency. */ export declare function createFisheyeResources({ cubeResolution, fov, near, far, }: CreateFisheyeResourcesParams): FisheyeResources; /** * Dispose all fisheye resources to free GPU memory. */ export declare function disposeFisheyeResources(resources: FisheyeResources): void; /** * Render a fisheye camera view to a render target. * * Pipeline: * 1. CubeCamera captures the scene from the camera position (6 faces) * 2. A custom shader projects the cubemap using equidistant fisheye projection * 3. An orthographic camera renders the result to the preview renderTarget */ export declare function renderFisheyeToTarget({ gl, scene, camera, renderTarget, resources, }: RenderFisheyeToTargetParams): void;