From 145c53d48dd03b68aad9ad46a4b19a8857711889 Mon Sep 17 00:00:00 2001 From: Pema Malling Date: Sun, 8 Sep 2024 16:26:02 +0200 Subject: [PATCH] Revert fundale's postprocessing script --- CHANGELOG.md | 2 +- .../Runtime/AudioLink.asmdef | 11 +--- .../Scripts/AudioReactivePostProcessing.asset | 53 ------------------- .../AudioReactivePostProcessing.asset.meta | 8 --- .../Scripts/AudioReactivePostProcessing.cs | 50 ----------------- .../AudioReactivePostProcessing.cs.meta | 11 ---- README.md | 2 +- 7 files changed, 4 insertions(+), 133 deletions(-) delete mode 100644 Packages/com.llealloo.audiolink/Runtime/Scripts/AudioReactivePostProcessing.asset delete mode 100644 Packages/com.llealloo.audiolink/Runtime/Scripts/AudioReactivePostProcessing.asset.meta delete mode 100644 Packages/com.llealloo.audiolink/Runtime/Scripts/AudioReactivePostProcessing.cs delete mode 100644 Packages/com.llealloo.audiolink/Runtime/Scripts/AudioReactivePostProcessing.cs.meta diff --git a/CHANGELOG.md b/CHANGELOG.md index 345540d9..6954078c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ ### New features - Added the ability to adjust how the AudioLink controller is synced. You can sync every part of it, none of it, or everything except the gain and power controls. (fundale) - Added support for dual mono audio sources, for cases where you want to supply the left and right channel from separate sources. (fundale) -- Added utility scripts for driving PostProcessing and blend shapes with AudioLink. These are called AudioReactivePostProcessing and AudioReactiveBlendshapes respectively. Just add them to a GameObject that has a PostProcessing component or SkinnedMeshRenderer to use. (fundale) +- Added a utility script for driving blend shapes with AudioLink - AudioReactiveBlendshapes. Just add the script to a GameObject that has a SkinnedMeshRenderer to use. (fundale) ### Changes - Lowered the default volume for the AudioLink avatar prefab a bit. (pema) diff --git a/Packages/com.llealloo.audiolink/Runtime/AudioLink.asmdef b/Packages/com.llealloo.audiolink/Runtime/AudioLink.asmdef index ba2085b6..c807af87 100644 --- a/Packages/com.llealloo.audiolink/Runtime/AudioLink.asmdef +++ b/Packages/com.llealloo.audiolink/Runtime/AudioLink.asmdef @@ -4,8 +4,7 @@ "references": [ "UdonSharp.Runtime", "UdonSharp.Lib", - "VRC.Udon", - "Unity.Postprocessing.Runtime" + "VRC.Udon" ], "includePlatforms": [], "excludePlatforms": [], @@ -14,12 +13,6 @@ "precompiledReferences": [], "autoReferenced": true, "defineConstraints": [], - "versionDefines": [ - { - "name": "com.unity.postprocessing", - "expression": "", - "define": "AUDIOLINK_HAS_POSTPROCESSING" - } - ], + "versionDefines": [], "noEngineReferences": false } \ No newline at end of file diff --git a/Packages/com.llealloo.audiolink/Runtime/Scripts/AudioReactivePostProcessing.asset b/Packages/com.llealloo.audiolink/Runtime/Scripts/AudioReactivePostProcessing.asset deleted file mode 100644 index 45f6e64a..00000000 --- a/Packages/com.llealloo.audiolink/Runtime/Scripts/AudioReactivePostProcessing.asset +++ /dev/null @@ -1,53 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!114 &11400000 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3} - m_Name: AudioReactivePostProcessing - m_EditorClassIdentifier: - serializedUdonProgramAsset: {fileID: 11400000, guid: b40bbdcf74d1e4b4c8003e3cbcba3bc4, - type: 2} - udonAssembly: - assemblyError: - sourceCsScript: {fileID: 11500000, guid: 9e65caa84d314fbecad06c94af94b895, type: 3} - scriptVersion: 2 - compiledVersion: 2 - behaviourSyncMode: 0 - hasInteractEvent: 0 - scriptID: -6319341700778265667 - serializationData: - SerializedFormat: 2 - SerializedBytes: - ReferencedUnityObjects: [] - SerializedBytesString: - Prefab: {fileID: 0} - PrefabModificationsReferencedUnityObjects: [] - PrefabModifications: [] - SerializationNodes: - - Name: fieldDefinitions - Entry: 7 - Data: 0|System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[UdonSharp.Compiler.FieldDefinition, - UdonSharp.Editor]], mscorlib - - Name: comparer - Entry: 7 - Data: 1|System.Collections.Generic.GenericEqualityComparer`1[[System.String, - mscorlib]], mscorlib - - Name: - Entry: 8 - Data: - - Name: - Entry: 12 - Data: 0 - - Name: - Entry: 13 - Data: - - Name: - Entry: 8 - Data: diff --git a/Packages/com.llealloo.audiolink/Runtime/Scripts/AudioReactivePostProcessing.asset.meta b/Packages/com.llealloo.audiolink/Runtime/Scripts/AudioReactivePostProcessing.asset.meta deleted file mode 100644 index e5f8e947..00000000 --- a/Packages/com.llealloo.audiolink/Runtime/Scripts/AudioReactivePostProcessing.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: e30221b772a7d29fd986a9f63e347037 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Packages/com.llealloo.audiolink/Runtime/Scripts/AudioReactivePostProcessing.cs b/Packages/com.llealloo.audiolink/Runtime/Scripts/AudioReactivePostProcessing.cs deleted file mode 100644 index 244694ef..00000000 --- a/Packages/com.llealloo.audiolink/Runtime/Scripts/AudioReactivePostProcessing.cs +++ /dev/null @@ -1,50 +0,0 @@ -using UnityEngine; - -namespace AudioLink -{ -#if AUDIOLINK_HAS_POSTPROCESSING -#if UDONSHARP - using UdonSharp; - using UnityEngine.Rendering.PostProcessing; - - [RequireComponent(typeof(PostProcessVolume))] - public class AudioReactivePostProcessing : UdonSharpBehaviour -#else - [RequireComponent(typeof(PostProcessVolume))] - public class AudioReactivePostProcessing : MonoBehaviour -#endif - { - public AudioLink audioLink; - public int band; - [Range(0, 127)] - public int delay; - public float weight = 1; - public float minWeight = 0; - - private PostProcessVolume _postProcessVolume; - - void Start() - { - _postProcessVolume = transform.GetComponent(); - - } - - void Update() - { - if (audioLink.AudioDataIsAvailable()) - { - float amplitude = audioLink.GetDataAtPixel(delay, band).x; - _postProcessVolume.weight = Mathf.Lerp(minWeight, weight, amplitude); - } - } - - } -#else -#if UDONSHARP - using UdonSharp; - public class AudioReactivePostProcessing : UdonSharpBehaviour {} -#else - public class AudioReactivePostProcessing : MonoBehaviour {} -#endif -#endif -} diff --git a/Packages/com.llealloo.audiolink/Runtime/Scripts/AudioReactivePostProcessing.cs.meta b/Packages/com.llealloo.audiolink/Runtime/Scripts/AudioReactivePostProcessing.cs.meta deleted file mode 100644 index 6535afcf..00000000 --- a/Packages/com.llealloo.audiolink/Runtime/Scripts/AudioReactivePostProcessing.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 9e65caa84d314fbecad06c94af94b895 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/README.md b/README.md index 4469c710..c7bbc61f 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ The per-frequency audio amplitude data is first read briefly into Udon using Uni ### New features - Added the ability to adjust how the AudioLink controller is synced. You can sync every part of it, none of it, or everything except the gain and power controls. (fundale) - Added support for dual mono audio sources, for cases where you want to supply the left and right channel from separate sources. (fundale) -- Added utility scripts for driving PostProcessing and blend shapes with AudioLink. These are called AudioReactivePostProcessing and AudioReactiveBlendshapes respectively. Just add them to a GameObject that has a PostProcessing component or SkinnedMeshRenderer to use. (fundale) +- Added a utility script for driving blend shapes with AudioLink - AudioReactiveBlendshapes. Just add the script to a GameObject that has a SkinnedMeshRenderer to use. (fundale) ### Changes - Lowered the default volume for the AudioLink avatar prefab a bit. (pema)