diff --git a/AudioLinkUnityProject/.vscode/settings.json b/AudioLinkUnityProject/.vscode/settings.json new file mode 100644 index 00000000..e232cd65 --- /dev/null +++ b/AudioLinkUnityProject/.vscode/settings.json @@ -0,0 +1,55 @@ +{ + "files.exclude": + { + "**/.DS_Store":true, + "**/.git":true, + "**/.gitmodules":true, + "**/*.booproj":true, + "**/*.pidb":true, + "**/*.suo":true, + "**/*.user":true, + "**/*.userprefs":true, + "**/*.unityproj":true, + "**/*.dll":true, + "**/*.exe":true, + "**/*.pdf":true, + "**/*.mid":true, + "**/*.midi":true, + "**/*.wav":true, + "**/*.gif":true, + "**/*.ico":true, + "**/*.jpg":true, + "**/*.jpeg":true, + "**/*.png":true, + "**/*.psd":true, + "**/*.tga":true, + "**/*.tif":true, + "**/*.tiff":true, + "**/*.3ds":true, + "**/*.3DS":true, + "**/*.fbx":true, + "**/*.FBX":true, + "**/*.lxo":true, + "**/*.LXO":true, + "**/*.ma":true, + "**/*.MA":true, + "**/*.obj":true, + "**/*.OBJ":true, + "**/*.asset":true, + "**/*.cubemap":true, + "**/*.flare":true, + "**/*.mat":true, + "**/*.meta":true, + "**/*.prefab":true, + "**/*.unity":true, + "build/":true, + "Build/":true, + "Library/":true, + "library/":true, + "obj/":true, + "Obj/":true, + "ProjectSettings/":true, + "temp/":true, + "Temp/":true + } +} \ No newline at end of file diff --git a/AudioLinkUnityProject/Assets/cxzczc.unity b/AudioLinkUnityProject/Assets/cxzczc.unity index 132a1ee7..24fab622 100644 --- a/AudioLinkUnityProject/Assets/cxzczc.unity +++ b/AudioLinkUnityProject/Assets/cxzczc.unity @@ -213,7 +213,7 @@ Transform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 6 + m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &122236469 stripped GameObject: @@ -339,8 +339,8 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 527800184} - m_LocalRotation: {x: -0.12777649, y: 0.7873831, z: -0.17426644, w: -0.57734936} - m_LocalPosition: {x: 0.3159182, y: 0.37197387, z: 0.14442097} + m_LocalRotation: {x: 0.081755124, y: -0.66190535, z: 0.072971225, w: 0.741534} + m_LocalPosition: {x: -0.5544642, y: 0.13656333, z: -0.6017693} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} @@ -432,12 +432,12 @@ PrefabInstance: - target: {fileID: 6759095419728963412, guid: 8894fa7e4588a5c4fab98453e558847d, type: 3} propertyPath: NetworkIDs.Array.size - value: 20 + value: 21 objectReference: {fileID: 0} - target: {fileID: 6759095419728963412, guid: 8894fa7e4588a5c4fab98453e558847d, type: 3} propertyPath: DynamicMaterials.Array.size - value: 5 + value: 4 objectReference: {fileID: 0} - target: {fileID: 6759095419728963412, guid: 8894fa7e4588a5c4fab98453e558847d, type: 3} @@ -539,6 +539,11 @@ PrefabInstance: propertyPath: NetworkIDs.Array.data[19].ID value: 29 objectReference: {fileID: 0} + - target: {fileID: 6759095419728963412, guid: 8894fa7e4588a5c4fab98453e558847d, + type: 3} + propertyPath: NetworkIDs.Array.data[20].ID + value: 30 + objectReference: {fileID: 0} - target: {fileID: 6759095419728963412, guid: 8894fa7e4588a5c4fab98453e558847d, type: 3} propertyPath: DynamicMaterials.Array.data[0] @@ -664,6 +669,11 @@ PrefabInstance: propertyPath: NetworkIDs.Array.data[19].gameObject value: objectReference: {fileID: 491851352} + - target: {fileID: 6759095419728963412, guid: 8894fa7e4588a5c4fab98453e558847d, + type: 3} + propertyPath: NetworkIDs.Array.data[20].gameObject + value: + objectReference: {fileID: 2053127254} - target: {fileID: 8464459589408506562, guid: 8894fa7e4588a5c4fab98453e558847d, type: 3} propertyPath: serializedProgramAsset @@ -845,7 +855,7 @@ Transform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 5 + m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1099480475 stripped GameObject: @@ -951,99 +961,6 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} ---- !u!1 &1261138542 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1261138546} - - component: {fileID: 1261138545} - - component: {fileID: 1261138544} - - component: {fileID: 1261138543} - m_Layer: 0 - m_Name: Cube - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!65 &1261138543 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1261138542} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!23 &1261138544 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1261138542} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: e483c32f1658c01429ef7a8e434c5ce2, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 ---- !u!33 &1261138545 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1261138542} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &1261138546 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1261138542} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -14.496497, y: -0.4671054, z: 17.197527} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 4 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1001 &1333337246 PrefabInstance: m_ObjectHideFlags: 0 @@ -1154,6 +1071,150 @@ GameObject: type: 3} m_PrefabInstance: {fileID: 4113948445909497553} m_PrefabAsset: {fileID: 0} +--- !u!1 &2053127254 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2053127260} + - component: {fileID: 2053127259} + - component: {fileID: 2053127258} + - component: {fileID: 2053127257} + - component: {fileID: 2053127256} + - component: {fileID: 2053127255} + m_Layer: 0 + m_Name: Cube (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &2053127255 +MonoBehaviour: + m_ObjectHideFlags: 2 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2053127254} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 45115577ef41a5b4ca741ed302693907, type: 3} + m_Name: + m_EditorClassIdentifier: + interactTextPlacement: {fileID: 0} + interactText: Toggle Controller + interactTextGO: {fileID: 0} + proximity: 2 + SynchronizePosition: 0 + AllowCollisionOwnershipTransfer: 0 + Reliable: 0 + _syncMethod: 3 + serializedProgramAsset: {fileID: 11400000, guid: 470e273d48e257b4d98865b37b70307d, + type: 2} + programSource: {fileID: 11400000, guid: 96ee11c7074d21e4f84d189ad35d45fc, type: 2} + serializedPublicVariablesBytesString: Ai8AAAAAATIAAABWAFIAQwAuAFUAZABvAG4ALgBDAG8AbQBtAG8AbgAuAFUAZABvAG4AVgBhAHIAaQBhAGIAbABlAFQAYQBiAGwAZQAsACAAVgBSAEMALgBVAGQAbwBuAC4AQwBvAG0AbQBvAG4AAAAAAAYBAAAAAAAAACcBBAAAAHQAeQBwAGUAAWgAAABTAHkAcwB0AGUAbQAuAEMAbwBsAGwAZQBjAHQAaQBvAG4AcwAuAEcAZQBuAGUAcgBpAGMALgBMAGkAcwB0AGAAMQBbAFsAVgBSAEMALgBVAGQAbwBuAC4AQwBvAG0AbQBvAG4ALgBJAG4AdABlAHIAZgBhAGMAZQBzAC4ASQBVAGQAbwBuAFYAYQByAGkAYQBiAGwAZQAsACAAVgBSAEMALgBVAGQAbwBuAC4AQwBvAG0AbQBvAG4AXQBdACwAIABtAHMAYwBvAHIAbABpAGIAAQEJAAAAVgBhAHIAaQBhAGIAbABlAHMALwEAAAABaAAAAFMAeQBzAHQAZQBtAC4AQwBvAGwAbABlAGMAdABpAG8AbgBzAC4ARwBlAG4AZQByAGkAYwAuAEwAaQBzAHQAYAAxAFsAWwBWAFIAQwAuAFUAZABvAG4ALgBDAG8AbQBtAG8AbgAuAEkAbgB0AGUAcgBmAGEAYwBlAHMALgBJAFUAZABvAG4AVgBhAHIAaQBhAGIAbABlACwAIABWAFIAQwAuAFUAZABvAG4ALgBDAG8AbQBtAG8AbgBdAF0ALAAgAG0AcwBjAG8AcgBsAGkAYgABAAAABgEAAAAAAAAAAi8CAAAAAUkAAABWAFIAQwAuAFUAZABvAG4ALgBDAG8AbQBtAG8AbgAuAFUAZABvAG4AVgBhAHIAaQBhAGIAbABlAGAAMQBbAFsAUwB5AHMAdABlAG0ALgBJAG4AdAAzADIALAAgAG0AcwBjAG8AcgBsAGkAYgBdAF0ALAAgAFYAUgBDAC4AVQBkAG8AbgAuAEMAbwBtAG0AbwBuAAIAAAAGAgAAAAAAAAAnAQQAAAB0AHkAcABlAAEXAAAAUwB5AHMAdABlAG0ALgBTAHQAcgBpAG4AZwAsACAAbQBzAGMAbwByAGwAaQBiACcBCgAAAFMAeQBtAGIAbwBsAE4AYQBtAGUAAR8AAABfAF8AXwBVAGQAbwBuAFMAaABhAHIAcABCAGUAaABhAHYAaQBvAHUAcgBWAGUAcgBzAGkAbwBuAF8AXwBfACcBBAAAAHQAeQBwAGUAARYAAABTAHkAcwB0AGUAbQAuAEkAbgB0ADMAMgAsACAAbQBzAGMAbwByAGwAaQBiABcBBQAAAFYAYQBsAHUAZQACAAAABwUHBQcF + publicVariablesUnityEngineObjects: [] + publicVariablesSerializationDataFormat: 0 +--- !u!114 &2053127256 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2053127254} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a3d8ddeb56f3a0c4daf49fe9d7447a3e, type: 3} + m_Name: + m_EditorClassIdentifier: + serializationData: + SerializedFormat: 2 + SerializedBytes: + ReferencedUnityObjects: [] + SerializedBytesString: + Prefab: {fileID: 0} + PrefabModificationsReferencedUnityObjects: [] + PrefabModifications: [] + SerializationNodes: [] + _udonSharpBackingUdonBehaviour: {fileID: 2053127255} + toggleObject: {fileID: 695303486} +--- !u!65 &2053127257 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2053127254} + m_Material: {fileID: 0} + m_IsTrigger: 1 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &2053127258 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2053127254} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &2053127259 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2053127254} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &2053127260 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2053127254} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -0.948, y: 0.399, z: 0.537} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1001 &4113948445909497553 PrefabInstance: m_ObjectHideFlags: 0 @@ -1292,7 +1353,7 @@ PrefabInstance: - target: {fileID: 4113948446330047376, guid: 0475f50b99de93c479d417894fe2e931, type: 3} propertyPath: m_RootOrder - value: 7 + value: 6 objectReference: {fileID: 0} - target: {fileID: 4113948446330047376, guid: 0475f50b99de93c479d417894fe2e931, type: 3} @@ -1378,6 +1439,11 @@ PrefabInstance: value: objectReference: {fileID: 4113948446357406664, guid: 0475f50b99de93c479d417894fe2e931, type: 3} + - target: {fileID: 4113948446475364157, guid: 0475f50b99de93c479d417894fe2e931, + type: 3} + propertyPath: m_LocalPosition.x + value: 0.019 + objectReference: {fileID: 0} - target: {fileID: 4113948446527525820, guid: 0475f50b99de93c479d417894fe2e931, type: 3} propertyPath: m_AnchorMax.x diff --git a/AudioLinkUnityProject/Packages/manifest.json b/AudioLinkUnityProject/Packages/manifest.json index 0b229a45..21371e18 100644 --- a/AudioLinkUnityProject/Packages/manifest.json +++ b/AudioLinkUnityProject/Packages/manifest.json @@ -9,6 +9,7 @@ "com.unity.textmeshpro": "2.1.6", "com.unity.timeline": "1.2.18", "com.unity.ugui": "1.0.0", + "com.unity.xr.oculus.android": "2.38.6", "com.unity.modules.ai": "1.0.0", "com.unity.modules.androidjni": "1.0.0", "com.unity.modules.animation": "1.0.0", diff --git a/AudioLinkUnityProject/Packages/packages-lock.json b/AudioLinkUnityProject/Packages/packages-lock.json index 79be74f8..7c6df970 100644 --- a/AudioLinkUnityProject/Packages/packages-lock.json +++ b/AudioLinkUnityProject/Packages/packages-lock.json @@ -140,6 +140,13 @@ "com.unity.modules.imgui": "1.0.0" } }, + "com.unity.xr.oculus.android": { + "version": "2.38.6", + "depth": 0, + "source": "registry", + "dependencies": {}, + "url": "https://packages.unity.com" + }, "com.unity.xr.oculus.standalone": { "version": "2.38.4", "depth": 1, diff --git a/AudioLinkUnityProject/ProjectSettings/AudioManager.asset b/AudioLinkUnityProject/ProjectSettings/AudioManager.asset index ba6209ee..d9250210 100644 --- a/AudioLinkUnityProject/ProjectSettings/AudioManager.asset +++ b/AudioLinkUnityProject/ProjectSettings/AudioManager.asset @@ -10,8 +10,8 @@ AudioManager: Default Speaker Mode: 2 m_SampleRate: 48000 m_DSPBufferSize: 1024 - m_VirtualVoiceCount: 64 - m_RealVoiceCount: 32 + m_VirtualVoiceCount: 32 + m_RealVoiceCount: 24 m_EnableOutputSuspension: 1 m_SpatializerPlugin: OculusSpatializer m_AmbisonicDecoderPlugin: OculusSpatializer diff --git a/AudioLinkUnityProject/ProjectSettings/GraphicsSettings.asset b/AudioLinkUnityProject/ProjectSettings/GraphicsSettings.asset index c6e1cb26..b4d1541b 100644 --- a/AudioLinkUnityProject/ProjectSettings/GraphicsSettings.asset +++ b/AudioLinkUnityProject/ProjectSettings/GraphicsSettings.asset @@ -32,6 +32,7 @@ GraphicsSettings: - {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 16001, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 16003, guid: 0000000000000000f000000000000000, type: 0} m_PreloadedShaders: [] m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} diff --git a/AudioLinkUnityProject/ProjectSettings/ProjectSettings.asset b/AudioLinkUnityProject/ProjectSettings/ProjectSettings.asset index aa7cb8f0..7f3d0a0d 100644 --- a/AudioLinkUnityProject/ProjectSettings/ProjectSettings.asset +++ b/AudioLinkUnityProject/ProjectSettings/ProjectSettings.asset @@ -176,15 +176,15 @@ PlayerSettings: applicationIdentifier: {} buildNumber: {} AndroidBundleVersionCode: 1 - AndroidMinSdkVersion: 19 - AndroidTargetSdkVersion: 0 + AndroidMinSdkVersion: 25 + AndroidTargetSdkVersion: 32 AndroidPreferredInstallLocation: 1 aotOptions: stripEngineCode: 1 iPhoneStrippingLevel: 0 iPhoneScriptCallOptimization: 0 ForceInternetPermission: 0 - ForceSDCardPermission: 0 + ForceSDCardPermission: 1 CreateWallpaper: 0 APKExpansionFiles: 0 keepLoadedShadersAlive: 0 @@ -250,7 +250,7 @@ PlayerSettings: clonedFromGUID: c0afd0d1d80e3634a9dac47e8a0426ea templatePackageId: com.vrchat.template.udonsharp@1.0.0 templateDefaultScene: Assets/VRCWelcome.unity - AndroidTargetArchitectures: 1 + AndroidTargetArchitectures: 2 AndroidTargetDevices: 0 AndroidSplashScreenScale: 0 androidSplashScreen: {fileID: 0} @@ -313,7 +313,7 @@ PlayerSettings: - m_BuildTarget: LuminSupport m_GraphicsJobs: 0 - m_BuildTarget: AndroidPlayer - m_GraphicsJobs: 0 + m_GraphicsJobs: 1 - m_BuildTarget: WebGLSupport m_GraphicsJobs: 0 m_BuildTargetGraphicsJobMode: @@ -347,6 +347,12 @@ PlayerSettings: - None - OpenVR - Oculus + - m_BuildTarget: Android + m_Enabled: 1 + m_Devices: + - None + - OpenVR + - Oculus openGLRequireES31: 0 openGLRequireES31AEP: 0 openGLRequireES32: 0 @@ -623,7 +629,7 @@ PlayerSettings: webGLWasmStreaming: 0 scriptingDefineSymbols: 1: UNITY_POST_PROCESSING_STACK_V2;AUDIOLINK;UDON;VRC_SDK_VRCSDK3;UDONSHARP - 7: UNITY_POST_PROCESSING_STACK_V2;AUDIOLINK + 7: UNITY_POST_PROCESSING_STACK_V2;AUDIOLINK;UDON;VRC_SDK_VRCSDK3;UDONSHARP 13: UNITY_POST_PROCESSING_STACK_V2;AUDIOLINK 14: UNITY_POST_PROCESSING_STACK_V2;AUDIOLINK 19: UNITY_POST_PROCESSING_STACK_V2;AUDIOLINK @@ -638,6 +644,7 @@ PlayerSettings: platformArchitecture: {} scriptingBackend: {} il2cppCompilerConfiguration: + Android: 1 Standalone: 1 managedStrippingLevel: {} incrementalIl2cppBuild: {} @@ -649,6 +656,7 @@ PlayerSettings: assemblyVersionValidation: 1 gcWBarrierValidation: 0 apiCompatibilityLevelPerPlatform: + Android: 3 Standalone: 3 m_RenderingPath: 1 m_MobileRenderingPath: 1 diff --git a/AudioLinkUnityProject/ProjectSettings/QualitySettings.asset b/AudioLinkUnityProject/ProjectSettings/QualitySettings.asset index 217010f3..0c8e050c 100644 --- a/AudioLinkUnityProject/ProjectSettings/QualitySettings.asset +++ b/AudioLinkUnityProject/ProjectSettings/QualitySettings.asset @@ -4,7 +4,7 @@ QualitySettings: m_ObjectHideFlags: 0 serializedVersion: 5 - m_CurrentQuality: 3 + m_CurrentQuality: 2 m_QualitySettings: - serializedVersion: 2 name: VRC Low diff --git a/Packages/com.llealloo.audiolink/Runtime/Materials/mat_AudioLink.mat b/Packages/com.llealloo.audiolink/Runtime/Materials/mat_AudioLink.mat index 5e47f944..0ff7cf64 100644 --- a/Packages/com.llealloo.audiolink/Runtime/Materials/mat_AudioLink.mat +++ b/Packages/com.llealloo.audiolink/Runtime/Materials/mat_AudioLink.mat @@ -28,9 +28,9 @@ Material: - _Gain: 1 - _MediaLoop: 1 - _MediaPlaying: 1 - - _MediaTime: 0.7841976 + - _MediaTime: 0.049759705 - _MediaVolume: 1 - - _SourceDistance: 1.1109239 + - _SourceDistance: 2.041648 - _SourceSpatialBlend: 0 - _SourceVolume: 1 - _ThemeColorMode: 0 @@ -44,7 +44,7 @@ Material: - _X2: 0.5 - _X3: 0.75 m_Colors: - - _CustomThemeColor0: {r: 0.95896864, g: 0.38433918, b: 0.38433918, a: 1} + - _CustomThemeColor0: {r: 1, g: 0.92156863, b: 0.015686275, a: 1} - _CustomThemeColor1: {r: 0, g: 0, b: 1, a: 1} - _CustomThemeColor2: {r: 1, g: 0, b: 0, a: 1} - _CustomThemeColor3: {r: 0, g: 1, b: 0, a: 1} diff --git a/Packages/com.llealloo.audiolink/Runtime/Materials/mat_AudioLinkControllerScreenMaterial.mat b/Packages/com.llealloo.audiolink/Runtime/Materials/mat_AudioLinkControllerScreenMaterial.mat index a03c7fdf..434f06fd 100644 --- a/Packages/com.llealloo.audiolink/Runtime/Materials/mat_AudioLinkControllerScreenMaterial.mat +++ b/Packages/com.llealloo.audiolink/Runtime/Materials/mat_AudioLinkControllerScreenMaterial.mat @@ -35,23 +35,23 @@ Material: - _HighMidThreshold: 0.5 - _HighThreshold: 0.5 - _HitFade: 0.25 - - _Hue: 0 + - _Hue: 0.15338646 - _LowMidThreshold: 0.5 - _LowThreshold: 0.5 - - _Saturation: 0.5992161 + - _Saturation: 0.9843137 - _SelectedColor: 0 - _ThemeColorMode: 0 - _Threshold0: 0.45 - _Threshold1: 0.45 - _Threshold2: 0.45 - _Threshold3: 0.45 - - _Value: 0.95896864 + - _Value: 1 - _X0: 0 - _X1: 0.25 - _X2: 0.5 - _X3: 0.75 m_Colors: - - _CustomColor0: {r: 0.95896864, g: 0.38433918, b: 0.38433918, a: 1} + - _CustomColor0: {r: 1, g: 0.92156863, b: 0.015686275, a: 1} - _CustomColor1: {r: 0, g: 0, b: 1, a: 1} - _CustomColor2: {r: 1, g: 0, b: 0, a: 1} - _CustomColor3: {r: 0, g: 1, b: 0, a: 1} diff --git a/Packages/com.llealloo.audiolink/Runtime/Shaders/AudioLinkUI.shader b/Packages/com.llealloo.audiolink/Runtime/Shaders/AudioLinkUI.shader index 18584cad..74a2101c 100644 --- a/Packages/com.llealloo.audiolink/Runtime/Shaders/AudioLinkUI.shader +++ b/Packages/com.llealloo.audiolink/Runtime/Shaders/AudioLinkUI.shader @@ -103,12 +103,13 @@ // Spacing const static float CORNER_RADIUS = 0.03; const static float FRAME_MARGIN = 0.035; - const static float AA_FACTOR = 0.002; const static float HANDLE_RADIUS = 0.007; const static float OUTLINE_WIDTH = 0.002; #define remap(value, low1, high1, low2, high2) ((low2) + ((value) - (low1)) * ((high2) - (low2)) / ((high1) - (low1))) + #define ADD_ELEMENT(existing, elementColor, elementDist) [branch] if (elementDist <= 0.01) addElement(existing, elementColor, elementDist) + float3 selectColor(uint i, float3 a, float3 b, float3 c, float3 d) { return float4x4( @@ -200,9 +201,15 @@ void addElement(inout float3 existing, float3 elementColor, float elementDist) { + // Branching mixed with pixel derivatives seems to cause a strange issue on Quest + // where an aliased "ghost" of the UI element is visible. So for Quest, we just use a constant anti-aliasing width. + #if defined(UNITY_PBS_USE_BRDF2) || defined(SHADER_API_MOBILE) + existing = lerp(elementColor, existing, smoothstep(0, 0.002, elementDist)); + #else const float pixelDiagonal = sqrt(2.0) / 2.0; float distDerivativeLength = sqrt(pow(ddx(elementDist), 2) + pow(ddy(elementDist), 2)); existing = lerp(elementColor, existing, lerpstep(-pixelDiagonal, pixelDiagonal, elementDist/distDerivativeLength)); + #endif } float sdRoundedBoxCentered(float2 p, float2 b, float4 r) @@ -266,11 +273,37 @@ float areaWidth = 1.0 - FRAME_MARGIN * 2; float areaHeight = 0.35; - float boxWidth = areaWidth / 4.0; + float handleWidth = 0.015 * areaWidth; float threshold[4] = { _Threshold0, _Threshold1, _Threshold2, _Threshold3 }; float crossover[4] = { _X0 * areaWidth, _X1 * areaWidth, _X2 * areaWidth, _X3 * areaWidth }; + // prefix sum to calculate offsets and sizes for boxes + uint start = 0; + uint stop = 4; + float currentBoxOffset = crossover[start]; + float boxOffsets[4] = { 0, 0, 0, 0 }; + float boxWidths[4] = { 0, 0, 0, 0 }; + for (uint i = 0; i < 4; i++) + { + float boxWidth = 0.0; + if (i == 3) // The last box should just stretch to fill + boxWidth = areaWidth - currentBoxOffset; + else + boxWidth = crossover[i + 1] - crossover[i]; + + boxOffsets[i] = currentBoxOffset; + boxWidths[i] = boxWidth; + + // Keep track of the range of boxes we need to draw + if (uv.x > currentBoxOffset + OUTLINE_WIDTH) + start = i; + if (uv.x < currentBoxOffset + boxWidth - handleWidth) + stop = min(stop, i + 1); + + currentBoxOffset += boxWidth; + } + // waveform calculation uint totalBins = AUDIOLINK_EXPBINS * AUDIOLINK_EXPOCT; uint noteno = AudioLinkRemap(uv.x, 0., 1., AUDIOLINK_4BAND_FREQFLOOR * totalBins, AUDIOLINK_4BAND_FREQCEILING * totalBins); @@ -278,8 +311,7 @@ float4 specLow = AudioLinkData(float2(fmod(noteno, 128), (noteno/128)+4.0)); float4 specHigh = AudioLinkData(float2(fmod(noteno+1, 128), ((noteno+1)/128)+4.0)); float4 intensity = lerp(specLow, specHigh, frac(notenof)) * _Gain; - uint bandIndex = AudioLinkRemap(uv.x, 0., areaWidth, 0, 4); - float bandIntensity = AudioLinkData(float2(0., bandIndex)); + float bandIntensity = AudioLinkData(float2(0., start ^ 0)); // XOR with 0 to avoid FXC miscompilation float funcY = areaHeight - (intensity.g * areaHeight); float waveformDist = smoothstep(0.005, 0.003, funcY - uv.y); float waveformDistAbs = abs(smoothstep(0.005, 0.003, abs(funcY - uv.y))); @@ -287,16 +319,17 @@ // background waveform color = lerp(color, color * 2, waveformDist); color = lerp(color, color * 2, waveformDistAbs); - - float boxOffset = crossover[0]; + + // This optimization increases performance, but introduces aliasing. The perf difference is only really noticeable on Quest. + #if defined(UNITY_PBS_USE_BRDF2) || defined(SHADER_API_MOBILE) + [loop] for (uint i = start; i < min(stop, 4); i++) + #else for (uint i = 0; i < 4; i++) + #endif { float boxHeight = threshold[i] * areaHeight; - float boxWidth = 0.0f; - if (i == 3) // The last box should just stretch to fill - boxWidth = areaWidth - boxOffset; - else - boxWidth = crossover[i + 1] - crossover[i]; + float boxWidth = boxWidths[i]; + float boxOffset = boxOffsets[i]; float leftCornerRadius = i == 0 ? CORNER_RADIUS : 0.0; float rightCornerRadius = i == 3 ? CORNER_RADIUS : 0.0; @@ -310,29 +343,26 @@ float3 innerColor = getBandColor(i); innerColor = lerp(innerColor, innerColor * 3, waveformDist); innerColor = lerp(innerColor, lerp(innerColor * 3, 1.0, bandIntensity > threshold[i]), waveformDistAbs); - addElement(color, innerColor, boxDist+OUTLINE_WIDTH); + ADD_ELEMENT(color, innerColor, boxDist+OUTLINE_WIDTH); // outer shell float shellDist = shell(boxDist, OUTLINE_WIDTH); - addElement(color, ACTIVE_COLOR, shellDist); + ADD_ELEMENT(color, ACTIVE_COLOR, shellDist); // Top pivot float handleDist = sdSphere( translate(uv, float2(boxWidth * 0.5 + boxOffset, areaHeight-boxHeight)), HANDLE_RADIUS ); - addElement(color, 1.0, handleDist); + ADD_ELEMENT(color, 1.0, handleDist); // Side pivot handleDist = sdRoundedBoxCentered( translate(uv, float2(boxOffset, areaHeight - boxHeight * 0.5)), - float2(0.015 * areaWidth, 0.35 * boxHeight), + float2(handleWidth, 0.35 * boxHeight), HANDLE_RADIUS ); - addElement(color, 1.0, handleDist); - - // Keep track of current offset - boxOffset += boxWidth; + ADD_ELEMENT(color, 1.0, handleDist); } return color; @@ -358,23 +388,23 @@ rotate(translate(uv, float2(sliderOffsetLeft, size.y * 0.5)), UNITY_PI*0.5), float2(size.y*0.3, maxTriangleWidth) ), 0.002); - addElement(color, inactiveColor, bgTriangleDist); + ADD_ELEMENT(color, inactiveColor, bgTriangleDist); // Current active area float currentTriangleWidth = maxTriangleWidth * t; float currentTriangleDist = max(bgTriangleDist, uv.x - currentTriangleWidth - sliderOffsetLeft); - addElement(color, activeColor, currentTriangleDist); + ADD_ELEMENT(color, activeColor, currentTriangleDist); // Slider handle float handleDist = sdSphere( translate(uv, float2(currentTriangleWidth + sliderOffsetLeft, size.y * 0.5)), HANDLE_RADIUS ); - addElement(color, ACTIVE_COLOR, handleDist); + ADD_ELEMENT(color, ACTIVE_COLOR, handleDist); // Slider vertical grip float gripDist = abs(uv.x - currentTriangleWidth - sliderOffsetLeft) - OUTLINE_WIDTH; - addElement(color, ACTIVE_COLOR, gripDist); + ADD_ELEMENT(color, ACTIVE_COLOR, gripDist); return color; } @@ -403,7 +433,7 @@ float fullWidth = halfWidth * 2; float fullHeight = halfHeight * 2; float bgTriangleDist = inflate(sdTriangleRight(triUV, halfWidth, halfHeight), 0.002); - addElement(color, INACTIVE_COLOR, bgTriangleDist); + ADD_ELEMENT(color, INACTIVE_COLOR, bgTriangleDist); // Current active area float remainingWidth = size.x - fullWidth; @@ -413,18 +443,18 @@ triUV.x += halfWidth * _HitFade; float fgTriangleDist = inflate(sdTriangleRight(triUV, halfWidth * (1.0 - _HitFade), halfHeight), 0.002); - addElement(color, ACTIVE_COLOR, fgTriangleDist); + ADD_ELEMENT(color, ACTIVE_COLOR, fgTriangleDist); // Slider handle float handleDist = sdSphere( translate(uv, float2(_HitFade * fullWidth + marginX, size.y * 0.5)), HANDLE_RADIUS ); - addElement(color, ACTIVE_COLOR, handleDist); + ADD_ELEMENT(color, ACTIVE_COLOR, handleDist); // Slider vertical grip float gripDist = abs(uv.x - _HitFade * halfWidth * 2 - marginX) - OUTLINE_WIDTH; - addElement(color, ACTIVE_COLOR, gripDist); + ADD_ELEMENT(color, ACTIVE_COLOR, gripDist); return color; } @@ -441,7 +471,7 @@ float fullWidth = halfWidth * 2; float fullHeight = halfHeight * 2; float bgTriangleDist = inflate(sdTriangleRight(triUV, halfWidth, halfHeight), 0.002); - addElement(color, INACTIVE_COLOR, bgTriangleDist); + ADD_ELEMENT(color, INACTIVE_COLOR, bgTriangleDist); // Current active area float remainingWidth = size.x - fullWidth; @@ -453,18 +483,18 @@ float expFalloffY = (1.0 + (pow(triUVx, 4.0) * _ExpFalloff) - _ExpFalloff) * triUVx; float fgDist = inflate((1.0 - triUVy) - expFalloffY, 0.02); - addElement(color, ACTIVE_COLOR, max(bgTriangleDist, fgDist*0.1)); + ADD_ELEMENT(color, ACTIVE_COLOR, max(bgTriangleDist, fgDist*0.1)); // Slider handle float handleDist = sdSphere( translate(uv, float2(_ExpFalloff * fullWidth + marginX, size.y * 0.5)), HANDLE_RADIUS ); - addElement(color, ACTIVE_COLOR, handleDist); + ADD_ELEMENT(color, ACTIVE_COLOR, handleDist); // Slider vertical grip float gripDist = abs(uv.x - _ExpFalloff * halfWidth * 2 - marginX) - OUTLINE_WIDTH; - addElement(color, ACTIVE_COLOR, gripDist); + ADD_ELEMENT(color, ACTIVE_COLOR, gripDist); return color; } @@ -491,10 +521,10 @@ translate(uv, float2(sliderOffset, size.y * 0.5)), HANDLE_RADIUS ); - addElement(color, ACTIVE_COLOR, handleDist); + ADD_ELEMENT(color, ACTIVE_COLOR, handleDist); float gripDist = abs(uv.x - sliderOffset) - OUTLINE_WIDTH; - addElement(color, ACTIVE_COLOR, gripDist); + ADD_ELEMENT(color, ACTIVE_COLOR, gripDist); return color; } @@ -508,15 +538,15 @@ translate(uv, float2(_Saturation, _Value) * size), HANDLE_RADIUS ); - addElement(color, ACTIVE_COLOR, shell(centerDist, 0.002)); + ADD_ELEMENT(color, ACTIVE_COLOR, shell(centerDist, 0.002)); // Slider vertical grip float gripDistV = abs(scaledUV.x - _Saturation) - OUTLINE_WIDTH / size.x; - addElement(color, ACTIVE_COLOR, max(gripDistV, -centerDist)); + ADD_ELEMENT(color, ACTIVE_COLOR, max(gripDistV, -centerDist)); // Slider horizontal grip float gripDistH = abs(scaledUV.y - _Value) - OUTLINE_WIDTH / size.y; - addElement(color, ACTIVE_COLOR, max(gripDistH, -centerDist)); + ADD_ELEMENT(color, ACTIVE_COLOR, max(gripDistH, -centerDist)); // Top handle float topTriSize = lerp(0.015, 0.04, smoothstep(0.4, 0.5, abs(0.5 - _Saturation))); @@ -524,7 +554,7 @@ translate(uv, float2(_Saturation * size.x, topTriSize)), float2(topTriSize, -topTriSize) ); - addElement(color, ACTIVE_COLOR, topHandleDist); + ADD_ELEMENT(color, ACTIVE_COLOR, topHandleDist); // Left handle float leftTriSize = lerp(0.015, 0.04, smoothstep(0.4, 0.5, abs(0.5 - _Value))); @@ -532,7 +562,7 @@ rotate(translate(uv, float2(leftTriSize, _Value * size.y)), UNITY_PI * 0.5), float2(leftTriSize, -leftTriSize) ); - addElement(color, ACTIVE_COLOR, leftHandleDist); + ADD_ELEMENT(color, ACTIVE_COLOR, leftHandleDist); return color; } @@ -568,7 +598,7 @@ float2 topAreaOrigin = translate(uv, FRAME_MARGIN); float2 topAreaSize = float2(1.0 - FRAME_MARGIN * 2, 0.35); float topAreaDist = sdRoundedBoxTopLeft(topAreaOrigin, topAreaSize, CORNER_RADIUS); - addElement(color, drawTopArea(topAreaOrigin), topAreaDist); + ADD_ELEMENT(color, drawTopArea(topAreaOrigin), topAreaDist); currentY += topAreaSize.y + margin; const float gainSliderHeight = 0.17; @@ -578,33 +608,33 @@ float2 gainSliderOrigin = translate(uv, FRAME_MARGIN + float2(0, currentY)); float2 gainSliderSize = float2(gainSliderWidth, gainSliderHeight); float gainSliderDist = sdRoundedBoxTopLeft(gainSliderOrigin, gainSliderSize, CORNER_RADIUS); - addElement(color, drawGainArea(gainSliderOrigin, gainSliderSize), gainSliderDist); + ADD_ELEMENT(color, drawGainArea(gainSliderOrigin, gainSliderSize), gainSliderDist); // Autogain button float2 autogainButtonOrigin = translate(uv, FRAME_MARGIN + float2(gainSliderWidth + margin, currentY)); float2 autogainButtonSize = float2(gainSliderHeight, gainSliderHeight); float autogainButtonDist = sdRoundedBoxTopLeft(autogainButtonOrigin, autogainButtonSize, CORNER_RADIUS); - addElement(color, drawAutoGainButton(autogainButtonOrigin, autogainButtonSize), autogainButtonDist); + ADD_ELEMENT(color, drawAutoGainButton(autogainButtonOrigin, autogainButtonSize), autogainButtonDist); currentY += autogainButtonSize.y + margin; // Hit fade float2 hitFadeAreaOrigin = translate(uv, FRAME_MARGIN + float2(0, currentY)); float2 hitFadeAreaSize = float2(topAreaSize.x * 0.5 - margin * 0.5, gainSliderHeight); float hitFadeAreaDist = sdRoundedBoxTopLeft(hitFadeAreaOrigin, hitFadeAreaSize, CORNER_RADIUS); - addElement(color, drawHitFadeArea(hitFadeAreaOrigin, hitFadeAreaSize), hitFadeAreaDist); + ADD_ELEMENT(color, drawHitFadeArea(hitFadeAreaOrigin, hitFadeAreaSize), hitFadeAreaDist); // Exp fallof float2 expFalloffAreaOrigin = translate(uv, FRAME_MARGIN + float2(hitFadeAreaSize.x + margin, currentY)); float2 expFalloffAreaSize = float2(topAreaSize.x * 0.5 - margin * 0.5, gainSliderHeight); float expFalloffAreaDist = sdRoundedBoxTopLeft(expFalloffAreaOrigin, expFalloffAreaSize, CORNER_RADIUS); - addElement(color, drawExpFalloffArea(expFalloffAreaOrigin, expFalloffAreaSize), expFalloffAreaDist); + ADD_ELEMENT(color, drawExpFalloffArea(expFalloffAreaOrigin, expFalloffAreaSize), expFalloffAreaDist); currentY += expFalloffAreaSize.y + margin; // 4-band float2 fourBandOrigin = translate(uv, FRAME_MARGIN + float2(0, currentY)); float2 fourBandSize = float2(topAreaSize.x, 0.3); float fourBandDist = sdRoundedBoxTopLeft(fourBandOrigin, fourBandSize, CORNER_RADIUS); - addElement(color, drawFourBandArea(fourBandOrigin, fourBandSize), fourBandDist); + ADD_ELEMENT(color, drawFourBandArea(fourBandOrigin, fourBandSize), fourBandDist); currentY += fourBandSize.y + margin; // Gray out irrelevant controls @@ -617,11 +647,11 @@ float2 colorOrigin = translate(uv, FRAME_MARGIN + float2(0, currentY) + float2(colorIndex * (colorSize.x + margin), 0)); float colorDist = sdRoundedBoxTopLeft(colorOrigin, colorSize, CORNER_RADIUS); float3 colors[4] = { _CustomColor0, _CustomColor1, _CustomColor2, _CustomColor3 }; - addElement(color, colors[colorIndex] * themeColorMultiplier, colorDist); + ADD_ELEMENT(color, colors[colorIndex] * themeColorMultiplier, colorDist); if (colorIndex == _SelectedColor % 4) { float shellDist = shell(colorDist, OUTLINE_WIDTH); - addElement(color, ACTIVE_COLOR * themeColorMultiplier, shellDist); + ADD_ELEMENT(color, ACTIVE_COLOR * themeColorMultiplier, shellDist); } currentY += colorSize.y + margin; @@ -629,23 +659,23 @@ float2 satOrigin = translate(uv, FRAME_MARGIN + float2(0, currentY)); float2 satSize = float2(colorSize.x, 0.2); float satDist = sdRoundedBoxTopLeft(satOrigin, satSize, CORNER_RADIUS); - addElement(color, drawSaturationValueArea(satOrigin, satSize) * themeColorMultiplier, satDist); + ADD_ELEMENT(color, drawSaturationValueArea(satOrigin, satSize) * themeColorMultiplier, satDist); // Hue float2 hueOrigin = translate(uv, FRAME_MARGIN + float2(satSize.x + margin, currentY)); float2 hueSize = float2(topAreaSize.x * 0.5 - margin * 0.5, 0.2); float hueDist = sdRoundedBoxTopLeft(hueOrigin, hueSize, CORNER_RADIUS); - addElement(color, drawHueArea(hueOrigin, hueSize) * themeColorMultiplier, hueDist); + ADD_ELEMENT(color, drawHueArea(hueOrigin, hueSize) * themeColorMultiplier, hueDist); // CC toggle float2 ccToggleOrigin = translate(uv, FRAME_MARGIN + float2(satSize.x + margin, currentY) + float2(hueSize.x + margin, 0)); float2 ccToggleSize = float2(colorSize.x, 0.2); float ccToggleDist = sdRoundedBoxTopLeft(ccToggleOrigin, ccToggleSize, CORNER_RADIUS); - addElement(color, drawColorChordToggle(ccToggleOrigin, ccToggleSize) * colorChordMultiplier, ccToggleDist); + ADD_ELEMENT(color, drawColorChordToggle(ccToggleOrigin, ccToggleSize) * colorChordMultiplier, ccToggleDist); if (_ThemeColorMode == 0) { float shellDist = shell(ccToggleDist, OUTLINE_WIDTH); - addElement(color, ACTIVE_COLOR, shellDist); + ADD_ELEMENT(color, ACTIVE_COLOR, shellDist); } return color;