Skip to main content

Module background_motion_vectors

Module background_motion_vectors 

Source
Expand description

Default background motion vector prepass.

When a camera has MotionVectorPrepass but no NoBackgroundMotionVectors, this module writes motion vectors for background pixels (depth == 0 in reversed-Z) based on camera rotation, so that effects like TAA and motion blur work correctly on the background.

This is a general solution that works for any background: skyboxes, atmospheric sky, solid color backgrounds, etc.

Structsยง

BackgroundMotionVectorsBindGroup
Stores the background motion vectors bind group on the camera entity. Used by the prepass node.
BackgroundMotionVectorsPipelineId
Stores the background motion vectors pipeline ID on the camera entity. Used by the prepass node.
BackgroundMotionVectorsPlugin
Plugin that writes camera-rotation motion vectors for background pixels on cameras with MotionVectorPrepass.
NoBackgroundMotionVectors
When added to a camera with MotionVectorPrepass, disables the automatic background motion vector prepass.