Skip to content

Commit 95d4e96

Browse files
committed
Fix UE5 zero-based stereo eye classification
Treat view index 0 as a real eye for UE5/LWC builds instead of a mono full pass. This restores per-eye callbacks and HMD state updates in UE5.5/5.6 games that only emit 0/1 stereo indices while preserving legacy UE4 behavior.\n\nBased on praydog/UEVR PR praydog#422 by Adam Benovic.
1 parent da83b77 commit 95d4e96

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/mods/vr/FFakeStereoRenderingHook.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8296,7 +8296,14 @@ __forceinline void FFakeStereoRenderingHook::calculate_stereo_view_offset(
82968296
index_starts_from_one = false;
82978297
}
82988298

8299-
const auto is_full_pass = view_index == 0 && !index_was_ever_two && !index_was_ever_negative && !synced_ue56_zero_view_is_eye;
8299+
// UE5 uses zero-based 0/1 eye indices; a genuine mono pass arrives as INDEX_NONE above.
8300+
// Do not misclassify the left eye as a full pass when no -1/2 call preceded it.
8301+
const auto is_full_pass =
8302+
view_index == 0 &&
8303+
!index_was_ever_two &&
8304+
!index_was_ever_negative &&
8305+
!g_hook->m_has_double_precision &&
8306+
!synced_ue56_zero_view_is_eye;
83008307

83018308
auto true_index = index_starts_from_one ? ((view_index + 1) % 2) : (view_index % 2);
83028309
const auto has_double_precision = g_hook->m_has_double_precision;

0 commit comments

Comments
 (0)