render: keep showcase staging fully inert while no showcase frame is live

This commit is contained in:
mchughalex 2026-07-21 09:31:00 +01:00
parent aa81e4e6c2
commit 137d97c190
2 changed files with 15 additions and 2 deletions

View file

@ -81,6 +81,7 @@ extern const rex::PPCImageInfo eawebkit_PPCImageConfig;
extern "C" REX_FUNC(__restgprlr_19);
// Defined in skate3_native_scene.cpp; toggled by the showcase hotkey below.
REXCVAR_DECLARE(bool, skate3_native_render_capture_hotkeys);
REXCVAR_DECLARE(bool, skate3_native_render_scene_showcase);
// Defined in skate3_native_scene.cpp; the freecam hotkey below toggles it,
// and while it captures input the guest input system is gated off.
@ -728,6 +729,13 @@ void Skate3BaseApp::OnCreateDialogs(rex::ui::ImGuiDrawer* drawer) {
});
rex::ui::RegisterBind("bind_skate3_showcase", "Ctrl+Shift+B",
"Graphics build-up showcase", [] {
// A capture/recording tool, not a player feature:
// like the capture hotkeys, the bind is inert
// unless the diagnostics cvar opts in (the F12
// Showcase Setup window still starts runs).
if (!REXCVAR_GET(skate3_native_render_capture_hotkeys)) {
return;
}
REXCVAR_SET(
skate3_native_render_scene_showcase,
!REXCVAR_GET(skate3_native_render_scene_showcase));

View file

@ -8417,8 +8417,13 @@ bool RenderScene(const NativeGuestOutputRenderContext& context, void* /*user_dat
constants[34] = item.unlit ? 1.0f : 0.0f;
// tint.a < 0 marks dynamic-entity items for the showcase dyn layer
// (ps_main clips them until the bit reveals); the solid-color
// early-out only ever reads tint.a > 0.
constants[35] = item.dyn_entity ? -1.0f : 0.0f;
// early-out only ever reads tint.a > 0. Staged only while a showcase
// frame is live (nonzero split rows) so normal rendering never
// carries the marker at all.
constants[35] = (item.dyn_entity && (g_r.showcase_rows[0] != 0.0f ||
g_r.showcase_rows[1] != 0.0f))
? -1.0f
: 0.0f;
}
constants[36] = scene.cam_pos[0];
constants[37] = scene.cam_pos[1];