render: record the captured cascade rows in the scene ring
This commit is contained in:
parent
b1cbbc263d
commit
f47de1e596
2 changed files with 14 additions and 0 deletions
|
|
@ -7730,6 +7730,8 @@ bool RenderScene(const NativeGuestOutputRenderContext& context, void* /*user_dat
|
|||
ring_frame->shadow_ready = shadow_ready;
|
||||
ring_frame->shadow_draws = uint16_t(std::min<uint32_t>(shadow_draws, 0xFFFFu));
|
||||
ring_frame->static_sun_valid = g_r.static_sun_valid;
|
||||
std::memcpy(ring_frame->shadow_rows, scene.shadow_rows,
|
||||
sizeof(ring_frame->shadow_rows));
|
||||
ring_frame->items.reserve(scene.items.size());
|
||||
ring_map.reserve(scene.items.size());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -686,6 +686,12 @@ struct SceneRingFrame {
|
|||
bool shadow_ready = false;
|
||||
uint16_t shadow_draws = 0;
|
||||
bool static_sun_valid = false;
|
||||
// The frame's captured cascade rows: receivers project through these, so
|
||||
// a single-frame foreign capture moves every dynamic shadow off-target
|
||||
// with the composition and the atlas identical. They vary legitimately
|
||||
// with the camera, so only a recorded per-frame trace can tell an
|
||||
// outlier from drift.
|
||||
float shadow_rows[48] = {};
|
||||
std::vector<SceneRingItem> items;
|
||||
};
|
||||
inline std::deque<SceneRingFrame> g_scene_ring; // render thread only
|
||||
|
|
@ -726,6 +732,12 @@ inline void MaybeDumpSceneRing() {
|
|||
fr.shadow_valid ? 1 : 0, fr.shadow_ready ? 1 : 0,
|
||||
unsigned(fr.shadow_draws), fr.static_sun_valid ? 1 : 0);
|
||||
f << line;
|
||||
f << "S," << fr.frame;
|
||||
for (float v : fr.shadow_rows) {
|
||||
std::snprintf(line, sizeof(line), ",%.6g", double(v));
|
||||
f << line;
|
||||
}
|
||||
f << "\n";
|
||||
for (const SceneRingItem& it : fr.items) {
|
||||
std::snprintf(line, sizeof(line),
|
||||
"I,%llu,%08X,%08X,%08X,%08X,%08X,%08X,%08X,%08X,%08X,"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue