feat: ACES tonemap + Bloom 后处理链(Extract/BlurH/BlurV 半分辨率)
- ACES(Narkowicz) 经 push 开关启用,exposure 接 ImGui 滑条 - RG: TextureDesc 支持 sizeScale 相对尺寸;per-pass 渲染尺寸解析 (半分辨率 pass 的 viewport 由此决定) - RG Toposort 重写:RAW+WAR+WAW 按声明序逐资源建边,支持多写者 ping-pong 资源(旧逻辑对 reader 连接所有 writer,ping-pong 成环) - GetPhysicalView 缺物理镜像时 throw(ENGINE_FATAL 只记日志不中止) - 全屏 pass 通用 16B push + 公共录制 lambda,Extract/Blur/Tonemap 复用
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#include <Engine/ECS/EntityHandle.h>
|
||||
#include <Engine/ECS/Components.h>
|
||||
#include <Engine/Assets/AssetManager.h>
|
||||
#include <Engine/Renderer/Renderer.h>
|
||||
|
||||
#include <imgui.h>
|
||||
|
||||
@@ -130,6 +131,29 @@ protected:
|
||||
}
|
||||
}
|
||||
|
||||
// Tonemap + Bloom 参数(HDR 后处理输出端)
|
||||
auto& renderer = GetRenderer();
|
||||
ImGui::Separator();
|
||||
ImGui::Text("Tonemap");
|
||||
f32 exposure = renderer.GetExposure();
|
||||
if (ImGui::SliderFloat("exposure", &exposure, 0.1f, 4.0f)) {
|
||||
renderer.SetExposure(exposure);
|
||||
}
|
||||
bool aces = renderer.GetUseACES();
|
||||
if (ImGui::Checkbox("ACES", &aces)) {
|
||||
renderer.SetUseACES(aces);
|
||||
}
|
||||
|
||||
ImGui::Text("Bloom");
|
||||
f32 threshold = renderer.GetBloomThreshold();
|
||||
if (ImGui::SliderFloat("threshold", &threshold, 0.0f, 2.0f)) {
|
||||
renderer.SetBloomThreshold(threshold);
|
||||
}
|
||||
f32 strength = renderer.GetBloomStrength();
|
||||
if (ImGui::SliderFloat("strength", &strength, 0.0f, 2.0f)) {
|
||||
renderer.SetBloomStrength(strength);
|
||||
}
|
||||
|
||||
ImGui::Separator();
|
||||
ImGui::Text("fps: %.1f frame: %llu",
|
||||
1.0f / GetDeltaTime(),
|
||||
|
||||
Reference in New Issue
Block a user