├── .github
├── FUNDING.yml
└── ISSUE_TEMPLATE
│ ├── bug_report.md
│ ├── custom.md
│ ├── feature_request.md
│ └── new_feature.md
├── .gitignore
├── CHANGELOG.md
├── CHANGELOG.md.meta
├── LICENSE
├── LICENSE.meta
├── Pictures~
├── SmartAssistantAudioDemoHD.png
├── SmartAssistantAudioDemoHD.png.meta
├── SmartAssistantAudioDemoHD.psd
└── SmartAssistantAudioDemoHD.psd.meta
├── README.md
├── README.md.meta
├── Samples~
└── Audio Visualizer Sample
│ ├── AudioClips.meta
│ ├── Blender.meta
│ ├── Blender
│ ├── HighResIcoSphere.blend
│ ├── HighResIcoSphere.blend.meta
│ ├── HighResIcoSphere.blend1
│ └── HighResIcoSphere.blend1.meta
│ ├── FBX.meta
│ ├── FBX
│ ├── HighResIcoSphere.fbx
│ └── HighResIcoSphere.fbx.meta
│ ├── Materials.meta
│ ├── Materials
│ ├── Wireframe.mat
│ └── Wireframe.mat.meta
│ ├── Scenes.meta
│ └── Scenes
│ ├── AudioVisualizerSample.unity
│ └── AudioVisualizerSample.unity.meta
├── VX.Audio.Editor.meta
├── VX.Audio.Editor
├── VX.Audio.Editor.asmdef
├── VX.Audio.Editor.asmdef.meta
├── WireframeGUI.cs
└── WireframeGUI.cs.meta
├── VX.Audio.meta
├── VX.Audio
├── AudioCore.cs
├── AudioCore.cs.meta
├── AudioInteraction.cs
├── AudioInteraction.cs.meta
├── AudioProcessor.cs
├── AudioProcessor.cs.meta
├── AudioProfile.cs
├── AudioProfile.cs.meta
├── AudioVisualizer.cs
├── AudioVisualizer.cs.meta
├── Shaders.meta
├── Shaders
│ ├── WireFrame.shader
│ ├── WireFrame.shader.meta
│ ├── WireframeFowardPass.hlsl
│ ├── WireframeFowardPass.hlsl.meta
│ ├── WireframeInput.hlsl
│ └── WireframeInput.hlsl.meta
├── VFX.meta
├── VFX
│ ├── AudioVFXParticles.vfx
│ └── AudioVFXParticles.vfx.meta
├── VX.Audio.asmdef
└── VX.Audio.asmdef.meta
├── package.json
└── package.json.meta
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 |
3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4 | patreon: voxelltech
5 | open_collective: # Replace with a single Open Collective username
6 | ko_fi: # Replace with a single Ko-fi username
7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9 | liberapay: # Replace with a single Liberapay username
10 | issuehunt: # Replace with a single IssueHunt username
11 | otechie: # Replace with a single Otechie username
12 | custom: ["paypal.me/voxelltechnologies"]
13 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: Create a report to help us improve
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Describe the bug**
11 | A clear and concise description of what the bug is.
12 |
13 | **To Reproduce**
14 | Steps to reproduce the behavior:
15 | 1. Go to '...'
16 | 2. Click on '....'
17 | 3. Scroll down to '....'
18 | 4. See error
19 |
20 | **Expected behavior**
21 | A clear and concise description of what you expected to happen.
22 |
23 | **Screenshots**
24 | If applicable, add screenshots to help explain your problem.
25 |
26 | **Desktop (please complete the following information):**
27 | - OS: [e.g. iOS]
28 | - Browser [e.g. chrome, safari]
29 | - Version [e.g. 22]
30 |
31 | **Smartphone (please complete the following information):**
32 | - Device: [e.g. iPhone6]
33 | - OS: [e.g. iOS8.1]
34 | - Browser [e.g. stock browser, safari]
35 | - Version [e.g. 22]
36 |
37 | **Additional context**
38 | Add any other context about the problem here.
39 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/custom.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Custom issue template
3 | about: Describe this issue template's purpose here.
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature request
3 | about: Suggest an idea for this project
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Is your feature request related to a problem? Please describe.**
11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12 |
13 | **Describe the solution you'd like**
14 | A clear and concise description of what you want to happen.
15 |
16 | **Describe alternatives you've considered**
17 | A clear and concise description of any alternative solutions or features you've considered.
18 |
19 | **Additional context**
20 | Add any other context or screenshots about the feature request here.
21 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/new_feature.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: New Feature
3 | about: Creating a new feature for this project.
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Summary**
11 |
12 | A quick intro or summary on the feature you want to create.
13 |
14 | **Intended Outcome**
15 |
16 | - What is the use case of this?
17 | - How will it affect/benefit the project?
18 |
19 | **How will it work?**
20 |
21 | - How to use this feature?
22 |
23 | *finally, please assign yourself to this issue if you intend to work on this new feature thanks!*
24 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .vscode/
2 | __pycache__/
3 | checkpoints/
4 | inference/
5 | env/
6 | temp/
7 |
8 | # This .gitignore file should be placed at the root of your Unity project directory
9 | #
10 | # Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore
11 | #
12 | /[Ll]ibrary/
13 | /[Tt]emp/
14 | /[Oo]bj/
15 | /[Bb]uild/
16 | /[Bb]uilds/
17 | /[Ll]ogs/
18 | /[Uu]ser[Ss]ettings/
19 | /[Rr]ecordings/
20 | /[Rr]eleases/
21 | /[Rr]elease/
22 |
23 |
24 | # MemoryCaptures can get excessive in size.
25 | # They also could contain extremely sensitive data
26 | /[Mm]emoryCaptures/
27 |
28 | # Asset meta data should only be ignored when the corresponding asset is also ignored
29 | !/[Aa]ssets/**/*.meta
30 |
31 | # Uncomment this line if you wish to ignore the asset store tools plugin
32 | # /[Aa]ssets/AssetStoreTools*
33 |
34 | # Autogenerated Jetbrains Rider plugin
35 | /[Aa]ssets/Plugins/Editor/JetBrains*
36 |
37 | # Visual Studio cache directory
38 | .vs/
39 |
40 | # Gradle cache directory
41 | .gradle/
42 |
43 | # Autogenerated VS/MD/Consulo solution and project files
44 | ExportedObj/
45 | .consulo/
46 | *.csproj
47 | *.unityproj
48 | *.sln
49 | *.suo
50 | *.tmp
51 | *.user
52 | *.userprefs
53 | *.pidb
54 | *.booproj
55 | *.svd
56 | *.pdb
57 | *.mdb
58 | *.opendb
59 | *.VC.db
60 |
61 | # Unity3D generated meta files
62 | *.pidb.meta
63 | *.pdb.meta
64 | *.mdb.meta
65 |
66 | # Unity3D generated file on crash reports
67 | sysinfo.txt
68 |
69 | # Builds
70 | *.apk
71 | *.aab
72 | *.unitypackage
73 | *.unitypackage.meta
74 | *.exe
75 |
76 | # Crashlytics generated file
77 | crashlytics-build.properties
78 |
79 | # Packed Addressables
80 | /[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin*
81 |
82 | # Temporary auto-generated Android Assets
83 | /[Aa]ssets/[Ss]treamingAssets/aa.meta
84 | /[Aa]ssets/[Ss]treamingAssets/aa/*
85 |
86 | # Tensorflow trained checkpoints and weights
87 | *.h5
88 | *.h5.meta
89 | *.pbmm
90 | *.pbmm.meta
91 | *.tflite
92 | *.tflite.meta
93 |
94 | # API keys
95 | *.apikey
96 |
97 | # pycaches
98 | *.pyc
99 |
100 | # audio files
101 | AudioClips/
102 | *.mp3
103 | *.wav
104 |
105 | # license
106 | LICENSE.meta
107 |
108 | # large libraries
109 | native/
110 | tensorflow.dll
111 | tensorflow.dll.meta
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ## [1.2.1]
2 |
3 | ### Changes
4 |
5 | Add in VX.Audio (remove *.audio from `.gitignore`).
6 |
7 | ## [1.2.0]
8 |
9 | ### Changes
10 |
11 | Update to match UnityUtil 1.4.0 API calls.
12 |
13 | ## [1.1.0]
14 |
15 | ### Changes
16 |
17 | - Randomization of triangle indices to generate a more randomized visulizer.
18 |
19 | ## [1.0.0]
20 |
21 | - Initial release.
--------------------------------------------------------------------------------
/CHANGELOG.md.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1c82b89ad0a396a4c8c0ad992754a282
3 | TextScriptImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "[]"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright 2021 Voxell Technologies
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
--------------------------------------------------------------------------------
/LICENSE.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f419748ee21f85c468f1012d9c92cc9c
3 | DefaultImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Pictures~/SmartAssistantAudioDemoHD.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nixon-voxell/UnityAudioVisualizer/4cf5935c20cd5f5cfaecd8ae6cd70e4fa784bb33/Pictures~/SmartAssistantAudioDemoHD.png
--------------------------------------------------------------------------------
/Pictures~/SmartAssistantAudioDemoHD.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: db12abf698a1485478e7cafe37f93384
3 | TextureImporter:
4 | internalIDToNameTable: []
5 | externalObjects: {}
6 | serializedVersion: 11
7 | mipmaps:
8 | mipMapMode: 0
9 | enableMipMap: 1
10 | sRGBTexture: 1
11 | linearTexture: 0
12 | fadeOut: 0
13 | borderMipMap: 0
14 | mipMapsPreserveCoverage: 0
15 | alphaTestReferenceValue: 0.5
16 | mipMapFadeDistanceStart: 1
17 | mipMapFadeDistanceEnd: 3
18 | bumpmap:
19 | convertToNormalMap: 0
20 | externalNormalMap: 0
21 | heightScale: 0.25
22 | normalMapFilter: 0
23 | isReadable: 0
24 | streamingMipmaps: 0
25 | streamingMipmapsPriority: 0
26 | vTOnly: 0
27 | grayScaleToAlpha: 0
28 | generateCubemap: 6
29 | cubemapConvolution: 0
30 | seamlessCubemap: 0
31 | textureFormat: 1
32 | maxTextureSize: 2048
33 | textureSettings:
34 | serializedVersion: 2
35 | filterMode: -1
36 | aniso: 2
37 | mipBias: -100
38 | wrapU: 0
39 | wrapV: 0
40 | wrapW: 0
41 | nPOTScale: 1
42 | lightmap: 0
43 | compressionQuality: 50
44 | spriteMode: 0
45 | spriteExtrude: 1
46 | spriteMeshType: 1
47 | alignment: 0
48 | spritePivot: {x: 0.5, y: 0.5}
49 | spritePixelsToUnits: 100
50 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
51 | spriteGenerateFallbackPhysicsShape: 1
52 | alphaUsage: 1
53 | alphaIsTransparency: 0
54 | spriteTessellationDetail: -1
55 | textureType: 0
56 | textureShape: 1
57 | singleChannelComponent: 0
58 | flipbookRows: 1
59 | flipbookColumns: 1
60 | maxTextureSizeSet: 0
61 | compressionQualitySet: 0
62 | textureFormatSet: 0
63 | ignorePngGamma: 0
64 | applyGammaDecoding: 0
65 | platformSettings:
66 | - serializedVersion: 3
67 | buildTarget: DefaultTexturePlatform
68 | maxTextureSize: 8192
69 | resizeAlgorithm: 0
70 | textureFormat: -1
71 | textureCompression: 1
72 | compressionQuality: 50
73 | crunchedCompression: 0
74 | allowsAlphaSplitting: 0
75 | overridden: 0
76 | androidETC2FallbackOverride: 0
77 | forceMaximumCompressionQuality_BC6H_BC7: 0
78 | - serializedVersion: 3
79 | buildTarget: Standalone
80 | maxTextureSize: 8192
81 | resizeAlgorithm: 0
82 | textureFormat: -1
83 | textureCompression: 1
84 | compressionQuality: 50
85 | crunchedCompression: 0
86 | allowsAlphaSplitting: 0
87 | overridden: 0
88 | androidETC2FallbackOverride: 0
89 | forceMaximumCompressionQuality_BC6H_BC7: 0
90 | - serializedVersion: 3
91 | buildTarget: iPhone
92 | maxTextureSize: 8192
93 | resizeAlgorithm: 0
94 | textureFormat: -1
95 | textureCompression: 1
96 | compressionQuality: 50
97 | crunchedCompression: 0
98 | allowsAlphaSplitting: 0
99 | overridden: 0
100 | androidETC2FallbackOverride: 0
101 | forceMaximumCompressionQuality_BC6H_BC7: 0
102 | - serializedVersion: 3
103 | buildTarget: Android
104 | maxTextureSize: 8192
105 | resizeAlgorithm: 0
106 | textureFormat: -1
107 | textureCompression: 1
108 | compressionQuality: 50
109 | crunchedCompression: 0
110 | allowsAlphaSplitting: 0
111 | overridden: 0
112 | androidETC2FallbackOverride: 0
113 | forceMaximumCompressionQuality_BC6H_BC7: 0
114 | - serializedVersion: 3
115 | buildTarget: Windows Store Apps
116 | maxTextureSize: 8192
117 | resizeAlgorithm: 0
118 | textureFormat: -1
119 | textureCompression: 1
120 | compressionQuality: 50
121 | crunchedCompression: 0
122 | allowsAlphaSplitting: 0
123 | overridden: 0
124 | androidETC2FallbackOverride: 0
125 | forceMaximumCompressionQuality_BC6H_BC7: 0
126 | spriteSheet:
127 | serializedVersion: 2
128 | sprites: []
129 | outline: []
130 | physicsShape: []
131 | bones: []
132 | spriteID:
133 | internalID: 0
134 | vertices: []
135 | indices:
136 | edges: []
137 | weights: []
138 | secondaryTextures: []
139 | spritePackingTag:
140 | pSDRemoveMatte: 0
141 | pSDShowRemoveMatteOption: 0
142 | userData:
143 | assetBundleName:
144 | assetBundleVariant:
145 |
--------------------------------------------------------------------------------
/Pictures~/SmartAssistantAudioDemoHD.psd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nixon-voxell/UnityAudioVisualizer/4cf5935c20cd5f5cfaecd8ae6cd70e4fa784bb33/Pictures~/SmartAssistantAudioDemoHD.psd
--------------------------------------------------------------------------------
/Pictures~/SmartAssistantAudioDemoHD.psd.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 64cdc397388133546909939c5517dac4
3 | TextureImporter:
4 | internalIDToNameTable: []
5 | externalObjects: {}
6 | serializedVersion: 11
7 | mipmaps:
8 | mipMapMode: 0
9 | enableMipMap: 1
10 | sRGBTexture: 1
11 | linearTexture: 0
12 | fadeOut: 0
13 | borderMipMap: 0
14 | mipMapsPreserveCoverage: 0
15 | alphaTestReferenceValue: 0.5
16 | mipMapFadeDistanceStart: 1
17 | mipMapFadeDistanceEnd: 3
18 | bumpmap:
19 | convertToNormalMap: 0
20 | externalNormalMap: 0
21 | heightScale: 0.25
22 | normalMapFilter: 0
23 | isReadable: 0
24 | streamingMipmaps: 0
25 | streamingMipmapsPriority: 0
26 | vTOnly: 0
27 | grayScaleToAlpha: 0
28 | generateCubemap: 6
29 | cubemapConvolution: 0
30 | seamlessCubemap: 0
31 | textureFormat: 1
32 | maxTextureSize: 2048
33 | textureSettings:
34 | serializedVersion: 2
35 | filterMode: -1
36 | aniso: 2
37 | mipBias: -100
38 | wrapU: 0
39 | wrapV: 0
40 | wrapW: 0
41 | nPOTScale: 1
42 | lightmap: 0
43 | compressionQuality: 50
44 | spriteMode: 0
45 | spriteExtrude: 1
46 | spriteMeshType: 1
47 | alignment: 0
48 | spritePivot: {x: 0.5, y: 0.5}
49 | spritePixelsToUnits: 100
50 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
51 | spriteGenerateFallbackPhysicsShape: 1
52 | alphaUsage: 1
53 | alphaIsTransparency: 0
54 | spriteTessellationDetail: -1
55 | textureType: 0
56 | textureShape: 1
57 | singleChannelComponent: 0
58 | flipbookRows: 1
59 | flipbookColumns: 1
60 | maxTextureSizeSet: 0
61 | compressionQualitySet: 0
62 | textureFormatSet: 0
63 | ignorePngGamma: 0
64 | applyGammaDecoding: 0
65 | platformSettings:
66 | - serializedVersion: 3
67 | buildTarget: DefaultTexturePlatform
68 | maxTextureSize: 8192
69 | resizeAlgorithm: 0
70 | textureFormat: -1
71 | textureCompression: 1
72 | compressionQuality: 50
73 | crunchedCompression: 0
74 | allowsAlphaSplitting: 0
75 | overridden: 0
76 | androidETC2FallbackOverride: 0
77 | forceMaximumCompressionQuality_BC6H_BC7: 0
78 | - serializedVersion: 3
79 | buildTarget: Standalone
80 | maxTextureSize: 8192
81 | resizeAlgorithm: 0
82 | textureFormat: -1
83 | textureCompression: 1
84 | compressionQuality: 50
85 | crunchedCompression: 0
86 | allowsAlphaSplitting: 0
87 | overridden: 0
88 | androidETC2FallbackOverride: 0
89 | forceMaximumCompressionQuality_BC6H_BC7: 0
90 | - serializedVersion: 3
91 | buildTarget: iPhone
92 | maxTextureSize: 8192
93 | resizeAlgorithm: 0
94 | textureFormat: -1
95 | textureCompression: 1
96 | compressionQuality: 50
97 | crunchedCompression: 0
98 | allowsAlphaSplitting: 0
99 | overridden: 0
100 | androidETC2FallbackOverride: 0
101 | forceMaximumCompressionQuality_BC6H_BC7: 0
102 | - serializedVersion: 3
103 | buildTarget: Android
104 | maxTextureSize: 8192
105 | resizeAlgorithm: 0
106 | textureFormat: -1
107 | textureCompression: 1
108 | compressionQuality: 50
109 | crunchedCompression: 0
110 | allowsAlphaSplitting: 0
111 | overridden: 0
112 | androidETC2FallbackOverride: 0
113 | forceMaximumCompressionQuality_BC6H_BC7: 0
114 | - serializedVersion: 3
115 | buildTarget: Windows Store Apps
116 | maxTextureSize: 8192
117 | resizeAlgorithm: 0
118 | textureFormat: -1
119 | textureCompression: 1
120 | compressionQuality: 50
121 | crunchedCompression: 0
122 | allowsAlphaSplitting: 0
123 | overridden: 0
124 | androidETC2FallbackOverride: 0
125 | forceMaximumCompressionQuality_BC6H_BC7: 0
126 | spriteSheet:
127 | serializedVersion: 2
128 | sprites: []
129 | outline: []
130 | physicsShape: []
131 | bones: []
132 | spriteID:
133 | internalID: 0
134 | vertices: []
135 | indices:
136 | edges: []
137 | weights: []
138 | secondaryTextures: []
139 | spritePackingTag:
140 | pSDRemoveMatte: 0
141 | pSDShowRemoveMatteOption: 1
142 | userData:
143 | assetBundleName:
144 | assetBundleVariant:
145 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Unity Audio Visualizer
2 |
3 | 
4 |
5 | This is a package than handles audio processing and visualization. Anyone can use this package in any way they want as long as they credit the author(s) and also respect the [license](LICENSE) agreement.
6 |
7 | - [Unity Audio Visualizer](#unity-audio-visualizer)
8 | - [Audio Visualizer](#audio-visualizer)
9 | - [Installation](#installation)
10 | - [Support the project!](#support-the-project)
11 | - [Join the community!](#join-the-community)
12 | - [License](#license)
13 |
14 |
15 | ### Audio Visualizer
16 |
17 | The audio visualizer is made using custom VFX Graph and custom Shader (Wireframe Shader). It also utilizes Unity's Job System and Burst Compiler to manipulate each triangles of the mesh of the audio visualizer.
18 |
19 | ## Installation
20 |
21 | This package only supports the Universal Render Pipeline.
22 |
23 | External dependencies:
24 |
25 | - VX Util ([UnityUtil](https://github.com/voxell-tech/UnityUtil))
26 |
27 | 1. Setup a project with URP as it's SRP.
28 | 2. Clone the [UnityUtil](https://github.com/voxell-tech/UnityUtil) repository into your `Packages` folder.
29 | 3. Clone this repository into your `Packages` folder.
30 | 4. And you are ready to go!
31 |
32 | ## Support the project!
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 | ## Join the community!
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 | ## License
54 |
55 | This repository as a whole is licensed under the Apache License 2.0. Individual files may have a different, but compatible license.
--------------------------------------------------------------------------------
/README.md.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 43a59e75aa26b6340ab1b83c9602c42b
3 | TextScriptImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Samples~/Audio Visualizer Sample/AudioClips.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3bdf6d860266f0148aef91e0c49a589e
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Samples~/Audio Visualizer Sample/Blender.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c9db0dd88a46a0e41b4eaa65b7c55e12
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Samples~/Audio Visualizer Sample/Blender/HighResIcoSphere.blend:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nixon-voxell/UnityAudioVisualizer/4cf5935c20cd5f5cfaecd8ae6cd70e4fa784bb33/Samples~/Audio Visualizer Sample/Blender/HighResIcoSphere.blend
--------------------------------------------------------------------------------
/Samples~/Audio Visualizer Sample/Blender/HighResIcoSphere.blend.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0b5f8cdaa8d19e0478f0d715a56ec57a
3 | ModelImporter:
4 | serializedVersion: 21100
5 | internalIDToNameTable: []
6 | externalObjects: {}
7 | materials:
8 | materialImportMode: 2
9 | materialName: 0
10 | materialSearch: 1
11 | materialLocation: 1
12 | animations:
13 | legacyGenerateAnimations: 4
14 | bakeSimulation: 0
15 | resampleCurves: 1
16 | optimizeGameObjects: 0
17 | motionNodeName:
18 | rigImportErrors:
19 | rigImportWarnings:
20 | animationImportErrors:
21 | animationImportWarnings:
22 | animationRetargetingWarnings:
23 | animationDoRetargetingWarnings: 0
24 | importAnimatedCustomProperties: 0
25 | importConstraints: 0
26 | animationCompression: 1
27 | animationRotationError: 0.5
28 | animationPositionError: 0.5
29 | animationScaleError: 0.5
30 | animationWrapMode: 0
31 | extraExposedTransformPaths: []
32 | extraUserProperties: []
33 | clipAnimations: []
34 | isReadable: 1
35 | meshes:
36 | lODScreenPercentages: []
37 | globalScale: 1
38 | meshCompression: 0
39 | addColliders: 0
40 | useSRGBMaterialColor: 1
41 | sortHierarchyByName: 1
42 | importVisibility: 1
43 | importBlendShapes: 1
44 | importCameras: 0
45 | importLights: 0
46 | fileIdsGeneration: 2
47 | swapUVChannels: 0
48 | generateSecondaryUV: 0
49 | useFileUnits: 1
50 | keepQuads: 0
51 | weldVertices: 0
52 | bakeAxisConversion: 0
53 | preserveHierarchy: 1
54 | skinWeightsMode: 0
55 | maxBonesPerVertex: 4
56 | minBoneWeight: 0.001
57 | meshOptimizationFlags: -1
58 | indexFormat: 0
59 | secondaryUVAngleDistortion: 8
60 | secondaryUVAreaDistortion: 15.000001
61 | secondaryUVHardAngle: 88
62 | secondaryUVMarginMethod: 1
63 | secondaryUVMinLightmapResolution: 40
64 | secondaryUVMinObjectScale: 1
65 | secondaryUVPackMargin: 4
66 | useFileScale: 1
67 | tangentSpace:
68 | normalSmoothAngle: 60
69 | normalImportMode: 0
70 | tangentImportMode: 3
71 | normalCalculationMode: 4
72 | legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
73 | blendShapeNormalImportMode: 1
74 | normalSmoothingSource: 0
75 | referencedClips: []
76 | importAnimation: 1
77 | humanDescription:
78 | serializedVersion: 3
79 | human: []
80 | skeleton: []
81 | armTwist: 0.5
82 | foreArmTwist: 0.5
83 | upperLegTwist: 0.5
84 | legTwist: 0.5
85 | armStretch: 0.05
86 | legStretch: 0.05
87 | feetSpacing: 0
88 | globalScale: 1
89 | rootMotionBoneName:
90 | hasTranslationDoF: 0
91 | hasExtraRoot: 0
92 | skeletonHasParents: 1
93 | lastHumanDescriptionAvatarSource: {instanceID: 0}
94 | autoGenerateAvatarMappingIfUnspecified: 1
95 | animationType: 2
96 | humanoidOversampling: 1
97 | avatarSetup: 0
98 | addHumanoidExtraRootOnlyWhenUsingAvatar: 1
99 | additionalBone: 0
100 | userData:
101 | assetBundleName:
102 | assetBundleVariant:
103 |
--------------------------------------------------------------------------------
/Samples~/Audio Visualizer Sample/Blender/HighResIcoSphere.blend1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nixon-voxell/UnityAudioVisualizer/4cf5935c20cd5f5cfaecd8ae6cd70e4fa784bb33/Samples~/Audio Visualizer Sample/Blender/HighResIcoSphere.blend1
--------------------------------------------------------------------------------
/Samples~/Audio Visualizer Sample/Blender/HighResIcoSphere.blend1.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7e68098c1a20974439c4d8e88140677e
3 | DefaultImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Samples~/Audio Visualizer Sample/FBX.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 985d66a8c596b90438a1c4768587f2f9
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Samples~/Audio Visualizer Sample/FBX/HighResIcoSphere.fbx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nixon-voxell/UnityAudioVisualizer/4cf5935c20cd5f5cfaecd8ae6cd70e4fa784bb33/Samples~/Audio Visualizer Sample/FBX/HighResIcoSphere.fbx
--------------------------------------------------------------------------------
/Samples~/Audio Visualizer Sample/FBX/HighResIcoSphere.fbx.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8eac8a7a1ac0ba3428ddb098e5ab5c4d
3 | ModelImporter:
4 | serializedVersion: 21100
5 | internalIDToNameTable: []
6 | externalObjects: {}
7 | materials:
8 | materialImportMode: 2
9 | materialName: 0
10 | materialSearch: 1
11 | materialLocation: 1
12 | animations:
13 | legacyGenerateAnimations: 4
14 | bakeSimulation: 0
15 | resampleCurves: 1
16 | optimizeGameObjects: 0
17 | motionNodeName:
18 | rigImportErrors:
19 | rigImportWarnings:
20 | animationImportErrors:
21 | animationImportWarnings:
22 | animationRetargetingWarnings:
23 | animationDoRetargetingWarnings: 0
24 | importAnimatedCustomProperties: 0
25 | importConstraints: 0
26 | animationCompression: 1
27 | animationRotationError: 0.5
28 | animationPositionError: 0.5
29 | animationScaleError: 0.5
30 | animationWrapMode: 0
31 | extraExposedTransformPaths: []
32 | extraUserProperties: []
33 | clipAnimations: []
34 | isReadable: 1
35 | meshes:
36 | lODScreenPercentages: []
37 | globalScale: 1
38 | meshCompression: 0
39 | addColliders: 0
40 | useSRGBMaterialColor: 1
41 | sortHierarchyByName: 1
42 | importVisibility: 1
43 | importBlendShapes: 1
44 | importCameras: 1
45 | importLights: 1
46 | fileIdsGeneration: 2
47 | swapUVChannels: 0
48 | generateSecondaryUV: 0
49 | useFileUnits: 1
50 | keepQuads: 0
51 | weldVertices: 1
52 | bakeAxisConversion: 0
53 | preserveHierarchy: 0
54 | skinWeightsMode: 0
55 | maxBonesPerVertex: 4
56 | minBoneWeight: 0.001
57 | meshOptimizationFlags: -1
58 | indexFormat: 0
59 | secondaryUVAngleDistortion: 8
60 | secondaryUVAreaDistortion: 15.000001
61 | secondaryUVHardAngle: 88
62 | secondaryUVMarginMethod: 1
63 | secondaryUVMinLightmapResolution: 40
64 | secondaryUVMinObjectScale: 1
65 | secondaryUVPackMargin: 4
66 | useFileScale: 1
67 | tangentSpace:
68 | normalSmoothAngle: 60
69 | normalImportMode: 0
70 | tangentImportMode: 3
71 | normalCalculationMode: 4
72 | legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
73 | blendShapeNormalImportMode: 1
74 | normalSmoothingSource: 0
75 | referencedClips: []
76 | importAnimation: 1
77 | humanDescription:
78 | serializedVersion: 3
79 | human: []
80 | skeleton: []
81 | armTwist: 0.5
82 | foreArmTwist: 0.5
83 | upperLegTwist: 0.5
84 | legTwist: 0.5
85 | armStretch: 0.05
86 | legStretch: 0.05
87 | feetSpacing: 0
88 | globalScale: 1
89 | rootMotionBoneName:
90 | hasTranslationDoF: 0
91 | hasExtraRoot: 0
92 | skeletonHasParents: 1
93 | lastHumanDescriptionAvatarSource: {instanceID: 0}
94 | autoGenerateAvatarMappingIfUnspecified: 1
95 | animationType: 2
96 | humanoidOversampling: 1
97 | avatarSetup: 0
98 | addHumanoidExtraRootOnlyWhenUsingAvatar: 1
99 | additionalBone: 0
100 | userData:
101 | assetBundleName:
102 | assetBundleVariant:
103 |
--------------------------------------------------------------------------------
/Samples~/Audio Visualizer Sample/Materials.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6637fc1a1c034b3469a59d286dcced93
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Samples~/Audio Visualizer Sample/Materials/Wireframe.mat:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!21 &2100000
4 | Material:
5 | serializedVersion: 8
6 | m_ObjectHideFlags: 0
7 | m_CorrespondingSourceObject: {fileID: 0}
8 | m_PrefabInstance: {fileID: 0}
9 | m_PrefabAsset: {fileID: 0}
10 | m_Name: Wireframe
11 | m_Shader: {fileID: 4800000, guid: 232c95391ae79b947b22ce3c216bae9d, type: 3}
12 | m_Parent: {fileID: 0}
13 | m_ModifiedSerializedProperties: 0
14 | m_ValidKeywords: []
15 | m_InvalidKeywords: []
16 | m_LightmapFlags: 4
17 | m_EnableInstancingVariants: 0
18 | m_DoubleSidedGI: 0
19 | m_CustomRenderQueue: 2000
20 | stringTagMap:
21 | RenderType: Opaque
22 | disabledShaderPasses: []
23 | m_LockedProperties:
24 | m_SavedProperties:
25 | serializedVersion: 3
26 | m_TexEnvs:
27 | - _BaseMap:
28 | m_Texture: {fileID: 0}
29 | m_Scale: {x: 1, y: 1}
30 | m_Offset: {x: 0, y: 0}
31 | - _BumpMap:
32 | m_Texture: {fileID: 0}
33 | m_Scale: {x: 1, y: 1}
34 | m_Offset: {x: 0, y: 0}
35 | - _DetailAlbedoMap:
36 | m_Texture: {fileID: 0}
37 | m_Scale: {x: 1, y: 1}
38 | m_Offset: {x: 0, y: 0}
39 | - _DetailMask:
40 | m_Texture: {fileID: 0}
41 | m_Scale: {x: 1, y: 1}
42 | m_Offset: {x: 0, y: 0}
43 | - _DetailNormalMap:
44 | m_Texture: {fileID: 0}
45 | m_Scale: {x: 1, y: 1}
46 | m_Offset: {x: 0, y: 0}
47 | - _EmissionMap:
48 | m_Texture: {fileID: 0}
49 | m_Scale: {x: 1, y: 1}
50 | m_Offset: {x: 0, y: 0}
51 | - _MainTex:
52 | m_Texture: {fileID: 0}
53 | m_Scale: {x: 1, y: 1}
54 | m_Offset: {x: 0, y: 0}
55 | - _MetallicGlossMap:
56 | m_Texture: {fileID: 0}
57 | m_Scale: {x: 1, y: 1}
58 | m_Offset: {x: 0, y: 0}
59 | - _OcclusionMap:
60 | m_Texture: {fileID: 0}
61 | m_Scale: {x: 1, y: 1}
62 | m_Offset: {x: 0, y: 0}
63 | - _ParallaxMap:
64 | m_Texture: {fileID: 0}
65 | m_Scale: {x: 1, y: 1}
66 | m_Offset: {x: 0, y: 0}
67 | - _SpecGlossMap:
68 | m_Texture: {fileID: 0}
69 | m_Scale: {x: 1, y: 1}
70 | m_Offset: {x: 0, y: 0}
71 | - unity_Lightmaps:
72 | m_Texture: {fileID: 0}
73 | m_Scale: {x: 1, y: 1}
74 | m_Offset: {x: 0, y: 0}
75 | - unity_LightmapsInd:
76 | m_Texture: {fileID: 0}
77 | m_Scale: {x: 1, y: 1}
78 | m_Offset: {x: 0, y: 0}
79 | - unity_ShadowMasks:
80 | m_Texture: {fileID: 0}
81 | m_Scale: {x: 1, y: 1}
82 | m_Offset: {x: 0, y: 0}
83 | m_Ints: []
84 | m_Floats:
85 | - _AlphaClip: 0
86 | - _Blend: 0
87 | - _BumpScale: 1
88 | - _ClearCoatMask: 0
89 | - _ClearCoatSmoothness: 0
90 | - _Cull: 2
91 | - _Cutoff: 0.5
92 | - _DetailAlbedoMapScale: 1
93 | - _DetailNormalMapScale: 1
94 | - _DstBlend: 0
95 | - _EnvironmentReflections: 1
96 | - _GlossMapScale: 0
97 | - _Glossiness: 0
98 | - _GlossinessSource: 0
99 | - _GlossyReflections: 0
100 | - _Metallic: 0.8
101 | - _OcclusionStrength: 1
102 | - _Parallax: 0.005
103 | - _QueueOffset: 0
104 | - _ReceiveShadows: 1
105 | - _Shininess: 0
106 | - _Smoothness: 0.8
107 | - _SmoothnessSource: 1
108 | - _SmoothnessTextureChannel: 0
109 | - _SpecSource: 0
110 | - _SpecularHighlights: 1
111 | - _SrcBlend: 1
112 | - _Surface: 0
113 | - _WireThickness: 300
114 | - _WorkflowMode: 1
115 | - _ZWrite: 1
116 | m_Colors:
117 | - _BaseColor: {r: 0, g: 0.1750647, b: 0.26415092, a: 1}
118 | - _Color: {r: 1, g: 1, b: 1, a: 1}
119 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
120 | - _SpecColor: {r: 1, g: 1, b: 1, a: 0.5}
121 | - _WireColor: {r: 0, g: 3, b: 3, a: 1}
122 | m_BuildTextureStacks: []
123 |
--------------------------------------------------------------------------------
/Samples~/Audio Visualizer Sample/Materials/Wireframe.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4533780757671614185f19071ffd3b7a
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 2100000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Samples~/Audio Visualizer Sample/Scenes.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 186f4913c9830694d861f6502d09c70f
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Samples~/Audio Visualizer Sample/Scenes/AudioVisualizerSample.unity:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!29 &1
4 | OcclusionCullingSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_OcclusionBakeSettings:
8 | smallestOccluder: 5
9 | smallestHole: 0.25
10 | backfaceThreshold: 100
11 | m_SceneGUID: 00000000000000000000000000000000
12 | m_OcclusionCullingData: {fileID: 0}
13 | --- !u!104 &2
14 | RenderSettings:
15 | m_ObjectHideFlags: 0
16 | serializedVersion: 9
17 | m_Fog: 1
18 | m_FogColor: {r: 0.65080994, g: 0.666729, b: 0.7075472, a: 1}
19 | m_FogMode: 3
20 | m_FogDensity: 0.05
21 | m_LinearFogStart: 0
22 | m_LinearFogEnd: 300
23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
26 | m_AmbientIntensity: 1
27 | m_AmbientMode: 0
28 | m_SubtractiveShadowColor: {r: 0.13296545, g: 0.19145328, b: 0.33962262, a: 1}
29 | m_SkyboxMaterial: {fileID: 2100000, guid: 0ffaa0b7117ba8c47a9d05ae701d4b4d, type: 2}
30 | m_HaloStrength: 0.5
31 | m_FlareStrength: 1
32 | m_FlareFadeSpeed: 3
33 | m_HaloTexture: {fileID: 0}
34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
35 | m_DefaultReflectionMode: 0
36 | m_DefaultReflectionResolution: 128
37 | m_ReflectionBounces: 1
38 | m_ReflectionIntensity: 1
39 | m_CustomReflection: {fileID: 0}
40 | m_Sun: {fileID: 2138677392}
41 | m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
42 | m_UseRadianceAmbientProbe: 0
43 | --- !u!157 &3
44 | LightmapSettings:
45 | m_ObjectHideFlags: 0
46 | serializedVersion: 12
47 | m_GIWorkflowMode: 0
48 | m_GISettings:
49 | serializedVersion: 2
50 | m_BounceScale: 1
51 | m_IndirectOutputScale: 1
52 | m_AlbedoBoost: 1
53 | m_EnvironmentLightingMode: 1
54 | m_EnableBakedLightmaps: 1
55 | m_EnableRealtimeLightmaps: 0
56 | m_LightmapEditorSettings:
57 | serializedVersion: 12
58 | m_Resolution: 2
59 | m_BakeResolution: 32
60 | m_AtlasSize: 512
61 | m_AO: 1
62 | m_AOMaxDistance: 1
63 | m_CompAOExponent: 1
64 | m_CompAOExponentDirect: 0.3
65 | m_ExtractAmbientOcclusion: 0
66 | m_Padding: 2
67 | m_LightmapParameters: {fileID: 0}
68 | m_LightmapsBakeMode: 0
69 | m_TextureCompression: 1
70 | m_FinalGather: 0
71 | m_FinalGatherFiltering: 1
72 | m_FinalGatherRayCount: 256
73 | m_ReflectionCompression: 2
74 | m_MixedBakeMode: 1
75 | m_BakeBackend: 1
76 | m_PVRSampling: 1
77 | m_PVRDirectSampleCount: 32
78 | m_PVRSampleCount: 256
79 | m_PVRBounces: 2
80 | m_PVREnvironmentSampleCount: 256
81 | m_PVREnvironmentReferencePointCount: 2048
82 | m_PVRFilteringMode: 2
83 | m_PVRDenoiserTypeDirect: 0
84 | m_PVRDenoiserTypeIndirect: 0
85 | m_PVRDenoiserTypeAO: 0
86 | m_PVRFilterTypeDirect: 0
87 | m_PVRFilterTypeIndirect: 0
88 | m_PVRFilterTypeAO: 0
89 | m_PVREnvironmentMIS: 0
90 | m_PVRCulling: 1
91 | m_PVRFilteringGaussRadiusDirect: 1
92 | m_PVRFilteringGaussRadiusIndirect: 5
93 | m_PVRFilteringGaussRadiusAO: 2
94 | m_PVRFilteringAtrousPositionSigmaDirect: 0.548
95 | m_PVRFilteringAtrousPositionSigmaIndirect: 2
96 | m_PVRFilteringAtrousPositionSigmaAO: 1
97 | m_ExportTrainingData: 0
98 | m_TrainingDataDestination: TrainingData
99 | m_LightProbeSampleCountMultiplier: 4
100 | m_LightingDataAsset: {fileID: 0}
101 | m_LightingSettings: {fileID: 4890085278179872738, guid: 477cc4148fad3449482a3bc3178594e2, type: 2}
102 | --- !u!196 &4
103 | NavMeshSettings:
104 | serializedVersion: 2
105 | m_ObjectHideFlags: 0
106 | m_BuildSettings:
107 | serializedVersion: 3
108 | agentTypeID: 0
109 | agentRadius: 0.5
110 | agentHeight: 2
111 | agentSlope: 45
112 | agentClimb: 0.4
113 | ledgeDropHeight: 0
114 | maxJumpAcrossDistance: 0
115 | minRegionArea: 2
116 | manualCellSize: 0
117 | cellSize: 0.16666667
118 | manualTileSize: 0
119 | tileSize: 256
120 | buildHeightMesh: 0
121 | maxJobWorkers: 0
122 | preserveTilesOutsideBounds: 0
123 | debug:
124 | m_Flags: 0
125 | m_NavMeshData: {fileID: 0}
126 | --- !u!1 &275060726
127 | GameObject:
128 | m_ObjectHideFlags: 0
129 | m_CorrespondingSourceObject: {fileID: 0}
130 | m_PrefabInstance: {fileID: 0}
131 | m_PrefabAsset: {fileID: 0}
132 | serializedVersion: 6
133 | m_Component:
134 | - component: {fileID: 275060729}
135 | - component: {fileID: 275060727}
136 | - component: {fileID: 275060728}
137 | - component: {fileID: 275060732}
138 | - component: {fileID: 275060730}
139 | m_Layer: 0
140 | m_Name: AudioVisualizer
141 | m_TagString: Untagged
142 | m_Icon: {fileID: 0}
143 | m_NavMeshLayer: 0
144 | m_StaticEditorFlags: 0
145 | m_IsActive: 1
146 | --- !u!73398921 &275060727
147 | VFXRenderer:
148 | serializedVersion: 1
149 | m_ObjectHideFlags: 2
150 | m_CorrespondingSourceObject: {fileID: 0}
151 | m_PrefabInstance: {fileID: 0}
152 | m_PrefabAsset: {fileID: 0}
153 | m_GameObject: {fileID: 275060726}
154 | m_Enabled: 1
155 | m_CastShadows: 0
156 | m_ReceiveShadows: 0
157 | m_DynamicOccludee: 1
158 | m_StaticShadowCaster: 0
159 | m_MotionVectors: 0
160 | m_LightProbeUsage: 0
161 | m_ReflectionProbeUsage: 0
162 | m_RayTracingMode: 0
163 | m_RayTraceProcedural: 0
164 | m_RenderingLayerMask: 1
165 | m_RendererPriority: 0
166 | m_StaticBatchInfo:
167 | firstSubMesh: 0
168 | subMeshCount: 0
169 | m_StaticBatchRoot: {fileID: 0}
170 | m_ProbeAnchor: {fileID: 0}
171 | m_LightProbeVolumeOverride: {fileID: 0}
172 | m_ScaleInLightmap: 1
173 | m_ReceiveGI: 1
174 | m_PreserveUVs: 0
175 | m_IgnoreNormalsForChartDetection: 0
176 | m_ImportantGI: 0
177 | m_StitchLightmapSeams: 1
178 | m_SelectedEditorRenderState: 3
179 | m_MinimumChartSize: 4
180 | m_AutoUVMaxDistance: 0.5
181 | m_AutoUVMaxAngle: 89
182 | m_LightmapParameters: {fileID: 0}
183 | m_SortingLayerID: 0
184 | m_SortingLayer: 0
185 | m_SortingOrder: 0
186 | --- !u!2083052967 &275060728
187 | VisualEffect:
188 | m_ObjectHideFlags: 0
189 | m_CorrespondingSourceObject: {fileID: 0}
190 | m_PrefabInstance: {fileID: 0}
191 | m_PrefabAsset: {fileID: 0}
192 | m_GameObject: {fileID: 275060726}
193 | m_Enabled: 1
194 | m_Asset: {fileID: 8926484042661614526, guid: 8edffe4b8b0441847aa9ed1e2915e1a3, type: 3}
195 | m_InitialEventName: OnPlaya
196 | m_InitialEventNameOverriden: 0
197 | m_StartSeed: 0
198 | m_ResetSeedOnPlay: 1
199 | m_AllowInstancing: 1
200 | m_ResourceVersion: 1
201 | m_PropertySheet:
202 | m_Float:
203 | m_Array:
204 | - m_Value: 0.2
205 | m_Name: Noise Speed
206 | m_Overridden: 0
207 | - m_Value: 0
208 | m_Name: Intensity
209 | m_Overridden: 0
210 | - m_Value: 0.5
211 | m_Name: Radius
212 | m_Overridden: 0
213 | - m_Value: 3
214 | m_Name: ParticleLifetime
215 | m_Overridden: 0
216 | - m_Value: 0.2
217 | m_Name: SpawnParticles
218 | m_Overridden: 0
219 | - m_Value: 30
220 | m_Name: DragCoefficient
221 | m_Overridden: 0
222 | - m_Value: 0.5
223 | m_Name: NoiseSpeed
224 | m_Overridden: 1
225 | - m_Value: 0
226 | m_Name: NoisePositionAddition
227 | m_Overridden: 0
228 | - m_Value: 0.05
229 | m_Name: NoiseIntensity
230 | m_Overridden: 1
231 | - m_Value: 0.1
232 | m_Name: IdleNoiseSpeed
233 | m_Overridden: 1
234 | - m_Value: 50
235 | m_Name: ForceMultiplier
236 | m_Overridden: 1
237 | - m_Value: 0.1
238 | m_Name: MinDistance
239 | m_Overridden: 1
240 | m_Vector2f:
241 | m_Array: []
242 | m_Vector3f:
243 | m_Array:
244 | - m_Value: {x: 1, y: 1, z: 1}
245 | m_Name: NoiseScale
246 | m_Overridden: 1
247 | m_Vector4f:
248 | m_Array:
249 | - m_Value: {x: 0, y: 0, z: 0, w: 0}
250 | m_Name: Audio5
251 | m_Overridden: 0
252 | - m_Value: {x: 0, y: 0, z: 0, w: 0}
253 | m_Name: Audio1
254 | m_Overridden: 0
255 | m_Uint:
256 | m_Array: []
257 | m_Int:
258 | m_Array:
259 | - m_Value: 1280
260 | m_Name: TriangleCount
261 | m_Overridden: 1
262 | m_Matrix4x4f:
263 | m_Array: []
264 | m_AnimationCurve:
265 | m_Array: []
266 | m_Gradient:
267 | m_Array:
268 | - m_Value:
269 | serializedVersion: 2
270 | key0: {r: 0, g: 7.999999, b: 7.999999, a: 1}
271 | key1: {r: 0, g: 17.069427, b: 17.069427, a: 1}
272 | key2: {r: 21.277485, g: 0, b: 31.999996, a: 0}
273 | key3: {r: 0, g: 0, b: 0, a: 0}
274 | key4: {r: 0, g: 0, b: 0, a: 0}
275 | key5: {r: 0, g: 0, b: 0, a: 0}
276 | key6: {r: 0, g: 0, b: 0, a: 0}
277 | key7: {r: 0, g: 0, b: 0, a: 0}
278 | ctime0: 0
279 | ctime1: 32768
280 | ctime2: 65535
281 | ctime3: 0
282 | ctime4: 0
283 | ctime5: 0
284 | ctime6: 0
285 | ctime7: 0
286 | atime0: 0
287 | atime1: 65535
288 | atime2: 0
289 | atime3: 0
290 | atime4: 0
291 | atime5: 0
292 | atime6: 0
293 | atime7: 0
294 | m_Mode: 0
295 | m_ColorSpace: -1
296 | m_NumColorKeys: 3
297 | m_NumAlphaKeys: 2
298 | m_Name: ColorOverLife
299 | m_Overridden: 0
300 | - m_Value:
301 | serializedVersion: 2
302 | key0: {r: 0, g: 7.999999, b: 7.999999, a: 1}
303 | key1: {r: 0, g: 3.8981645, b: 17.069426, a: 1}
304 | key2: {r: 21.277485, g: 0, b: 31.999996, a: 0}
305 | key3: {r: 0, g: 0, b: 0, a: 0}
306 | key4: {r: 0, g: 0, b: 0, a: 0}
307 | key5: {r: 0, g: 0, b: 0, a: 0}
308 | key6: {r: 0, g: 0, b: 0, a: 0}
309 | key7: {r: 0, g: 0, b: 0, a: 0}
310 | ctime0: 0
311 | ctime1: 32768
312 | ctime2: 65535
313 | ctime3: 0
314 | ctime4: 0
315 | ctime5: 0
316 | ctime6: 0
317 | ctime7: 0
318 | atime0: 0
319 | atime1: 65535
320 | atime2: 0
321 | atime3: 0
322 | atime4: 0
323 | atime5: 0
324 | atime6: 0
325 | atime7: 0
326 | m_Mode: 0
327 | m_ColorSpace: -1
328 | m_NumColorKeys: 3
329 | m_NumAlphaKeys: 2
330 | m_Name: Color Gradient
331 | m_Overridden: 1
332 | m_NamedObject:
333 | m_Array:
334 | - m_Value: {fileID: 289301614986012343, guid: 8eac8a7a1ac0ba3428ddb098e5ab5c4d, type: 3}
335 | m_Name: SampleMesh
336 | m_Overridden: 1
337 | - m_Value: {fileID: 289301614986012343, guid: 8eac8a7a1ac0ba3428ddb098e5ab5c4d, type: 3}
338 | m_Name: OriginMesh
339 | m_Overridden: 1
340 | m_Bool:
341 | m_Array: []
342 | --- !u!4 &275060729
343 | Transform:
344 | m_ObjectHideFlags: 0
345 | m_CorrespondingSourceObject: {fileID: 0}
346 | m_PrefabInstance: {fileID: 0}
347 | m_PrefabAsset: {fileID: 0}
348 | m_GameObject: {fileID: 275060726}
349 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
350 | m_LocalPosition: {x: 0, y: 0, z: -5}
351 | m_LocalScale: {x: 1, y: 1, z: 1}
352 | m_ConstrainProportionsScale: 0
353 | m_Children:
354 | - {fileID: 473425279}
355 | m_Father: {fileID: 0}
356 | m_RootOrder: 3
357 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
358 | --- !u!114 &275060730
359 | MonoBehaviour:
360 | m_ObjectHideFlags: 0
361 | m_CorrespondingSourceObject: {fileID: 0}
362 | m_PrefabInstance: {fileID: 0}
363 | m_PrefabAsset: {fileID: 0}
364 | m_GameObject: {fileID: 275060726}
365 | m_Enabled: 1
366 | m_EditorHideFlags: 0
367 | m_Script: {fileID: 11500000, guid: ac0faf44a08a76a4e86ff920ebb28e53, type: 3}
368 | m_Name:
369 | m_EditorClassIdentifier:
370 | idleVelocity: {x: 0.5, y: -0.5}
371 | idleNoiseIntensity: 0.05
372 | maxNoiseIntensity: 0.3
373 | rotationMultiplier: 500
374 | velocityDamping: 0.9
375 | intensityCoefficient: 0.1
376 | audioSource: {fileID: 275060732}
377 | audioProfile:
378 | channel: 0
379 | window: 4
380 | sampleSize: 4096
381 | power: 1.1
382 | scale: 3
383 | smoothingIterations: 10
384 | frequencyRange: 5000
385 | bandSize: 1280
386 | audioVFX: {fileID: 275060728}
387 | meshFilter: {fileID: 473425281}
388 | sampleMesh: {fileID: 289301614986012343, guid: 8eac8a7a1ac0ba3428ddb098e5ab5c4d, type: 3}
389 | velocityMultiplier: 0.8
390 | batchSize: 100
391 | totalTriangles: 1280
392 | --- !u!82 &275060732
393 | AudioSource:
394 | m_ObjectHideFlags: 0
395 | m_CorrespondingSourceObject: {fileID: 0}
396 | m_PrefabInstance: {fileID: 0}
397 | m_PrefabAsset: {fileID: 0}
398 | m_GameObject: {fileID: 275060726}
399 | m_Enabled: 1
400 | serializedVersion: 4
401 | OutputAudioMixerGroup: {fileID: 0}
402 | m_audioClip: {fileID: 8300000, guid: 8348611d6fcf0ec449ed561d0b38774b, type: 3}
403 | m_PlayOnAwake: 1
404 | m_Volume: 1
405 | m_Pitch: 1
406 | Loop: 0
407 | Mute: 0
408 | Spatialize: 0
409 | SpatializePostEffects: 0
410 | Priority: 128
411 | DopplerLevel: 1
412 | MinDistance: 1
413 | MaxDistance: 2
414 | Pan2D: 0
415 | rolloffMode: 0
416 | BypassEffects: 0
417 | BypassListenerEffects: 0
418 | BypassReverbZones: 0
419 | rolloffCustomCurve:
420 | serializedVersion: 2
421 | m_Curve:
422 | - serializedVersion: 3
423 | time: 0
424 | value: 1
425 | inSlope: 0
426 | outSlope: 0
427 | tangentMode: 0
428 | weightedMode: 0
429 | inWeight: 0.33333334
430 | outWeight: 0.33333334
431 | - serializedVersion: 3
432 | time: 1
433 | value: 0
434 | inSlope: 0
435 | outSlope: 0
436 | tangentMode: 0
437 | weightedMode: 0
438 | inWeight: 0.33333334
439 | outWeight: 0.33333334
440 | m_PreInfinity: 2
441 | m_PostInfinity: 2
442 | m_RotationOrder: 4
443 | panLevelCustomCurve:
444 | serializedVersion: 2
445 | m_Curve:
446 | - serializedVersion: 3
447 | time: 0
448 | value: 0
449 | inSlope: 0
450 | outSlope: 0
451 | tangentMode: 0
452 | weightedMode: 0
453 | inWeight: 0.33333334
454 | outWeight: 0.33333334
455 | m_PreInfinity: 2
456 | m_PostInfinity: 2
457 | m_RotationOrder: 4
458 | spreadCustomCurve:
459 | serializedVersion: 2
460 | m_Curve:
461 | - serializedVersion: 3
462 | time: 0
463 | value: 0
464 | inSlope: 0
465 | outSlope: 0
466 | tangentMode: 0
467 | weightedMode: 0
468 | inWeight: 0.33333334
469 | outWeight: 0.33333334
470 | m_PreInfinity: 2
471 | m_PostInfinity: 2
472 | m_RotationOrder: 4
473 | reverbZoneMixCustomCurve:
474 | serializedVersion: 2
475 | m_Curve:
476 | - serializedVersion: 3
477 | time: 0
478 | value: 1
479 | inSlope: 0
480 | outSlope: 0
481 | tangentMode: 0
482 | weightedMode: 0
483 | inWeight: 0.33333334
484 | outWeight: 0.33333334
485 | m_PreInfinity: 2
486 | m_PostInfinity: 2
487 | m_RotationOrder: 4
488 | --- !u!1 &473425278
489 | GameObject:
490 | m_ObjectHideFlags: 0
491 | m_CorrespondingSourceObject: {fileID: 0}
492 | m_PrefabInstance: {fileID: 0}
493 | m_PrefabAsset: {fileID: 0}
494 | serializedVersion: 6
495 | m_Component:
496 | - component: {fileID: 473425279}
497 | - component: {fileID: 473425281}
498 | - component: {fileID: 473425280}
499 | m_Layer: 0
500 | m_Name: Mesh
501 | m_TagString: Untagged
502 | m_Icon: {fileID: 0}
503 | m_NavMeshLayer: 0
504 | m_StaticEditorFlags: 0
505 | m_IsActive: 1
506 | --- !u!4 &473425279
507 | Transform:
508 | m_ObjectHideFlags: 0
509 | m_CorrespondingSourceObject: {fileID: 0}
510 | m_PrefabInstance: {fileID: 0}
511 | m_PrefabAsset: {fileID: 0}
512 | m_GameObject: {fileID: 473425278}
513 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
514 | m_LocalPosition: {x: 0, y: 0, z: 0}
515 | m_LocalScale: {x: 1, y: 1, z: 1}
516 | m_ConstrainProportionsScale: 0
517 | m_Children: []
518 | m_Father: {fileID: 275060729}
519 | m_RootOrder: 0
520 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
521 | --- !u!23 &473425280
522 | MeshRenderer:
523 | m_ObjectHideFlags: 0
524 | m_CorrespondingSourceObject: {fileID: 0}
525 | m_PrefabInstance: {fileID: 0}
526 | m_PrefabAsset: {fileID: 0}
527 | m_GameObject: {fileID: 473425278}
528 | m_Enabled: 1
529 | m_CastShadows: 1
530 | m_ReceiveShadows: 1
531 | m_DynamicOccludee: 1
532 | m_StaticShadowCaster: 0
533 | m_MotionVectors: 1
534 | m_LightProbeUsage: 1
535 | m_ReflectionProbeUsage: 1
536 | m_RayTracingMode: 2
537 | m_RayTraceProcedural: 0
538 | m_RenderingLayerMask: 1
539 | m_RendererPriority: 0
540 | m_Materials:
541 | - {fileID: 2100000, guid: 4533780757671614185f19071ffd3b7a, type: 2}
542 | m_StaticBatchInfo:
543 | firstSubMesh: 0
544 | subMeshCount: 0
545 | m_StaticBatchRoot: {fileID: 0}
546 | m_ProbeAnchor: {fileID: 0}
547 | m_LightProbeVolumeOverride: {fileID: 0}
548 | m_ScaleInLightmap: 1
549 | m_ReceiveGI: 1
550 | m_PreserveUVs: 0
551 | m_IgnoreNormalsForChartDetection: 0
552 | m_ImportantGI: 0
553 | m_StitchLightmapSeams: 1
554 | m_SelectedEditorRenderState: 3
555 | m_MinimumChartSize: 4
556 | m_AutoUVMaxDistance: 0.5
557 | m_AutoUVMaxAngle: 89
558 | m_LightmapParameters: {fileID: 0}
559 | m_SortingLayerID: 0
560 | m_SortingLayer: 0
561 | m_SortingOrder: 0
562 | m_AdditionalVertexStreams: {fileID: 0}
563 | --- !u!33 &473425281
564 | MeshFilter:
565 | m_ObjectHideFlags: 0
566 | m_CorrespondingSourceObject: {fileID: 0}
567 | m_PrefabInstance: {fileID: 0}
568 | m_PrefabAsset: {fileID: 0}
569 | m_GameObject: {fileID: 473425278}
570 | m_Mesh: {fileID: 289301614986012343, guid: 8eac8a7a1ac0ba3428ddb098e5ab5c4d, type: 3}
571 | --- !u!1 &653260035
572 | GameObject:
573 | m_ObjectHideFlags: 0
574 | m_CorrespondingSourceObject: {fileID: 0}
575 | m_PrefabInstance: {fileID: 0}
576 | m_PrefabAsset: {fileID: 0}
577 | serializedVersion: 6
578 | m_Component:
579 | - component: {fileID: 653260038}
580 | - component: {fileID: 653260036}
581 | m_Layer: 0
582 | m_Name: Post-process Volume
583 | m_TagString: Untagged
584 | m_Icon: {fileID: 0}
585 | m_NavMeshLayer: 0
586 | m_StaticEditorFlags: 0
587 | m_IsActive: 1
588 | --- !u!114 &653260036
589 | MonoBehaviour:
590 | m_ObjectHideFlags: 0
591 | m_CorrespondingSourceObject: {fileID: 0}
592 | m_PrefabInstance: {fileID: 0}
593 | m_PrefabAsset: {fileID: 0}
594 | m_GameObject: {fileID: 653260035}
595 | m_Enabled: 1
596 | m_EditorHideFlags: 0
597 | m_Script: {fileID: 11500000, guid: 172515602e62fb746b5d573b38a5fe58, type: 3}
598 | m_Name:
599 | m_EditorClassIdentifier:
600 | m_IsGlobal: 1
601 | priority: 0
602 | blendDistance: 0
603 | weight: 1
604 | sharedProfile: {fileID: 11400000, guid: 10fc4df2da32a41aaa32d77bc913491c, type: 2}
605 | --- !u!4 &653260038
606 | Transform:
607 | m_ObjectHideFlags: 0
608 | m_CorrespondingSourceObject: {fileID: 0}
609 | m_PrefabInstance: {fileID: 0}
610 | m_PrefabAsset: {fileID: 0}
611 | m_GameObject: {fileID: 653260035}
612 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
613 | m_LocalPosition: {x: 0, y: 0, z: 0}
614 | m_LocalScale: {x: 1, y: 1, z: 1}
615 | m_ConstrainProportionsScale: 0
616 | m_Children: []
617 | m_Father: {fileID: 0}
618 | m_RootOrder: 2
619 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
620 | --- !u!1 &1687258581
621 | GameObject:
622 | m_ObjectHideFlags: 0
623 | m_CorrespondingSourceObject: {fileID: 0}
624 | m_PrefabInstance: {fileID: 0}
625 | m_PrefabAsset: {fileID: 0}
626 | serializedVersion: 6
627 | m_Component:
628 | - component: {fileID: 1687258585}
629 | - component: {fileID: 1687258584}
630 | - component: {fileID: 1687258586}
631 | - component: {fileID: 1687258582}
632 | - component: {fileID: 1687258583}
633 | - component: {fileID: 1687258587}
634 | m_Layer: 0
635 | m_Name: 3D Camera
636 | m_TagString: MainCamera
637 | m_Icon: {fileID: 0}
638 | m_NavMeshLayer: 0
639 | m_StaticEditorFlags: 0
640 | m_IsActive: 1
641 | --- !u!81 &1687258582
642 | AudioListener:
643 | m_ObjectHideFlags: 0
644 | m_CorrespondingSourceObject: {fileID: 0}
645 | m_PrefabInstance: {fileID: 0}
646 | m_PrefabAsset: {fileID: 0}
647 | m_GameObject: {fileID: 1687258581}
648 | m_Enabled: 1
649 | --- !u!114 &1687258583
650 | MonoBehaviour:
651 | m_ObjectHideFlags: 0
652 | m_CorrespondingSourceObject: {fileID: 0}
653 | m_PrefabInstance: {fileID: 0}
654 | m_PrefabAsset: {fileID: 0}
655 | m_GameObject: {fileID: 1687258581}
656 | m_Enabled: 1
657 | m_EditorHideFlags: 0
658 | m_Script: {fileID: 11500000, guid: be76e5f14cfee674cb30b491fb72b09b, type: 3}
659 | m_Name:
660 | m_EditorClassIdentifier:
661 | boost: 3.5
662 | positionLerpTime: 0.2
663 | mouseSensitivityCurve:
664 | serializedVersion: 2
665 | m_Curve:
666 | - serializedVersion: 3
667 | time: 0
668 | value: 0.5
669 | inSlope: 0
670 | outSlope: 5
671 | tangentMode: 0
672 | weightedMode: 0
673 | inWeight: 0
674 | outWeight: 0
675 | - serializedVersion: 3
676 | time: 1
677 | value: 2.5
678 | inSlope: 0
679 | outSlope: 0
680 | tangentMode: 0
681 | weightedMode: 0
682 | inWeight: 0
683 | outWeight: 0
684 | m_PreInfinity: 2
685 | m_PostInfinity: 2
686 | m_RotationOrder: 4
687 | rotationLerpTime: 0.01
688 | invertY: 0
689 | --- !u!20 &1687258584
690 | Camera:
691 | m_ObjectHideFlags: 0
692 | m_CorrespondingSourceObject: {fileID: 0}
693 | m_PrefabInstance: {fileID: 0}
694 | m_PrefabAsset: {fileID: 0}
695 | m_GameObject: {fileID: 1687258581}
696 | m_Enabled: 1
697 | serializedVersion: 2
698 | m_ClearFlags: 2
699 | m_BackGroundColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 0}
700 | m_projectionMatrixMode: 1
701 | m_GateFitMode: 2
702 | m_FOVAxisMode: 0
703 | m_Iso: 200
704 | m_ShutterSpeed: 0.005
705 | m_Aperture: 16
706 | m_FocusDistance: 10
707 | m_FocalLength: 50
708 | m_BladeCount: 5
709 | m_Curvature: {x: 2, y: 11}
710 | m_BarrelClipping: 0.25
711 | m_Anamorphism: 0
712 | m_SensorSize: {x: 36, y: 24}
713 | m_LensShift: {x: 0, y: 0}
714 | m_NormalizedViewPortRect:
715 | serializedVersion: 2
716 | x: 0
717 | y: 0
718 | width: 1
719 | height: 1
720 | near clip plane: 0.3
721 | far clip plane: 1000
722 | field of view: 60
723 | orthographic: 0
724 | orthographic size: 5
725 | m_Depth: -1
726 | m_CullingMask:
727 | serializedVersion: 2
728 | m_Bits: 55
729 | m_RenderingPath: -1
730 | m_TargetTexture: {fileID: 0}
731 | m_TargetDisplay: 0
732 | m_TargetEye: 3
733 | m_HDR: 1
734 | m_AllowMSAA: 1
735 | m_AllowDynamicResolution: 0
736 | m_ForceIntoRT: 0
737 | m_OcclusionCulling: 1
738 | m_StereoConvergence: 10
739 | m_StereoSeparation: 0.022
740 | --- !u!4 &1687258585
741 | Transform:
742 | m_ObjectHideFlags: 0
743 | m_CorrespondingSourceObject: {fileID: 0}
744 | m_PrefabInstance: {fileID: 0}
745 | m_PrefabAsset: {fileID: 0}
746 | m_GameObject: {fileID: 1687258581}
747 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
748 | m_LocalPosition: {x: 0, y: 0, z: -8}
749 | m_LocalScale: {x: 1, y: 1, z: 1}
750 | m_ConstrainProportionsScale: 0
751 | m_Children: []
752 | m_Father: {fileID: 0}
753 | m_RootOrder: 0
754 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
755 | --- !u!114 &1687258586
756 | MonoBehaviour:
757 | m_ObjectHideFlags: 0
758 | m_CorrespondingSourceObject: {fileID: 0}
759 | m_PrefabInstance: {fileID: 0}
760 | m_PrefabAsset: {fileID: 0}
761 | m_GameObject: {fileID: 1687258581}
762 | m_Enabled: 1
763 | m_EditorHideFlags: 0
764 | m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3}
765 | m_Name:
766 | m_EditorClassIdentifier:
767 | m_RenderShadows: 1
768 | m_RequiresDepthTextureOption: 2
769 | m_RequiresOpaqueTextureOption: 2
770 | m_CameraType: 0
771 | m_Cameras: []
772 | m_RendererIndex: 0
773 | m_VolumeLayerMask:
774 | serializedVersion: 2
775 | m_Bits: 1
776 | m_VolumeTrigger: {fileID: 0}
777 | m_VolumeFrameworkUpdateModeOption: 2
778 | m_RenderPostProcessing: 1
779 | m_Antialiasing: 2
780 | m_AntialiasingQuality: 2
781 | m_StopNaN: 1
782 | m_Dithering: 0
783 | m_ClearDepth: 1
784 | m_AllowXRRendering: 1
785 | m_AllowHDROutput: 1
786 | m_UseScreenCoordOverride: 0
787 | m_ScreenSizeOverride: {x: 0, y: 0, z: 0, w: 0}
788 | m_ScreenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0}
789 | m_RequiresDepthTexture: 0
790 | m_RequiresColorTexture: 0
791 | m_Version: 2
792 | m_TaaSettings:
793 | quality: 3
794 | frameInfluence: 0.1
795 | jitterScale: 1
796 | mipBias: 0
797 | varianceClampScale: 0.9
798 | contrastAdaptiveSharpening: 0
799 | --- !u!114 &1687258587
800 | MonoBehaviour:
801 | m_ObjectHideFlags: 0
802 | m_CorrespondingSourceObject: {fileID: 0}
803 | m_PrefabInstance: {fileID: 0}
804 | m_PrefabAsset: {fileID: 0}
805 | m_GameObject: {fileID: 1687258581}
806 | m_Enabled: 0
807 | m_EditorHideFlags: 0
808 | m_Script: {fileID: 11500000, guid: 3d75140455244ad4d8b4a6f9079aefd2, type: 3}
809 | m_Name:
810 | m_EditorClassIdentifier:
811 | --- !u!1 &2138677391
812 | GameObject:
813 | m_ObjectHideFlags: 0
814 | m_CorrespondingSourceObject: {fileID: 0}
815 | m_PrefabInstance: {fileID: 0}
816 | m_PrefabAsset: {fileID: 0}
817 | serializedVersion: 6
818 | m_Component:
819 | - component: {fileID: 2138677393}
820 | - component: {fileID: 2138677392}
821 | - component: {fileID: 2138677394}
822 | m_Layer: 0
823 | m_Name: Directional Light
824 | m_TagString: Untagged
825 | m_Icon: {fileID: 0}
826 | m_NavMeshLayer: 0
827 | m_StaticEditorFlags: 0
828 | m_IsActive: 1
829 | --- !u!108 &2138677392
830 | Light:
831 | m_ObjectHideFlags: 0
832 | m_CorrespondingSourceObject: {fileID: 0}
833 | m_PrefabInstance: {fileID: 0}
834 | m_PrefabAsset: {fileID: 0}
835 | m_GameObject: {fileID: 2138677391}
836 | m_Enabled: 1
837 | serializedVersion: 10
838 | m_Type: 1
839 | m_Shape: 0
840 | m_Color: {r: 1, g: 1, b: 1, a: 1}
841 | m_Intensity: 1
842 | m_Range: 10
843 | m_SpotAngle: 30
844 | m_InnerSpotAngle: 21.802082
845 | m_CookieSize: 10
846 | m_Shadows:
847 | m_Type: 2
848 | m_Resolution: -1
849 | m_CustomResolution: -1
850 | m_Strength: 1
851 | m_Bias: 0.02
852 | m_NormalBias: 0.1
853 | m_NearPlane: 0.1
854 | m_CullingMatrixOverride:
855 | e00: 1
856 | e01: 0
857 | e02: 0
858 | e03: 0
859 | e10: 0
860 | e11: 1
861 | e12: 0
862 | e13: 0
863 | e20: 0
864 | e21: 0
865 | e22: 1
866 | e23: 0
867 | e30: 0
868 | e31: 0
869 | e32: 0
870 | e33: 1
871 | m_UseCullingMatrixOverride: 0
872 | m_Cookie: {fileID: 0}
873 | m_DrawHalo: 0
874 | m_Flare: {fileID: 0}
875 | m_RenderMode: 0
876 | m_CullingMask:
877 | serializedVersion: 2
878 | m_Bits: 4294967295
879 | m_RenderingLayerMask: 1
880 | m_Lightmapping: 4
881 | m_LightShadowCasterMode: 0
882 | m_AreaSize: {x: 1, y: 1}
883 | m_BounceIntensity: 1
884 | m_ColorTemperature: 6570
885 | m_UseColorTemperature: 0
886 | m_BoundingSphereOverride: {x: 0, y: 2.7067e-41, z: 0, w: -33.25}
887 | m_UseBoundingSphereOverride: 0
888 | m_UseViewFrustumForShadowCasterCull: 1
889 | m_ShadowRadius: 0
890 | m_ShadowAngle: 0
891 | --- !u!4 &2138677393
892 | Transform:
893 | m_ObjectHideFlags: 0
894 | m_CorrespondingSourceObject: {fileID: 0}
895 | m_PrefabInstance: {fileID: 0}
896 | m_PrefabAsset: {fileID: 0}
897 | m_GameObject: {fileID: 2138677391}
898 | m_LocalRotation: {x: 0.2499996, y: -0.24999957, z: 0.06698707, w: 0.93301296}
899 | m_LocalPosition: {x: 0, y: 3, z: -10}
900 | m_LocalScale: {x: 1, y: 1, z: 1}
901 | m_ConstrainProportionsScale: 0
902 | m_Children: []
903 | m_Father: {fileID: 0}
904 | m_RootOrder: 1
905 | m_LocalEulerAnglesHint: {x: 30, y: -30, z: 0}
906 | --- !u!114 &2138677394
907 | MonoBehaviour:
908 | m_ObjectHideFlags: 0
909 | m_CorrespondingSourceObject: {fileID: 0}
910 | m_PrefabInstance: {fileID: 0}
911 | m_PrefabAsset: {fileID: 0}
912 | m_GameObject: {fileID: 2138677391}
913 | m_Enabled: 1
914 | m_EditorHideFlags: 0
915 | m_Script: {fileID: 11500000, guid: 474bcb49853aa07438625e644c072ee6, type: 3}
916 | m_Name:
917 | m_EditorClassIdentifier:
918 | m_Version: 3
919 | m_UsePipelineSettings: 1
920 | m_AdditionalLightsShadowResolutionTier: 2
921 | m_LightLayerMask: 1
922 | m_RenderingLayers: 1
923 | m_CustomShadowLayers: 0
924 | m_ShadowLayerMask: 1
925 | m_ShadowRenderingLayers: 1
926 | m_LightCookieSize: {x: 1, y: 1}
927 | m_LightCookieOffset: {x: 0, y: 0}
928 | m_SoftShadowQuality: 1
929 |
--------------------------------------------------------------------------------
/Samples~/Audio Visualizer Sample/Scenes/AudioVisualizerSample.unity.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b2f2f87bede50514b8a0db6a04250321
3 | DefaultImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/VX.Audio.Editor.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f833ca37169edc549bcf2b3fe3ad92f4
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/VX.Audio.Editor/VX.Audio.Editor.asmdef:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Voxell.Audio.Editor",
3 | "rootNamespace": "",
4 | "references": [],
5 | "includePlatforms": [
6 | "Editor"
7 | ],
8 | "excludePlatforms": [],
9 | "allowUnsafeCode": false,
10 | "overrideReferences": false,
11 | "precompiledReferences": [],
12 | "autoReferenced": true,
13 | "defineConstraints": [],
14 | "versionDefines": [],
15 | "noEngineReferences": false
16 | }
--------------------------------------------------------------------------------
/VX.Audio.Editor/VX.Audio.Editor.asmdef.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8d3bd2f41acecbe4eb7c6a2df61eb3a2
3 | AssemblyDefinitionImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/VX.Audio.Editor/WireframeGUI.cs:
--------------------------------------------------------------------------------
1 | /*
2 | This program is free software; you can redistribute it and/or
3 | modify it under the terms of the GNU General Public License
4 | as published by the Free Software Foundation; either version 2
5 | of the License, or (at your option) any later version.
6 |
7 | This program is distributed in the hope that it will be useful,
8 | but WITHOUT ANY WARRANTY; without even the implied warranty of
9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 | GNU General Public License for more details.
11 |
12 | You should have received a copy of the GNU General Public License
13 | along with this program; if not, write to the Free Software Foundation,
14 | Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15 |
16 | The Original Code is Copyright (C) 2020 Voxell Technologies.
17 | All rights reserved.
18 | */
19 |
20 | using UnityEditor;
21 | // TODO: create custom shader gui for wire frame, add in wireframe thickness and wireframe color
22 |
23 | namespace Voxell.Audio.Editor
24 | {
25 | public class WireframeGUI: ShaderGUI
26 | {
27 | public override void OnGUI (MaterialEditor materialEditor, MaterialProperty[] properties)
28 | {
29 | base.OnGUI (materialEditor, properties);
30 | }
31 | }
32 | }
--------------------------------------------------------------------------------
/VX.Audio.Editor/WireframeGUI.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8ea70a4e5f79ab547ad0516f5359be39
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/VX.Audio.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8c57f6e39e33d784aa778123a6ac2f8f
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/VX.Audio/AudioCore.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using UnityEngine.VFX;
3 |
4 | namespace Voxell.Audio
5 | {
6 | [RequireComponent(typeof(VisualEffect))]
7 | [RequireComponent(typeof(AudioSource))]
8 | public sealed partial class AudioCore : MonoBehaviour
9 | {
10 | private const float EPSILON = 0.001f;
11 |
12 | void Start()
13 | {
14 | InitAgentInteraction();
15 | InitAudioVisualizer();
16 | }
17 |
18 | void Update() => UpdateAgentInteraction();
19 | void FixedUpdate() => UpdateAudioVisualizer();
20 |
21 | internal static class ShaderPropertyId
22 | {
23 | public static readonly int sampleCount = Shader.PropertyToID("sampleCount");
24 | public static readonly int transform = Shader.PropertyToID("transform");
25 | public static readonly int oldTransform = Shader.PropertyToID("oldTransform");
26 | public static readonly int framRate = Shader.PropertyToID("framRate");
27 | }
28 |
29 | internal static class ShaderBufferId
30 | {
31 | public static readonly int cb_samplePoints = Shader.PropertyToID("cb_samplePoints");
32 | public static readonly int cb_position = Shader.PropertyToID("cb_position");
33 | public static readonly int cb_oldPosition = Shader.PropertyToID("cb_oldPosition");
34 | public static readonly int cb_normal = Shader.PropertyToID("cb_normal;");
35 | public static readonly int tex_positionMap = Shader.PropertyToID("tex_positionMap");
36 | public static readonly int tex_velocityMap = Shader.PropertyToID("tex_velocityMap");
37 | public static readonly int tex_normalMap = Shader.PropertyToID("tex_normalMap");
38 | }
39 |
40 | internal static class VFXPropertyId
41 | {
42 | public static readonly int mesh_sampleMesh = Shader.PropertyToID("SampleMesh");
43 | public static readonly int float_forceMultiplier = Shader.PropertyToID("ForceMultiplier");
44 | public static readonly int int_triangleCount = Shader.PropertyToID("TriangleCount");
45 | public static readonly int float_idleNoiseSpeed = Shader.PropertyToID("IdleNoiseSpeed");
46 | public static readonly int float_noiseIntensity = Shader.PropertyToID("NoiseIntensity");
47 | public static readonly int float3_noiseScale = Shader.PropertyToID("NoiseScale");
48 | }
49 | }
50 | }
--------------------------------------------------------------------------------
/VX.Audio/AudioCore.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ac0faf44a08a76a4e86ff920ebb28e53
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/VX.Audio/AudioInteraction.cs:
--------------------------------------------------------------------------------
1 | /*
2 | This program is free software; you can redistribute it and/or
3 | modify it under the terms of the GNU General Public License
4 | as published by the Free Software Foundation; either version 2
5 | of the License, or (at your option) any later version.
6 |
7 | This program is distributed in the hope that it will be useful,
8 | but WITHOUT ANY WARRANTY; without even the implied warranty of
9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 | GNU General Public License for more details.
11 |
12 | You should have received a copy of the GNU General Public License
13 | along with this program; if not, write to the Free Software Foundation,
14 | Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15 |
16 | The Original Code is Copyright (C) 2020 Voxell Technologies.
17 | All rights reserved.
18 | */
19 |
20 | using UnityEngine;
21 |
22 | namespace Voxell.Audio
23 | {
24 | public partial class AudioCore
25 | {
26 | [Header("Audio Visualizer Interaction")]
27 | [Tooltip("Velocity of audio visualizer when there is no interaction")]
28 | public Vector2 idleVelocity = new Vector2(1.0f, -1.0f);
29 |
30 | [Tooltip("Minimum turbulence for VFX graph when there is no interaction or extra force")]
31 | public float idleNoiseIntensity = 0.1f;
32 | public float maxNoiseIntensity = 0.3f;
33 |
34 | [Tooltip("Sensitivity of the audio visualizer on mouse drag")]
35 | public float rotationMultiplier = 500;
36 |
37 | [Range(0.8f, 0.99f), Tooltip("A number that multiplies the velocity of the audio visualizer on each update")]
38 | public float velocityDamping = 0.9f;
39 |
40 | [Tooltip("Multiplier of noise intensity before sending it to the VFX graph")]
41 | public float intensityCoefficient = 0.1f;
42 |
43 | private Vector2 _rotationVelocity;
44 |
45 | private void InitAgentInteraction() => _rotationVelocity = Vector2.zero;
46 |
47 | private void UpdateAgentInteraction()
48 | {
49 | // if (Input.GetMouseButton(0)) OnMouseDrag();
50 |
51 | if (Vector3.Dot(transform.up, Vector3.up) >= 0)
52 | transform.Rotate(Camera.main.transform.up, -Vector3.Dot(_rotationVelocity, Camera.main.transform.right), Space.World);
53 | else
54 | transform.Rotate(Camera.main.transform.up, -Vector3.Dot(_rotationVelocity, Camera.main.transform.right), Space.World);
55 |
56 | transform.Rotate(Camera.main.transform.right, Vector3.Dot(_rotationVelocity, Camera.main.transform.up), Space.World);
57 | _rotationVelocity *= velocityDamping;
58 | _rotationVelocity += idleVelocity*Time.deltaTime;
59 |
60 | if (_rotationVelocity.magnitude <= EPSILON) _rotationVelocity = Vector2.zero;
61 |
62 | float intensity = Mathf.Clamp(_rotationVelocity.magnitude * intensityCoefficient, idleNoiseIntensity, maxNoiseIntensity);
63 | audioVFX.SetFloat(VFXPropertyId.float_noiseIntensity, intensity);
64 | }
65 |
66 | ///
67 | /// Calcualte mouse drag force and apply rotational force accordingly
68 | ///
69 | private void OnMouseDrag()
70 | {
71 | float rotationX = Input.GetAxis("Mouse X")*rotationMultiplier*Mathf.Deg2Rad;
72 | float rotationY = Input.GetAxis("Mouse Y")*rotationMultiplier*Mathf.Deg2Rad;
73 |
74 | _rotationVelocity = new Vector2(rotationX, rotationY);
75 | }
76 | }
77 | }
--------------------------------------------------------------------------------
/VX.Audio/AudioInteraction.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 59c1c6bdd7ae2724b86acb22b1e7b8f8
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/VX.Audio/AudioProcessor.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 |
3 | namespace Voxell.Audio
4 | {
5 | public class AudioProcessor
6 | {
7 | public AudioSource source;
8 | public AudioProfile profile;
9 |
10 | public float[] samples;
11 | public int freqSize;
12 | public int bandAverage;
13 | public int[] bandDistribution;
14 |
15 | public AudioProcessor(ref AudioSource source, ref AudioProfile profile)
16 | {
17 | Debug.Assert(profile.frequencyRange > profile.bandSize, "Number of triangles should not exceed frequency range.");
18 | this.source = source;
19 | this.profile = profile;
20 |
21 | samples = new float[profile.sampleSize];
22 |
23 | float freqInterval = AudioSettings.outputSampleRate / profile.sampleSize;
24 | float currFreq = 0.0f;
25 | freqSize = 0;
26 |
27 | for (int s = 0; s < profile.sampleSize; s++)
28 | {
29 | currFreq += freqInterval;
30 | if (currFreq < profile.frequencyRange) freqSize++;
31 | else break;
32 | }
33 |
34 | bandAverage = Mathf.Max(1, freqSize / profile.bandSize);
35 |
36 | bandDistribution = new int[profile.bandSize + 1];
37 | bandDistribution[0] = 0;
38 | for (int b = 0; b < profile.bandSize; b++)
39 | {
40 | bandDistribution[b + 1] = bandAverage + b * bandAverage;
41 | }
42 | }
43 |
44 | public void SampleSpectrum() => source.GetSpectrumData(samples, profile.channel, profile.window);
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/VX.Audio/AudioProcessor.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a47e8bda09734cb4ead6f874bde6c65d
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/VX.Audio/AudioProfile.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 |
3 | namespace Voxell.Audio
4 | {
5 | [System.Serializable]
6 | public class AudioProfile
7 | {
8 | public int channel;
9 | public FFTWindow window;
10 | public int sampleSize;
11 | public float power;
12 | public float scale;
13 | public int smoothingIterations;
14 | [Range(5000, 20000)] public int frequencyRange;
15 | [HideInInspector] public int bandSize;
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/VX.Audio/AudioProfile.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0e4b798bb090bbf42b9811faf75e03b5
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/VX.Audio/AudioVisualizer.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using UnityEngine.VFX;
3 | using Unity.Mathematics;
4 | using Unity.Collections;
5 | using Unity.Collections.LowLevel.Unsafe;
6 | using Unity.Burst;
7 | using Unity.Jobs;
8 | using Voxell.Inspector;
9 | using Voxell.Mathx;
10 |
11 | namespace Voxell.Audio
12 | {
13 | public partial class AudioCore
14 | {
15 | [Header("Audio Visualizer Settings")]
16 | public AudioSource audioSource;
17 | public AudioProfile audioProfile;
18 | public AudioProcessor audioProcessor;
19 |
20 | public VisualEffect audioVFX;
21 | public MeshFilter meshFilter;
22 | public Mesh sampleMesh;
23 | [Tooltip("Damping value to multiply the velocity of each triangles each frame.")]
24 | [Range(0, 1)]
25 | public float velocityMultiplier = 0.95f;
26 | public int batchSize = 128;
27 | [InspectOnly] public int totalTriangles;
28 |
29 | private Mesh modifiedSampleMesh;
30 | private NativeArray normals;
31 | private NativeArray triangles;
32 | private NativeArray samples;
33 | private NativeArray bandDistribution;
34 | private NativeArray vertices;
35 | private NativeArray prevBands;
36 | private NativeArray bandVelocities;
37 |
38 | private void InitAudioVisualizer()
39 | {
40 | totalTriangles = (int)sampleMesh.GetIndexCount(0) / 3;
41 | audioProfile.bandSize = totalTriangles;
42 |
43 | audioProcessor = new AudioProcessor(ref audioSource, ref audioProfile);
44 |
45 | MeshUtil.DeepCopyMesh(in sampleMesh, out modifiedSampleMesh);
46 | audioVFX.SetMesh(VFXPropertyId.mesh_sampleMesh, modifiedSampleMesh);
47 | audioVFX.SetInt(VFXPropertyId.int_triangleCount, totalTriangles);
48 | modifiedSampleMesh.MarkDynamic();
49 | meshFilter.mesh = modifiedSampleMesh;
50 |
51 | // transferring mesh data to native arrays to be processed parallely
52 | Mesh.MeshDataArray sampleMeshData = Mesh.AcquireReadOnlyMeshData(sampleMesh);
53 | MeshUtil.NativeGetNormals(sampleMeshData[0], out normals, Allocator.Persistent);
54 | normals.AsReadOnly();
55 |
56 | MeshUtil.NativeGetIndices(sampleMeshData[0], out triangles, Allocator.Persistent);
57 | triangles.AsReadOnly();
58 |
59 | MeshUtil.NativeGetVertices(sampleMeshData[0], out vertices, Allocator.Persistent);
60 |
61 | // audio processing attributes
62 | samples = new NativeArray(audioProfile.sampleSize, Allocator.Persistent);
63 | bandDistribution = new NativeArray(audioProfile.bandSize + 1, Allocator.Persistent);
64 | bandDistribution.CopyFrom(audioProcessor.bandDistribution);
65 | bandDistribution.AsReadOnly();
66 |
67 | prevBands = new NativeArray(totalTriangles, Allocator.Persistent);
68 | prevBands.CopyFrom(prevBands);
69 |
70 | bandVelocities = new NativeArray(totalTriangles, Allocator.Persistent);
71 | bandVelocities.CopyFrom(bandVelocities);
72 |
73 | sampleMeshData.Dispose();
74 |
75 | // if randomized is turned on
76 | int[] seqArray = MathUtil.GenerateSeqArray(totalTriangles);
77 | MathUtil.ShuffleArray(ref seqArray);
78 |
79 | // triangle indices
80 | NativeArray trianglesCopy = new NativeArray(triangles, Allocator.Temp);
81 |
82 | for (int s = 0; s < seqArray.Length; s++)
83 | {
84 | triangles[s * 3] = trianglesCopy[seqArray[s] * 3];
85 | triangles[s * 3 + 1] = trianglesCopy[seqArray[s] * 3 + 1];
86 | triangles[s * 3 + 2] = trianglesCopy[seqArray[s] * 3 + 2];
87 | }
88 |
89 | trianglesCopy.Dispose();
90 | }
91 |
92 | private void UpdateAudioVisualizer()
93 | {
94 | audioProcessor.SampleSpectrum();
95 |
96 | // copy audio samples to native array samples
97 | samples.CopyFrom(audioProcessor.samples);
98 |
99 | AudioMeshVisualizer audioMeshVisualizer = new AudioMeshVisualizer
100 | {
101 | normals = normals,
102 | triangles = triangles,
103 | samples = samples,
104 | bandDistribution = bandDistribution,
105 | power = audioProfile.power,
106 | scale = audioProfile.scale,
107 | bandAverage = audioProcessor.bandAverage,
108 | vertices = vertices,
109 | prevBands = prevBands,
110 | bandVelocities = bandVelocities,
111 | velocityMultiplier = velocityMultiplier,
112 | deltaTime = Time.deltaTime
113 | };
114 |
115 | JobHandle jobHandle = audioMeshVisualizer.Schedule(totalTriangles, batchSize);
116 | jobHandle.Complete();
117 |
118 | modifiedSampleMesh.SetVertices(vertices);
119 | }
120 |
121 | void OnDisable()
122 | {
123 | normals.Dispose();
124 | triangles.Dispose();
125 | samples.Dispose();
126 | bandDistribution.Dispose();
127 | vertices.Dispose();
128 | prevBands.Dispose();
129 | bandVelocities.Dispose();
130 | }
131 | }
132 |
133 | [BurstCompile]
134 | public struct AudioMeshVisualizer : IJobParallelFor
135 | {
136 | [ReadOnly] public NativeArray normals;
137 | [ReadOnly] public NativeArray triangles;
138 |
139 | [ReadOnly] public NativeArray samples;
140 | [ReadOnly] public NativeArray bandDistribution;
141 | public float power;
142 | public float scale;
143 | public int bandAverage;
144 |
145 | [NativeDisableContainerSafetyRestriction]
146 | public NativeArray vertices;
147 |
148 | public NativeArray prevBands;
149 | public NativeArray bandVelocities;
150 | public float velocityMultiplier;
151 | public float deltaTime;
152 |
153 | public void Execute(int index)
154 | {
155 | int t0 = triangles[index * 3];
156 | int t1 = triangles[index * 3 + 1];
157 | int t2 = triangles[index * 3 + 2];
158 |
159 | float3 normal = normals[t0];
160 |
161 | float band = CreateBand(bandDistribution[index], bandDistribution[index + 1]);
162 | band = math.pow(math.sqrt(band), power) * scale;
163 |
164 | bandVelocities[index] += band - prevBands[index];
165 | float magnitude = bandVelocities[index] * deltaTime;
166 | float3 displacement = normal * magnitude;
167 |
168 | vertices[t0] += displacement;
169 | vertices[t1] += displacement;
170 | vertices[t2] += displacement;
171 |
172 | bandVelocities[index] *= velocityMultiplier;
173 | prevBands[index] += magnitude;
174 | }
175 |
176 | private float CreateBand(int start, int end)
177 | {
178 | float totalFreq = 0.0f;
179 | for (int b = start; b < end; b++) totalFreq += samples[b] / bandAverage;
180 | return totalFreq;
181 | }
182 | }
183 | }
184 |
--------------------------------------------------------------------------------
/VX.Audio/AudioVisualizer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c58fb3443d4922c458379123f78288f1
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/VX.Audio/Shaders.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c8d16cc998d471848a673284277321ff
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/VX.Audio/Shaders/WireFrame.shader:
--------------------------------------------------------------------------------
1 | Shader "Custom/Wireframe"
2 | {
3 | Properties
4 | {
5 | // Specular vs Metallic workflow
6 | [HideInInspector] _WorkflowMode("WorkflowMode", Float) = 1.0
7 |
8 | [MainTexture] _BaseMap("Albedo", 2D) = "white" {}
9 | [MainColor] _BaseColor("Color", Color) = (1,1,1,1)
10 |
11 | _Cutoff("Alpha Cutoff", Range(0.0, 1.0)) = 0.5
12 |
13 | _Smoothness("Smoothness", Range(0.0, 1.0)) = 0.5
14 | _GlossMapScale("Smoothness Scale", Range(0.0, 1.0)) = 1.0
15 | _SmoothnessTextureChannel("Smoothness texture channel", Float) = 0
16 |
17 | _Metallic("Metallic", Range(0.0, 1.0)) = 0.0
18 | _MetallicGlossMap("Metallic", 2D) = "white" {}
19 |
20 | _SpecColor("Specular", Color) = (0.2, 0.2, 0.2)
21 | _SpecGlossMap("Specular", 2D) = "white" {}
22 |
23 | [ToggleOff] _SpecularHighlights("Specular Highlights", Float) = 1.0
24 | [ToggleOff] _EnvironmentReflections("Environment Reflections", Float) = 1.0
25 |
26 | _BumpScale("Scale", Float) = 1.0
27 | _BumpMap("Normal Map", 2D) = "bump" {}
28 |
29 | _Parallax("Scale", Range(0.005, 0.08)) = 0.005
30 | _ParallaxMap("Height Map", 2D) = "black" {}
31 |
32 | _OcclusionStrength("Strength", Range(0.0, 1.0)) = 1.0
33 | _OcclusionMap("Occlusion", 2D) = "white" {}
34 |
35 | [HDR] _EmissionColor("Wireframe", Color) = (0,0,0)
36 | _EmissionMap("Emission", 2D) = "white" {}
37 |
38 | _DetailMask("Detail Mask", 2D) = "white" {}
39 | _DetailAlbedoMapScale("Scale", Range(0.0, 2.0)) = 1.0
40 | _DetailAlbedoMap("Detail Albedo x2", 2D) = "linearGrey" {}
41 | _DetailNormalMapScale("Scale", Range(0.0, 2.0)) = 1.0
42 | [Normal] _DetailNormalMap("Normal Map", 2D) = "bump" {}
43 |
44 | _WireThickness("Wire Thickness", Range(0, 800)) = 300
45 | [HDR] _WireColor("Wire Color", Color) = (0.0, 3.0, 3.0, 1.0)
46 |
47 | // Blending state
48 | [HideInInspector] _Surface("__surface", Float) = 0.0
49 | [HideInInspector] _Blend("__blend", Float) = 0.0
50 | [HideInInspector] _AlphaClip("__clip", Float) = 0.0
51 | [HideInInspector] _SrcBlend("__src", Float) = 1.0
52 | [HideInInspector] _DstBlend("__dst", Float) = 0.0
53 | [HideInInspector] _ZWrite("__zw", Float) = 1.0
54 | [HideInInspector] _Cull("__cull", Float) = 2.0
55 |
56 | _ReceiveShadows("Receive Shadows", Float) = 1.0
57 | // Editmode props
58 | [HideInInspector] _QueueOffset("Queue offset", Float) = 0.0
59 | }
60 |
61 | SubShader
62 | {
63 | // Universal Pipeline tag is required. If Universal render pipeline is not set in the graphics settings
64 | // this Subshader will fail. One can add a subshader below or fallback to Standard built-in to make this
65 | // material work with both Universal Render Pipeline and Builtin Unity Pipeline
66 | Tags{"RenderType" = "Opaque" "RenderPipeline" = "UniversalPipeline" "UniversalMaterialType" = "Lit" "IgnoreProjector" = "True" "ShaderModel"="4.5"}
67 | LOD 100
68 |
69 | // ------------------------------------------------------------------
70 | // Forward pass. Shades all light in a single pass. GI + emission + Fog
71 | Pass
72 | {
73 | // Lightmode matches the ShaderPassName set in UniversalRenderPipeline.cs. SRPDefaultUnlit and passes with
74 | // no LightMode tag are also rendered by Universal Render Pipeline
75 | Name "ForwardLit"
76 | Tags{"LightMode" = "UniversalForward"}
77 |
78 | Blend[_SrcBlend][_DstBlend]
79 | ZWrite[_ZWrite]
80 | Cull[_Cull]
81 |
82 | HLSLPROGRAM
83 | #pragma require geometry
84 | #pragma exclude_renderers gles gles3 glcore
85 | #pragma target 4.5
86 |
87 | // -------------------------------------
88 | // Material Keywords
89 | #pragma shader_feature_local _NORMALMAP
90 | #pragma shader_feature_local_fragment _ALPHATEST_ON
91 | #pragma shader_feature_local_fragment _ALPHAPREMULTIPLY_ON
92 | #pragma shader_feature_local_fragment _EMISSION
93 | #pragma shader_feature_local_fragment _METALLICSPECGLOSSMAP
94 | #pragma shader_feature_local_fragment _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
95 | #pragma shader_feature_local_fragment _OCCLUSIONMAP
96 | #pragma shader_feature_local _PARALLAXMAP
97 | #pragma shader_feature_local _ _DETAIL_MULX2 _DETAIL_SCALED
98 | #pragma shader_feature_local_fragment _SPECULARHIGHLIGHTS_OFF
99 | #pragma shader_feature_local_fragment _ENVIRONMENTREFLECTIONS_OFF
100 | #pragma shader_feature_local_fragment _SPECULAR_SETUP
101 | #pragma shader_feature_local _RECEIVE_SHADOWS_OFF
102 |
103 | // -------------------------------------
104 | // Universal Pipeline keywords
105 | #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN
106 | #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS
107 | #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS
108 | #pragma multi_compile_fragment _ _SHADOWS_SOFT
109 | #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION
110 | #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING
111 | #pragma multi_compile _ SHADOWS_SHADOWMASK
112 |
113 | // -------------------------------------
114 | // Unity defined keywords
115 | #pragma multi_compile _ DIRLIGHTMAP_COMBINED
116 | #pragma multi_compile _ LIGHTMAP_ON
117 | #pragma multi_compile_fog
118 |
119 | //--------------------------------------
120 | // GPU Instancing
121 | #pragma multi_compile_instancing
122 | #pragma multi_compile _ DOTS_INSTANCING_ON
123 |
124 | #pragma vertex LitPassVertex
125 | #pragma geometry LitPassGeometry
126 | #pragma fragment LitPassFragment
127 |
128 | #include "./WireframeInput.hlsl"
129 | #include "./WireframeFowardPass.hlsl"
130 | ENDHLSL
131 | }
132 |
133 | Pass
134 | {
135 | Name "ShadowCaster"
136 | Tags{"LightMode" = "ShadowCaster"}
137 |
138 | ZWrite On
139 | ZTest LEqual
140 | ColorMask 0
141 | Cull[_Cull]
142 |
143 | HLSLPROGRAM
144 | #pragma exclude_renderers gles gles3 glcore
145 | #pragma target 4.5
146 |
147 | // -------------------------------------
148 | // Material Keywords
149 | #pragma shader_feature_local_fragment _ALPHATEST_ON
150 | #pragma shader_feature_local_fragment _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
151 |
152 | //--------------------------------------
153 | // GPU Instancing
154 | #pragma multi_compile_instancing
155 | #pragma multi_compile _ DOTS_INSTANCING_ON
156 |
157 | // -------------------------------------
158 | // Universal Pipeline keywords
159 |
160 | // This is used during shadow map generation to differentiate between directional and punctual light shadows, as they use different formulas to apply Normal Bias
161 | #pragma multi_compile_vertex _ _CASTING_PUNCTUAL_LIGHT_SHADOW
162 |
163 | #pragma vertex ShadowPassVertex
164 | #pragma fragment ShadowPassFragment
165 |
166 | #include "./WireframeInput.hlsl"
167 | #include "Packages/com.unity.render-pipelines.universal/Shaders/ShadowCasterPass.hlsl"
168 | ENDHLSL
169 | }
170 |
171 | Pass
172 | {
173 | // Lightmode matches the ShaderPassName set in UniversalRenderPipeline.cs. SRPDefaultUnlit and passes with
174 | // no LightMode tag are also rendered by Universal Render Pipeline
175 | Name "GBuffer"
176 | Tags{"LightMode" = "UniversalGBuffer"}
177 |
178 | ZWrite[_ZWrite]
179 | ZTest LEqual
180 | Cull[_Cull]
181 |
182 | HLSLPROGRAM
183 | #pragma exclude_renderers gles gles3 glcore
184 | #pragma target 4.5
185 |
186 | // -------------------------------------
187 | // Material Keywords
188 | #pragma shader_feature_local _NORMALMAP
189 | #pragma shader_feature_local_fragment _ALPHATEST_ON
190 | //#pragma shader_feature_local_fragment _ALPHAPREMULTIPLY_ON
191 | #pragma shader_feature_local_fragment _EMISSION
192 | #pragma shader_feature_local_fragment _METALLICSPECGLOSSMAP
193 | #pragma shader_feature_local_fragment _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
194 | #pragma shader_feature_local_fragment _OCCLUSIONMAP
195 | #pragma shader_feature_local _PARALLAXMAP
196 | #pragma shader_feature_local _ _DETAIL_MULX2 _DETAIL_SCALED
197 |
198 | #pragma shader_feature_local_fragment _SPECULARHIGHLIGHTS_OFF
199 | #pragma shader_feature_local_fragment _ENVIRONMENTREFLECTIONS_OFF
200 | #pragma shader_feature_local_fragment _SPECULAR_SETUP
201 | #pragma shader_feature_local _RECEIVE_SHADOWS_OFF
202 |
203 | // -------------------------------------
204 | // Universal Pipeline keywords
205 | #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN
206 | //#pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS
207 | //#pragma multi_compile _ _ADDITIONAL_LIGHT_SHADOWS
208 | #pragma multi_compile _ _SHADOWS_SOFT
209 | #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING
210 | #pragma multi_compile _ SHADOWS_SHADOWMASK
211 |
212 | // -------------------------------------
213 | // Unity defined keywords
214 | #pragma multi_compile _ DIRLIGHTMAP_COMBINED
215 | #pragma multi_compile _ LIGHTMAP_ON
216 | #pragma multi_compile_fragment _ _GBUFFER_NORMALS_OCT
217 |
218 | //--------------------------------------
219 | // GPU Instancing
220 | #pragma multi_compile_instancing
221 | #pragma multi_compile _ DOTS_INSTANCING_ON
222 |
223 | #pragma vertex LitGBufferPassVertex
224 | #pragma fragment LitGBufferPassFragment
225 |
226 | #include "./WireframeInput.hlsl"
227 | #include "Packages/com.unity.render-pipelines.universal/Shaders/LitGBufferPass.hlsl"
228 | ENDHLSL
229 | }
230 |
231 | Pass
232 | {
233 | Name "DepthOnly"
234 | Tags{"LightMode" = "DepthOnly"}
235 |
236 | ZWrite On
237 | ColorMask 0
238 | Cull[_Cull]
239 |
240 | HLSLPROGRAM
241 | #pragma exclude_renderers gles gles3 glcore
242 | #pragma target 4.5
243 |
244 | #pragma vertex DepthOnlyVertex
245 | #pragma fragment DepthOnlyFragment
246 |
247 | // -------------------------------------
248 | // Material Keywords
249 | #pragma shader_feature_local_fragment _ALPHATEST_ON
250 | #pragma shader_feature_local_fragment _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
251 |
252 | //--------------------------------------
253 | // GPU Instancing
254 | #pragma multi_compile_instancing
255 | #pragma multi_compile _ DOTS_INSTANCING_ON
256 |
257 | #include "./WireframeInput.hlsl"
258 | #include "Packages/com.unity.render-pipelines.universal/Shaders/DepthOnlyPass.hlsl"
259 | ENDHLSL
260 | }
261 |
262 | // This pass is used when drawing to a _CameraNormalsTexture texture
263 | Pass
264 | {
265 | Name "DepthNormals"
266 | Tags{"LightMode" = "DepthNormals"}
267 |
268 | ZWrite On
269 | Cull[_Cull]
270 |
271 | HLSLPROGRAM
272 | #pragma exclude_renderers gles gles3 glcore
273 | #pragma target 4.5
274 |
275 | #pragma vertex DepthNormalsVertex
276 | #pragma fragment DepthNormalsFragment
277 |
278 | // -------------------------------------
279 | // Material Keywords
280 | #pragma shader_feature_local _NORMALMAP
281 | #pragma shader_feature_local_fragment _ALPHATEST_ON
282 | #pragma shader_feature_local_fragment _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
283 |
284 | //--------------------------------------
285 | // GPU Instancing
286 | #pragma multi_compile_instancing
287 | #pragma multi_compile _ DOTS_INSTANCING_ON
288 |
289 | #include "./WireframeInput.hlsl"
290 | #include "Packages/com.unity.render-pipelines.universal/Shaders/DepthNormalsPass.hlsl"
291 | ENDHLSL
292 | }
293 |
294 | // This pass it not used during regular rendering, only for lightmap baking.
295 | Pass
296 | {
297 | Name "Meta"
298 | Tags{"LightMode" = "Meta"}
299 |
300 | Cull Off
301 |
302 | HLSLPROGRAM
303 | #pragma exclude_renderers gles gles3 glcore
304 | #pragma target 4.5
305 |
306 | #pragma vertex UniversalVertexMeta
307 | #pragma fragment UniversalFragmentMeta
308 |
309 | #pragma shader_feature_local_fragment _SPECULAR_SETUP
310 | #pragma shader_feature_local_fragment _EMISSION
311 | #pragma shader_feature_local_fragment _METALLICSPECGLOSSMAP
312 | #pragma shader_feature_local_fragment _ALPHATEST_ON
313 | #pragma shader_feature_local_fragment _ _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
314 | #pragma shader_feature_local _ _DETAIL_MULX2 _DETAIL_SCALED
315 |
316 | #pragma shader_feature_local_fragment _SPECGLOSSMAP
317 |
318 | #include "./WireframeInput.hlsl"
319 | #include "Packages/com.unity.render-pipelines.universal/Shaders/LitMetaPass.hlsl"
320 |
321 | ENDHLSL
322 | }
323 | Pass
324 | {
325 | Name "Universal2D"
326 | Tags{ "LightMode" = "Universal2D" }
327 |
328 | Blend[_SrcBlend][_DstBlend]
329 | ZWrite[_ZWrite]
330 | Cull[_Cull]
331 |
332 | HLSLPROGRAM
333 | #pragma exclude_renderers gles gles3 glcore
334 | #pragma target 4.5
335 |
336 | #pragma vertex vert
337 | #pragma fragment frag
338 | #pragma shader_feature_local_fragment _ALPHATEST_ON
339 | #pragma shader_feature_local_fragment _ALPHAPREMULTIPLY_ON
340 |
341 | #include "./WireframeInput.hlsl"
342 | #include "Packages/com.unity.render-pipelines.universal/Shaders/Utils/Universal2D.hlsl"
343 | ENDHLSL
344 | }
345 | }
346 |
347 | SubShader
348 | {
349 | // Universal Pipeline tag is required. If Universal render pipeline is not set in the graphics settings
350 | // this Subshader will fail. One can add a subshader below or fallback to Standard built-in to make this
351 | // material work with both Universal Render Pipeline and Builtin Unity Pipeline
352 | Tags{"RenderType" = "Opaque" "RenderPipeline" = "UniversalPipeline" "UniversalMaterialType" = "Lit" "IgnoreProjector" = "True" "ShaderModel"="2.0"}
353 | LOD 300
354 |
355 | // ------------------------------------------------------------------
356 | // Forward pass. Shades all light in a single pass. GI + emission + Fog
357 | Pass
358 | {
359 | // Lightmode matches the ShaderPassName set in UniversalRenderPipeline.cs. SRPDefaultUnlit and passes with
360 | // no LightMode tag are also rendered by Universal Render Pipeline
361 | Name "ForwardLit"
362 | Tags{"LightMode" = "UniversalForward"}
363 |
364 | Blend[_SrcBlend][_DstBlend]
365 | ZWrite[_ZWrite]
366 | Cull[_Cull]
367 |
368 | HLSLPROGRAM
369 | #pragma only_renderers gles gles3 glcore d3d11
370 | #pragma target 2.0
371 |
372 | //--------------------------------------
373 | // GPU Instancing
374 | #pragma multi_compile_instancing
375 |
376 | // -------------------------------------
377 | // Material Keywords
378 | #pragma shader_feature_local _NORMALMAP
379 | #pragma shader_feature_local_fragment _ALPHATEST_ON
380 | #pragma shader_feature_local_fragment _ALPHAPREMULTIPLY_ON
381 | #pragma shader_feature_local_fragment _EMISSION
382 | #pragma shader_feature_local_fragment _METALLICSPECGLOSSMAP
383 | #pragma shader_feature_local_fragment _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
384 | #pragma shader_feature_local_fragment _OCCLUSIONMAP
385 | #pragma shader_feature_local _PARALLAXMAP
386 | #pragma shader_feature_local _ _DETAIL_MULX2 _DETAIL_SCALED
387 |
388 | #pragma shader_feature_local_fragment _SPECULARHIGHLIGHTS_OFF
389 | #pragma shader_feature_local_fragment _ENVIRONMENTREFLECTIONS_OFF
390 | #pragma shader_feature_local_fragment _SPECULAR_SETUP
391 | #pragma shader_feature_local _RECEIVE_SHADOWS_OFF
392 |
393 | // -------------------------------------
394 | // Universal Pipeline keywords
395 | #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN
396 | #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS
397 | #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS
398 | #pragma multi_compile_fragment _ _SHADOWS_SOFT
399 | #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING
400 | #pragma multi_compile _ SHADOWS_SHADOWMASK
401 | #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION
402 |
403 | // -------------------------------------
404 | // Unity defined keywords
405 | #pragma multi_compile _ DIRLIGHTMAP_COMBINED
406 | #pragma multi_compile _ LIGHTMAP_ON
407 | #pragma multi_compile_fog
408 |
409 | #pragma vertex LitPassVertex
410 | #pragma fragment LitPassFragment
411 |
412 | #include "./WireframeInput.hlsl"
413 | #include "Packages/com.unity.render-pipelines.universal/Shaders/LitForwardPass.hlsl"
414 | ENDHLSL
415 | }
416 |
417 | Pass
418 | {
419 | Name "ShadowCaster"
420 | Tags{"LightMode" = "ShadowCaster"}
421 |
422 | ZWrite On
423 | ZTest LEqual
424 | ColorMask 0
425 | Cull[_Cull]
426 |
427 | HLSLPROGRAM
428 | #pragma only_renderers gles gles3 glcore d3d11
429 | #pragma target 2.0
430 |
431 | //--------------------------------------
432 | // GPU Instancing
433 | #pragma multi_compile_instancing
434 |
435 | // -------------------------------------
436 | // Material Keywords
437 | #pragma shader_feature_local_fragment _ALPHATEST_ON
438 | #pragma shader_feature_local_fragment _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
439 |
440 | // -------------------------------------
441 | // Universal Pipeline keywords
442 |
443 | // This is used during shadow map generation to differentiate between directional and punctual light shadows, as they use different formulas to apply Normal Bias
444 | #pragma multi_compile_vertex _ _CASTING_PUNCTUAL_LIGHT_SHADOW
445 |
446 | #pragma vertex ShadowPassVertex
447 | #pragma fragment ShadowPassFragment
448 |
449 | #include "./WireframeInput.hlsl"
450 | #include "Packages/com.unity.render-pipelines.universal/Shaders/ShadowCasterPass.hlsl"
451 | ENDHLSL
452 | }
453 |
454 | Pass
455 | {
456 | Name "DepthOnly"
457 | Tags{"LightMode" = "DepthOnly"}
458 |
459 | ZWrite On
460 | ColorMask 0
461 | Cull[_Cull]
462 |
463 | HLSLPROGRAM
464 | #pragma only_renderers gles gles3 glcore d3d11
465 | #pragma target 2.0
466 |
467 | //--------------------------------------
468 | // GPU Instancing
469 | #pragma multi_compile_instancing
470 |
471 | #pragma vertex DepthOnlyVertex
472 | #pragma fragment DepthOnlyFragment
473 |
474 | // -------------------------------------
475 | // Material Keywords
476 | #pragma shader_feature_local_fragment _ALPHATEST_ON
477 | #pragma shader_feature_local_fragment _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
478 |
479 | #include "./WireframeInput.hlsl"
480 | #include "Packages/com.unity.render-pipelines.universal/Shaders/DepthOnlyPass.hlsl"
481 | ENDHLSL
482 | }
483 |
484 | // This pass is used when drawing to a _CameraNormalsTexture texture
485 | Pass
486 | {
487 | Name "DepthNormals"
488 | Tags{"LightMode" = "DepthNormals"}
489 |
490 | ZWrite On
491 | Cull[_Cull]
492 |
493 | HLSLPROGRAM
494 | #pragma only_renderers gles gles3 glcore d3d11
495 | #pragma target 2.0
496 |
497 | #pragma vertex DepthNormalsVertex
498 | #pragma fragment DepthNormalsFragment
499 |
500 | // -------------------------------------
501 | // Material Keywords
502 | #pragma shader_feature_local _NORMALMAP
503 | #pragma shader_feature_local_fragment _ALPHATEST_ON
504 | #pragma shader_feature_local_fragment _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
505 |
506 | //--------------------------------------
507 | // GPU Instancing
508 | #pragma multi_compile_instancing
509 |
510 | #include "./WireframeInput.hlsl"
511 | #include "Packages/com.unity.render-pipelines.universal/Shaders/DepthNormalsPass.hlsl"
512 | ENDHLSL
513 | }
514 |
515 | // This pass it not used during regular rendering, only for lightmap baking.
516 | Pass
517 | {
518 | Name "Meta"
519 | Tags{"LightMode" = "Meta"}
520 |
521 | Cull Off
522 |
523 | HLSLPROGRAM
524 | #pragma only_renderers gles gles3 glcore d3d11
525 | #pragma target 2.0
526 |
527 | #pragma vertex UniversalVertexMeta
528 | #pragma fragment UniversalFragmentMeta
529 |
530 | #pragma shader_feature_local_fragment _SPECULAR_SETUP
531 | #pragma shader_feature_local_fragment _EMISSION
532 | #pragma shader_feature_local_fragment _METALLICSPECGLOSSMAP
533 | #pragma shader_feature_local_fragment _ALPHATEST_ON
534 | #pragma shader_feature_local_fragment _ _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
535 | #pragma shader_feature_local _ _DETAIL_MULX2 _DETAIL_SCALED
536 |
537 | #pragma shader_feature_local_fragment _SPECGLOSSMAP
538 |
539 | #include "./WireframeInput.hlsl"
540 | #include "Packages/com.unity.render-pipelines.universal/Shaders/LitMetaPass.hlsl"
541 |
542 | ENDHLSL
543 | }
544 | Pass
545 | {
546 | Name "Universal2D"
547 | Tags{ "LightMode" = "Universal2D" }
548 |
549 | Blend[_SrcBlend][_DstBlend]
550 | ZWrite[_ZWrite]
551 | Cull[_Cull]
552 |
553 | HLSLPROGRAM
554 | #pragma only_renderers gles gles3 glcore d3d11
555 | #pragma target 2.0
556 |
557 | #pragma vertex vert
558 | #pragma fragment frag
559 | #pragma shader_feature_local_fragment _ALPHATEST_ON
560 | #pragma shader_feature_local_fragment _ALPHAPREMULTIPLY_ON
561 |
562 | #include "./WireframeInput.hlsl"
563 | #include "Packages/com.unity.render-pipelines.universal/Shaders/Utils/Universal2D.hlsl"
564 | ENDHLSL
565 | }
566 | }
567 |
568 | FallBack "Hidden/Universal Render Pipeline/FallbackError"
569 | CustomEditor "UnityEditor.Rendering.Universal.ShaderGUI.LitShader"
570 | }
571 |
--------------------------------------------------------------------------------
/VX.Audio/Shaders/WireFrame.shader.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 232c95391ae79b947b22ce3c216bae9d
3 | ShaderImporter:
4 | externalObjects: {}
5 | defaultTextures: []
6 | nonModifiableTextures: []
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/VX.Audio/Shaders/WireframeFowardPass.hlsl:
--------------------------------------------------------------------------------
1 | #ifndef UNIVERSAL_FORWARD_LIT_PASS_INCLUDED
2 | #define UNIVERSAL_FORWARD_LIT_PASS_INCLUDED
3 |
4 | #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
5 |
6 | // GLES2 has limited amount of interpolators
7 | #if defined(_PARALLAXMAP) && !defined(SHADER_API_GLES)
8 | #define REQUIRES_TANGENT_SPACE_VIEW_DIR_INTERPOLATOR
9 | #endif
10 |
11 | #if (defined(_NORMALMAP) || (defined(_PARALLAXMAP) && !defined(REQUIRES_TANGENT_SPACE_VIEW_DIR_INTERPOLATOR))) || defined(_DETAIL)
12 | #define REQUIRES_WORLD_SPACE_TANGENT_INTERPOLATOR
13 | #endif
14 |
15 | // keep this file in sync with LitGBufferPass.hlsl
16 |
17 | struct Attributes
18 | {
19 | float4 positionOS : POSITION;
20 | float3 normalOS : NORMAL;
21 | float4 tangentOS : TANGENT;
22 | float2 texcoord : TEXCOORD0;
23 | float2 lightmapUV : TEXCOORD1;
24 | UNITY_VERTEX_INPUT_INSTANCE_ID
25 | };
26 |
27 | struct Varyings
28 | {
29 | float2 uv : TEXCOORD0;
30 | DECLARE_LIGHTMAP_OR_SH(lightmapUV, vertexSH, 1);
31 |
32 | #if defined(REQUIRES_WORLD_SPACE_POS_INTERPOLATOR)
33 | float3 positionWS : TEXCOORD2;
34 | #endif
35 |
36 | float3 normalWS : TEXCOORD3;
37 | #if defined(REQUIRES_WORLD_SPACE_TANGENT_INTERPOLATOR)
38 | float4 tangentWS : TEXCOORD4; // xyz: tangent, w: sign
39 | #endif
40 | float3 viewDirWS : TEXCOORD5;
41 |
42 | half4 fogFactorAndVertexLight : TEXCOORD6; // x: fogFactor, yzw: vertex light
43 |
44 | #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
45 | float4 shadowCoord : TEXCOORD7;
46 | #endif
47 |
48 | #if defined(REQUIRES_TANGENT_SPACE_VIEW_DIR_INTERPOLATOR)
49 | float3 viewDirTS : TEXCOORD8;
50 | float4 dist : TEXCOORD9;
51 | #else
52 | float4 dist : TEXCOORD8;
53 | #endif
54 |
55 | float4 positionCS : SV_POSITION;
56 | UNITY_VERTEX_INPUT_INSTANCE_ID
57 | UNITY_VERTEX_OUTPUT_STEREO
58 | };
59 |
60 | void InitializeInputData(Varyings input, half3 normalTS, out InputData inputData)
61 | {
62 | inputData = (InputData)0;
63 |
64 | #if defined(REQUIRES_WORLD_SPACE_POS_INTERPOLATOR)
65 | inputData.positionWS = input.positionWS;
66 | #endif
67 |
68 | half3 viewDirWS = SafeNormalize(input.viewDirWS);
69 | #if defined(_NORMALMAP) || defined(_DETAIL)
70 | float sgn = input.tangentWS.w; // should be either +1 or -1
71 | float3 bitangent = sgn * cross(input.normalWS.xyz, input.tangentWS.xyz);
72 | inputData.normalWS = TransformTangentToWorld(normalTS, half3x3(input.tangentWS.xyz, bitangent.xyz, input.normalWS.xyz));
73 | #else
74 | inputData.normalWS = input.normalWS;
75 | #endif
76 |
77 | inputData.normalWS = NormalizeNormalPerPixel(inputData.normalWS);
78 | inputData.viewDirectionWS = viewDirWS;
79 |
80 | #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
81 | inputData.shadowCoord = input.shadowCoord;
82 | #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS)
83 | inputData.shadowCoord = TransformWorldToShadowCoord(inputData.positionWS);
84 | #else
85 | inputData.shadowCoord = float4(0, 0, 0, 0);
86 | #endif
87 |
88 | inputData.fogCoord = input.fogFactorAndVertexLight.x;
89 | inputData.vertexLighting = input.fogFactorAndVertexLight.yzw;
90 | inputData.bakedGI = SAMPLE_GI(input.lightmapUV, input.vertexSH, inputData.normalWS);
91 | inputData.normalizedScreenSpaceUV = GetNormalizedScreenSpaceUV(input.positionCS);
92 | inputData.shadowMask = SAMPLE_SHADOWMASK(input.lightmapUV);
93 | }
94 |
95 | //////////////////////////////////////////////////////////////////////////////////////////
96 | // Vertex, Geometry, and Fragment functions //
97 | //////////////////////////////////////////////////////////////////////////////////////////
98 |
99 | // Used in Standard (Physically Based) shader
100 | Varyings LitPassVertex(Attributes input)
101 | {
102 | Varyings output = (Varyings)0;
103 |
104 | UNITY_SETUP_INSTANCE_ID(input);
105 | UNITY_TRANSFER_INSTANCE_ID(input, output);
106 | UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
107 |
108 | VertexPositionInputs vertexInput = GetVertexPositionInputs(input.positionOS.xyz);
109 |
110 | // normalWS and tangentWS already normalize.
111 | // this is required to avoid skewing the direction during interpolation
112 | // also required for per-vertex lighting and SH evaluation
113 | VertexNormalInputs normalInput = GetVertexNormalInputs(input.normalOS, input.tangentOS);
114 |
115 | half3 viewDirWS = GetWorldSpaceViewDir(vertexInput.positionWS);
116 | half3 vertexLight = VertexLighting(vertexInput.positionWS, normalInput.normalWS);
117 | half fogFactor = ComputeFogFactor(vertexInput.positionCS.z);
118 |
119 | output.uv = TRANSFORM_TEX(input.texcoord, _BaseMap);
120 |
121 | // already normalized from normal transform to WS.
122 | output.normalWS = normalInput.normalWS;
123 | output.viewDirWS = viewDirWS;
124 | #if defined(REQUIRES_WORLD_SPACE_TANGENT_INTERPOLATOR) || defined(REQUIRES_TANGENT_SPACE_VIEW_DIR_INTERPOLATOR)
125 | real sign = input.tangentOS.w * GetOddNegativeScale();
126 | half4 tangentWS = half4(normalInput.tangentWS.xyz, sign);
127 | #endif
128 | #if defined(REQUIRES_WORLD_SPACE_TANGENT_INTERPOLATOR)
129 | output.tangentWS = tangentWS;
130 | #endif
131 |
132 | #if defined(REQUIRES_TANGENT_SPACE_VIEW_DIR_INTERPOLATOR)
133 | half3 viewDirTS = GetViewDirectionTangentSpace(tangentWS, output.normalWS, viewDirWS);
134 | output.viewDirTS = viewDirTS;
135 | #endif
136 |
137 | OUTPUT_LIGHTMAP_UV(input.lightmapUV, unity_LightmapST, output.lightmapUV);
138 | OUTPUT_SH(output.normalWS.xyz, output.vertexSH);
139 |
140 | output.fogFactorAndVertexLight = half4(fogFactor, vertexLight);
141 |
142 | #if defined(REQUIRES_WORLD_SPACE_POS_INTERPOLATOR)
143 | output.positionWS = vertexInput.positionWS;
144 | #endif
145 |
146 | #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
147 | output.shadowCoord = GetShadowCoord(vertexInput);
148 | #endif
149 |
150 | output.positionCS = vertexInput.positionCS;
151 |
152 | return output;
153 | }
154 |
155 | [maxvertexcount(3)]
156 | void LitPassGeometry(triangle Varyings input[3], inout TriangleStream stream)
157 | {
158 | float2 p0 = input[0].positionCS.xy / input[0].positionCS.w;
159 | float2 p1 = input[1].positionCS.xy / input[1].positionCS.w;
160 | float2 p2 = input[2].positionCS.xy / input[2].positionCS.w;
161 |
162 | float2 edge0 = p2 - p1;
163 | float2 edge1 = p2 - p0;
164 | float2 edge2 = p1 - p0;
165 |
166 | float area = abs(edge1.x * edge2.y - edge1.y * edge2.x);
167 | float wireThickness = 800 - _WireThickness;
168 |
169 | Varyings output;
170 | output = input[0];
171 | output.dist.xyz = float3( (area / length(edge0)), 0.0, 0.0) * output.positionCS.w * wireThickness;
172 | output.dist.w = 1.0 / output.positionCS.w;
173 | stream.Append(output);
174 |
175 | output = input[1];
176 | output.dist.xyz = float3(0.0, (area / length(edge1)), 0.0) * output.positionCS.w * wireThickness;
177 | output.dist.w = 1.0 / output.positionCS.w;
178 | stream.Append(output);
179 |
180 | output = input[2];
181 | output.dist.xyz = float3(0.0, 0.0, (area / length(edge2))) * output.positionCS.w * wireThickness;
182 | output.dist.w = 1.0 / output.positionCS.w;
183 | stream.Append(output);
184 | }
185 |
186 | // Used in Standard (Physically Based) shader
187 | half4 LitPassFragment(Varyings input) : SV_Target
188 | {
189 | UNITY_SETUP_INSTANCE_ID(input);
190 | UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input);
191 |
192 | #if defined(_PARALLAXMAP)
193 | #if defined(REQUIRES_TANGENT_SPACE_VIEW_DIR_INTERPOLATOR)
194 | half3 viewDirTS = input.viewDirTS;
195 | #else
196 | half3 viewDirTS = GetViewDirectionTangentSpace(input.tangentWS, input.normalWS, input.viewDirWS);
197 | #endif
198 | ApplyPerPixelDisplacement(viewDirTS, input.uv);
199 | #endif
200 |
201 | SurfaceData surfaceData;
202 | InitializeStandardLitSurfaceData(input.uv, surfaceData);
203 |
204 | InputData inputData;
205 | InitializeInputData(input, surfaceData.normalTS, inputData);
206 |
207 | half4 col = UniversalFragmentPBR(inputData, surfaceData);
208 |
209 | col.rgb = MixFog(col.rgb, inputData.fogCoord);
210 | col.a = OutputAlpha(col.a, _Surface);
211 |
212 | float minDistanceToEdge = min(input.dist.x, min(input.dist.y, input.dist.z)) * input.dist.w;
213 | col = lerp(_WireColor, col, step(0.5, minDistanceToEdge));
214 | // col.a *= _WireColor.a * step(0.9, minDistanceToEdge);
215 |
216 | return col;
217 | }
218 |
219 | #endif
--------------------------------------------------------------------------------
/VX.Audio/Shaders/WireframeFowardPass.hlsl.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2f034a02824ea86478664343cb6b831b
3 | ShaderImporter:
4 | externalObjects: {}
5 | defaultTextures: []
6 | nonModifiableTextures: []
7 | preprocessorOverride: 0
8 | userData:
9 | assetBundleName:
10 | assetBundleVariant:
11 |
--------------------------------------------------------------------------------
/VX.Audio/Shaders/WireframeInput.hlsl:
--------------------------------------------------------------------------------
1 | #ifndef UNIVERSAL_LIT_INPUT_INCLUDED
2 | #define UNIVERSAL_LIT_INPUT_INCLUDED
3 |
4 | #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
5 | #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/CommonMaterial.hlsl"
6 | #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/SurfaceInput.hlsl"
7 | #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/ParallaxMapping.hlsl"
8 |
9 | #if defined(_DETAIL_MULX2) || defined(_DETAIL_SCALED)
10 | #define _DETAIL
11 | #endif
12 |
13 | // NOTE: Do not ifdef the properties here as SRP batcher can not handle different layouts.
14 | CBUFFER_START(UnityPerMaterial)
15 | float4 _BaseMap_ST;
16 | float4 _DetailAlbedoMap_ST;
17 | half4 _BaseColor;
18 | half4 _SpecColor;
19 | half4 _EmissionColor;
20 | half _Cutoff;
21 | half _Smoothness;
22 | half _Metallic;
23 | half _BumpScale;
24 | half _Parallax;
25 | half _OcclusionStrength;
26 | half _ClearCoatMask;
27 | half _ClearCoatSmoothness;
28 | half _DetailAlbedoMapScale;
29 | half _DetailNormalMapScale;
30 | half _Surface;
31 | half _WireThickness;
32 | half4 _WireColor;
33 | CBUFFER_END
34 |
35 | // NOTE: Do not ifdef the properties for dots instancing, but ifdef the actual usage.
36 | // Otherwise you might break CPU-side as property constant-buffer offsets change per variant.
37 | // NOTE: Dots instancing is orthogonal to the constant buffer above.
38 | #ifdef UNITY_DOTS_INSTANCING_ENABLED
39 | UNITY_DOTS_INSTANCING_START(MaterialPropertyMetadata)
40 | UNITY_DOTS_INSTANCED_PROP(float4, _BaseColor)
41 | UNITY_DOTS_INSTANCED_PROP(float4, _SpecColor)
42 | UNITY_DOTS_INSTANCED_PROP(float4, _EmissionColor)
43 | UNITY_DOTS_INSTANCED_PROP(float , _Cutoff)
44 | UNITY_DOTS_INSTANCED_PROP(float , _Smoothness)
45 | UNITY_DOTS_INSTANCED_PROP(float , _Metallic)
46 | UNITY_DOTS_INSTANCED_PROP(float , _BumpScale)
47 | UNITY_DOTS_INSTANCED_PROP(float , _Parallax)
48 | UNITY_DOTS_INSTANCED_PROP(float , _OcclusionStrength)
49 | UNITY_DOTS_INSTANCED_PROP(float , _ClearCoatMask)
50 | UNITY_DOTS_INSTANCED_PROP(float , _ClearCoatSmoothness)
51 | UNITY_DOTS_INSTANCED_PROP(float , _DetailAlbedoMapScale)
52 | UNITY_DOTS_INSTANCED_PROP(float , _DetailNormalMapScale)
53 | UNITY_DOTS_INSTANCED_PROP(float , _Surface)
54 | UNITY_DOTS_INSTANCING_END(MaterialPropertyMetadata)
55 |
56 | #define _BaseColor UNITY_ACCESS_DOTS_INSTANCED_PROP_FROM_MACRO(float4 , Metadata__BaseColor)
57 | #define _SpecColor UNITY_ACCESS_DOTS_INSTANCED_PROP_FROM_MACRO(float4 , Metadata__SpecColor)
58 | #define _EmissionColor UNITY_ACCESS_DOTS_INSTANCED_PROP_FROM_MACRO(float4 , Metadata__EmissionColor)
59 | #define _Cutoff UNITY_ACCESS_DOTS_INSTANCED_PROP_FROM_MACRO(float , Metadata__Cutoff)
60 | #define _Smoothness UNITY_ACCESS_DOTS_INSTANCED_PROP_FROM_MACRO(float , Metadata__Smoothness)
61 | #define _Metallic UNITY_ACCESS_DOTS_INSTANCED_PROP_FROM_MACRO(float , Metadata__Metallic)
62 | #define _BumpScale UNITY_ACCESS_DOTS_INSTANCED_PROP_FROM_MACRO(float , Metadata__BumpScale)
63 | #define _Parallax UNITY_ACCESS_DOTS_INSTANCED_PROP_FROM_MACRO(float , Metadata__Parallax)
64 | #define _OcclusionStrength UNITY_ACCESS_DOTS_INSTANCED_PROP_FROM_MACRO(float , Metadata__OcclusionStrength)
65 | #define _ClearCoatMask UNITY_ACCESS_DOTS_INSTANCED_PROP_FROM_MACRO(float , Metadata__ClearCoatMask)
66 | #define _ClearCoatSmoothness UNITY_ACCESS_DOTS_INSTANCED_PROP_FROM_MACRO(float , Metadata__ClearCoatSmoothness)
67 | #define _DetailAlbedoMapScale UNITY_ACCESS_DOTS_INSTANCED_PROP_FROM_MACRO(float , Metadata__DetailAlbedoMapScale)
68 | #define _DetailNormalMapScale UNITY_ACCESS_DOTS_INSTANCED_PROP_FROM_MACRO(float , Metadata__DetailNormalMapScale)
69 | #define _Surface UNITY_ACCESS_DOTS_INSTANCED_PROP_FROM_MACRO(float , Metadata__Surface)
70 | #endif
71 |
72 | TEXTURE2D(_ParallaxMap); SAMPLER(sampler_ParallaxMap);
73 | TEXTURE2D(_OcclusionMap); SAMPLER(sampler_OcclusionMap);
74 | TEXTURE2D(_DetailMask); SAMPLER(sampler_DetailMask);
75 | TEXTURE2D(_DetailAlbedoMap); SAMPLER(sampler_DetailAlbedoMap);
76 | TEXTURE2D(_DetailNormalMap); SAMPLER(sampler_DetailNormalMap);
77 | TEXTURE2D(_MetallicGlossMap); SAMPLER(sampler_MetallicGlossMap);
78 | TEXTURE2D(_SpecGlossMap); SAMPLER(sampler_SpecGlossMap);
79 | TEXTURE2D(_ClearCoatMap); SAMPLER(sampler_ClearCoatMap);
80 |
81 | #ifdef _SPECULAR_SETUP
82 | #define SAMPLE_METALLICSPECULAR(uv) SAMPLE_TEXTURE2D(_SpecGlossMap, sampler_SpecGlossMap, uv)
83 | #else
84 | #define SAMPLE_METALLICSPECULAR(uv) SAMPLE_TEXTURE2D(_MetallicGlossMap, sampler_MetallicGlossMap, uv)
85 | #endif
86 |
87 | half4 SampleMetallicSpecGloss(float2 uv, half albedoAlpha)
88 | {
89 | half4 specGloss;
90 |
91 | #ifdef _METALLICSPECGLOSSMAP
92 | specGloss = SAMPLE_METALLICSPECULAR(uv);
93 | #ifdef _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
94 | specGloss.a = albedoAlpha * _Smoothness;
95 | #else
96 | specGloss.a *= _Smoothness;
97 | #endif
98 | #else // _METALLICSPECGLOSSMAP
99 | #if _SPECULAR_SETUP
100 | specGloss.rgb = _SpecColor.rgb;
101 | #else
102 | specGloss.rgb = _Metallic.rrr;
103 | #endif
104 |
105 | #ifdef _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
106 | specGloss.a = albedoAlpha * _Smoothness;
107 | #else
108 | specGloss.a = _Smoothness;
109 | #endif
110 | #endif
111 |
112 | return specGloss;
113 | }
114 |
115 | half SampleOcclusion(float2 uv)
116 | {
117 | #ifdef _OCCLUSIONMAP
118 | // TODO: Controls things like these by exposing SHADER_QUALITY levels (low, medium, high)
119 | #if defined(SHADER_API_GLES)
120 | return SAMPLE_TEXTURE2D(_OcclusionMap, sampler_OcclusionMap, uv).g;
121 | #else
122 | half occ = SAMPLE_TEXTURE2D(_OcclusionMap, sampler_OcclusionMap, uv).g;
123 | return LerpWhiteTo(occ, _OcclusionStrength);
124 | #endif
125 | #else
126 | return 1.0;
127 | #endif
128 | }
129 |
130 |
131 | // Returns clear coat parameters
132 | // .x/.r == mask
133 | // .y/.g == smoothness
134 | half2 SampleClearCoat(float2 uv)
135 | {
136 | #if defined(_CLEARCOAT) || defined(_CLEARCOATMAP)
137 | half2 clearCoatMaskSmoothness = half2(_ClearCoatMask, _ClearCoatSmoothness);
138 |
139 | #if defined(_CLEARCOATMAP)
140 | clearCoatMaskSmoothness *= SAMPLE_TEXTURE2D(_ClearCoatMap, sampler_ClearCoatMap, uv).rg;
141 | #endif
142 |
143 | return clearCoatMaskSmoothness;
144 | #else
145 | return half2(0.0, 1.0);
146 | #endif // _CLEARCOAT
147 | }
148 |
149 | void ApplyPerPixelDisplacement(half3 viewDirTS, inout float2 uv)
150 | {
151 | #if defined(_PARALLAXMAP)
152 | uv += ParallaxMapping(TEXTURE2D_ARGS(_ParallaxMap, sampler_ParallaxMap), viewDirTS, _Parallax, uv);
153 | #endif
154 | }
155 |
156 | // Used for scaling detail albedo. Main features:
157 | // - Depending if detailAlbedo brightens or darkens, scale magnifies effect.
158 | // - No effect is applied if detailAlbedo is 0.5.
159 | half3 ScaleDetailAlbedo(half3 detailAlbedo, half scale)
160 | {
161 | // detailAlbedo = detailAlbedo * 2.0h - 1.0h;
162 | // detailAlbedo *= _DetailAlbedoMapScale;
163 | // detailAlbedo = detailAlbedo * 0.5h + 0.5h;
164 | // return detailAlbedo * 2.0f;
165 |
166 | // A bit more optimized
167 | return 2.0h * detailAlbedo * scale - scale + 1.0h;
168 | }
169 |
170 | half3 ApplyDetailAlbedo(float2 detailUv, half3 albedo, half detailMask)
171 | {
172 | #if defined(_DETAIL)
173 | half3 detailAlbedo = SAMPLE_TEXTURE2D(_DetailAlbedoMap, sampler_DetailAlbedoMap, detailUv).rgb;
174 |
175 | // In order to have same performance as builtin, we do scaling only if scale is not 1.0 (Scaled version has 6 additional instructions)
176 | #if defined(_DETAIL_SCALED)
177 | detailAlbedo = ScaleDetailAlbedo(detailAlbedo, _DetailAlbedoMapScale);
178 | #else
179 | detailAlbedo = 2.0h * detailAlbedo;
180 | #endif
181 |
182 | return albedo * LerpWhiteTo(detailAlbedo, detailMask);
183 | #else
184 | return albedo;
185 | #endif
186 | }
187 |
188 | half3 ApplyDetailNormal(float2 detailUv, half3 normalTS, half detailMask)
189 | {
190 | #if defined(_DETAIL)
191 | #if BUMP_SCALE_NOT_SUPPORTED
192 | half3 detailNormalTS = UnpackNormal(SAMPLE_TEXTURE2D(_DetailNormalMap, sampler_DetailNormalMap, detailUv));
193 | #else
194 | half3 detailNormalTS = UnpackNormalScale(SAMPLE_TEXTURE2D(_DetailNormalMap, sampler_DetailNormalMap, detailUv), _DetailNormalMapScale);
195 | #endif
196 |
197 | // With UNITY_NO_DXT5nm unpacked vector is not normalized for BlendNormalRNM
198 | // For visual consistancy we going to do in all cases
199 | detailNormalTS = normalize(detailNormalTS);
200 |
201 | return lerp(normalTS, BlendNormalRNM(normalTS, detailNormalTS), detailMask); // todo: detailMask should lerp the angle of the quaternion rotation, not the normals
202 | #else
203 | return normalTS;
204 | #endif
205 | }
206 |
207 | inline void InitializeStandardLitSurfaceData(float2 uv, out SurfaceData outSurfaceData)
208 | {
209 | half4 albedoAlpha = SampleAlbedoAlpha(uv, TEXTURE2D_ARGS(_BaseMap, sampler_BaseMap));
210 | outSurfaceData.alpha = Alpha(albedoAlpha.a, _BaseColor, _Cutoff);
211 |
212 | half4 specGloss = SampleMetallicSpecGloss(uv, albedoAlpha.a);
213 | outSurfaceData.albedo = albedoAlpha.rgb * _BaseColor.rgb;
214 |
215 | #if _SPECULAR_SETUP
216 | outSurfaceData.metallic = 1.0h;
217 | outSurfaceData.specular = specGloss.rgb;
218 | #else
219 | outSurfaceData.metallic = specGloss.r;
220 | outSurfaceData.specular = half3(0.0h, 0.0h, 0.0h);
221 | #endif
222 |
223 | outSurfaceData.smoothness = specGloss.a;
224 | outSurfaceData.normalTS = SampleNormal(uv, TEXTURE2D_ARGS(_BumpMap, sampler_BumpMap), _BumpScale);
225 | outSurfaceData.occlusion = SampleOcclusion(uv);
226 | outSurfaceData.emission = SampleEmission(uv, _EmissionColor.rgb, TEXTURE2D_ARGS(_EmissionMap, sampler_EmissionMap));
227 |
228 | #if defined(_CLEARCOAT) || defined(_CLEARCOATMAP)
229 | half2 clearCoat = SampleClearCoat(uv);
230 | outSurfaceData.clearCoatMask = clearCoat.r;
231 | outSurfaceData.clearCoatSmoothness = clearCoat.g;
232 | #else
233 | outSurfaceData.clearCoatMask = 0.0h;
234 | outSurfaceData.clearCoatSmoothness = 0.0h;
235 | #endif
236 |
237 | #if defined(_DETAIL)
238 | half detailMask = SAMPLE_TEXTURE2D(_DetailMask, sampler_DetailMask, uv).a;
239 | float2 detailUv = uv * _DetailAlbedoMap_ST.xy + _DetailAlbedoMap_ST.zw;
240 | outSurfaceData.albedo = ApplyDetailAlbedo(detailUv, outSurfaceData.albedo, detailMask);
241 | outSurfaceData.normalTS = ApplyDetailNormal(detailUv, outSurfaceData.normalTS, detailMask);
242 |
243 | #endif
244 | }
245 |
246 | #endif // UNIVERSAL_INPUT_SURFACE_PBR_INCLUDED
247 |
--------------------------------------------------------------------------------
/VX.Audio/Shaders/WireframeInput.hlsl.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 10de2335113a2ef43ae044d08c4e5bda
3 | ShaderImporter:
4 | externalObjects: {}
5 | defaultTextures: []
6 | nonModifiableTextures: []
7 | preprocessorOverride: 0
8 | userData:
9 | assetBundleName:
10 | assetBundleVariant:
11 |
--------------------------------------------------------------------------------
/VX.Audio/VFX.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: db0a3f544d0a00e47969e00027524db8
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/VX.Audio/VFX/AudioVFXParticles.vfx.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8edffe4b8b0441847aa9ed1e2915e1a3
3 | VisualEffectImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/VX.Audio/VX.Audio.asmdef:
--------------------------------------------------------------------------------
1 | {
2 | "name": "VX.Audio",
3 | "rootNamespace": "VX.Audio",
4 | "references": [
5 | "GUID:d04eb9c554ad44ceab303cecf0c0cf82",
6 | "GUID:8a2eafa29b15f444eb6d74f94a930e1d",
7 | "GUID:d8b63aba1907145bea998dd612889d6b",
8 | "GUID:2665a8d13d1b3f18800f46e256720795",
9 | "GUID:b23efe0d0bd83184681bd63517e3c327"
10 | ],
11 | "includePlatforms": [],
12 | "excludePlatforms": [],
13 | "allowUnsafeCode": false,
14 | "overrideReferences": false,
15 | "precompiledReferences": [],
16 | "autoReferenced": true,
17 | "defineConstraints": [],
18 | "versionDefines": [],
19 | "noEngineReferences": false
20 | }
--------------------------------------------------------------------------------
/VX.Audio/VX.Audio.asmdef.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a0a31be11065b7d409dc053481875361
3 | AssemblyDefinitionImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "voxell.audio",
3 | "displayName": "VX Audio",
4 | "author": "Nixon",
5 | "description": "Audio Visualizer using VFX graph and Job System.",
6 | "keywords": [
7 | "audio",
8 | "visualizer",
9 | "voxell"
10 | ],
11 | "license": "Apache 2.0",
12 | "unity": "2021.1",
13 | "unityRelease": "0f1",
14 | "version": "1.2.0",
15 | "samples": [
16 | {
17 | "displayName": "Audio Visualizer Sample",
18 | "description": "Audio visualizer sample scene.",
19 | "path": "Samples~/Audio Visualizer Sample"
20 | }
21 | ],
22 | "dependencies": {
23 | "com.unity.visualeffectgraph": "10.3.2",
24 | "com.unity.collections": "1.0.0-pre.5",
25 | "com.unity.jobs": "0.11.0-preview.6",
26 | "com.unity.burst": "1.5.5",
27 | "voxell.util": "1.4.3"
28 | }
29 | }
--------------------------------------------------------------------------------
/package.json.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3e905c883b7da7043848c7069c80d112
3 | PackageManifestImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------