mirror of
https://github.com/mitch030504/Wiicompiled_VR_Frame.git
synced 2026-10-06 05:00:27 +02:00
aurora: add asynchronous OpenXR stereo replay bridge
This commit is contained in:
1 parent
8c8e4561e9
commit
d8788de919
17 files changed
+1521
-74
No files matched your search
@@ -4,6 +4,22 @@
|
||||
|
||||
namespace aurora::gfx::stereo_replay {
|
||||
|
||||
// An OpenXR eye supplies the shape of its asymmetric frustum, but the sealed
|
||||
// GX draw already contains the depth mapping adjusted for that draw's GX
|
||||
// viewport and Aurora's reversed-Z convention. Replacing the complete matrix
|
||||
// would pair an unrelated depth range with the original pipeline compare and
|
||||
// clear state, which can reject the entire eye. Replace only the four
|
||||
// perspective-frustum coefficients and preserve every depth-related element.
|
||||
inline Mat4x4<float> compose_projection(const Mat4x4<float>& eyeFrustum,
|
||||
const Mat4x4<float>& gameProjection) noexcept {
|
||||
Mat4x4<float> out = gameProjection;
|
||||
out.m0[0] = eyeFrustum.m0[0];
|
||||
out.m0[2] = eyeFrustum.m0[2];
|
||||
out.m1[1] = eyeFrustum.m1[1];
|
||||
out.m1[2] = eyeFrustum.m1[2];
|
||||
return out;
|
||||
}
|
||||
|
||||
// Aurora stores the GX 3x4 matrices row-major. The vertex shader consumes
|
||||
// them as vec4 * mat3x4, which is equivalent to the original column-vector
|
||||
// affine transform. Applying an eye-space delta therefore composes delta *
|
||||
|
||||
Reference in new issue
Block a user