#pragma once #include #include #include namespace faset::render { // CPU-only 1:1 oracle for the temporal resolve shader. Color is already // display-referred; motion is current-minus-previous normalized scene UV. // The renderer does not call this per-pixel path in production. struct TemporalReferencePixel { std::array color{0, 0, 0, 1}; float depth{1}; std::array motion{}; float previous_depth{1}; bool motion_valid{}; float reactive{}; }; struct TemporalReferenceFrame { std::uint32_t width{}, height{}; std::vector pixels; }; struct TemporalReferenceHistory { std::uint32_t width{}, height{}; std::vector> color; std::vector depth; }; struct TemporalReferenceResult { TemporalReferenceHistory history; std::vector accepted; std::uint32_t accepted_count{}; }; // A null previous history is the first-frame/cut fallback. Extents must agree // when history is supplied; reset it instead of reprojecting stale dimensions. // Input is bounded to four million pixels so synthetic tests cannot consume // unbounded memory. Invalid motion rejects history for that pixel. TemporalReferenceResult temporal_reference_resolve( const TemporalReferenceFrame& current, const TemporalReferenceHistory* previous = nullptr); } // namespace faset::render