Version: 2020.3

XRDisplaySubsystem

class in UnityEngine.XR

/

继承自:IntegratedSubsystem

切换到手册

描述

XRDisplaySubsystem 控制如何渲染到头部跟踪显示器。

变量

contentProtectionEnabled设置或获取当前活动提供程序的内容保护状态。 对于大多数提供程序,内容保护允许你使用仅写入纹理进行渲染。这会使应用程序无法从显卡读取纹理以及查看/记录可能以某种方式进行保护的图像。
disableLegacyRenderer当此 XRDisplaySubsystem 处于活动状态时,禁用旧版渲染器。
displayOpaque确定当前连接的设备是否具有不透明显示屏。 大多数 VR 设备是不透明的,以便提高沉浸式体验,而 AR 设备是透明的,以便可以与当前环境的增强内容进行交互。
reprojectionMode应用程序请求的重投影类型,以稳定与用户头部活动相关的全息渲染。
scaleOfAllRenderTargetsControls the size of the textures submitted to the display as a multiplier of the display's default resolution.
scaleOfAllViewportsControls how much of the allocated display texture should be used for rendering.
supportedTextureLayoutsSpecifies all texture layouts supported by this display subsystem. This var is a bit field that could be combination of XRDisplaySubsystem.TextureLayout.
textureLayoutSet DisplaySubsystem to use certain texture layout. Should query supported texture layout through XRDisplaySubsystem.supportedTextureLayouts first for the capabilities.
zFar设置 DisplaySubsystem 以将 zFar 用于渲染。
zNear设置 DisplaySubsystem 以将 zNear 用于渲染。

公共函数

AddGraphicsThreadMirrorViewBlit此函数将显示子系统的原生 blit 事件记录到目标命令缓冲区中。此函数通常由可编程渲染管线进行调用。
BeginRecordingIfLateLatchedThis function enables late latching recording of constant buffer memory locations which are later patched with the latest pose data.
EndRecordingIfLateLatchedThis function disables late latching recording of constant buffer locations.
GetCullingParameters获取特定剔除通道索引的剔除参数。
GetMirrorViewBlitDesc从当前显示子系统获取镜像视图 blit 操作描述符。
GetPreferredMirrorBlitMode返回 XR 显示的首选镜像 blit 模式。
GetRenderPass获取特定索引的 XRRenderPass。
GetRenderPassCount此 XR 显示的 XRRenderPass 条目数。
GetRenderTextureForRenderPass给定一个渲染通道,返回为该渲染通道提供支持的 RenderTexture 实例。如果渲染通道无效,或是如果渲染纹理不存在,则返回 null。
MarkTransformLateLatchedThis marks a given GameObject's transform to be late latched in the next frame. Once marked for late latching, the GameObject transform and its descendants will be updated with the latest VR pose updates before rendering is submitted to the GPU.
SetFocusPlane针对此帧,在 3D 空间中将一个点设置为场景的焦点。这有助于提高此点周围内容的视觉保真度。必须每一帧都设置此值。 请注意,指定将焦点中的内容锁定到身体,系统将以未锁定到身体的内容为代价,提高锁定到身体的内容的保真度。这在用户移动时尤其明显。
SetMSAALevelSet MSAA level for the DisplaySubsystem's render texture.
SetPreferredMirrorBlitMode从脚本覆盖 XR 显示的首选镜像 blit 模式。
TryGetAppGPUTimeLastFrame从应用程序的最后一帧获取 GPU 执行命令所花费的时间(由 XR 插件报告)。以秒为测量单位。
TryGetCompositorGPUTimeLastFrame获取 GPU 在最后一帧中执行合成器渲染器所花费的时间量(由 XR 插件报告)。以秒为测量单位。
TryGetDisplayRefreshRate获取显示器刷新率(由 XR 插件报告)。
TryGetDroppedFrameCount获取 XR 插件报告的丢弃的帧数。
TryGetFramePresentCount获取 XR 插件报告的当前帧绘制到设备中的次数。
TryGetMotionToPhoton获取 XR 插件报告的 motion-to-photon 值。

Events

displayFocusChangedXR 显示焦点更改时发送的事件。

继承的成员

变量

running子系统是否在运行。

公共函数

Destroy销毁子系统的此实例。
Start启动子系统的一个实例。
Stop停止子系统的一个实例。