Search Issue Tracker
Fixed in 2020.1.X
Votes
1
Found in
2018.1.0b12
Issue ID
1195557
Regression
No
[XR][XR SDK][Oculus] In mirror view, Render viewport scale changes take effect one frame later than expected
When using XR SDK oculus 1.1.1 and higher changing the render viewport scale results in a single frame of the blit to mirror screen occurring incorrectly
1) Create a new project
2) Add Oculus Loader to XR Management standalone window
3) Add the script attached to this bug report to any game object in the scene
4) enter playmode
5) Observe every 2 seconds the render viewport scale changes
6) observe one frame where the viewport is blitted incorrectly into the mirror view on render viewport scale changes
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.XR;
public class RenderViewportScale : MonoBehaviour
{
float renderViewportScale = 1.0f;
// Start is called before the first frame update
// Update is called once per frame
private float[] values = {0.2f, 0.4f, 0.8f, 1.0f};
private float time = 0.0f;
private float changeTime = 2.0f;
private int value = 0;
// void Update()
// {
// float value = 0.5f * (1.0f + Mathf.Sin(2.0f*Mathf.PI * 0.1f* Time.time));
// XRSettings.renderViewportScale = value;
// }
void Update()
{
time += Time.deltaTime;
if (time > changeTime)
{
value++;
XRSettings.renderViewportScale = values[value % values.Length];
time = 0;
}
}
}
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- The Game view and Scene view fail to render when launching the Editor with a maximized Render Graph Viewer window
- "List is empty" is poorly visible in the "Create Node" window
- [Android] GameObject with a custom shader becomes invisible when deployed with the Vulkan Graphics API
- “ReferenceError: Pointer_stringify is not defined” error is thrown when downloading a file
- GameObjects are not rendered when using a fragment shader with RWStructuredBuffer in URP
Resolution Note (fix version 2020.1):
This issue is fixed in Oculus XR Plugin 1.1.5