您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
16 行
593 B
16 行
593 B
namespace UnityEngine.Rendering
|
|
{
|
|
public static class XRUtils
|
|
{
|
|
public static void DrawOcclusionMesh(CommandBuffer cmd, Camera camera, bool stereoEnabled = true) // Optional stereoEnabled is for SRP-specific stereo logic
|
|
{
|
|
#if UNITY_2019_1_OR_NEWER
|
|
if ((!XRGraphics.enabled) || (!camera.stereoEnabled) || (!stereoEnabled))
|
|
return;
|
|
UnityEngine.RectInt normalizedCamViewport = new UnityEngine.RectInt(0, 0, camera.pixelWidth, camera.pixelHeight);
|
|
cmd.DrawOcclusionMesh(normalizedCamViewport);
|
|
#endif
|
|
}
|
|
|
|
}
|
|
}
|