File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -553,9 +553,13 @@ VRRuntime::Error OpenXR::update_matrices(float nearz, float farz) {
553553 };
554554 };
555555
556+ static long int frame_count = -1 ;
557+ frame_count++;
558+
559+
556560 // if we've not yet derived an eye projection matrix, or we've changed the projection, derive it here
557561 // Hacky way to check for an uninitialised eye matrix - is there something better, is this necessary?
558- if (this ->should_recalculate_eye_projections || this ->last_eye_matrix_nearz != nearz || this ->projections [0 ][2 ][3 ] == 0 ) {
562+ if (this ->should_recalculate_eye_projections || this ->last_eye_matrix_nearz != nearz || this ->projections [0 ][2 ][3 ] == 0 || frame_count % 100 == 0 ) {
559563 // deriving the texture bounds when modifying projections requires left and right raw projections so get them all before we start:
560564 std::unique_lock __{this ->eyes_mtx };
561565 const auto & left_fov = this ->views [0 ].fov ;
You can’t perform that action at this time.
0 commit comments