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:
@@ -157,8 +157,8 @@ namespace Engine
|
||||
ubo.projNoJitter = ubo.proj;
|
||||
|
||||
// 子像素抖动(Halton×8):光栅化采样位置逐帧偏移,TAA 累积去锯齿。
|
||||
// NDC 偏移 = 像素偏移 × 2 / 尺寸
|
||||
{
|
||||
// NDC 偏移 = 像素偏移 × 2 / 尺寸。TAA 关闭时停抖(直通画面静止)
|
||||
if (m_TAAEnabled) {
|
||||
const u32 idx = static_cast<u32>(m_FrameIndex % 8);
|
||||
const f32 jx = Halton(idx + 1, 2) - 0.5f;
|
||||
const f32 jy = Halton(idx + 1, 3) - 0.5f;
|
||||
@@ -168,6 +168,13 @@ namespace Engine
|
||||
|
||||
ubo.ambientColor = scene.GetSettings().ambientColor;
|
||||
|
||||
// ---- 运行时开关/调试视图落帧(各 pass 与 frag 只读契约字段)----
|
||||
m_Frame.shadowsEnabled = m_ShadowsEnabled;
|
||||
m_Frame.taaEnabled = m_TAAEnabled;
|
||||
m_Frame.bloomEnabled = m_BloomEnabled;
|
||||
m_Frame.debugView = m_DebugView;
|
||||
ubo.cascadeSplits.w = m_ShadowsEnabled ? 1.0f : 0.0f;
|
||||
|
||||
// 天空盒:视图去平移(只留旋转)× 投影 → 逆矩阵,push 给 Skybox pass;
|
||||
// 反投影远平面点 = 相机相对世界方向,frag normalize 后采样 cube
|
||||
m_Frame.skyInvVP =
|
||||
|
||||
Reference in New Issue
Block a user