Skip to main content

Camera-Reprojection Antialiasing

Reconstruct previous-frame image coordinates from scene depth and camera transforms when a per-pixel velocity buffer is unavailable. createCameraReprojectionTAAShaderPassPipeline powers the camera-aware temporal antialiasing path in luma.gl's ANARI rendering runtime.

At a Glance

PropertyValue
ExportcreateCameraReprojectionTAAShaderPassPipeline
BackendWebGPU
Render passesThree: temporal resolve, resolved-color copy, and depth-history copy
Required bindingdepthTexture
Persistent stateFull-resolution rgba16float color and depth history
Motion modelCamera motion and static-world geometry; no object-velocity attachment

Usage

import {ShaderPassRenderer} from '@luma.gl/engine';
import {createCameraReprojectionTAAShaderPassPipeline} from '@luma.gl/effects';

const renderer = new ShaderPassRenderer(device, {
colorFormat: 'rgba16float',
shaderPasses: [createCameraReprojectionTAAShaderPassPipeline()]
});

renderer.renderToScreen({
sourceTexture: sceneColorTexture,
bindings: {depthTexture: sceneDepthTexture},
uniforms: {
cameraReprojectionTaaResolve: {
inverseViewProjectionMatrix,
previousViewProjectionMatrix,
historyWeight: 0.9,
depthThreshold: 0.0025,
currentJitter,
previousJitter
}
},
resetHistory: cameraCut || sceneTopologyChanged
});

Parameters

ParameterDefaultDescription
inverseViewProjectionMatrixIdentityInverse current unjittered camera transform used to reconstruct world position.
previousViewProjectionMatrixIdentityPrevious unjittered camera transform used to project that position into history.
historyWeight0.9Fraction of accepted previous-frame color blended into the current pixel.
depthThreshold0.0025Maximum normalized-device-depth disagreement before history is discarded.
currentJitter[0, 0]Current projection jitter expressed in normalized image coordinates.
previousJitter[0, 0]Previous projection jitter expressed in normalized image coordinates.

Limitations and History Management

Camera reprojection can follow static-world surfaces as the view changes, but it cannot infer independent object motion without a velocity texture. Reset history when moving-object topology, render resolution, or camera continuity changes. Use velocity-aware Temporal Antialiasing for animated scenes that already publish per-pixel motion vectors.

  • Temporal Antialiasing supports application-provided object velocity.
  • FXAA requires no history, depth, jitter, or camera transforms.
  • ANARI Rendering documents the renderer that consumes this pipeline.