feat: 特性开关 + Pass 调试视图接口(ImGui 可控,统一帧契约)

三个运行时开关(Shadows/TAA/Bloom)与 9 种调试视图(Final/
TemporalDiff/HDR/TAAColor/Bloom/Velocity/ShadowMap0-2)。

统一设计:开关状态收敛 FrameSceneData 契约,SceneRenderer 唯一
写入、各 pass 只读(零虚接口路由);调试视图经 tonemap push
int 路由已绑定的中间目标(声明超集、运行时零重绑);HDR 域
资源过同一 tonemap 保证观感可比。

- Shadows:ShadowPass lambda 空转 + frag cascadeSplits.w 短路
- TAA:alpha=0 直通 + SceneRenderer 停投影抖动(同一持有者同步)
- Bloom:3 子 pass 空转 + tonemap 强度归零
- Renderer 门面 Get/Set 转发,App ImGui 3 Checkbox + Combo
- PostProcessParams 瘦身为纯数值参数,showTemporalDiff 被取缔
This commit is contained in:
2026-09-24 13:03:00 +08:00
parent 708d714459
commit a1c6ad20be
17 changed files with 271 additions and 66 deletions
+23 -4
View File
@@ -182,11 +182,30 @@ namespace
renderer.SetBloomStrength(strength);
}
// 调试视图:帧历史差异(静止=黑,运动边缘发光=链路正确)
bool temporalDiff = renderer.GetShowTemporalDiff();
if (ImGui::Checkbox("Temporal Diff View", &temporalDiff))
ImGui::Text("Features");
bool shadows = renderer.GetShadowsEnabled();
if (ImGui::Checkbox("Shadows", &shadows))
{
renderer.SetShowTemporalDiff(temporalDiff);
renderer.SetShadowsEnabled(shadows);
}
bool taa = renderer.GetTAAEnabled();
if (ImGui::Checkbox("TAA", &taa))
{
renderer.SetTAAEnabled(taa);
}
bool bloom = renderer.GetBloomEnabled();
if (ImGui::Checkbox("Bloom", &bloom))
{
renderer.SetBloomEnabled(bloom);
}
// 调试视图:单看某个 pass 的中间输出(类 UE pass debug)
const auto& viewNames = renderer.GetDebugViewNames();
int view = renderer.GetDebugView();
if (ImGui::Combo("Debug View", &view, viewNames.data(),
static_cast<int>(viewNames.size())))
{
renderer.SetDebugView(view);
}
ImGui::Checkbox("Pause Animation", &m_PauseAnim);