浏览代码

Added stereoRenderingPath to XRGraphicsConfig

/main
Nerites 6 年前
当前提交
a1d90d2e
共有 1 个文件被更改,包括 20 次插入12 次删除
  1. 32
      com.unity.render-pipelines.core/CoreRP/Common/XRGraphicsConfig.cs

32
com.unity.render-pipelines.core/CoreRP/Common/XRGraphicsConfig.cs


public float occlusionMaskScale;
public bool showDeviceView;
public GameViewRenderMode gameViewRenderMode;
public void SetConfig()
{ // If XR is enabled, sets XRSettings from our saved config
if (!enabled)

return false;
#endif
}
}
}
public static StereoRenderingPath stereoRenderingMode
{
get
{
if (!enabled)
Assert.IsFalse(enabled);
#if UNITY_2018_3_OR_NEWER
return (StereoRenderingPath)XRSettings.stereoRenderingMode;
#else
if (eyeTextureDesc.vrUsage == VRTextureUsage.TwoEyes)
return StereoRenderingPath.SinglePass;
else if (eyeTextureDesc.dimension == UnityEngine.Rendering.TextureDimension.Tex2DArray)
return StereoRenderingPath.Instancing;
else
return StereoRenderingPath.MultiPass;
#endif
}
}
public static RenderTextureDescriptor eyeTextureDesc
{
get

if (!enabled)
Assert.IsFalse(enabled);
return XRSettings.eyeTextureHeight;
}
}
public static string[] supportedDevices
{
get
{
if (!enabled)
Assert.IsFalse(enabled);
return XRSettings.supportedDevices;
}
}
}
正在加载...
取消
保存