/** * Native character motion vectors for temporal reprojection. * * The CPU stage evaluates the exact dual-influence skinning contract used by * skin-skinning.wgsl for both the previous and current CharacterDrawSpec. The * GPU stage rasterizes those per-vertex vectors with the character index * buffer, producing screen-space velocity and depth grids for temporal resolve. */ import type { CharacterDrawSpec } from '../native-render/draw-spec'; import type { DepthGrid, MotionVectorGrid } from '../rendering/webgpu/TemporalInputs'; import { type Mat4 } from './skin-math'; export interface CharacterMotionVectorOptions { width: number; height: number; currentViewProjection: Mat4; previousViewProjection?: Mat4; } export interface CharacterMotionVectorReceipt { schemaVersion: 'holoscript.character-motion-vectors.v1'; entityId: string; vertexCount: number; movingVertexCount: number; invalidVertexCount: number; meanMagnitudePixels: number; maximumMagnitudePixels: number; motionVectorSpace: 'current-minus-previous-pixels'; dualInfluenceSkinningConsumed: true; modelMotionConsumed: true; viewProjectionMotionConsumed: true; topologyIdentityRequired: true; currentClipDigest: string; previousClipDigest: string; motionDigest: string; } export interface CharacterMotionVectorFrame { schemaVersion: 'holoscript.character-motion-vector-frame.v1'; width: number; height: number; vertexCount: number; currentClipPositions: Float32Array; previousClipPositions: Float32Array; currentDepth: Float32Array; motionPixels: Float32Array; receipt: CharacterMotionVectorReceipt; } export interface CharacterMotionRasterReceipt { schemaVersion: 'holoscript.webgpu-character-motion-raster.v1'; backend: 'webgpu'; deviceExecutionMeasured: true; width: number; height: number; vertexCount: number; triangleCount: number; rasterizedPixelCount: number; movingPixelCount: number; motionVectorSpace: 'current-minus-previous-pixels'; depthConvention: 'webgpu-ndc-zero-to-one'; gpuTimestampMeasured: false; timingClassification: 'not-measured'; } export interface CharacterMotionRasterResult { motionVectors: MotionVectorGrid; depth: DepthGrid; receipt: CharacterMotionRasterReceipt; } /** * Derive current/previous clip positions and current-minus-previous pixel * velocity from two topology-identical character frames. */ export declare function deriveCharacterMotionVectorFrame(current: CharacterDrawSpec, previous: CharacterDrawSpec, options: CharacterMotionVectorOptions): CharacterMotionVectorFrame; /** * Rasterize a character motion frame into screen-space velocity and NDC depth * on a live GPUDevice. Readback proves execution but is not a GPU timing result. */ export declare function rasterizeCharacterMotionVectorsGPU(device: GPUDevice, frame: CharacterMotionVectorFrame, indices: Uint32Array): Promise; //# sourceMappingURL=CharacterMotionVectors.d.ts.map