Raise bloom threshold to HDR 3.0; fix blit dst-mip layout warnings

The smooth brass case back of the pocket watch reflects large bright
sky regions of the Venice dawn environment at HDR values well above 1.
With the old threshold of 1.0 the entire metal surface passed the
bloom extract, and the blurred additive result washed it out to flat
white. Only genuinely hot highlights (HDR >= 3, near-white after ACES)
should bloom.

- Default bloomThreshold 1.0 -> 3.0; Stats slider range extended to 8
  with a logarithmic scale
- Texture mip generation: transition the whole mip chain to
  TRANSFER_DST up front; blitting into never-transitioned destination
  mips triggered one validation warning per level
This commit is contained in:
2026-10-05 12:28:14 +08:00
parent 6c80693618
commit a941207ae3
3 changed files with 11 additions and 3 deletions
@@ -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; // 叠加强度
};
+5 -1
View File
@@ -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);