Skip to content

feat(vk): add centered 3D rotating Triforce loading screen with retro LOADING... overlay - #1068

Draft
oscarlosu-lab wants to merge 3 commits into
NotRexed:mainfrom
oscarlosu-lab:feat/loading-screen-triforce
Draft

oscarlosu-lab wants to merge 3 commits into
NotRexed:mainfrom
oscarlosu-lab:feat/loading-screen-triforce

Conversation

@oscarlosu-lab

Copy link
Copy Markdown
Contributor

Summary

This PR adds an optional, centered 3D rotating golden Triforce animation with a retro "LOADING..." indicator during zone and scene transitions, paying homage to classic 90s console loading screens while replacing the empty black screen and the tiny static corner icon.

Replaces and supersedes #471 with a clean rebase on latest main (2957106).

Preview

Zelda Loading Animation

Key Features & Design

  1. Accurate GPU Synchronization (Zero False Positives):
    • Synchronized directly with the Vulkan command stream (d3d depth draws, compute dispatches, and pass geometry).
    • Only triggers during actual black loading transitions (d3d == 0, f_disp == 0, f_draws <= 25, where the engine unloads the 3D scene).
    • Automatically hides on the exact frame the 3D world resumes rendering (d3d >= 15), completely preventing false triggers during background streaming in towns or open areas.
  2. Display Thread & Frame Pacer Decoupling:
    • Integrated into display_main() (vk_framegen.cpp) with a 16 ms timeout fallback so the 3D Triforce continues spinning smoothly at 60 FPS even when the CPU game thread stalls performing heavy I/O file loads.
  3. Clean Visuals:
    • Clears the swapchain image to black during active loading passes to cleanly replace the small static bottom-right indicator with the centered 3D rotating model.
  4. Configurable in F1 / Insert Menu:
    • Added toggle Loading animation: On/Off under the in-game options menu (Options::loading_screen).
  5. Zero Performance Overhead:
    • Measured overhead during normal 3D gameplay: 0.00 ms (a single atomic read per frame).
    • Active animation cost: ~0.19 ms per frame during loading.

Tested Scenarios

  • Entering/exiting buildings in Kakariko Village.
  • Area warping and dungeon transitions.
  • Verified on Windows x64 Vulkan backend with frame interpolation enabled and disabled.

oscarlosu-lab added a commit to oscarlosu-lab/Hookshot-TEST-commits that referenced this pull request Nov 9, 2026
@oscarlosu-lab
oscarlosu-lab force-pushed the feat/loading-screen-triforce branch from 04ad965 to 09bab3f Compare November 9, 2026 09:09
@hckrman101

Copy link
Copy Markdown
Collaborator

Hi! This PR has merge conflicts with main now (a lot has landed today). Could you merge main in or rebase and resolve them? Happy to give it a proper review once it's up to date.

@oscarlosu-lab

Copy link
Copy Markdown
Contributor Author

Hi @hckrman101! Done — merged the latest main into the branch and resolved all merge conflicts (including adapting to the new TLS objects, startup screen upload slots, and host table changes). Everything is clean and ready for review!

@hckrman101

Copy link
Copy Markdown
Collaborator

Hi, I think this is probably better as a mod than in engine.

@hckrman101
hckrman101 marked this pull request as draft November 9, 2026 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants