perf: CSM 每级联独立剔除 + 光向 caster pad
- 场景剔除从 [主|阴影] 两视图扩展为 [主|级联0|级联1|级联2] 四视图: 每级联只画自己盒内的 batch,消除原先 3× 全量阴影 draw 的浪费 - 实例数组拼接为四段,batch.first 加段基址保持段内连续; ViewScratch 分桶收集复用容量,稳态零堆分配 - ComputeCascades 沿光方向扩展级联深度范围(pad=30)——切片盒外 caster(高树/城墙)投影进级联的影子不会被剔除裁掉,per-cascade 剔除正确性的前提;只扩 z 不缩 XY,分辨率不受影响 - 遥测 shadow 计数 = 各级联求和 - SunTemple 1056 mesh 全量加载,validation 零警告
This commit is contained in:
@@ -92,7 +92,7 @@ namespace Engine::Passes
|
||||
0, sizeof(glm::mat4),
|
||||
&m_Frame.ubo.lightSpace[c]);
|
||||
|
||||
for (const auto& batch : m_Frame.shadowView.batches) {
|
||||
for (const auto& batch : m_Frame.shadowCascades[c].batches) {
|
||||
batch.mesh->Draw(cmd, batch.count, batch.first);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user