diff --git a/Assets/Resources/Controller/PICO 4U/.DS_Store b/Assets/Resources/Controller/PICO 4U/.DS_Store deleted file mode 100644 index f1fd224..0000000 Binary files a/Assets/Resources/Controller/PICO 4U/.DS_Store and /dev/null differ diff --git a/Assets/Resources/Controller/PICO 4U/Animation/.DS_Store b/Assets/Resources/Controller/PICO 4U/Animation/.DS_Store deleted file mode 100644 index b0c7f35..0000000 Binary files a/Assets/Resources/Controller/PICO 4U/Animation/.DS_Store and /dev/null differ diff --git a/Editor/Debugger/PXR_PicoDebuggerSetup.cs b/Editor/Debugger/PXR_PicoDebuggerSetup.cs index ad9619c..972d338 100644 --- a/Editor/Debugger/PXR_PicoDebuggerSetup.cs +++ b/Editor/Debugger/PXR_PicoDebuggerSetup.cs @@ -26,9 +26,9 @@ static PXR_PicoDebuggerSetup() static void Init_PXR_PicoDebuggerSetup() { string currentPanelPath = $"{PXR_DebuggerConst.sdkPackageName}Assets/Debugger/Prefabs/DebuggerPanel.prefab"; - string targetPanelPath = "Assets/Resources/DebuggerPanel.prefab"; + string targetPanelPath = "Assets/Resources/PXR_DebuggerPanel.prefab"; string currentEntryPath = $"{PXR_DebuggerConst.sdkPackageName}Assets/Debugger/Prefabs/PICODebugger.prefab"; - string targetEntryPath = "Assets/Resources/PICODebugger.prefab"; + string targetEntryPath = "Assets/Resources/PXR_PICODebugger.prefab"; if(!File.Exists(targetEntryPath)){ if (!Directory.Exists("Assets/Resources")) { diff --git a/Editor/PXR_BuildProcessor.cs b/Editor/PXR_BuildProcessor.cs index ffd82b2..ad31372 100644 --- a/Editor/PXR_BuildProcessor.cs +++ b/Editor/PXR_BuildProcessor.cs @@ -191,7 +191,8 @@ internal class PXR_BuildHooks : IPreprocessBuildWithReport, IPostprocessBuildWit { { "xr-usable-core-mask-enabled", "1"}, { "xr-require-backbuffer-textures", "0" }, - { "xr-hide-memoryless-render-texture", "1" } + { "xr-hide-memoryless-render-texture", "1" }, + { "xr-vulkan-extension-fragment-density-map-enabled", "1"} }; public void OnPreprocessBuild(BuildReport report) @@ -330,6 +331,7 @@ public void OnPostGenerateGradleAndroidProject(string path) #if PICO_OPENXR_SDK doc.InsertAttributeInTargetTag(metaDataTagPath,new Dictionary{{"name","use.pxr.sdk"}},new Dictionary{{"value", "2"}}); doc.InsertAttributeInTargetTag(metaDataTagPath,new Dictionary{{"name","pvr.sdk.version"}},new Dictionary{{"value","Unity OpenXR "+PXR_Constants.SDKVersion}}); + doc.InsertAttributeInTargetTag(metaDataTagPath,new Dictionary{{"name","sdk.unity.version"}},new Dictionary{{"value",Application.unityVersion}}); var settings = OpenXRSettings.GetSettingsForBuildTargetGroup(BuildTargetGroup.Android); bool mrPermission = false; @@ -479,6 +481,7 @@ public void OnPostGenerateGradleAndroidProject(string path) var settings = PXR_XmlTools.GetSettings(); doc.InsertAttributeInTargetTag(metaDataTagPath,new Dictionary{{"name","use.pxr.sdk"}},new Dictionary{{"value", "1"}}); doc.InsertAttributeInTargetTag(metaDataTagPath,new Dictionary{{"name","pvr.sdk.version"}},new Dictionary{{"value","XR Platform_"+PXR_Constants.SDKVersion}}); + doc.InsertAttributeInTargetTag(metaDataTagPath,new Dictionary{{"name","sdk.unity.version"}},new Dictionary{{"value",Application.unityVersion}}); doc.InsertAttributeInTargetTag(metaDataTagPath,new Dictionary{{"name","enable_cpt"}},new Dictionary{{"value",PXR_ProjectSetting.GetProjectConfig().useContentProtect ? "1" : "0"}}); doc.InsertAttributeInTargetTag(metaDataTagPath,new Dictionary{{"name","Enable_AdaptiveHandModel"}},new Dictionary {{"value",PXR_ProjectSetting.GetProjectConfig().adaptiveHand ? "1" : "0" }}); doc.InsertAttributeInTargetTag(metaDataTagPath,new Dictionary{{"name","Hand_Tracking_HighFrequency"}},new Dictionary {{"value",PXR_ProjectSetting.GetProjectConfig().highFrequencyHand ? "1" : "0" }}); diff --git a/Editor/PXR_ManagerEditor.cs b/Editor/PXR_ManagerEditor.cs index c3c52cc..8e91255 100644 --- a/Editor/PXR_ManagerEditor.cs +++ b/Editor/PXR_ManagerEditor.cs @@ -308,6 +308,10 @@ public override void OnInspectorGUI() "MR safety, if you choose this option, your application will adopt MR safety policies during runtime. If not selected, it will continue to use VR safety policies by default."; projectConfig.mrSafeguard = EditorGUILayout.Toggle(mrSafeguardContent, projectConfig.mrSafeguard); + var secureMRContent = new GUIContent(); + secureMRContent.text = "SecureMR"; + projectConfig.secureMR = EditorGUILayout.Toggle(secureMRContent, projectConfig.secureMR); + //Super Resolution var superresolutionContent = new GUIContent(); superresolutionContent.text = "Super Resolution"; diff --git a/Editor/PXR_Metadata.cs b/Editor/PXR_Metadata.cs index 9701ea0..dfb2e00 100644 --- a/Editor/PXR_Metadata.cs +++ b/Editor/PXR_Metadata.cs @@ -39,8 +39,7 @@ private class PXR_LoaderMetadata : IXRLoaderMetadata private static readonly List SupportedBuildTargets = new List() { - BuildTargetGroup.Android, - BuildTargetGroup.Standalone + BuildTargetGroup.Android }; } diff --git a/Enterprise/Sample/CameraRendering/PXR/EnterpriseAPI.cs b/Enterprise/Sample/CameraRendering/PXR/EnterpriseAPI.cs index b22777e..3fc62a4 100644 --- a/Enterprise/Sample/CameraRendering/PXR/EnterpriseAPI.cs +++ b/Enterprise/Sample/CameraRendering/PXR/EnterpriseAPI.cs @@ -46,7 +46,11 @@ private void Awake() imgByte = new byte[width*height*4]; texture = new Texture2D((int)width, (int)height, TextureFormat.RGBA32, false); videoMaterial.SetTexture("_MainTex", texture); - + PXR_Enterprise.InitEnterpriseService(); + PXR_Enterprise.BindEnterpriseService(b => + { + Debug.Log($"{tag} Bind enterprise service success={b}"); + } ); } public void OpenCamera() { diff --git a/Enterprise/Scripts/PXR_Enterprise.cs b/Enterprise/Scripts/PXR_Enterprise.cs index 78ff16b..4453206 100644 --- a/Enterprise/Scripts/PXR_Enterprise.cs +++ b/Enterprise/Scripts/PXR_Enterprise.cs @@ -3841,6 +3841,7 @@ public static bool StartPreviewfor4U(IntPtr surfaceObj, PXRCaptureRenderMode mod private static Action onImageAvailable; private static Action openCameraAsyncSuccess; static Frame pxrFrame; + private static bool isGlobalPose = false; /// /// Sets a frame buffer for the camera. The frame buffer is used to store image data with specified width and height. /// @note Only supported by PICO 4 Ultra Enterprise. @@ -3866,7 +3867,7 @@ static void EventDataCapturelibCallBackFunction(int type) if (onImageAvailable!=null) { - SensorState a = GetPredictedMainSensorState(pxrFrame.timestamp / 1000000.0f); + SensorState a = GetPredictedMainSensorState(pxrFrame.timestamp / 1000000.0f,isGlobalPose); pxrFrame.pose = a.pose; pxrFrame.status=a.status; @@ -4329,6 +4330,7 @@ public static PxrSensorState2 GetPredictedMainSensorState2(double predictTime) /// public static void UseGlobalPose(bool flg) { + isGlobalPose=flg; PXR_Plugin.Boundary.UPxr_SetSeeThroughState(flg); if (flg) { diff --git a/Enterprise/Scripts/Plugin/PXR_EnterprisePlugin.cs b/Enterprise/Scripts/Plugin/PXR_EnterprisePlugin.cs index 34e5d15..212bdc2 100644 --- a/Enterprise/Scripts/Plugin/PXR_EnterprisePlugin.cs +++ b/Enterprise/Scripts/Plugin/PXR_EnterprisePlugin.cs @@ -2982,7 +2982,7 @@ public static bool GetCameraExtrinsics(out double[] leftExtrinsics, out double[] int rightCount = 0; IntPtr leftHandle = IntPtr.Zero; IntPtr rightHandle = IntPtr.Zero; - if (UPxr_GetToken()) + // if (UPxr_GetToken()) { bool ret = getCameraExtrinsics(ref leftCount, ref leftHandle, ref rightCount, ref rightHandle); leftExtrinsics = new Double[leftCount]; @@ -2998,7 +2998,7 @@ public static double[] GetCameraIntrinsics(int width, int height, double h_fov, double[] configArray = null; int configCount = 0; IntPtr configHandle = IntPtr.Zero; - if (UPxr_GetToken()) + // if (UPxr_GetToken()) { getCameraIntrinsics(width ,height,h_fov,v_fov,ref configCount, ref configHandle); configArray = new Double[configCount]; @@ -3026,14 +3026,10 @@ public static Matrix4x4 DoubleArrayToMatrix4x4(double[] array) } public static bool GetCameraParametersNew(int width, int height, ref RGBCameraParamsNew paramsNew) { - if (UPxr_GetToken()) + // if (UPxr_GetToken()) { return getCameraParametersNew(width,height,ref paramsNew); } - else - { - return false; - } } public static int UPxr_SetDeviceOwner(string pkg, string cls) diff --git a/Enterprise/android/CameraRenderingPlugin-release.aar b/Enterprise/android/CameraRenderingPlugin-release.aar deleted file mode 100644 index 012132e..0000000 Binary files a/Enterprise/android/CameraRenderingPlugin-release.aar and /dev/null differ diff --git a/Enterprise/android/CameraRenderingPlugin.aar b/Enterprise/android/CameraRenderingPlugin.aar new file mode 100644 index 0000000..99a3222 Binary files /dev/null and b/Enterprise/android/CameraRenderingPlugin.aar differ diff --git a/Enterprise/android/CameraRenderingPlugin-release.aar.meta b/Enterprise/android/CameraRenderingPlugin.aar.meta similarity index 93% rename from Enterprise/android/CameraRenderingPlugin-release.aar.meta rename to Enterprise/android/CameraRenderingPlugin.aar.meta index 4503471..55ad8b6 100644 --- a/Enterprise/android/CameraRenderingPlugin-release.aar.meta +++ b/Enterprise/android/CameraRenderingPlugin.aar.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 28287b98d3b9af04ea5c3ee70b2076e0 +guid: 027a119e339465b4aac4975cdaf7596b PluginImporter: externalObjects: {} serializedVersion: 2 diff --git a/README.md b/README.md deleted file mode 100644 index b670ac3..0000000 --- a/README.md +++ /dev/null @@ -1,23 +0,0 @@ -This article records the changes to the PICO Unity Integration SDK in version 3.3.0. -## Download the SDK -Download the latest version of the PICO Unity Integration SDK from the [Download](https://developer-global.pico-interactive.com/resources/#sdk) screen. -## What's new -Released on: September 18, 2025 -Required PICO device's system version: 5.13.0 for PICO 4 series, 5.14.0 or later for PICO 4 Ultra series -**Add** -| **Module** | **Description** | -| --- | --- | -| General | Supported the Unity OpenXR Plugin, and you can use this plugin to integrate XR functionalities into your app. For more information, refer to [Add support for the Unity OpenXR Plugin](https://developer.picoxr.com/document/unity/support-for-the-unity-openxr-plugin/). | -| PICO Building Blocks | Added the following blocks:

* PICO Spatial Anchor Sample
* PICO Spatial Mesh
* PICO Scene Capture
* PICO Composition Layer Overlay
* PICO Composition Layer Underlay

For more information, refer to [PICO Building Blocks](https://developer.picoxr.com/document/unitypico-building-blocks/). | -| | Compatible with the Unity OpenXR Plugin. | -| Enterprise services | Added the following APIs:

* `GetHeadTrackingStatus`: Gets the status of HMD tracking.
* `GetHeadPose`: Gets the pose of the HMD.
* `GetControllerPose`: Gets the pose of the controller.
* `GetSwiftPose`: Gets the pose of a motion tracker.
* `GetSwiftTrackerDevices`: Gets the information of motion trackers.
* `GetHeadIMUData`: Gets the IMU data of the HMD.
* `GetControllerIMUData`: Gets the IMU data of the controller.
* `GetSwiftIMUData`: Gets the IMU data of a motion tracker.
* `StartSwiftTrackerPairing`: Starts pairing motion tracker(s).
* `UnBondSwiftTracker`: Unbonds motion tracker(s).
* `ResetTracking`: Resets tracking.
* `SetFenceColor`: Sets the color of the fence.
* `GetFenceColor`: Gets the color of the fence.
* `SetUsbTetheringStaticIP`: Sets the static IP for USB tethering.
* `GetUsbTetheringStaticIPLocal`: Gets the local static IP for USB tethering.
* `GetUsbTetheringStaticIPClient`: Gets the client static IP for USB tethering.
* `SetLargeSpaceMapScale`: Sets the scale of the large-space map.
* `GetPredictedMainSensorState2`: Gets the predicted pose and status of the main sensor when the VST image is being displayed.
* `UseGlobalPose`: Uses the global pose for HMD and controller tracking.
* `ConvertPoseCoordinate`: Converts the coordinate of a pose. | -| Developer Tools | Added the PICO Debugger, which is a debugging tool that allows you not only to view logs and scene information, but also to use its built-in tools to optimize your application in a more targeted way. For more information, refer to "[PICO Debugger](https://developer.picoxr.com/document/unity/pico-debugger)". | -**Optimize** -| **Module** | **Description** | -| --- | --- | -| Rendering | Optimized the "Use Premultiplied Alpha" parameter used for configuring composition layers:

* Enabled the premultiplied alpha effect for content, which multiplies the RGB color channels by the alpha value `(R×A, G×A, B×A)`.
* Improved the rendering performance of transparent elements, such as UI, particles, and more.
* Fixed visual defects such as color fringing at the edges of semi-transparent objects.
* Supported the specification for OpenXR and GPU hybrid rendering. | -**Change** -| **Module** | **Description** | -| --- | --- | -| Rendering | Renamed the PXR_Over Lay component used for configuring composition layer parameters to PXR_Composition Layer. | - diff --git a/README.md.meta b/README.md.meta deleted file mode 100644 index 2d5d1c3..0000000 --- a/README.md.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: dccb2dce6acab428284311e8cf685c43 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Runtime/Android/PxrPlatform.aar b/Runtime/Android/PxrPlatform.aar index c9bab78..1e187d8 100644 Binary files a/Runtime/Android/PxrPlatform.aar and b/Runtime/Android/PxrPlatform.aar differ diff --git a/Runtime/Debugger/Scripts/Core/PXR_PicoDebuggerManager.cs b/Runtime/Debugger/Scripts/Core/PXR_PicoDebuggerManager.cs index 21b2c08..37be455 100644 --- a/Runtime/Debugger/Scripts/Core/PXR_PicoDebuggerManager.cs +++ b/Runtime/Debugger/Scripts/Core/PXR_PicoDebuggerManager.cs @@ -27,7 +27,7 @@ private static void OnBeforeSceneLoadRuntimeMethod() private static void AddPrefab() { - GameObject prefab = Resources.Load("PICODebugger"); + GameObject prefab = Resources.Load("PXR_PICODebugger"); if (prefab != null) { Instantiate(prefab, Vector3.zero, Quaternion.identity); diff --git a/Runtime/Debugger/Scripts/UI/Default/PXR_UIManager.cs b/Runtime/Debugger/Scripts/UI/Default/PXR_UIManager.cs index b91728a..28c0074 100644 --- a/Runtime/Debugger/Scripts/UI/Default/PXR_UIManager.cs +++ b/Runtime/Debugger/Scripts/UI/Default/PXR_UIManager.cs @@ -23,7 +23,7 @@ public class PXR_UIManager : MonoBehaviour private void Start() { config = Resources.Load("PXR_PicoDebuggerSO"); - uiController = Resources.Load("DebuggerPanel").GetComponent(); + uiController = Resources.Load("PXR_DebuggerPanel").GetComponent(); if(config.isOpen) { switch (config.debuggerLauncherButton) diff --git a/Runtime/Debugger/UI/RoundedRectMesh.cs b/Runtime/Debugger/UI/RoundedRectMesh.cs index 8905ea5..e187a25 100644 --- a/Runtime/Debugger/UI/RoundedRectMesh.cs +++ b/Runtime/Debugger/UI/RoundedRectMesh.cs @@ -15,7 +15,7 @@ material is strictly forbidden unless prior written permission is obtained from using UnityEngine; using UnityEditor; using System.IO; -#if UNITY_EDITOR +#if UNITY_EDITOR || DEVELOPMENT_BUILD namespace Unity.XR.PXR.Debugger { [RequireComponent(typeof(MeshFilter))] @@ -43,22 +43,6 @@ private void Init(){ isInit = true; } } - // 在Inspector中通过按钮触发保存 - [ContextMenu("Save Mesh And Remove Component")] - public void SaveMesh() - { - MeshFilter mf = GetComponent(); - if (mf == null || mf.mesh == null) return; - - string path = $"Assets/{saveName}.asset"; - if(File.Exists(path)){ - Debug.Log($"Remove Exist File"); - AssetDatabase.DeleteAsset(path); - } - AssetDatabase.CreateAsset(mf.mesh, path); - AssetDatabase.SaveAssets(); - Debug.Log($"Mesh saved to: {path}"); - } public static List CreateRoundedRectPath(Vector3 center, float width, float height, float radius, bool[] corners, int cornerSegments) { List path = new(); @@ -151,11 +135,6 @@ private void GenerateRoundedRectMesh() mesh.RecalculateBounds(); mesh.RecalculateNormals(); - // mesh.RecalculateTangents(); - // for (var i = 0; i < mesh.normals.Length; i++) - // { - // Debug.Log($"normals {i}:{mesh.normals[i]}"); - // } } } } diff --git a/Runtime/InputSystem/DeviceLayouts.cs b/Runtime/InputSystem/DeviceLayouts.cs index 86dd1ec..79f77aa 100644 --- a/Runtime/InputSystem/DeviceLayouts.cs +++ b/Runtime/InputSystem/DeviceLayouts.cs @@ -151,7 +151,7 @@ protected override void FinishSetup() public class PXR_Controller : XRControllerWithRumble { [Preserve] - [InputControl(aliases = new[] { "Primary2DAxis", "Touchpad" })] + [InputControl(aliases = new[] { "Primary2DAxis", "Thumbstick" })] public Vector2Control thumbstick { get; private set; } [Preserve] @@ -171,7 +171,7 @@ public class PXR_Controller : XRControllerWithRumble [InputControl(aliases = new[] { "GripButton", "GripPress" })] public ButtonControl gripPressed { get; private set; } [Preserve] - [InputControl(aliases = new[] { "Primary2DAxisClick", "TouchpadPress" })] + [InputControl(aliases = new[] { "Primary2DAxisClick", "ThumbstickPress" })] public ButtonControl thumbstickClicked { get; private set; } [Preserve] [InputControl(aliases = new[] { "ATouch", "XTouch" })] @@ -189,11 +189,11 @@ public class PXR_Controller : XRControllerWithRumble [InputControl(aliases = new[] { "Menu" })] public ButtonControl menu { get; private set; } [Preserve] - [InputControl(aliases = new[] { "TouchpadTouch" })] - public ButtonControl touchpadTouched { get; private set; } + [InputControl(aliases = new[] { "ThumbstickTouch" })] + public ButtonControl thumbstickTouched { get; private set; } [Preserve] [InputControl(aliases = new[] { "ThumbRestTouch" })] - public ButtonControl thumbstickTouched { get; private set; } + public ButtonControl thumbRestTouched { get; private set; } [Preserve] [InputControl(aliases = new[] { "controllerTrackingState" })] diff --git a/Runtime/Scripts/OpenXRFeatures/Interactions/PICO4ControllerProfile.cs b/Runtime/Scripts/OpenXRFeatures/Interactions/PICO4ControllerProfile.cs index f99907d..dfd2f61 100644 --- a/Runtime/Scripts/OpenXRFeatures/Interactions/PICO4ControllerProfile.cs +++ b/Runtime/Scripts/OpenXRFeatures/Interactions/PICO4ControllerProfile.cs @@ -733,6 +733,10 @@ protected override void RegisterActionMapsWithRuntime() AddActionMap(actionMap); } + protected override string GetDeviceLayoutName() + { + return nameof(PICO4TouchController); + } } } #endif \ No newline at end of file diff --git a/Runtime/Scripts/OpenXRFeatures/Interactions/PICO4UltraControllerProfile.cs b/Runtime/Scripts/OpenXRFeatures/Interactions/PICO4UltraControllerProfile.cs index d12350a..22b68b7 100644 --- a/Runtime/Scripts/OpenXRFeatures/Interactions/PICO4UltraControllerProfile.cs +++ b/Runtime/Scripts/OpenXRFeatures/Interactions/PICO4UltraControllerProfile.cs @@ -734,6 +734,10 @@ protected override void RegisterActionMapsWithRuntime() AddActionMap(actionMap); } + protected override string GetDeviceLayoutName() + { + return nameof(PICO4UltraController); + } } } #endif \ No newline at end of file diff --git a/Runtime/Scripts/OpenXRFeatures/Interactions/PICOG3ControllerProfile.cs b/Runtime/Scripts/OpenXRFeatures/Interactions/PICOG3ControllerProfile.cs index 043e575..b55a4c4 100644 --- a/Runtime/Scripts/OpenXRFeatures/Interactions/PICOG3ControllerProfile.cs +++ b/Runtime/Scripts/OpenXRFeatures/Interactions/PICOG3ControllerProfile.cs @@ -487,6 +487,10 @@ protected override void RegisterActionMapsWithRuntime() AddActionMap(actionMap); } + protected override string GetDeviceLayoutName() + { + return nameof(PICOG3TouchController); + } } } #endif \ No newline at end of file diff --git a/Runtime/Scripts/OpenXRFeatures/Interactions/PICONeo3ControllerProfile.cs b/Runtime/Scripts/OpenXRFeatures/Interactions/PICONeo3ControllerProfile.cs index d49e31e..c113f11 100644 --- a/Runtime/Scripts/OpenXRFeatures/Interactions/PICONeo3ControllerProfile.cs +++ b/Runtime/Scripts/OpenXRFeatures/Interactions/PICONeo3ControllerProfile.cs @@ -729,6 +729,10 @@ protected override void RegisterActionMapsWithRuntime() AddActionMap(actionMap); } + protected override string GetDeviceLayoutName() + { + return nameof(PICONeo3Controller); + } } } #endif diff --git a/Runtime/Scripts/OpenXRFeatures/PICOFeature.cs b/Runtime/Scripts/OpenXRFeatures/PICOFeature.cs index 6370757..bc3e7f2 100644 --- a/Runtime/Scripts/OpenXRFeatures/PICOFeature.cs +++ b/Runtime/Scripts/OpenXRFeatures/PICOFeature.cs @@ -40,7 +40,7 @@ public class PICOFeature : OpenXRFeature /// The feature id string. This is used to give the feature a well known id for reference. ///
public const string featureId = "com.unity.openxr.feature.pico"; - public const string OpenXrExtensionList = "XR_PICO_controller_interaction"; + public const string OpenXrExtensionList = "XR_PICO_controller_interaction "+"XR_PICO_view_state"; public bool isPicoSupport = false; public static Action onAppFocusedAction; diff --git a/Runtime/Scripts/PXR_Loader.cs b/Runtime/Scripts/PXR_Loader.cs index e5ecaa5..779b840 100644 --- a/Runtime/Scripts/PXR_Loader.cs +++ b/Runtime/Scripts/PXR_Loader.cs @@ -151,7 +151,8 @@ public override bool Initialize() colorSpace = (ushort)((QualitySettings.activeColorSpace == ColorSpace.Linear) ? 1 : 0), useContentProtect = Convert.ToUInt16(PXR_ProjectSetting.GetProjectConfig().useContentProtect), systemDisplayFrequency = settings.GetSystemDisplayFrequency(), - optimizeBufferDiscards = settings.GetOptimizeBufferDiscards(), + // Workaround: Disable optimizeBufferDiscards for Vulkan to prevent rendering artifacts (left eye whiteout) + optimizeBufferDiscards = (SystemInfo.graphicsDeviceType == UnityEngine.Rendering.GraphicsDeviceType.Vulkan) ? (ushort)0 : settings.GetOptimizeBufferDiscards(), enableAppSpaceWarp = Convert.ToUInt16(settings.enableAppSpaceWarp), enableSubsampled = Convert.ToUInt16(PXR_ProjectSetting.GetProjectConfig().enableSubsampled), lateLatchingDebug = Convert.ToUInt16(PXR_ProjectSetting.GetProjectConfig().latelatchingDebug), diff --git a/Runtime/Scripts/PXR_Plugin.cs b/Runtime/Scripts/PXR_Plugin.cs index 2ff44a8..7d5bd14 100644 --- a/Runtime/Scripts/PXR_Plugin.cs +++ b/Runtime/Scripts/PXR_Plugin.cs @@ -325,6 +325,9 @@ public enum SecureMROperatorType UpdateGltf = 31, RenderText = 32, LoadTexture = 33, + Svd = 34, + Norm = 35, + SwapHwcChw = 36, } #endregion @@ -6864,6 +6867,9 @@ public static class SecureMR { typeof(UpdateGltfOperator), SecureMROperatorType.UpdateGltf }, { typeof(RenderTextOperator), SecureMROperatorType.RenderText }, { typeof(LoadTextureOperator), SecureMROperatorType.LoadTexture }, + { typeof(SvdOperator), SecureMROperatorType.Svd }, + { typeof(NormOperator), SecureMROperatorType.Norm }, + { typeof(SwapHwcChwOperator), SecureMROperatorType.SwapHwcChw }, }; public static PxrResult UPxr_CreateSecureMRProvider(int width, int height, out ulong providerHandle) diff --git a/Runtime/Scripts/PXR_ProjectSetting.cs b/Runtime/Scripts/PXR_ProjectSetting.cs index d8375c4..67da4e8 100644 --- a/Runtime/Scripts/PXR_ProjectSetting.cs +++ b/Runtime/Scripts/PXR_ProjectSetting.cs @@ -41,6 +41,7 @@ public class PXR_ProjectSetting : ScriptableObject public bool sceneCapture; public bool sharedAnchor; public bool spatialMesh; + public bool secureMR; public PxrMeshLod meshLod; public bool superResolution; public bool normalSharpening; @@ -110,6 +111,7 @@ public static PXR_ProjectSetting GetProjectConfig() projectConfig.isDataCollectionDisabled = false; projectConfig.portalFirstSelected = 0; projectConfig.meshLod = PxrMeshLod.Low; + projectConfig.secureMR = false; string path = Application.dataPath + "/Resources"; if (!Directory.Exists(path)) diff --git a/Runtime/Scripts/SecureMR/Component/Operator/PXR_SecureMROperator.cs b/Runtime/Scripts/SecureMR/Component/Operator/PXR_SecureMROperator.cs index 1f21fc1..3906087 100644 --- a/Runtime/Scripts/SecureMR/Component/Operator/PXR_SecureMROperator.cs +++ b/Runtime/Scripts/SecureMR/Component/Operator/PXR_SecureMROperator.cs @@ -211,6 +211,21 @@ public void InitializeOperator(PXR_SecureMRPipeline pipeline) Operator = pipeline.pipeline.CreateOperator(); } break; + case SecureMROperatorType.Svd: + { + Operator = pipeline.pipeline.CreateOperator(); + } + break; + case SecureMROperatorType.Norm: + { + Operator = pipeline.pipeline.CreateOperator(); + } + break; + case SecureMROperatorType.SwapHwcChw: + { + Operator = pipeline.pipeline.CreateOperator(); + } + break; default: throw new ArgumentOutOfRangeException(); } diff --git a/Runtime/Scripts/SecureMR/Core/PXR_SecureMROperatorCore.cs b/Runtime/Scripts/SecureMR/Core/PXR_SecureMROperatorCore.cs index f905e7a..b78b85a 100644 --- a/Runtime/Scripts/SecureMR/Core/PXR_SecureMROperatorCore.cs +++ b/Runtime/Scripts/SecureMR/Core/PXR_SecureMROperatorCore.cs @@ -547,6 +547,45 @@ public LoadTextureOperator(ulong pipelineHandle, SecureMROperatorType operatorTy } } } + + public class SvdOperator : Operator + { + public SvdOperator(ulong pipelineHandle, SecureMROperatorType operatorType) : base(pipelineHandle, operatorType) + { + var result = PXR_Plugin.SecureMR.UPxr_CreateSecureMROperator(pipelineHandle, operatorType, out var operatorHandle); + PLog.i(PXR_Plugin.SecureMR.TAG, $"Create {operatorType} operator" + result, false); + if (result == PxrResult.SUCCESS) + { + base.OperatorHandle = operatorHandle; + } + } + } + + public class NormOperator : Operator + { + public NormOperator(ulong pipelineHandle, SecureMROperatorType operatorType) : base(pipelineHandle, operatorType) + { + var result = PXR_Plugin.SecureMR.UPxr_CreateSecureMROperator(pipelineHandle, operatorType, out var operatorHandle); + PLog.i(PXR_Plugin.SecureMR.TAG, $"Create {operatorType} operator" + result, false); + if (result == PxrResult.SUCCESS) + { + base.OperatorHandle = operatorHandle; + } + } + } + + public class SwapHwcChwOperator : Operator + { + public SwapHwcChwOperator(ulong pipelineHandle, SecureMROperatorType operatorType) : base(pipelineHandle, operatorType) + { + var result = PXR_Plugin.SecureMR.UPxr_CreateSecureMROperator(pipelineHandle, operatorType, out var operatorHandle); + PLog.i(PXR_Plugin.SecureMR.TAG, $"Create {operatorType} operator" + result, false); + if (result == PxrResult.SUCCESS) + { + base.OperatorHandle = operatorHandle; + } + } + } } #endif \ No newline at end of file diff --git a/Runtime/Scripts/Utils/PXR_Constants.cs b/Runtime/Scripts/Utils/PXR_Constants.cs index 98b498e..d6ebbcd 100644 --- a/Runtime/Scripts/Utils/PXR_Constants.cs +++ b/Runtime/Scripts/Utils/PXR_Constants.cs @@ -2,6 +2,6 @@ { public class PXR_Constants { - public const string SDKVersion = "3.3.1"; + public const string SDKVersion = "3.3.3"; } } \ No newline at end of file diff --git a/Runtime/Windows/x64.meta b/Runtime/Windows/x64.meta deleted file mode 100644 index 41022b2..0000000 --- a/Runtime/Windows/x64.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 80d3afe7d889b8846ad5b9356ab8bf94 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Runtime/Windows/x64/PxrPlatform.dll b/Runtime/Windows/x64/PxrPlatform.dll deleted file mode 100644 index 39ea773..0000000 Binary files a/Runtime/Windows/x64/PxrPlatform.dll and /dev/null differ diff --git a/Runtime/Windows/x64/PxrPlatform.dll.meta b/Runtime/Windows/x64/PxrPlatform.dll.meta deleted file mode 100644 index 3df049f..0000000 --- a/Runtime/Windows/x64/PxrPlatform.dll.meta +++ /dev/null @@ -1,20 +0,0 @@ -fileFormatVersion: 2 -guid: 7b9d23324f8283a4abe5b2a8b7c9c885 -PluginImporter: - externalObjects: {} - serializedVersion: 3 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 1 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - Editor: - enabled: 0 - settings: - DefaultValueInitialized: true - userData: - assetBundleName: - assetBundleVariant: diff --git a/Runtime/Windows/x64/openxr_loader.dll b/Runtime/Windows/x64/openxr_loader.dll deleted file mode 100644 index e50949b..0000000 Binary files a/Runtime/Windows/x64/openxr_loader.dll and /dev/null differ diff --git a/Runtime/Windows/x64/openxr_loader.dll.meta b/Runtime/Windows/x64/openxr_loader.dll.meta deleted file mode 100644 index 750dfbc..0000000 --- a/Runtime/Windows/x64/openxr_loader.dll.meta +++ /dev/null @@ -1,20 +0,0 @@ -fileFormatVersion: 2 -guid: 9a92e8cb2f424984fa7266cb1d20983c -PluginImporter: - externalObjects: {} - serializedVersion: 3 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 1 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - Editor: - enabled: 0 - settings: - DefaultValueInitialized: true - userData: - assetBundleName: - assetBundleVariant: diff --git a/SpatialAudio/Plugins/Android/libs/arm64-v8a/libPicoAmbisonicDecoder.so b/SpatialAudio/Plugins/Android/libs/arm64-v8a/libPicoAmbisonicDecoder.so index a8543c2..d737440 100644 Binary files a/SpatialAudio/Plugins/Android/libs/arm64-v8a/libPicoAmbisonicDecoder.so and b/SpatialAudio/Plugins/Android/libs/arm64-v8a/libPicoAmbisonicDecoder.so differ diff --git a/SpatialAudio/Plugins/Android/libs/arm64-v8a/libPicoSpatializer.so b/SpatialAudio/Plugins/Android/libs/arm64-v8a/libPicoSpatializer.so index 6d07cab..38452bb 100644 Binary files a/SpatialAudio/Plugins/Android/libs/arm64-v8a/libPicoSpatializer.so and b/SpatialAudio/Plugins/Android/libs/arm64-v8a/libPicoSpatializer.so differ diff --git a/SpatialAudio/Plugins/Android/libs/armeabi-v7a/libPicoAmbisonicDecoder.so b/SpatialAudio/Plugins/Android/libs/armeabi-v7a/libPicoAmbisonicDecoder.so index e8d5c29..239d2d7 100644 Binary files a/SpatialAudio/Plugins/Android/libs/armeabi-v7a/libPicoAmbisonicDecoder.so and b/SpatialAudio/Plugins/Android/libs/armeabi-v7a/libPicoAmbisonicDecoder.so differ diff --git a/SpatialAudio/Plugins/Android/libs/armeabi-v7a/libPicoSpatializer.so b/SpatialAudio/Plugins/Android/libs/armeabi-v7a/libPicoSpatializer.so index ef7721c..a0a6182 100644 Binary files a/SpatialAudio/Plugins/Android/libs/armeabi-v7a/libPicoSpatializer.so and b/SpatialAudio/Plugins/Android/libs/armeabi-v7a/libPicoSpatializer.so differ diff --git a/SpatialAudio/Samples/audio/speech_48k.wav b/SpatialAudio/Samples/audio/speech_48k.wav index 97681e5..c28bc3c 100644 Binary files a/SpatialAudio/Samples/audio/speech_48k.wav and b/SpatialAudio/Samples/audio/speech_48k.wav differ diff --git a/SpatialAudio/Samples/material/unity_logo.jpg b/SpatialAudio/Samples/material/unity_logo.jpg index 9e65ff6..b704c5e 100644 Binary files a/SpatialAudio/Samples/material/unity_logo.jpg and b/SpatialAudio/Samples/material/unity_logo.jpg differ diff --git a/package.json b/package.json index 2379074..8b2264a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "com.unity.xr.picoxr", "displayName": "PICO Integration", - "version": "3.3.1", + "version": "3.3.3", "unity": "2021.3", "description": "Provides display and input support for PICO devices.", "keywords": [