You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
696 B
26 lines
696 B
// Helper API to create custom XR layout |
|
|
|
#if ENABLE_VR && ENABLE_XR_MODULE |
|
|
|
namespace UnityEngine.Rendering.Universal |
|
{ |
|
internal struct XRLayout |
|
{ |
|
internal Camera camera; |
|
internal XRSystem xrSystem; |
|
|
|
internal XRPass CreatePass(XRPassCreateInfo passCreateInfo) |
|
{ |
|
XRPass pass = XRPass.Create(passCreateInfo); |
|
xrSystem.AddPassToFrame(pass); |
|
return pass; |
|
} |
|
|
|
internal void AddViewToPass(XRViewCreateInfo viewCreateInfo, XRPass pass) |
|
{ |
|
pass.AddView(viewCreateInfo.projMatrix, viewCreateInfo.viewMatrix, viewCreateInfo.viewport, viewCreateInfo.textureArraySlice); |
|
} |
|
} |
|
} |
|
|
|
#endif
|
|
|