/** * The `SplatModifier`s of `.asog` GPU playback: they evaluate every splat's * TRiGS rigid-body motion (format section 4.1) at a time uniform, from a * motion texture and a clip table uploaded once, so a frame costs no CPU * evaluation and no upload. The twin of `evaluateAsogSplat` * (`formats/asog/asog-motion.ts`), in float32. * * {@link asogMotionModifier} moves the centre (`offset`), turns the * covariance by the motion's rotation (`rotation`, exact for a rigid turn: * `Σ' = R·Σ·Rᵀ`) and scales opacity by the temporal and clip weights. * {@link asogPositionModifier} is its position part alone, for * `SplatMesh.sortDisplacement`. * * Every branch is a float mask (`mix`, `step`): `select`/`If` in a modifier * graph drops splats. */ import * as THREE from 'three/webgpu'; import type { SplatModifier } from '../core/splat-modifier'; /** Texels per row of the motion texture (RGBA32F). */ export declare const ASOG_MOTION_TEXTURE_WIDTH = 4096; /** Motion texels per splat (`ASOG_MOTION_FLOATS / 4`). */ export declare const ASOG_MOTION_TEXELS = 5; /** Channel holding each slot's first motion texel. */ export declare const ASOG_BASE_CHANNEL = "asogBase"; /** * The GPU state of a playing clip. Both textures are uploaded once; only * the `time` uniform changes per frame, and each clip's local time and fade * weight are derived from it here. * * - `motion`: {@link ASOG_MOTION_TEXELS} RGBA32F texels per splat, the * layout of `ASOG_MOTION_FLOATS`. * - `clips`: the clip table, two RGBA32F texels per clip: (time offset, * active start, active end, 0) and (core start, core end, fade-in, * fade-out), in seconds. * - `time`: the global clip time in seconds. */ export interface AsogMotionState { readonly motion: THREE.DataTexture; readonly clips: THREE.DataTexture; readonly time: THREE.UniformNode<'float', number>; } /** The position part of {@link asogMotionModifier}, for `SplatMesh.sortDisplacement`. */ export declare function asogPositionModifier(state: AsogMotionState): SplatModifier; /** The motion-evaluating modifier over `state` (see the module comment). */ export declare function asogMotionModifier(state: AsogMotionState): SplatModifier;