fix: 阴影不可见——灯序依赖遍历顺序 + 光比失衡,新增帧截图调试能力
- 灯序修复(根因):entt Each 遍历序不保证创建序,lights[0] 曾落到 点光(params.x=1)→ shader 阴影分支整个跳过。收集后 stable_sort 方向光排前,确立"lights[0] = CSM 阴影光源"契约 - 光比失衡:IBL 环境与点光淹没主光阴影。KeyLight 5.0 + exposure 默认 0.6 + ambientColor 0.07;阴影区环境光同步衰减(简化遮蔽) - ShadowPass depth bias 0.006(acne 均值形态 vs 推过头丢阴影的折中) - Renderer 帧截图能力:第 60 帧自动截 HDRColor/ShadowMap 落 BMP (ACES+gamma 还原屏幕观感),视觉调试自闭环不再依赖肉眼 - KeyLight 增加 intensity slider(0-20 运行时可调)
This commit is contained in:
@@ -694,6 +694,24 @@ namespace Engine::RG {
|
||||
return entry.physical[frameSlot]->view;
|
||||
}
|
||||
|
||||
bool RenderGraph::GetCaptureTarget(TextureHandle h, u32 frameSlot,
|
||||
vk::Image& outImage, vk::Extent2D& outExtent,
|
||||
vk::Format& outFormat,
|
||||
vk::ImageLayout& outResting) const
|
||||
{
|
||||
const auto& entry = GetEntry(h);
|
||||
if (entry.imported || frameSlot >= entry.physical.size() ||
|
||||
!entry.physical[frameSlot]) {
|
||||
return false;
|
||||
}
|
||||
const auto& phys = *entry.physical[frameSlot];
|
||||
outImage = phys.image;
|
||||
outExtent = phys.extent;
|
||||
outFormat = phys.format;
|
||||
outResting = entry.restingLayout;
|
||||
return true;
|
||||
}
|
||||
|
||||
void RenderGraph::SetQueryPool(vk::QueryPool pool, u32 queriesPerFrame)
|
||||
{
|
||||
m_QueryPool = pool;
|
||||
|
||||
Reference in New Issue
Block a user