/** * Procedural sky background pass. * * Draws one fullscreen triangle into the main render pass BEFORE any * geometry (the pass's colour attachments are cleared either way, so the * sky simply replaces the flat clear colour). Reverse-Z places it at the * far plane (z = 0) with depth writes off, so geometry always wins the * depth test and transparent surfaces blend over the sky correctly. * * The pipeline targets must mirror the main pass exactly: colour + object-id * attachments and the MSAA sample count. The object-id output is the * attachment's clear value, so picking still reads "background" on sky. */ import type { ResolvedEnvironment } from './environment.js'; export interface SkyPassFormats { colorFormat: GPUTextureFormat; objectIdFormat: GPUTextureFormat; depthFormat: GPUTextureFormat; sampleCount: number; } export interface SkyCamera { /** Camera world position → target direction, unit. */ forward: [number, number, number]; /** Screen-right in world space, unit. */ right: [number, number, number]; /** Screen-up in world space, unit. */ up: [number, number, number]; /** Vertical field of view in radians. */ fovY: number; /** Viewport width / height. */ aspect: number; } export declare class SkyPass { private device; private pipeline; private uniformBuffer; private bindGroup; private scratch; private destroyed; constructor(device: GPUDevice, formats: SkyPassFormats, shaderSource: string); /** * Record the sky draw into an already-begun render pass. Callers must * re-set their own pipeline + group(0) afterwards (the main loop does * this per batch anyway). */ draw(pass: GPURenderPassEncoder, camera: SkyCamera, env: ResolvedEnvironment): void; destroy(): void; } //# sourceMappingURL=sky-pass.d.ts.map