1. Hijacks any Unity Camera targeting the back buffer. ( Camera "Target Eye" property can stop this)

PSVR开发小结

解释下就是说,不考虑TargetEye,Target Texture 属性为空的的所有相机都会被头盔控制(旋转)


2. VR和非VR模式的切换

PSVR开发小结

Due to some quirks with VR Devices on other platforms we delay VR Device creation till the end of the frame. This means any settings set during the frame you create a VR Device will generally go to the old device (which might be the None device). Currently you need to wait till the next frame after loading a new VRDevice to set any VRSettings for it.

LoadDeviceByName与VRSettings.enable 的设置中间需要隔一帧,如果在同一帧执行的话,由于LoadDeviceByName在帧尾执行,后面的VRSettings.enable的实际执行点会在其之前,反而导致VR切换的结果未知,例如花屏。解决方案中间 隔一帧。

实际调用:启动VR: VRManager.instance.BeginVRSetup()   关闭VR:VRManager.instance.BeginShutdownVR(),其中关键实现如下:

SetupVR:

VRSettings.LoadDeviceByName(VRDeviceNames.PlayStationVR);
        // WORKAROUND: At the moment the device is created at the end of the frame so
        // changing almost any VR settings needs to be delayed until the next frame
        yield return null;
        VRSettings.enabled = true;
        VRSettings.renderScale = renderScale;

IEnumerator ShutdownVR()
{
        VRSettings.LoadDeviceByName(VRDeviceNames.None);
        // WORKAROUND: At the moment the device is created at the end of the frame so
        // we need to wait a frame until the VR device is changed back to 'None', and
        // then reset the Main Camera's FOV and Aspect
        yield return null;

        VRSettings.enabled = false;
        VRSettings.showDeviceView = false;


3. [email protected]在新的版本中改为VR reprojection rate 60hz

PSVR开发小结

@60Hz is a little special in that here we run your title at 60Hz to give you as much frame time as possible (~16.6ms) but we run the PS VR display at 120Hz and use the reprojection system to generate a new intermediate frame between the two that your title will render. These extra frames will be updated for the rotation of the PS VR headset as it looks around but will have no other updates.


4. PlayStationVRSettings.postReprojectionType

官方文档也是说了一堆,如果不使用,“ anything locked to the camera will judder” ,头盔快速移动的时候会比较明显。一般受影响的如 模拟Gaze的UI红点,会有拖尾的残影效果,其实还能忍受~


相关文章: