mirror of
https://github.com/mitch030504/Wiicompiled_VR_Frame.git
synced 2026-10-06 10:00:27 +02:00
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.
This commit is contained in:
1 parent
85fab2fa09
commit
e7eab8a6b2
19 files changed
+1978
-114
No files matched your search
@@ -2188,10 +2188,19 @@ bool prepare_late_stereo_replay(SealedFrame& frame, wgpu::CommandEncoder& cmd, c
|
||||
Mat3x4<float> before, current, result;
|
||||
std::memcpy(&before, previous + at, sizeof(before));
|
||||
std::memcpy(¤t, uniform.data() + at, sizeof(current));
|
||||
const bool vertexMotion = layout.vertexMotion.enabled && offset == layout.positionOffset &&
|
||||
!layout.indexedMatrices;
|
||||
if (vertexMotion) {
|
||||
before = gx::offset_transform_origin(before, layout.vertexMotion.center);
|
||||
current = gx::offset_transform_origin(current, layout.vertexMotion.center);
|
||||
}
|
||||
const bool valid = layout.indexedMatrices ? gx::interpolate_indexed_transform(before, current, weight, result)
|
||||
: gx::interpolate_transform(before, current, weight, result);
|
||||
if (valid)
|
||||
: gx::interpolate_draw_transform(before, current, weight, result);
|
||||
if (valid) {
|
||||
if (vertexMotion)
|
||||
result = gx::offset_transform_origin(result, layout.vertexMotion.center, -1.f);
|
||||
std::memcpy(uniform.data() + at, &result, sizeof(result));
|
||||
}
|
||||
}
|
||||
};
|
||||
interpolateMatrices(layout.positionOffset, layout.positionMatrixCount, layout.positionMatrixMask);
|
||||
|
||||
Reference in new issue
Block a user