Skip to content

Commit 109b4f1

Browse files
author
Christopher - Marcel Böddecker
committed
fix(AdaptiveQuality): prevent flickering on Unity 5.4.2
Whenever the render scale is changed the old frame is visible for some time, looking like flickering when `AdaptiveQuality` is enabled. The fix is to change the render scale in `LateUpdate` on Unity 5.4.2, too.
1 parent 8d974b4 commit 109b4f1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Assets/VRTK/Scripts/VRTK_AdaptiveQuality.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ private void Update()
331331
timing.SaveCurrentFrameTiming();
332332
}
333333

334-
#if UNITY_5_4_1 || UNITY_5_5_OR_NEWER
334+
#if UNITY_5_4_1 || UNITY_5_4_2 || UNITY_5_5_OR_NEWER
335335
private void LateUpdate()
336336
{
337337
UpdateRenderScale();
@@ -340,12 +340,12 @@ private void LateUpdate()
340340

341341
private void OnCameraPreCull(Camera camera)
342342
{
343-
#if !(UNITY_5_4_1 || UNITY_5_5_OR_NEWER)
344343
if (camera.transform != VRTK_SDK_Bridge.GetHeadsetCamera())
345344
{
346345
return;
347346
}
348347

348+
#if !(UNITY_5_4_1 || UNITY_5_4_2 || UNITY_5_5_OR_NEWER)
349349
UpdateRenderScale();
350350
#endif
351351
UpdateMSAALevel();

0 commit comments

Comments
 (0)