Skip to content

Commit c2fcd30

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 b66ac65 commit c2fcd30

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
@@ -8245,7 +8245,14 @@ __forceinline void FFakeStereoRenderingHook::calculate_stereo_view_offset(
82458245
index_starts_from_one = false;
82468246
}
82478247

8248-
const auto is_full_pass = view_index == 0 && !index_was_ever_two && !index_was_ever_negative && !synced_ue56_zero_view_is_eye;
8248+
// UE5 uses zero-based 0/1 eye indices; a genuine mono pass arrives as INDEX_NONE above.
8249+
// Do not misclassify the left eye as a full pass when no -1/2 call preceded it.
8250+
const auto is_full_pass =
8251+
view_index == 0 &&
8252+
!index_was_ever_two &&
8253+
!index_was_ever_negative &&
8254+
!g_hook->m_has_double_precision &&
8255+
!synced_ue56_zero_view_is_eye;
82498256

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

0 commit comments

Comments
 (0)