The HTC OpenXR plugin and VR base sample worked well up until Unity 2023.2.20f1. In all versions of Unity 6, however, there is a rendering issue with a black border around each eye’s render. This bug prevents us from releasing our game on HTC.
2 Likes
Can you please file a bug for this, for the team to investigate? As it stands, there’s not enough information in this post for us to determine what’s going on.
Do I file the bug directly from the editor, or do you have a URL with a form?
The process is very simple:
- Install any version of Unity 6.
- Create a new project using Unity’s VR template.
- Install the OpenXR plugin version 2.4.2 from HTC (latest version from GitHub).
- Compile for Android and run on the HTC Focus.
You will see an issue with the viewport and black borders around each eye.
If you can, please file the bug directly from the Editor.
Done
CASE IN-88260
I am also having this same issue on my end.
I have the same issue. The borders will disappear after back to Focus home screen.
Do you have any workaround for this issue?
Hello ,
Unity close the bug thread and say this is a problem from HTC.
Later we received some feedback from HTC with a workaround.
Here is the solution.
//////////////////////////////////////////////////////////////////////////
//USING
//////////////////////////////////////////////////////////////////////////
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.XR;
//////////////////////////////////////////////////////////////////////////
//NAMESPACE
//////////////////////////////////////////////////////////////////////////
namespace VigoCreative
{
//////////////////////////////////////////////////////////////////////////
//CLASS
//////////////////////////////////////////////////////////////////////////
public class VC_CHTCViveFix : MonoBehaviour
{
//////////////////////////////////////////////////////////////////////////
//FIELD
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
//FUNCTION
//////////////////////////////////////////////////////////////////////////
private void OnEnable()
{
StartCoroutine(RemoveOcclusionMask());
}
//////////////////////////////////////////////////////////////////////////
IEnumerator RemoveOcclusionMask()
{
// Find DisplaySubsystem
XRDisplaySubsystem display = null;
List<XRDisplaySubsystem> displaySubsystems = new List<XRDisplaySubsystem>();
do
{
SubsystemManager.GetSubsystems(displaySubsystems);
foreach (var d in displaySubsystems)
{
if (d.running)
{
display = d;
break;
}
}
yield return null;
} while (display == null);
Debug.Log("RemoveOcclusionMask XRSettings.occlusionMaskScale = 0");
XRSettings.occlusionMaskScale = 0;
XRSettings.useOcclusionMesh = false;
}
}
//////////////////////////////////////////////////////////////////////////
//EVENT HANDLER
//////////////////////////////////////////////////////////////////////////
}