diff --git a/App/main.cpp b/App/main.cpp index b221b4e..a159d8c 100644 --- a/App/main.cpp +++ b/App/main.cpp @@ -101,7 +101,12 @@ protected: void OnUpdate(f32 deltaTime) override { - m_Time += deltaTime; + // 暂停时冻结动画时钟(帧历史验证:暂停后 Temporal Diff + // 视图应在 2 帧内整屏变黑;相机移动同样会被 diff 捕捉到) + if (!m_PauseAnim) + { + m_Time += deltaTime; + } // 相机(WASD/Space/Shift 移动) m_Camera.GetComponent() @@ -172,6 +177,7 @@ protected: { renderer.SetShowTemporalDiff(temporalDiff); } + ImGui::Checkbox("Pause Animation", &m_PauseAnim); // Pass 级 GPU 耗时(RG timestamp) ImGui::Separator(); @@ -286,6 +292,7 @@ private: EntityHandle m_KeyLight{}; std::vector m_Spinners; f32 m_Time = 0.0f; + bool m_PauseAnim = false; // 冻结动画时钟(帧历史 diff 验证用) }; int main()