diff --git a/App/editor/StatsPanel.cpp b/App/editor/StatsPanel.cpp index d7ed23d..4d3a5cd 100644 --- a/App/editor/StatsPanel.cpp +++ b/App/editor/StatsPanel.cpp @@ -95,7 +95,8 @@ void StatsPanel::Draw(const EditorContext& ctx) if (bloom) { f32 threshold = renderer.GetBloomThreshold(); - if (ImGui::SliderFloat("Threshold", &threshold, 0.0f, 2.0f)) + if (ImGui::SliderFloat("Threshold", &threshold, 0.0f, 8.0f, + "%.1f", ImGuiSliderFlags_Logarithmic)) { renderer.SetBloomThreshold(threshold); } diff --git a/Engine/include/Engine/Renderer/Passes/FullscreenGpu.h b/Engine/include/Engine/Renderer/Passes/FullscreenGpu.h index 203d224..603911e 100644 --- a/Engine/include/Engine/Renderer/Passes/FullscreenGpu.h +++ b/Engine/include/Engine/Renderer/Passes/FullscreenGpu.h @@ -36,7 +36,10 @@ namespace Engine { struct PostProcessParams { f32 exposure = 0.6f; bool useACES = true; - f32 bloomThreshold = 1.0f; // HDR 域亮度阈值 + // HDR 域亮度阈值。注意不能设 1.0:光滑金属反射亮天空的 HDR 值 + // 普遍 2~50,阈值为 1 会让整片金属表面进 bloom → 白色泛光糊满 + //(怀表铜壳"纯白"元凶)。3.0 ≈ ACES 后接近白的真高光才泛光 + f32 bloomThreshold = 3.0f; f32 bloomStrength = 0.8f; // 叠加强度 }; diff --git a/Engine/src/Vulkan/Texture.cpp b/Engine/src/Vulkan/Texture.cpp index 48e5720..8fe8223 100644 --- a/Engine/src/Vulkan/Texture.cpp +++ b/Engine/src/Vulkan/Texture.cpp @@ -173,7 +173,11 @@ namespace Engine .setOldLayout(vk::ImageLayout::eUndefined) .setNewLayout(vk::ImageLayout::eTransferDstOptimal) .setImage(m_Image) - .setSubresourceRange({vk::ImageAspectFlagBits::eColor, 0, 1, 0, 1}); + // 整条 mip 链一次性 UNDEFINED → TRANSFER_DST:后续 blit + // 的目标 mip 必须已在目标布局(仅转 mip0 会触发 validation + // 对每个 blit 目标的 UNDEFINED 布局告警) + .setSubresourceRange({vk::ImageAspectFlagBits::eColor, + 0, m_MipLevels, 0, 1}); vk::DependencyInfo dep1; dep1.setImageMemoryBarriers(toTransfer);