Commit Graph
16 Commits
Author SHA1 Message Date
Claude b361ecd54c Stop draws from merging or reading past their own vertices
Incomplete primitives no longer emit indices: quads drop a one- or
two-vertex tail and draw a three-vertex tail as a triangle, triangle
lists ignore leftover vertices, and fans or strips under three vertices
emit nothing. Draws with no complete primitive are skipped. Previously an
incomplete quad indexed vertices that belonged to the next merged draw,
or past the end of the buffer.

Merging now stops before the 16-bit index offset would wrap, never folds
triangles into a single-instance line or point draw, and breaks after
GXInvalidateVtxCache or a vertex-format switch, so the next draw uploads
fresh arrays and uses its own format's shader.

From upstream patchzyy/Wiicompiled 6f14bde (#244, KartPad batch).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Wg7mB8ogCWmp9GH19Uc82B
2026-10-05 13:29:17 +00:00
iChris4 e7eab8a6b2 Refactor stereo frame worker and interpolation tests for enhanced VR performance
- Updated stereo_frame_worker_smoke.cpp to allow dynamic headset rates and prediction lead time.
- Improved logging to include motion diagnostics and adjusted frame submission logic based on headset frequency.
- Enhanced stereo_interpolation_test.cpp with additional tests for camera motion separation and playback cadence.
- Introduced MkwVRReadSceneView function to read the camera view matrix for improved scene rendering.
- Modified VR first-person logic to support scene view reading and validation.
- Added scene_camera.hpp to encapsulate camera motion handling and inverse view calculations.
- Ensured that the VR integration layer correctly logs motion diagnostics and handles scene playback accurately.
2026-10-01 00:37:49 +02:00
iChris4 3c20f677eb Implement Bullet Bill model visibility and cockpit recentering improvements
- Added support for hiding model arrays in the rendering pipeline to optimize performance during VR gameplay.
- Introduced new functions in `gx_model_visibility` to manage hidden model arrays and their visibility based on game state.
- Enhanced cockpit recentering logic to ensure accurate seat measurements and eye positioning during gameplay.
- Updated `FirstPersonState` to track cockpit height and forward direction, improving VR experience.
- Added tests for Bullet Bill model visibility and cockpit height adjustments to ensure functionality and stability.
- Refactored existing code to accommodate new features and improve overall code organization.
2026-09-28 23:21:01 +02:00
iChris4 e89988f92e Refactor composite source handling: unify link_composite_source logic and update related pipeline references 2026-09-26 05:51:43 +02:00
iChris4 f2f7c5007a Implement native composite source handling for Mario Kart Wii ghost kart effect 2026-09-26 05:17:49 +02:00
iChris4 2a89fac79d Implement stereo depth and stencil support for VR cockpit rendering to fix hands getting darken by virtual screen 2026-09-23 16:03:00 +02:00
iChris4andClaude Opus 5 fd42edf303 Merge kart draws again while the native steering wheel is animated
The animated copy is registered for the vehicle's whole position array, and a
race frame has 228 primitives that bind it. Suppressing draw merging for all of
them turned the kart's display list back into hundreds of separate draw calls,
each recorded once and replayed in the mono pass and both eyes: on a Quest 3 the
app frame went from 15.7 ms to 21.7 ms with the GPU pinned at 97 %, which past
the 72 Hz deadline reads as 56 FPS against 42.

Merging is unsafe only between draws that resolved the array differently, since
the merged whole renders through the binding of the draw it folds into. So
resolve the replacement once per draw, before the merge test, and merge into a
draw that reached the same decision. Draws of an opponent sharing the asset
merge with each other again too, and with no set registered the test is exactly
what it was before the feature.

Measured at the same place on a Quest 3: 60 FPS against 42, the app frame back
to 13.9 ms, 564 draw calls a frame with 11808 primitives merged away.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-23 01:04:06 +02:00
iChris4 131da8a7a9 Keep the cockpit wheel with the view and let the native wheel recover
Found on a Quest 3 through Virtual Desktop (VirtualDesktopXR, Vulkan):
the race camera's view matched the scene camera exactly and the kart's
own wheel animated (228 draws a frame took the copy), but during the
race's opening pan no draw took it, the 30-frame fallback latched the VR
wheel for that vehicle, and it stayed until the scene changed.

The fallback now heals: copies keep being published, the VR wheel stands
in only while draws are not taking them, and the vehicle's own wheel
returns as soon as they are. Both switches are logged, a few per race.

With first_person_rotation "yaw_pitch" or "full" the wheel copy and the
hands' wheel geometry now ride in the view's own frame (the kart's
orientation around the seat) instead of the level seat, so the wheel no
longer tilts against the view on slopes.

Aurora logs, after about half a second, five seconds and a minute of
copies, how many draws bound a copied array (inside and outside its
window), how many matched, and the closest position matrix against the
expected one, so a mismatch says whether the array or the matrix differs.
2026-09-22 03:56:38 +02:00
iChris4 f3d7277ff3 Add native steering-wheel vertex substitution to Aurora
The VR first-person camera will animate the local vehicle's steering wheel
by handing Aurora a rotated copy of one of the vehicle's position arrays.
A draw picks up the copy only when it binds that exact array with the local
vehicle's position matrix (per-position ownership for indexed-matrix
draws), so opponents sharing the asset keep the original vertices. The copy
takes the same padded upload path as the original and never touches the
shared array cache.

Ported from heurazy's mario-kart-wii-VR-port (GPL-3.0-or-later).
2026-09-22 03:54:33 +02:00
iChris4 60c443654f Added performance level configuration for OpenXR runtime and enhance Aurora's frame worker 2026-09-19 04:43:47 +02:00
iChris4 e52227baf5 Added Android Meta Quest Support 2026-09-16 22:06:34 +02:00
iChris4 3e8bdcfd7b Added Support for Multiplayer Player 1 Immersive View 2026-09-16 17:06:03 +02:00
iChris4 6467c6390c Added support for VR Frame Interpolation 2026-09-10 21:33:34 +02:00
iChris4 7898a76a22 Added 2D Virtual Screen for HUD and Ortho Elements 2026-09-04 18:31:03 +02:00
iChris4 0beb7d880c Initial OpenXR configuration 2026-08-30 21:47:12 +02:00
patchzyy ec226e8348 init 2026-08-23 17:10:50 +02:00