├── .gitignore
├── Assets
├── InputSystem_Actions.inputactions
├── InputSystem_Actions.inputactions.meta
├── Plugins.meta
├── Plugins
│ ├── Android.meta
│ ├── Android
│ │ ├── AndroidManifest.xml
│ │ ├── AndroidManifest.xml.meta
│ │ ├── libs.meta
│ │ └── libs
│ │ │ ├── arm64-v8a.meta
│ │ │ └── arm64-v8a
│ │ │ ├── libespeak-ng.so
│ │ │ └── libespeak-ng.so.meta
│ ├── Windows.meta
│ ├── Windows
│ │ ├── x64.meta
│ │ └── x64
│ │ │ ├── libespeak-ng.dll
│ │ │ └── libespeak-ng.dll.meta
│ ├── macOS.meta
│ └── macOS
│ │ ├── x64.meta
│ │ └── x64
│ │ ├── libespeak-ng.1.dylib
│ │ ├── libespeak-ng.1.dylib.meta
│ │ ├── libespeak-ng.dylib
│ │ └── libespeak-ng.dylib.meta
├── Scenes.meta
├── Scenes
│ ├── PiperScene.unity
│ └── PiperScene.unity.meta
├── Scripts.meta
├── Scripts
│ ├── ESpeakNG.cs
│ ├── ESpeakNG.cs.meta
│ ├── ESpeakTokenizer.cs
│ ├── ESpeakTokenizer.cs.meta
│ ├── FrequencyBandAnalyser.cs
│ ├── FrequencyBandAnalyser.cs.meta
│ ├── PiperManager.cs
│ └── PiperManager.cs.meta
├── Settings.meta
├── Settings
│ ├── DefaultVolumeProfile.asset
│ ├── DefaultVolumeProfile.asset.meta
│ ├── Mobile_RPAsset.asset
│ ├── Mobile_RPAsset.asset.meta
│ ├── Mobile_Renderer.asset
│ ├── Mobile_Renderer.asset.meta
│ ├── PC_RPAsset.asset
│ ├── PC_RPAsset.asset.meta
│ ├── PC_Renderer.asset
│ ├── PC_Renderer.asset.meta
│ ├── SampleSceneProfile.asset
│ ├── SampleSceneProfile.asset.meta
│ ├── UniversalRenderPipelineGlobalSettings.asset
│ └── UniversalRenderPipelineGlobalSettings.asset.meta
├── TextMesh Pro.meta
└── TextMesh Pro
│ ├── Fonts.meta
│ ├── Fonts
│ ├── LiberationSans - OFL.txt
│ ├── LiberationSans - OFL.txt.meta
│ ├── LiberationSans.ttf
│ └── LiberationSans.ttf.meta
│ ├── Resources.meta
│ ├── Resources
│ ├── Fonts & Materials.meta
│ ├── Fonts & Materials
│ │ ├── LiberationSans SDF - Drop Shadow.mat
│ │ ├── LiberationSans SDF - Drop Shadow.mat.meta
│ │ ├── LiberationSans SDF - Fallback.asset
│ │ ├── LiberationSans SDF - Fallback.asset.meta
│ │ ├── LiberationSans SDF - Outline.mat
│ │ ├── LiberationSans SDF - Outline.mat.meta
│ │ ├── LiberationSans SDF.asset
│ │ └── LiberationSans SDF.asset.meta
│ ├── LineBreaking Following Characters.txt
│ ├── LineBreaking Following Characters.txt.meta
│ ├── LineBreaking Leading Characters.txt
│ ├── LineBreaking Leading Characters.txt.meta
│ ├── Sprite Assets.meta
│ ├── Sprite Assets
│ │ ├── EmojiOne.asset
│ │ └── EmojiOne.asset.meta
│ ├── Style Sheets.meta
│ ├── Style Sheets
│ │ ├── Default Style Sheet.asset
│ │ └── Default Style Sheet.asset.meta
│ ├── TMP Settings.asset
│ └── TMP Settings.asset.meta
│ ├── Shaders.meta
│ ├── Shaders
│ ├── SDFFunctions.hlsl
│ ├── SDFFunctions.hlsl.meta
│ ├── TMP_Bitmap-Custom-Atlas.shader
│ ├── TMP_Bitmap-Custom-Atlas.shader.meta
│ ├── TMP_Bitmap-Mobile.shader
│ ├── TMP_Bitmap-Mobile.shader.meta
│ ├── TMP_Bitmap.shader
│ ├── TMP_Bitmap.shader.meta
│ ├── TMP_SDF Overlay.shader
│ ├── TMP_SDF Overlay.shader.meta
│ ├── TMP_SDF SSD.shader
│ ├── TMP_SDF SSD.shader.meta
│ ├── TMP_SDF-HDRP LIT.shadergraph
│ ├── TMP_SDF-HDRP LIT.shadergraph.meta
│ ├── TMP_SDF-HDRP UNLIT.shadergraph
│ ├── TMP_SDF-HDRP UNLIT.shadergraph.meta
│ ├── TMP_SDF-Mobile Masking.shader
│ ├── TMP_SDF-Mobile Masking.shader.meta
│ ├── TMP_SDF-Mobile Overlay.shader
│ ├── TMP_SDF-Mobile Overlay.shader.meta
│ ├── TMP_SDF-Mobile SSD.shader
│ ├── TMP_SDF-Mobile SSD.shader.meta
│ ├── TMP_SDF-Mobile-2-Pass.shader
│ ├── TMP_SDF-Mobile-2-Pass.shader.meta
│ ├── TMP_SDF-Mobile.shader
│ ├── TMP_SDF-Mobile.shader.meta
│ ├── TMP_SDF-Surface-Mobile.shader
│ ├── TMP_SDF-Surface-Mobile.shader.meta
│ ├── TMP_SDF-Surface.shader
│ ├── TMP_SDF-Surface.shader.meta
│ ├── TMP_SDF-URP Lit.shadergraph
│ ├── TMP_SDF-URP Lit.shadergraph.meta
│ ├── TMP_SDF-URP Unlit.shadergraph
│ ├── TMP_SDF-URP Unlit.shadergraph.meta
│ ├── TMP_SDF.shader
│ ├── TMP_SDF.shader.meta
│ ├── TMP_Sprite.shader
│ ├── TMP_Sprite.shader.meta
│ ├── TMPro.cginc
│ ├── TMPro.cginc.meta
│ ├── TMPro_Mobile.cginc
│ ├── TMPro_Mobile.cginc.meta
│ ├── TMPro_Properties.cginc
│ ├── TMPro_Properties.cginc.meta
│ ├── TMPro_Surface.cginc
│ └── TMPro_Surface.cginc.meta
│ ├── Sprites.meta
│ └── Sprites
│ ├── EmojiOne Attribution.txt
│ ├── EmojiOne Attribution.txt.meta
│ ├── EmojiOne.json
│ ├── EmojiOne.json.meta
│ ├── EmojiOne.png
│ └── EmojiOne.png.meta
├── LICENSE
├── Packages
├── manifest.json
└── packages-lock.json
├── ProjectSettings
├── AudioManager.asset
├── ClusterInputManager.asset
├── DynamicsManager.asset
├── EditorBuildSettings.asset
├── EditorSettings.asset
├── GraphicsSettings.asset
├── InputManager.asset
├── MemorySettings.asset
├── MultiplayerManager.asset
├── NavMeshAreas.asset
├── PackageManagerSettings.asset
├── Physics2DSettings.asset
├── PresetManager.asset
├── ProjectSettings.asset
├── ProjectVersion.txt
├── QualitySettings.asset
├── SceneTemplateSettings.json
├── ShaderGraphSettings.asset
├── TagManager.asset
├── TimeManager.asset
├── URPProjectSettings.asset
├── UnityConnectSettings.asset
├── VFXManager.asset
├── VersionControlSettings.asset
└── XRSettings.asset
└── README.md
/.gitignore:
--------------------------------------------------------------------------------
1 | # This .gitignore file should be placed at the root of your Unity project directory
2 | #
3 | # Get latest from https://github.com/github/gitignore/blob/main/Unity.gitignore
4 | #
5 | .utmp/
6 | /[Ll]ibrary/
7 | /[Tt]emp/
8 | /[Oo]bj/
9 | /[Bb]uild/
10 | /[Bb]uilds/
11 | /[Ll]ogs/
12 | /[Uu]ser[Ss]ettings/
13 | *.log
14 |
15 | # By default unity supports Blender asset imports, *.blend1 blender files do not need to be commited to version control.
16 | *.blend1
17 | *.blend1.meta
18 |
19 | # MemoryCaptures can get excessive in size.
20 | # They also could contain extremely sensitive data
21 | /[Mm]emoryCaptures/
22 |
23 | # Recordings can get excessive in size
24 | /[Rr]ecordings/
25 |
26 | # Uncomment this line if you wish to ignore the asset store tools plugin
27 | # /[Aa]ssets/AssetStoreTools*
28 |
29 | # Autogenerated Jetbrains Rider plugin
30 | /[Aa]ssets/Plugins/Editor/JetBrains*
31 | # Jetbrains Rider personal-layer settings
32 | *.DotSettings.user
33 |
34 | # Visual Studio cache directory
35 | .vs/
36 |
37 | # Gradle cache directory
38 | .gradle/
39 |
40 | # Autogenerated VS/MD/Consulo solution and project files
41 | ExportedObj/
42 | .consulo/
43 | *.csproj
44 | *.unityproj
45 | *.sln
46 | *.suo
47 | *.tmp
48 | *.user
49 | *.userprefs
50 | *.pidb
51 | *.booproj
52 | *.svd
53 | *.pdb
54 | *.mdb
55 | *.opendb
56 | *.VC.db
57 |
58 | # Unity3D generated meta files
59 | *.pidb.meta
60 | *.pdb.meta
61 | *.mdb.meta
62 |
63 | # Unity3D generated file on crash reports
64 | sysinfo.txt
65 |
66 | # Mono auto generated files
67 | mono_crash.*
68 |
69 | # Builds
70 | *.apk
71 | *.aab
72 | *.unitypackage
73 | *.unitypackage.meta
74 | *.app
75 |
76 | # Crashlytics generated file
77 | crashlytics-build.properties
78 |
79 | # TestRunner generated files
80 | InitTestScene*.unity*
81 |
82 | # Addressables default ignores, before user customizations
83 | /ServerData
84 | /[Aa]ssets/StreamingAssets/aa*
85 | /[Aa]ssets/AddressableAssetsData/link.xml*
86 | /[Aa]ssets/Addressables_Temp*
87 | # By default, Addressables content builds will generate addressables_content_state.bin
88 | # files in platform-specific subfolders, for example:
89 | # /Assets/AddressableAssetsData/OSX/addressables_content_state.bin
90 | /[Aa]ssets/AddressableAssetsData/*/*.bin*
91 |
92 | # Visual Scripting auto-generated files
93 | /[Aa]ssets/Unity.VisualScripting.Generated/VisualScripting.Flow/UnitOptions.db
94 | /[Aa]ssets/Unity.VisualScripting.Generated/VisualScripting.Flow/UnitOptions.db.meta
95 | /[Aa]ssets/Unity.VisualScripting.Generated/VisualScripting.Core/Property Providers
96 | /[Aa]ssets/Unity.VisualScripting.Generated/VisualScripting.Core/Property Providers.meta
97 |
98 | # Auto-generated scenes by play mode tests
99 | /[Aa]ssets/[Ii]nit[Tt]est[Ss]cene*.unity*
100 |
101 | # macOS
102 | .DS_Store
--------------------------------------------------------------------------------
/Assets/InputSystem_Actions.inputactions.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 052faaac586de48259a63d0c4782560b
3 | ScriptedImporter:
4 | internalIDToNameTable: []
5 | externalObjects: {}
6 | serializedVersion: 2
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 | script: {fileID: 11500000, guid: 8404be70184654265930450def6a9037, type: 3}
11 | generateWrapperCode: 0
12 | wrapperCodePath:
13 | wrapperClassName:
14 | wrapperCodeNamespace:
15 |
--------------------------------------------------------------------------------
/Assets/Plugins.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9c81fc6c65b464e28abde7b6703703a0
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Plugins/Android.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1ada73d764ed44770baf3040d3609875
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Plugins/Android/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Assets/Plugins/Android/AndroidManifest.xml.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2929aeee723fb46dc92e15523ac387e0
3 | TextScriptImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/Plugins/Android/libs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 45ce793be43e64681a32965532678274
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Plugins/Android/libs/arm64-v8a.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ac8e6420f04b7446a9f18fd59deb520f
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Plugins/Android/libs/arm64-v8a/libespeak-ng.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/skykim/piper-unity/f244185b52c12c378accecd5b5537edb1ff147d8/Assets/Plugins/Android/libs/arm64-v8a/libespeak-ng.so
--------------------------------------------------------------------------------
/Assets/Plugins/Android/libs/arm64-v8a/libespeak-ng.so.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: efa022b5919bd49e1a4d48b3a31affa1
--------------------------------------------------------------------------------
/Assets/Plugins/Windows.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c080d19d352224895822271379f67fbc
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Plugins/Windows/x64.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 92c775bb59f9440dfb1d1c05184a9246
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Plugins/Windows/x64/libespeak-ng.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/skykim/piper-unity/f244185b52c12c378accecd5b5537edb1ff147d8/Assets/Plugins/Windows/x64/libespeak-ng.dll
--------------------------------------------------------------------------------
/Assets/Plugins/Windows/x64/libespeak-ng.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 24f50459c13a942709ee5730bd5d153a
--------------------------------------------------------------------------------
/Assets/Plugins/macOS.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: bee2191f3680f4cc1bc5c48d45a7713d
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Plugins/macOS/x64.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: aaa33408fc3064409a79f396bb49a7da
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Plugins/macOS/x64/libespeak-ng.1.dylib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/skykim/piper-unity/f244185b52c12c378accecd5b5537edb1ff147d8/Assets/Plugins/macOS/x64/libespeak-ng.1.dylib
--------------------------------------------------------------------------------
/Assets/Plugins/macOS/x64/libespeak-ng.1.dylib.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 042128efce9044ea49170d635e1554f3
3 | PluginImporter:
4 | externalObjects: {}
5 | serializedVersion: 3
6 | iconMap: {}
7 | executionOrder: {}
8 | defineConstraints: []
9 | isPreloaded: 0
10 | isOverridable: 0
11 | isExplicitlyReferenced: 0
12 | validateReferences: 1
13 | platformData:
14 | Any:
15 | enabled: 0
16 | settings:
17 | Exclude Android: 1
18 | Exclude Editor: 0
19 | Exclude Linux64: 1
20 | Exclude OSXUniversal: 0
21 | Exclude WebGL: 1
22 | Exclude Win: 1
23 | Exclude Win64: 1
24 | Editor:
25 | enabled: 1
26 | settings:
27 | DefaultValueInitialized: true
28 | OSXUniversal:
29 | enabled: 1
30 | settings:
31 | CPU: AnyCPU
32 | userData:
33 | assetBundleName:
34 | assetBundleVariant:
35 |
--------------------------------------------------------------------------------
/Assets/Plugins/macOS/x64/libespeak-ng.dylib:
--------------------------------------------------------------------------------
1 | libespeak-ng.1.dylib
--------------------------------------------------------------------------------
/Assets/Plugins/macOS/x64/libespeak-ng.dylib.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 34840fb91c569481f8e9fba1ef84393d
--------------------------------------------------------------------------------
/Assets/Scenes.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9c53962885c2c4f449125a979d6ad240
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Scenes/PiperScene.unity.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 99c9720ab356a0642a771bea13969a05
3 | DefaultImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/Scripts.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1c85ea0193b0a4fafaf37964ac28bded
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Scripts/ESpeakNG.cs:
--------------------------------------------------------------------------------
1 | // ESpeakNG.cs
2 |
3 | using System;
4 | using System.Runtime.InteropServices;
5 |
6 | public static class ESpeakNG
7 | {
8 | private const string LibName = "espeak-ng";
9 |
10 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
11 | public delegate int SynthCallback(IntPtr wav, int numSamples, IntPtr events);
12 |
13 | [DllImport(LibName, CallingConvention = CallingConvention.Cdecl)]
14 | public static extern int espeak_Initialize(int output, int buflength, string path, int options);
15 |
16 | [DllImport(LibName, CallingConvention = CallingConvention.Cdecl)]
17 | public static extern void espeak_SetSynthCallback(SynthCallback callback);
18 |
19 | [DllImport(LibName, CallingConvention = CallingConvention.Cdecl)]
20 | public static extern int espeak_SetVoiceByName(string name);
21 |
22 | [DllImport(LibName, CallingConvention = CallingConvention.Cdecl)]
23 | public static extern int espeak_Synth(byte[] text, int size, uint position, int positionType, uint endPosition, uint flags, IntPtr uniqueIdentifier, IntPtr userData);
24 |
25 | [DllImport(LibName, CallingConvention = CallingConvention.Cdecl)]
26 | public static extern int espeak_GetSampleRate();
27 |
28 | [DllImport(LibName, CallingConvention = CallingConvention.Cdecl)]
29 | public static extern int espeak_Terminate();
30 |
31 | [DllImport(LibName, CallingConvention = CallingConvention.Cdecl)]
32 | public static extern IntPtr espeak_TextToPhonemes(ref IntPtr text, int textmode, int phonememode);
33 | }
--------------------------------------------------------------------------------
/Assets/Scripts/ESpeakNG.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: eec836b46e7244c8b98b07e2c0f9c503
--------------------------------------------------------------------------------
/Assets/Scripts/ESpeakTokenizer.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using Newtonsoft.Json;
3 | using System.Collections.Generic;
4 | using System;
5 |
6 | public class AudioConfig
7 | {
8 | public int sample_rate { get; set; }
9 | public string quality { get; set; }
10 | }
11 |
12 | public class ESpeakConfig
13 | {
14 | public string voice { get; set; }
15 | }
16 |
17 | public class InferenceConfig
18 | {
19 | public float noise_scale { get; set; }
20 | public float length_scale { get; set; }
21 | public float noise_w { get; set; }
22 | }
23 |
24 | public class PiperConfig
25 | {
26 | public AudioConfig audio { get; set; }
27 | public ESpeakConfig espeak { get; set; }
28 | public InferenceConfig inference { get; set; }
29 | public string phoneme_type { get; set; }
30 |
31 | [JsonProperty("phoneme_id_map")]
32 | public Dictionary PhonemeIdMap { get; set; }
33 | }
34 |
35 | public class ESpeakTokenizer : MonoBehaviour
36 | {
37 | public TextAsset jsonFile;
38 |
39 | public int SampleRate { get; private set; }
40 | public string Quality { get; private set; }
41 | public string Voice { get; private set; }
42 | public string PhonemeType { get; private set; }
43 |
44 | private PiperConfig config;
45 | private float[] inferenceParams;
46 | private bool isInitialized = false;
47 |
48 | void Awake()
49 | {
50 | Initialize();
51 | }
52 |
53 | private void Initialize()
54 | {
55 | if (jsonFile == null)
56 | {
57 | Debug.LogError("JSON file is not assigned. Please assign it in the Inspector.");
58 | return;
59 | }
60 |
61 | try
62 | {
63 | config = JsonConvert.DeserializeObject(jsonFile.text);
64 | if (config == null || config.audio == null || config.espeak == null || config.inference == null || config.PhonemeIdMap == null)
65 | {
66 | Debug.LogError("JSON data is missing required fields or is invalid. Deserialization resulted in a partially/fully null object.");
67 | config = null;
68 | return;
69 | }
70 | }
71 | catch (JsonException ex)
72 | {
73 | Debug.LogError($"Failed to parse JSON file. Error: {ex.Message}");
74 | return;
75 | }
76 |
77 | inferenceParams = new float[3]
78 | {
79 | config.inference.noise_scale,
80 | config.inference.length_scale,
81 | config.inference.noise_w
82 | };
83 |
84 | this.SampleRate = config.audio.sample_rate;
85 | this.Quality = config.audio.quality;
86 | this.Voice = config.espeak.voice;
87 | this.PhonemeType = config.phoneme_type;
88 |
89 | isInitialized = true;
90 | Debug.Log("JSON parsing and setup completed successfully.");
91 | Debug.Log($"Extracted Settings: SampleRate={SampleRate}, Quality='{Quality}', Voice='{Voice}', PhonemeType='{PhonemeType}'");
92 | }
93 |
94 | public int[] Tokenize(string[] phonemes)
95 | {
96 | if (!isInitialized)
97 | {
98 | Debug.LogError("Tokenizer is not initialized. Check for errors during Awake().");
99 | return null;
100 | }
101 |
102 | int estimatedCapacity = (phonemes != null ? phonemes.Length * 2 : 0) + 3;
103 | var tokenizedList = new List(estimatedCapacity) { 1, 0 };
104 |
105 | if (phonemes != null && phonemes.Length > 0)
106 | {
107 | foreach (string phoneme in phonemes)
108 | {
109 | if (config.PhonemeIdMap.TryGetValue(phoneme, out int[] ids) && ids.Length > 0)
110 | {
111 | tokenizedList.Add(ids[0]);
112 | tokenizedList.Add(0);
113 | }
114 | else
115 | {
116 | Debug.LogWarning($"Token not found for phoneme: '{phoneme}'. It will be skipped.");
117 | }
118 | }
119 | }
120 |
121 | tokenizedList.Add(2);
122 |
123 | return tokenizedList.ToArray();
124 | }
125 |
126 | public float[] GetInferenceParams()
127 | {
128 | if (!isInitialized)
129 | {
130 | Debug.LogError("Tokenizer is not initialized. Cannot get inference parameters.");
131 | return null;
132 | }
133 | return (float[])inferenceParams.Clone();
134 | }
135 | }
--------------------------------------------------------------------------------
/Assets/Scripts/ESpeakTokenizer.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1f7a3d2d14e554c2792464d4165f92dd
--------------------------------------------------------------------------------
/Assets/Scripts/FrequencyBandAnalyser.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 |
3 | [RequireComponent(typeof(LineRenderer))]
4 | public class FrequencyBandAnalyser : MonoBehaviour
5 | {
6 | public enum Bands
7 | {
8 | Eight = 8,
9 | SixtyFour = 64,
10 | }
11 |
12 | AudioSource _AudioSource;
13 | LineRenderer _lineRenderer;
14 |
15 | int _FrequencyBins = 512;
16 |
17 | float[] _Samples;
18 | float[] _SampleBuffer;
19 |
20 | [Header("Visualization Settings")]
21 | public bool _enableVisualization = true;
22 | public float _Scalar = 100;
23 | public float _visualizerWidth = 10f;
24 | public Color _lineColor = Color.white;
25 | public float _lineWidth = 0.05f;
26 |
27 | [Header("Audio Processing")]
28 | public float _SmoothDownRate = 10;
29 |
30 | float[] _FreqBands8;
31 | [HideInInspector]
32 | float[] _FreqBands64;
33 |
34 | void Start()
35 | {
36 | _AudioSource = GetComponent();
37 | _lineRenderer = GetComponent();
38 |
39 | _FreqBands8 = new float[8];
40 | _FreqBands64 = new float[64];
41 | _Samples = new float[_FrequencyBins];
42 | _SampleBuffer = new float[_FrequencyBins];
43 |
44 | SetupLineRenderer();
45 | }
46 |
47 | void SetupLineRenderer()
48 | {
49 | _lineRenderer.positionCount = _FreqBands64.Length;
50 | _lineRenderer.startWidth = _lineWidth;
51 | _lineRenderer.endWidth = _lineWidth;
52 | _lineRenderer.startColor = _lineColor;
53 | _lineRenderer.endColor = _lineColor;
54 | _lineRenderer.useWorldSpace = false;
55 | }
56 |
57 | void Update()
58 | {
59 | _AudioSource.GetSpectrumData(_SampleBuffer, 0, FFTWindow.BlackmanHarris);
60 |
61 | for (int i = 0; i < _Samples.Length; i++)
62 | {
63 | if (_SampleBuffer[i] > _Samples[i])
64 | _Samples[i] = _SampleBuffer[i];
65 | else
66 | _Samples[i] = Mathf.Lerp(_Samples[i], _SampleBuffer[i], Time.deltaTime * _SmoothDownRate);
67 | }
68 |
69 | UpdateFreqBands8();
70 | UpdateFreqBands64();
71 |
72 | if (_enableVisualization)
73 | {
74 | _lineRenderer.enabled = true;
75 | DrawVisualizer();
76 | }
77 | else
78 | {
79 | _lineRenderer.enabled = false;
80 | }
81 | }
82 |
83 | void DrawVisualizer()
84 | {
85 | _lineRenderer.startWidth = _lineWidth;
86 | _lineRenderer.endWidth = _lineWidth;
87 | _lineRenderer.startColor = _lineColor;
88 | _lineRenderer.endColor = _lineColor;
89 |
90 | Vector3[] positions = new Vector3[_FreqBands64.Length];
91 | for (int i = 0; i < _FreqBands64.Length; i++)
92 | {
93 | float xPos = (float)i / (_FreqBands64.Length - 1) * _visualizerWidth;
94 | float yPos = _FreqBands64[i] * _Scalar;
95 | positions[i] = new Vector3(xPos, yPos, 0);
96 | }
97 | _lineRenderer.SetPositions(positions);
98 | }
99 | void UpdateFreqBands8()
100 | {
101 | int count = 0;
102 | for (int i = 0; i < 8; i++)
103 | {
104 | float average = 0;
105 | int sampleCount = (int)Mathf.Pow(2, i) * 2;
106 |
107 | if(i == 7)
108 | {
109 | sampleCount += 2;
110 | }
111 |
112 | for (int j = 0; j < sampleCount; j++)
113 | {
114 | average += _Samples[count] * (count + 1);
115 | count++;
116 | }
117 |
118 | average /= count;
119 | _FreqBands8[i] = average;
120 | }
121 | }
122 |
123 | void UpdateFreqBands64()
124 | {
125 | int count = 0;
126 | int sampleCount = 1;
127 | int power = 0;
128 |
129 | for (int i = 0; i < 64; i++)
130 | {
131 | float average = 0;
132 |
133 | if (i == 16 || i == 32 || i == 40 || i == 48 || i == 56)
134 | {
135 | power++;
136 | sampleCount = (int)Mathf.Pow(2, power);
137 | if (power == 3)
138 | sampleCount -= 2;
139 | }
140 |
141 | for (int j = 0; j < sampleCount; j++)
142 | {
143 | average += _Samples[count] * (count + 1);
144 | count++;
145 | }
146 |
147 | average /= count;
148 | _FreqBands64[i] = average;
149 | }
150 | }
151 |
152 | public float GetBandValue(int index, Bands bands)
153 | {
154 | if(bands == Bands.Eight)
155 | {
156 | return _FreqBands8[index];
157 | }
158 | else
159 | {
160 | return _FreqBands64[index];
161 | }
162 | }
163 | }
--------------------------------------------------------------------------------
/Assets/Scripts/FrequencyBandAnalyser.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 68e525749ca13446cb150be6bf457fe9
--------------------------------------------------------------------------------
/Assets/Scripts/PiperManager.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5bd68a7f73b184ad9a8dfb22592a7d44
--------------------------------------------------------------------------------
/Assets/Settings.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 709f11a7f3c4041caa4ef136ea32d874
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Settings/DefaultVolumeProfile.asset.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ab09877e2e707104187f6f83e2f62510
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 11400000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Settings/Mobile_RPAsset.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!114 &11400000
4 | MonoBehaviour:
5 | m_ObjectHideFlags: 0
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | m_GameObject: {fileID: 0}
10 | m_Enabled: 1
11 | m_EditorHideFlags: 0
12 | m_Script: {fileID: 11500000, guid: bf2edee5c58d82540a51f03df9d42094, type: 3}
13 | m_Name: Mobile_RPAsset
14 | m_EditorClassIdentifier:
15 | k_AssetVersion: 12
16 | k_AssetPreviousVersion: 12
17 | m_RendererType: 1
18 | m_RendererData: {fileID: 0}
19 | m_RendererDataList:
20 | - {fileID: 11400000, guid: 65bc7dbf4170f435aa868c779acfb082, type: 2}
21 | m_DefaultRendererIndex: 0
22 | m_RequireDepthTexture: 0
23 | m_RequireOpaqueTexture: 0
24 | m_OpaqueDownsampling: 0
25 | m_SupportsTerrainHoles: 1
26 | m_SupportsHDR: 1
27 | m_HDRColorBufferPrecision: 0
28 | m_MSAA: 1
29 | m_RenderScale: 0.8
30 | m_UpscalingFilter: 3
31 | m_FsrOverrideSharpness: 0
32 | m_FsrSharpness: 0.92
33 | m_EnableLODCrossFade: 1
34 | m_LODCrossFadeDitheringType: 1
35 | m_ShEvalMode: 0
36 | m_LightProbeSystem: 0
37 | m_ProbeVolumeMemoryBudget: 1024
38 | m_ProbeVolumeBlendingMemoryBudget: 256
39 | m_SupportProbeVolumeGPUStreaming: 0
40 | m_SupportProbeVolumeDiskStreaming: 0
41 | m_SupportProbeVolumeScenarios: 0
42 | m_SupportProbeVolumeScenarioBlending: 0
43 | m_ProbeVolumeSHBands: 1
44 | m_MainLightRenderingMode: 1
45 | m_MainLightShadowsSupported: 1
46 | m_MainLightShadowmapResolution: 1024
47 | m_AdditionalLightsRenderingMode: 1
48 | m_AdditionalLightsPerObjectLimit: 4
49 | m_AdditionalLightShadowsSupported: 0
50 | m_AdditionalLightsShadowmapResolution: 2048
51 | m_AdditionalLightsShadowResolutionTierLow: 256
52 | m_AdditionalLightsShadowResolutionTierMedium: 512
53 | m_AdditionalLightsShadowResolutionTierHigh: 1024
54 | m_ReflectionProbeBlending: 1
55 | m_ReflectionProbeBoxProjection: 1
56 | m_ShadowDistance: 50
57 | m_ShadowCascadeCount: 1
58 | m_Cascade2Split: 0.25
59 | m_Cascade3Split: {x: 0.1, y: 0.3}
60 | m_Cascade4Split: {x: 0.067, y: 0.2, z: 0.467}
61 | m_CascadeBorder: 0.2
62 | m_ShadowDepthBias: 1
63 | m_ShadowNormalBias: 1
64 | m_AnyShadowsSupported: 1
65 | m_SoftShadowsSupported: 0
66 | m_ConservativeEnclosingSphere: 1
67 | m_NumIterationsEnclosingSphere: 64
68 | m_SoftShadowQuality: 2
69 | m_AdditionalLightsCookieResolution: 1024
70 | m_AdditionalLightsCookieFormat: 1
71 | m_UseSRPBatcher: 1
72 | m_SupportsDynamicBatching: 0
73 | m_MixedLightingSupported: 1
74 | m_SupportsLightCookies: 1
75 | m_SupportsLightLayers: 1
76 | m_DebugLevel: 0
77 | m_StoreActionsOptimization: 0
78 | m_UseAdaptivePerformance: 1
79 | m_ColorGradingMode: 0
80 | m_ColorGradingLutSize: 32
81 | m_AllowPostProcessAlphaOutput: 0
82 | m_UseFastSRGBLinearConversion: 1
83 | m_SupportDataDrivenLensFlare: 1
84 | m_SupportScreenSpaceLensFlare: 1
85 | m_GPUResidentDrawerMode: 0
86 | m_SmallMeshScreenPercentage: 0
87 | m_GPUResidentDrawerEnableOcclusionCullingInCameras: 0
88 | m_ShadowType: 1
89 | m_LocalShadowsSupported: 0
90 | m_LocalShadowsAtlasResolution: 256
91 | m_MaxPixelLights: 0
92 | m_ShadowAtlasResolution: 256
93 | m_VolumeFrameworkUpdateMode: 0
94 | m_VolumeProfile: {fileID: 11400000, guid: 10fc4df2da32a41aaa32d77bc913491c, type: 2}
95 | apvScenesData:
96 | obsoleteSceneBounds:
97 | m_Keys: []
98 | m_Values: []
99 | obsoleteHasProbeVolumes:
100 | m_Keys: []
101 | m_Values:
102 | m_PrefilteringModeMainLightShadows: 3
103 | m_PrefilteringModeAdditionalLight: 0
104 | m_PrefilteringModeAdditionalLightShadows: 0
105 | m_PrefilterXRKeywords: 1
106 | m_PrefilteringModeForwardPlus: 2
107 | m_PrefilteringModeDeferredRendering: 0
108 | m_PrefilteringModeScreenSpaceOcclusion: 0
109 | m_PrefilterDebugKeywords: 1
110 | m_PrefilterWriteRenderingLayers: 1
111 | m_PrefilterHDROutput: 1
112 | m_PrefilterAlphaOutput: 1
113 | m_PrefilterSSAODepthNormals: 1
114 | m_PrefilterSSAOSourceDepthLow: 1
115 | m_PrefilterSSAOSourceDepthMedium: 1
116 | m_PrefilterSSAOSourceDepthHigh: 1
117 | m_PrefilterSSAOInterleaved: 1
118 | m_PrefilterSSAOBlueNoise: 1
119 | m_PrefilterSSAOSampleCountLow: 1
120 | m_PrefilterSSAOSampleCountMedium: 1
121 | m_PrefilterSSAOSampleCountHigh: 1
122 | m_PrefilterDBufferMRT1: 1
123 | m_PrefilterDBufferMRT2: 1
124 | m_PrefilterDBufferMRT3: 1
125 | m_PrefilterSoftShadowsQualityLow: 1
126 | m_PrefilterSoftShadowsQualityMedium: 1
127 | m_PrefilterSoftShadowsQualityHigh: 1
128 | m_PrefilterSoftShadows: 0
129 | m_PrefilterScreenCoord: 1
130 | m_PrefilterNativeRenderPass: 1
131 | m_PrefilterUseLegacyLightmaps: 0
132 | m_ShaderVariantLogLevel: 0
133 | m_ShadowCascades: 0
134 | m_Textures:
135 | blueNoise64LTex: {fileID: 2800000, guid: e3d24661c1e055f45a7560c033dbb837, type: 3}
136 | bayerMatrixTex: {fileID: 2800000, guid: f9ee4ed84c1d10c49aabb9b210b0fc44, type: 3}
137 |
--------------------------------------------------------------------------------
/Assets/Settings/Mobile_RPAsset.asset.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5e6cbd92db86f4b18aec3ed561671858
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 11400000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Settings/Mobile_Renderer.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!114 &11400000
4 | MonoBehaviour:
5 | m_ObjectHideFlags: 0
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | m_GameObject: {fileID: 0}
10 | m_Enabled: 1
11 | m_EditorHideFlags: 0
12 | m_Script: {fileID: 11500000, guid: de640fe3d0db1804a85f9fc8f5cadab6, type: 3}
13 | m_Name: Mobile_Renderer
14 | m_EditorClassIdentifier:
15 | debugShaders:
16 | debugReplacementPS: {fileID: 4800000, guid: cf852408f2e174538bcd9b7fda1c5ae7,
17 | type: 3}
18 | hdrDebugViewPS: {fileID: 4800000, guid: 573620ae32aec764abd4d728906d2587, type: 3}
19 | probeVolumeSamplingDebugComputeShader: {fileID: 7200000, guid: 53626a513ea68ce47b59dc1299fe3959,
20 | type: 3}
21 | probeVolumeResources:
22 | probeVolumeDebugShader: {fileID: 0}
23 | probeVolumeFragmentationDebugShader: {fileID: 0}
24 | probeVolumeOffsetDebugShader: {fileID: 0}
25 | probeVolumeSamplingDebugShader: {fileID: 0}
26 | probeSamplingDebugMesh: {fileID: 0}
27 | probeSamplingDebugTexture: {fileID: 0}
28 | probeVolumeBlendStatesCS: {fileID: 0}
29 | m_RendererFeatures: []
30 | m_RendererFeatureMap:
31 | m_UseNativeRenderPass: 1
32 | postProcessData: {fileID: 11400000, guid: 41439944d30ece34e96484bdb6645b55, type: 2}
33 | m_AssetVersion: 2
34 | m_OpaqueLayerMask:
35 | serializedVersion: 2
36 | m_Bits: 4294967295
37 | m_TransparentLayerMask:
38 | serializedVersion: 2
39 | m_Bits: 4294967295
40 | m_DefaultStencilState:
41 | overrideStencilState: 0
42 | stencilReference: 0
43 | stencilCompareFunction: 8
44 | passOperation: 2
45 | failOperation: 0
46 | zFailOperation: 0
47 | m_ShadowTransparentReceive: 0
48 | m_RenderingMode: 2
49 | m_DepthPrimingMode: 0
50 | m_CopyDepthMode: 0
51 | m_AccurateGbufferNormals: 0
52 | m_IntermediateTextureMode: 0
53 |
--------------------------------------------------------------------------------
/Assets/Settings/Mobile_Renderer.asset.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 65bc7dbf4170f435aa868c779acfb082
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 11400000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Settings/PC_RPAsset.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!114 &11400000
4 | MonoBehaviour:
5 | m_ObjectHideFlags: 0
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | m_GameObject: {fileID: 0}
10 | m_Enabled: 1
11 | m_EditorHideFlags: 0
12 | m_Script: {fileID: 11500000, guid: bf2edee5c58d82540a51f03df9d42094, type: 3}
13 | m_Name: PC_RPAsset
14 | m_EditorClassIdentifier:
15 | k_AssetVersion: 12
16 | k_AssetPreviousVersion: 12
17 | m_RendererType: 1
18 | m_RendererData: {fileID: 0}
19 | m_RendererDataList:
20 | - {fileID: 11400000, guid: f288ae1f4751b564a96ac7587541f7a2, type: 2}
21 | m_DefaultRendererIndex: 0
22 | m_RequireDepthTexture: 1
23 | m_RequireOpaqueTexture: 1
24 | m_OpaqueDownsampling: 1
25 | m_SupportsTerrainHoles: 1
26 | m_SupportsHDR: 1
27 | m_HDRColorBufferPrecision: 0
28 | m_MSAA: 1
29 | m_RenderScale: 1
30 | m_UpscalingFilter: 0
31 | m_FsrOverrideSharpness: 0
32 | m_FsrSharpness: 0.92
33 | m_EnableLODCrossFade: 1
34 | m_LODCrossFadeDitheringType: 1
35 | m_ShEvalMode: 0
36 | m_LightProbeSystem: 0
37 | m_ProbeVolumeMemoryBudget: 1024
38 | m_ProbeVolumeBlendingMemoryBudget: 256
39 | m_SupportProbeVolumeGPUStreaming: 0
40 | m_SupportProbeVolumeDiskStreaming: 0
41 | m_SupportProbeVolumeScenarios: 0
42 | m_SupportProbeVolumeScenarioBlending: 0
43 | m_ProbeVolumeSHBands: 1
44 | m_MainLightRenderingMode: 1
45 | m_MainLightShadowsSupported: 1
46 | m_MainLightShadowmapResolution: 2048
47 | m_AdditionalLightsRenderingMode: 1
48 | m_AdditionalLightsPerObjectLimit: 4
49 | m_AdditionalLightShadowsSupported: 1
50 | m_AdditionalLightsShadowmapResolution: 2048
51 | m_AdditionalLightsShadowResolutionTierLow: 256
52 | m_AdditionalLightsShadowResolutionTierMedium: 512
53 | m_AdditionalLightsShadowResolutionTierHigh: 1024
54 | m_ReflectionProbeBlending: 1
55 | m_ReflectionProbeBoxProjection: 1
56 | m_ShadowDistance: 50
57 | m_ShadowCascadeCount: 4
58 | m_Cascade2Split: 0.25
59 | m_Cascade3Split: {x: 0.1, y: 0.3}
60 | m_Cascade4Split: {x: 0.12299999, y: 0.2926, z: 0.53599995}
61 | m_CascadeBorder: 0.107758604
62 | m_ShadowDepthBias: 0.1
63 | m_ShadowNormalBias: 0.5
64 | m_AnyShadowsSupported: 1
65 | m_SoftShadowsSupported: 1
66 | m_ConservativeEnclosingSphere: 1
67 | m_NumIterationsEnclosingSphere: 64
68 | m_SoftShadowQuality: 3
69 | m_AdditionalLightsCookieResolution: 2048
70 | m_AdditionalLightsCookieFormat: 3
71 | m_UseSRPBatcher: 1
72 | m_SupportsDynamicBatching: 0
73 | m_MixedLightingSupported: 1
74 | m_SupportsLightCookies: 1
75 | m_SupportsLightLayers: 1
76 | m_DebugLevel: 0
77 | m_StoreActionsOptimization: 0
78 | m_UseAdaptivePerformance: 1
79 | m_ColorGradingMode: 0
80 | m_ColorGradingLutSize: 32
81 | m_UseFastSRGBLinearConversion: 0
82 | m_SupportDataDrivenLensFlare: 1
83 | m_SupportScreenSpaceLensFlare: 1
84 | m_GPUResidentDrawerMode: 0
85 | m_UseLegacyLightmaps: 0
86 | m_SmallMeshScreenPercentage: 0
87 | m_GPUResidentDrawerEnableOcclusionCullingInCameras: 0
88 | m_ShadowType: 1
89 | m_LocalShadowsSupported: 0
90 | m_LocalShadowsAtlasResolution: 256
91 | m_MaxPixelLights: 0
92 | m_ShadowAtlasResolution: 256
93 | m_VolumeFrameworkUpdateMode: 0
94 | m_VolumeProfile: {fileID: 11400000, guid: 10fc4df2da32a41aaa32d77bc913491c, type: 2}
95 | apvScenesData:
96 | obsoleteSceneBounds:
97 | m_Keys: []
98 | m_Values: []
99 | obsoleteHasProbeVolumes:
100 | m_Keys: []
101 | m_Values:
102 | m_PrefilteringModeMainLightShadows: 3
103 | m_PrefilteringModeAdditionalLight: 4
104 | m_PrefilteringModeAdditionalLightShadows: 0
105 | m_PrefilterXRKeywords: 1
106 | m_PrefilteringModeForwardPlus: 1
107 | m_PrefilteringModeDeferredRendering: 0
108 | m_PrefilteringModeScreenSpaceOcclusion: 1
109 | m_PrefilterDebugKeywords: 1
110 | m_PrefilterWriteRenderingLayers: 0
111 | m_PrefilterHDROutput: 1
112 | m_PrefilterSSAODepthNormals: 0
113 | m_PrefilterSSAOSourceDepthLow: 1
114 | m_PrefilterSSAOSourceDepthMedium: 1
115 | m_PrefilterSSAOSourceDepthHigh: 1
116 | m_PrefilterSSAOInterleaved: 1
117 | m_PrefilterSSAOBlueNoise: 0
118 | m_PrefilterSSAOSampleCountLow: 1
119 | m_PrefilterSSAOSampleCountMedium: 0
120 | m_PrefilterSSAOSampleCountHigh: 1
121 | m_PrefilterDBufferMRT1: 1
122 | m_PrefilterDBufferMRT2: 1
123 | m_PrefilterDBufferMRT3: 0
124 | m_PrefilterSoftShadowsQualityLow: 0
125 | m_PrefilterSoftShadowsQualityMedium: 0
126 | m_PrefilterSoftShadowsQualityHigh: 0
127 | m_PrefilterSoftShadows: 0
128 | m_PrefilterScreenCoord: 1
129 | m_PrefilterNativeRenderPass: 1
130 | m_PrefilterUseLegacyLightmaps: 0
131 | m_ShaderVariantLogLevel: 0
132 | m_ShadowCascades: 0
133 | m_Textures:
134 | blueNoise64LTex: {fileID: 2800000, guid: e3d24661c1e055f45a7560c033dbb837, type: 3}
135 | bayerMatrixTex: {fileID: 2800000, guid: f9ee4ed84c1d10c49aabb9b210b0fc44, type: 3}
136 |
--------------------------------------------------------------------------------
/Assets/Settings/PC_RPAsset.asset.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4b83569d67af61e458304325a23e5dfd
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 11400000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Settings/PC_Renderer.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!114 &11400000
4 | MonoBehaviour:
5 | m_ObjectHideFlags: 0
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | m_GameObject: {fileID: 0}
10 | m_Enabled: 1
11 | m_EditorHideFlags: 0
12 | m_Script: {fileID: 11500000, guid: de640fe3d0db1804a85f9fc8f5cadab6, type: 3}
13 | m_Name: PC_Renderer
14 | m_EditorClassIdentifier:
15 | debugShaders:
16 | debugReplacementPS: {fileID: 4800000, guid: cf852408f2e174538bcd9b7fda1c5ae7,
17 | type: 3}
18 | hdrDebugViewPS: {fileID: 4800000, guid: 573620ae32aec764abd4d728906d2587, type: 3}
19 | probeVolumeSamplingDebugComputeShader: {fileID: 7200000, guid: 53626a513ea68ce47b59dc1299fe3959,
20 | type: 3}
21 | probeVolumeResources:
22 | probeVolumeDebugShader: {fileID: 4800000, guid: e5c6678ed2aaa91408dd3df699057aae,
23 | type: 3}
24 | probeVolumeFragmentationDebugShader: {fileID: 4800000, guid: 03cfc4915c15d504a9ed85ecc404e607,
25 | type: 3}
26 | probeVolumeOffsetDebugShader: {fileID: 4800000, guid: 53a11f4ebaebf4049b3638ef78dc9664,
27 | type: 3}
28 | probeVolumeSamplingDebugShader: {fileID: 4800000, guid: 8f96cd657dc40064aa21efcc7e50a2e7,
29 | type: 3}
30 | probeSamplingDebugMesh: {fileID: -3555484719484374845, guid: 57d7c4c16e2765b47a4d2069b311bffe,
31 | type: 3}
32 | probeSamplingDebugTexture: {fileID: 2800000, guid: 24ec0e140fb444a44ab96ee80844e18e,
33 | type: 3}
34 | probeVolumeBlendStatesCS: {fileID: 7200000, guid: b9a23f869c4fd45f19c5ada54dd82176,
35 | type: 3}
36 | m_RendererFeatures:
37 | - {fileID: 7833122117494664109}
38 | m_RendererFeatureMap: ad6b866f10d7b46c
39 | m_UseNativeRenderPass: 1
40 | postProcessData: {fileID: 11400000, guid: 41439944d30ece34e96484bdb6645b55, type: 2}
41 | m_AssetVersion: 2
42 | m_OpaqueLayerMask:
43 | serializedVersion: 2
44 | m_Bits: 4294967295
45 | m_TransparentLayerMask:
46 | serializedVersion: 2
47 | m_Bits: 4294967295
48 | m_DefaultStencilState:
49 | overrideStencilState: 0
50 | stencilReference: 1
51 | stencilCompareFunction: 3
52 | passOperation: 2
53 | failOperation: 0
54 | zFailOperation: 0
55 | m_ShadowTransparentReceive: 1
56 | m_RenderingMode: 2
57 | m_DepthPrimingMode: 0
58 | m_CopyDepthMode: 0
59 | m_AccurateGbufferNormals: 0
60 | m_IntermediateTextureMode: 0
61 | --- !u!114 &7833122117494664109
62 | MonoBehaviour:
63 | m_ObjectHideFlags: 0
64 | m_CorrespondingSourceObject: {fileID: 0}
65 | m_PrefabInstance: {fileID: 0}
66 | m_PrefabAsset: {fileID: 0}
67 | m_GameObject: {fileID: 0}
68 | m_Enabled: 1
69 | m_EditorHideFlags: 0
70 | m_Script: {fileID: 11500000, guid: f62c9c65cf3354c93be831c8bc075510, type: 3}
71 | m_Name: ScreenSpaceAmbientOcclusion
72 | m_EditorClassIdentifier:
73 | m_Active: 1
74 | m_Settings:
75 | AOMethod: 0
76 | Downsample: 0
77 | AfterOpaque: 0
78 | Source: 1
79 | NormalSamples: 1
80 | Intensity: 0.4
81 | DirectLightingStrength: 0.25
82 | Radius: 0.3
83 | Samples: 1
84 | BlurQuality: 0
85 | Falloff: 100
86 | SampleCount: -1
87 | m_BlueNoise256Textures:
88 | - {fileID: 2800000, guid: 36f118343fc974119bee3d09e2111500, type: 3}
89 | - {fileID: 2800000, guid: 4b7b083e6b6734e8bb2838b0b50a0bc8, type: 3}
90 | - {fileID: 2800000, guid: c06cc21c692f94f5fb5206247191eeee, type: 3}
91 | - {fileID: 2800000, guid: cb76dd40fa7654f9587f6a344f125c9a, type: 3}
92 | - {fileID: 2800000, guid: e32226222ff144b24bf3a5a451de54bc, type: 3}
93 | - {fileID: 2800000, guid: 3302065f671a8450b82c9ddf07426f3a, type: 3}
94 | - {fileID: 2800000, guid: 56a77a3e8d64f47b6afe9e3c95cb57d5, type: 3}
95 | m_Shader: {fileID: 4800000, guid: 0849e84e3d62649e8882e9d6f056a017, type: 3}
96 |
--------------------------------------------------------------------------------
/Assets/Settings/PC_Renderer.asset.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f288ae1f4751b564a96ac7587541f7a2
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 11400000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Settings/SampleSceneProfile.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!114 &-7893295128165547882
4 | MonoBehaviour:
5 | m_ObjectHideFlags: 3
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | m_GameObject: {fileID: 0}
10 | m_Enabled: 1
11 | m_EditorHideFlags: 0
12 | m_Script: {fileID: 11500000, guid: 0b2db86121404754db890f4c8dfe81b2, type: 3}
13 | m_Name: Bloom
14 | m_EditorClassIdentifier:
15 | active: 1
16 | skipIterations:
17 | m_OverrideState: 1
18 | m_Value: 0
19 | threshold:
20 | m_OverrideState: 1
21 | m_Value: 1
22 | intensity:
23 | m_OverrideState: 1
24 | m_Value: 0.25
25 | scatter:
26 | m_OverrideState: 1
27 | m_Value: 0.5
28 | clamp:
29 | m_OverrideState: 0
30 | m_Value: 65472
31 | tint:
32 | m_OverrideState: 0
33 | m_Value: {r: 1, g: 1, b: 1, a: 1}
34 | highQualityFiltering:
35 | m_OverrideState: 1
36 | m_Value: 1
37 | downscale:
38 | m_OverrideState: 0
39 | m_Value: 0
40 | maxIterations:
41 | m_OverrideState: 0
42 | m_Value: 6
43 | dirtTexture:
44 | m_OverrideState: 0
45 | m_Value: {fileID: 0}
46 | dimension: 1
47 | dirtIntensity:
48 | m_OverrideState: 0
49 | m_Value: 0
50 | --- !u!114 &-3357603926938260329
51 | MonoBehaviour:
52 | m_ObjectHideFlags: 3
53 | m_CorrespondingSourceObject: {fileID: 0}
54 | m_PrefabInstance: {fileID: 0}
55 | m_PrefabAsset: {fileID: 0}
56 | m_GameObject: {fileID: 0}
57 | m_Enabled: 1
58 | m_EditorHideFlags: 0
59 | m_Script: {fileID: 11500000, guid: 899c54efeace73346a0a16faa3afe726, type: 3}
60 | m_Name: Vignette
61 | m_EditorClassIdentifier:
62 | active: 1
63 | color:
64 | m_OverrideState: 0
65 | m_Value: {r: 0, g: 0, b: 0, a: 1}
66 | center:
67 | m_OverrideState: 0
68 | m_Value: {x: 0.5, y: 0.5}
69 | intensity:
70 | m_OverrideState: 1
71 | m_Value: 0.2
72 | smoothness:
73 | m_OverrideState: 0
74 | m_Value: 0.2
75 | rounded:
76 | m_OverrideState: 0
77 | m_Value: 0
78 | --- !u!114 &11400000
79 | MonoBehaviour:
80 | m_ObjectHideFlags: 0
81 | m_CorrespondingSourceObject: {fileID: 0}
82 | m_PrefabInstance: {fileID: 0}
83 | m_PrefabAsset: {fileID: 0}
84 | m_GameObject: {fileID: 0}
85 | m_Enabled: 1
86 | m_EditorHideFlags: 0
87 | m_Script: {fileID: 11500000, guid: d7fd9488000d3734a9e00ee676215985, type: 3}
88 | m_Name: SampleSceneProfile
89 | m_EditorClassIdentifier:
90 | components:
91 | - {fileID: 849379129802519247}
92 | - {fileID: -7893295128165547882}
93 | - {fileID: 7391319092446245454}
94 | - {fileID: -3357603926938260329}
95 | --- !u!114 &849379129802519247
96 | MonoBehaviour:
97 | m_ObjectHideFlags: 3
98 | m_CorrespondingSourceObject: {fileID: 0}
99 | m_PrefabInstance: {fileID: 0}
100 | m_PrefabAsset: {fileID: 0}
101 | m_GameObject: {fileID: 0}
102 | m_Enabled: 1
103 | m_EditorHideFlags: 0
104 | m_Script: {fileID: 11500000, guid: 97c23e3b12dc18c42a140437e53d3951, type: 3}
105 | m_Name: Tonemapping
106 | m_EditorClassIdentifier:
107 | active: 1
108 | mode:
109 | m_OverrideState: 1
110 | m_Value: 1
111 | neutralHDRRangeReductionMode:
112 | m_OverrideState: 0
113 | m_Value: 2
114 | acesPreset:
115 | m_OverrideState: 0
116 | m_Value: 3
117 | hueShiftAmount:
118 | m_OverrideState: 0
119 | m_Value: 0
120 | detectPaperWhite:
121 | m_OverrideState: 1
122 | m_Value: 0
123 | paperWhite:
124 | m_OverrideState: 1
125 | m_Value: 234
126 | detectBrightnessLimits:
127 | m_OverrideState: 1
128 | m_Value: 1
129 | minNits:
130 | m_OverrideState: 1
131 | m_Value: 0.005
132 | maxNits:
133 | m_OverrideState: 1
134 | m_Value: 647
135 | --- !u!114 &7391319092446245454
136 | MonoBehaviour:
137 | m_ObjectHideFlags: 3
138 | m_CorrespondingSourceObject: {fileID: 0}
139 | m_PrefabInstance: {fileID: 0}
140 | m_PrefabAsset: {fileID: 0}
141 | m_GameObject: {fileID: 0}
142 | m_Enabled: 1
143 | m_EditorHideFlags: 0
144 | m_Script: {fileID: 11500000, guid: ccf1aba9553839d41ae37dd52e9ebcce, type: 3}
145 | m_Name: MotionBlur
146 | m_EditorClassIdentifier:
147 | active: 0
148 | mode:
149 | m_OverrideState: 0
150 | m_Value: 0
151 | quality:
152 | m_OverrideState: 1
153 | m_Value: 2
154 | intensity:
155 | m_OverrideState: 1
156 | m_Value: 0.6
157 | clamp:
158 | m_OverrideState: 0
159 | m_Value: 0.05
160 |
--------------------------------------------------------------------------------
/Assets/Settings/SampleSceneProfile.asset.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 10fc4df2da32a41aaa32d77bc913491c
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 0
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Settings/UniversalRenderPipelineGlobalSettings.asset.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 18dc0cd2c080841dea60987a38ce93fa
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 11400000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f54d1bd14bd3ca042bd867b519fee8cc
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Fonts.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6ab70aee4d56447429c680537fbf93ed
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Fonts/LiberationSans - OFL.txt:
--------------------------------------------------------------------------------
1 | Digitized data copyright (c) 2010 Google Corporation
2 | with Reserved Font Arimo, Tinos and Cousine.
3 | Copyright (c) 2012 Red Hat, Inc.
4 | with Reserved Font Name Liberation.
5 |
6 | This Font Software is licensed under the SIL Open Font License, Version 1.1.
7 | This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL
8 |
9 | -----------------------------------------------------------
10 | SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
11 | -----------------------------------------------------------
12 |
13 | PREAMBLE
14 | The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others.
15 |
16 | The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives.
17 |
18 | DEFINITIONS
19 | "Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation.
20 |
21 | "Reserved Font Name" refers to any names specified as such after the copyright statement(s).
22 |
23 | "Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s).
24 |
25 | "Modified Version" refers to any derivative made by adding to, deleting, or substituting -- in part or in whole -- any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment.
26 |
27 | "Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software.
28 |
29 | PERMISSION & CONDITIONS
30 | Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions:
31 |
32 | 1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself.
33 |
34 | 2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user.
35 |
36 | 3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users.
37 |
38 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission.
39 |
40 | 5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software.
41 |
42 | TERMINATION
43 | This license becomes null and void if any of the above conditions are not met.
44 |
45 | DISCLAIMER
46 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Fonts/LiberationSans - OFL.txt.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6e59c59b81ab47f9b6ec5781fa725d2c
3 | timeCreated: 1484171296
4 | licenseType: Pro
5 | TextScriptImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Fonts/LiberationSans.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/skykim/piper-unity/f244185b52c12c378accecd5b5537edb1ff147d8/Assets/TextMesh Pro/Fonts/LiberationSans.ttf
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Fonts/LiberationSans.ttf.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e3265ab4bf004d28a9537516768c1c75
3 | timeCreated: 1484171297
4 | licenseType: Pro
5 | TrueTypeFontImporter:
6 | serializedVersion: 2
7 | fontSize: 16
8 | forceTextureCase: -2
9 | characterSpacing: 1
10 | characterPadding: 0
11 | includeFontData: 1
12 | use2xBehaviour: 0
13 | fontNames: []
14 | fallbackFontReferences: []
15 | customCharacters:
16 | fontRenderingMode: 0
17 | userData:
18 | assetBundleName:
19 | assetBundleVariant:
20 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Resources.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 243e06394e614e5d99fab26083b707fa
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Resources/Fonts & Materials.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 731f1baa9d144a9897cb1d341c2092b8
3 | folderAsset: yes
4 | timeCreated: 1442040525
5 | licenseType: Pro
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Drop Shadow.mat:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!21 &2100000
4 | Material:
5 | serializedVersion: 6
6 | m_ObjectHideFlags: 0
7 | m_CorrespondingSourceObject: {fileID: 0}
8 | m_PrefabInstance: {fileID: 0}
9 | m_PrefabAsset: {fileID: 0}
10 | m_Name: LiberationSans SDF - Drop Shadow
11 | m_Shader: {fileID: 4800000, guid: fe393ace9b354375a9cb14cdbbc28be4, type: 3}
12 | m_ShaderKeywords: OUTLINE_ON UNDERLAY_ON
13 | m_LightmapFlags: 5
14 | m_EnableInstancingVariants: 0
15 | m_DoubleSidedGI: 0
16 | m_CustomRenderQueue: -1
17 | stringTagMap: {}
18 | disabledShaderPasses: []
19 | m_SavedProperties:
20 | serializedVersion: 3
21 | m_TexEnvs:
22 | - _BumpMap:
23 | m_Texture: {fileID: 0}
24 | m_Scale: {x: 1, y: 1}
25 | m_Offset: {x: 0, y: 0}
26 | - _Cube:
27 | m_Texture: {fileID: 0}
28 | m_Scale: {x: 1, y: 1}
29 | m_Offset: {x: 0, y: 0}
30 | - _FaceTex:
31 | m_Texture: {fileID: 0}
32 | m_Scale: {x: 1, y: 1}
33 | m_Offset: {x: 0, y: 0}
34 | - _MainTex:
35 | m_Texture: {fileID: 28684132378477856, guid: 8f586378b4e144a9851e7b34d9b748ee,
36 | type: 2}
37 | m_Scale: {x: 1, y: 1}
38 | m_Offset: {x: 0, y: 0}
39 | - _OutlineTex:
40 | m_Texture: {fileID: 0}
41 | m_Scale: {x: 1, y: 1}
42 | m_Offset: {x: 0, y: 0}
43 | m_Floats:
44 | - _Ambient: 0.5
45 | - _Bevel: 0.5
46 | - _BevelClamp: 0
47 | - _BevelOffset: 0
48 | - _BevelRoundness: 0
49 | - _BevelWidth: 0
50 | - _BumpFace: 0
51 | - _BumpOutline: 0
52 | - _ColorMask: 15
53 | - _Diffuse: 0.5
54 | - _DiffusePower: 1
55 | - _FaceDilate: 0.1
56 | - _FaceUVSpeedX: 0
57 | - _FaceUVSpeedY: 0
58 | - _GlowInner: 0.05
59 | - _GlowOffset: 0
60 | - _GlowOuter: 0.05
61 | - _GlowPower: 0.75
62 | - _GradientScale: 10
63 | - _LightAngle: 3.1416
64 | - _MaskSoftnessX: 0
65 | - _MaskSoftnessY: 0
66 | - _OutlineSoftness: 0
67 | - _OutlineUVSpeedX: 0
68 | - _OutlineUVSpeedY: 0
69 | - _OutlineWidth: 0.1
70 | - _PerspectiveFilter: 0.875
71 | - _Reflectivity: 10
72 | - _ScaleRatioA: 0.9
73 | - _ScaleRatioB: 0.73125
74 | - _ScaleRatioC: 0.64125
75 | - _ScaleX: 1
76 | - _ScaleY: 1
77 | - _ShaderFlags: 0
78 | - _Sharpness: 0
79 | - _SpecularPower: 2
80 | - _Stencil: 0
81 | - _StencilComp: 8
82 | - _StencilOp: 0
83 | - _StencilReadMask: 255
84 | - _StencilWriteMask: 255
85 | - _TextureHeight: 1024
86 | - _TextureWidth: 1024
87 | - _UnderlayDilate: 0
88 | - _UnderlayOffsetX: 0.5
89 | - _UnderlayOffsetY: -0.5
90 | - _UnderlaySoftness: 0.05
91 | - _VertexOffsetX: 0
92 | - _VertexOffsetY: 0
93 | - _WeightBold: 0.75
94 | - _WeightNormal: 0
95 | m_Colors:
96 | - _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767}
97 | - _Color: {r: 1, g: 1, b: 1, a: 1}
98 | - _EnvMatrixRotation: {r: 0, g: 0, b: 0, a: 0}
99 | - _FaceColor: {r: 1, g: 1, b: 1, a: 1}
100 | - _GlowColor: {r: 0, g: 1, b: 0, a: 0.5}
101 | - _MaskCoord: {r: 0, g: 0, b: 32767, a: 32767}
102 | - _OutlineColor: {r: 0, g: 0, b: 0, a: 1}
103 | - _ReflectFaceColor: {r: 0, g: 0, b: 0, a: 1}
104 | - _ReflectOutlineColor: {r: 0, g: 0, b: 0, a: 1}
105 | - _SpecularColor: {r: 1, g: 1, b: 1, a: 1}
106 | - _UnderlayColor: {r: 0, g: 0, b: 0, a: 0.5}
107 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Drop Shadow.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e73a58f6e2794ae7b1b7e50b7fb811b0
3 | timeCreated: 1484172806
4 | licenseType: Pro
5 | NativeFormatImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Fallback.asset.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 2e498d1c8094910479dc3e1b768306a4
3 | timeCreated: 1484171803
4 | licenseType: Pro
5 | NativeFormatImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Outline.mat:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!21 &2100000
4 | Material:
5 | serializedVersion: 6
6 | m_ObjectHideFlags: 0
7 | m_CorrespondingSourceObject: {fileID: 0}
8 | m_PrefabInstance: {fileID: 0}
9 | m_PrefabAsset: {fileID: 0}
10 | m_Name: LiberationSans SDF - Outline
11 | m_Shader: {fileID: 4800000, guid: fe393ace9b354375a9cb14cdbbc28be4, type: 3}
12 | m_ShaderKeywords: OUTLINE_ON
13 | m_LightmapFlags: 5
14 | m_EnableInstancingVariants: 0
15 | m_DoubleSidedGI: 0
16 | m_CustomRenderQueue: -1
17 | stringTagMap: {}
18 | disabledShaderPasses: []
19 | m_SavedProperties:
20 | serializedVersion: 3
21 | m_TexEnvs:
22 | - _BumpMap:
23 | m_Texture: {fileID: 0}
24 | m_Scale: {x: 1, y: 1}
25 | m_Offset: {x: 0, y: 0}
26 | - _Cube:
27 | m_Texture: {fileID: 0}
28 | m_Scale: {x: 1, y: 1}
29 | m_Offset: {x: 0, y: 0}
30 | - _FaceTex:
31 | m_Texture: {fileID: 0}
32 | m_Scale: {x: 1, y: 1}
33 | m_Offset: {x: 0, y: 0}
34 | - _MainTex:
35 | m_Texture: {fileID: 28684132378477856, guid: 8f586378b4e144a9851e7b34d9b748ee,
36 | type: 2}
37 | m_Scale: {x: 1, y: 1}
38 | m_Offset: {x: 0, y: 0}
39 | - _OutlineTex:
40 | m_Texture: {fileID: 0}
41 | m_Scale: {x: 1, y: 1}
42 | m_Offset: {x: 0, y: 0}
43 | m_Floats:
44 | - _Ambient: 0.5
45 | - _Bevel: 0.5
46 | - _BevelClamp: 0
47 | - _BevelOffset: 0
48 | - _BevelRoundness: 0
49 | - _BevelWidth: 0
50 | - _BumpFace: 0
51 | - _BumpOutline: 0
52 | - _ColorMask: 15
53 | - _Diffuse: 0.5
54 | - _FaceDilate: 0.1
55 | - _FaceUVSpeedX: 0
56 | - _FaceUVSpeedY: 0
57 | - _GlowInner: 0.05
58 | - _GlowOffset: 0
59 | - _GlowOuter: 0.05
60 | - _GlowPower: 0.75
61 | - _GradientScale: 10
62 | - _LightAngle: 3.1416
63 | - _MaskSoftnessX: 0
64 | - _MaskSoftnessY: 0
65 | - _OutlineSoftness: 0
66 | - _OutlineUVSpeedX: 0
67 | - _OutlineUVSpeedY: 0
68 | - _OutlineWidth: 0.1
69 | - _PerspectiveFilter: 0.875
70 | - _Reflectivity: 10
71 | - _ScaleRatioA: 0.9
72 | - _ScaleRatioB: 0.73125
73 | - _ScaleRatioC: 0.64125
74 | - _ScaleX: 1
75 | - _ScaleY: 1
76 | - _ShaderFlags: 0
77 | - _Sharpness: 0
78 | - _SpecularPower: 2
79 | - _Stencil: 0
80 | - _StencilComp: 8
81 | - _StencilOp: 0
82 | - _StencilReadMask: 255
83 | - _StencilWriteMask: 255
84 | - _TextureHeight: 1024
85 | - _TextureWidth: 1024
86 | - _UnderlayDilate: 0
87 | - _UnderlayOffsetX: 0
88 | - _UnderlayOffsetY: 0
89 | - _UnderlaySoftness: 0
90 | - _VertexOffsetX: 0
91 | - _VertexOffsetY: 0
92 | - _WeightBold: 0.75
93 | - _WeightNormal: 0
94 | m_Colors:
95 | - _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767}
96 | - _EnvMatrixRotation: {r: 0, g: 0, b: 0, a: 0}
97 | - _FaceColor: {r: 1, g: 1, b: 1, a: 1}
98 | - _GlowColor: {r: 0, g: 1, b: 0, a: 0.5}
99 | - _MaskCoord: {r: 0, g: 0, b: 32767, a: 32767}
100 | - _OutlineColor: {r: 0, g: 0, b: 0, a: 1}
101 | - _ReflectFaceColor: {r: 0, g: 0, b: 0, a: 1}
102 | - _ReflectOutlineColor: {r: 0, g: 0, b: 0, a: 1}
103 | - _SpecularColor: {r: 1, g: 1, b: 1, a: 1}
104 | - _UnderlayColor: {r: 0, g: 0, b: 0, a: 0.5}
105 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Outline.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 79459efec17a4d00a321bdcc27bbc385
3 | timeCreated: 1484172856
4 | licenseType: Pro
5 | NativeFormatImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF.asset.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8f586378b4e144a9851e7b34d9b748ee
3 | timeCreated: 1484171803
4 | licenseType: Pro
5 | NativeFormatImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Resources/LineBreaking Following Characters.txt:
--------------------------------------------------------------------------------
1 | )]}〕〉》」』】〙〗〟’”⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、%,.:;。!?]):;=}¢°"†‡℃〆%,.
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Resources/LineBreaking Following Characters.txt.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: fade42e8bc714b018fac513c043d323b
3 | timeCreated: 1425440388
4 | licenseType: Store
5 | TextScriptImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Resources/LineBreaking Leading Characters.txt:
--------------------------------------------------------------------------------
1 | ([{〔〈《「『【〘〖〝‘“⦅«$—…‥〳〴〵\[({£¥"々〇$¥₩ #
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Resources/LineBreaking Leading Characters.txt.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d82c1b31c7e74239bff1220585707d2b
3 | timeCreated: 1425440388
4 | licenseType: Store
5 | TextScriptImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Resources/Sprite Assets.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 512a49d95c0c4332bdd98131869c23c9
3 | folderAsset: yes
4 | timeCreated: 1441876896
5 | licenseType: Pro
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Resources/Sprite Assets/EmojiOne.asset.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c41005c129ba4d66911b75229fd70b45
3 | timeCreated: 1480316912
4 | licenseType: Pro
5 | NativeFormatImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Resources/Style Sheets.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4aecb92fff08436c8303b10eab8da368
3 | folderAsset: yes
4 | timeCreated: 1441876950
5 | licenseType: Pro
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Resources/Style Sheets/Default Style Sheet.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!114 &11400000
4 | MonoBehaviour:
5 | m_ObjectHideFlags: 0
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | m_GameObject: {fileID: 0}
10 | m_Enabled: 1
11 | m_EditorHideFlags: 0
12 | m_Script: {fileID: 11500000, guid: ab2114bdc8544297b417dfefe9f1e410, type: 3}
13 | m_Name: Default Style Sheet
14 | m_EditorClassIdentifier:
15 | m_StyleList:
16 | - m_Name: Normal
17 | m_HashCode: -1183493901
18 | m_OpeningDefinition:
19 | m_ClosingDefinition:
20 | m_OpeningTagArray:
21 | m_ClosingTagArray:
22 | - m_Name: H1
23 | m_HashCode: 2425
24 | m_OpeningDefinition: <#40ff80>*
25 | m_ClosingDefinition: '*'
26 | m_OpeningTagArray: 3c00000073000000690000007a000000650000003d00000032000000650000006d0000003e0000003c000000620000003e0000003c000000230000003400000030000000660000006600000038000000300000003e0000002a000000
27 | m_ClosingTagArray: 2a0000003c0000002f00000073000000690000007a000000650000003e0000003c0000002f000000620000003e0000003c0000002f000000630000006f0000006c0000006f000000720000003e000000
28 | - m_Name: Quote
29 | m_HashCode: 93368250
30 | m_OpeningDefinition:
31 | m_ClosingDefinition:
32 | m_OpeningTagArray: 3c000000690000003e0000003c00000073000000690000007a000000650000003d0000003700000035000000250000003e0000003c0000006d000000610000007200000067000000690000006e0000003d0000003100000030000000250000003e000000
33 | m_ClosingTagArray: 3c0000002f000000690000003e0000003c0000002f00000073000000690000007a000000650000003e0000003c0000002f00000077000000690000006400000074000000680000003e0000003c0000002f0000006d000000610000007200000067000000690000006e0000003e000000
34 | - m_Name: A
35 | m_HashCode: 65
36 | m_OpeningDefinition:
37 | m_ClosingDefinition:
38 | m_OpeningTagArray: 3c000000630000006f0000006c0000006f000000720000003d000000230000003400000030000000610000003000000066000000660000003e0000003c000000750000003e000000
39 | m_ClosingTagArray: 3c0000002f000000750000003e0000003c0000002f000000630000006f0000006c0000006f000000720000003e000000
40 | - m_Name: Link
41 | m_HashCode: 2656128
42 | m_OpeningDefinition: <#40a0ff>
43 | m_ClosingDefinition:
44 | m_OpeningTagArray: 3c000000750000003e0000003c000000230000003400000030000000610000003000000066000000660000003e0000003c0000006c000000690000006e0000006b0000003d0000002200000049000000440000005f0000003000000031000000220000003e000000
45 | m_ClosingTagArray: 3c0000002f000000750000003e0000003c0000002f000000630000006f0000006c0000006f000000720000003e0000003c0000002f0000006c000000690000006e0000006b0000003e000000
46 | - m_Name: Title
47 | m_HashCode: 97690656
48 | m_OpeningDefinition:
49 | m_ClosingDefinition:
50 | m_OpeningTagArray: 3c00000073000000690000007a000000650000003d000000310000003200000035000000250000003e0000003c000000620000003e0000003c000000610000006c00000069000000670000006e0000003d00000063000000650000006e0000007400000065000000720000003e000000
51 | m_ClosingTagArray: 3c0000002f00000073000000690000007a000000650000003e0000003c0000002f000000620000003e0000003c0000002f000000610000006c00000069000000670000006e0000003e000000
52 | - m_Name: H2
53 | m_HashCode: 2426
54 | m_OpeningDefinition: <#4080FF>
55 | m_ClosingDefinition:
56 | m_OpeningTagArray: 3c00000073000000690000007a000000650000003d000000310000002e00000035000000650000006d0000003e0000003c000000620000003e0000003c000000230000003400000030000000380000003000000046000000460000003e000000
57 | m_ClosingTagArray: 3c0000002f00000073000000690000007a000000650000003e0000003c0000002f000000620000003e0000003c0000002f000000630000006f0000006c0000006f000000720000003e000000
58 | - m_Name: H3
59 | m_HashCode: 2427
60 | m_OpeningDefinition: <#FF8040>
61 | m_ClosingDefinition:
62 | m_OpeningTagArray: 3c00000073000000690000007a000000650000003d000000310000002e0000003100000037000000650000006d0000003e0000003c000000620000003e0000003c000000230000004600000046000000380000003000000034000000300000003e000000
63 | m_ClosingTagArray: 3c0000002f00000073000000690000007a000000650000003e0000003c0000002f000000620000003e0000003c0000002f000000630000006f0000006c0000006f000000720000003e000000
64 | - m_Name: C1
65 | m_HashCode: 2194
66 | m_OpeningDefinition:
67 | m_ClosingDefinition:
68 | m_OpeningTagArray: 3c000000630000006f0000006c0000006f000000720000003d000000230000006600000066000000660000006600000034000000300000003e000000
69 | m_ClosingTagArray: 3c0000002f000000630000006f0000006c0000006f000000720000003e000000
70 | - m_Name: C2
71 | m_HashCode: 2193
72 | m_OpeningDefinition:
73 | m_ClosingDefinition:
74 | m_OpeningTagArray: 3c000000630000006f0000006c0000006f000000720000003d000000230000006600000066000000340000003000000046000000460000003e0000003c00000073000000690000007a000000650000003d000000310000003200000035000000250000003e000000
75 | m_ClosingTagArray: 3c0000002f000000630000006f0000006c0000006f000000720000003e0000003c0000002f00000073000000690000007a000000650000003e000000
76 | - m_Name: C3
77 | m_HashCode: 2192
78 | m_OpeningDefinition:
79 | m_ClosingDefinition:
80 | m_OpeningTagArray: 3c000000630000006f0000006c0000006f000000720000003d000000230000003800000030000000410000003000000046000000460000003e0000003c000000620000003e000000
81 | m_ClosingTagArray: 3c0000002f000000630000006f0000006c0000006f000000720000003e0000003c0000002f000000620000003e000000
82 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Resources/Style Sheets/Default Style Sheet.asset.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f952c082cb03451daed3ee968ac6c63e
3 | timeCreated: 1432805430
4 | licenseType: Store
5 | NativeFormatImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Resources/TMP Settings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!114 &11400000
4 | MonoBehaviour:
5 | m_ObjectHideFlags: 0
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | m_GameObject: {fileID: 0}
10 | m_Enabled: 1
11 | m_EditorHideFlags: 0
12 | m_Script: {fileID: 11500000, guid: 2705215ac5b84b70bacc50632be6e391, type: 3}
13 | m_Name: TMP Settings
14 | m_EditorClassIdentifier:
15 | assetVersion: 2
16 | m_TextWrappingMode: 1
17 | m_enableKerning: 1
18 | m_ActiveFontFeatures: 00000000
19 | m_enableExtraPadding: 0
20 | m_enableTintAllSprites: 0
21 | m_enableParseEscapeCharacters: 1
22 | m_EnableRaycastTarget: 1
23 | m_GetFontFeaturesAtRuntime: 1
24 | m_missingGlyphCharacter: 0
25 | m_ClearDynamicDataOnBuild: 1
26 | m_warningsDisabled: 0
27 | m_defaultFontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
28 | m_defaultFontAssetPath: Fonts & Materials/
29 | m_defaultFontSize: 36
30 | m_defaultAutoSizeMinRatio: 0.5
31 | m_defaultAutoSizeMaxRatio: 2
32 | m_defaultTextMeshProTextContainerSize: {x: 20, y: 5}
33 | m_defaultTextMeshProUITextContainerSize: {x: 200, y: 50}
34 | m_autoSizeTextContainer: 0
35 | m_IsTextObjectScaleStatic: 0
36 | m_fallbackFontAssets: []
37 | m_matchMaterialPreset: 1
38 | m_HideSubTextObjects: 0
39 | m_defaultSpriteAsset: {fileID: 11400000, guid: c41005c129ba4d66911b75229fd70b45,
40 | type: 2}
41 | m_defaultSpriteAssetPath: Sprite Assets/
42 | m_enableEmojiSupport: 1
43 | m_MissingCharacterSpriteUnicode: 0
44 | m_EmojiFallbackTextAssets: []
45 | m_defaultColorGradientPresetsPath: Color Gradient Presets/
46 | m_defaultStyleSheet: {fileID: 11400000, guid: f952c082cb03451daed3ee968ac6c63e,
47 | type: 2}
48 | m_StyleSheetsResourcePath:
49 | m_leadingCharacters: {fileID: 4900000, guid: d82c1b31c7e74239bff1220585707d2b, type: 3}
50 | m_followingCharacters: {fileID: 4900000, guid: fade42e8bc714b018fac513c043d323b,
51 | type: 3}
52 | m_UseModernHangulLineBreakingRules: 0
53 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Resources/TMP Settings.asset.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3f5b5dff67a942289a9defa416b206f3
3 | timeCreated: 1436653997
4 | licenseType: Pro
5 | NativeFormatImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e9f693669af91aa45ad615fc681ed29f
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/SDFFunctions.hlsl:
--------------------------------------------------------------------------------
1 | float2 UnpackUV(float uv)
2 | {
3 | float2 output;
4 | output.x = floor(uv / 4096.0);
5 | output.y = uv - 4096.0 * output.x;
6 |
7 | return output * 0.001953125;
8 | }
9 |
10 | float4 BlendARGB(float4 overlying, float4 underlying)
11 | {
12 | overlying.rgb *= overlying.a;
13 | underlying.rgb *= underlying.a;
14 | float3 blended = overlying.rgb + ((1 - overlying.a) * underlying.rgb);
15 | float alpha = underlying.a + (1 - underlying.a) * overlying.a;
16 | return float4(blended / alpha, alpha);
17 | }
18 |
19 | float3 GetSpecular(float3 n, float3 l)
20 | {
21 | float spec = pow(max(0.0, dot(n, l)), _Reflectivity);
22 | return _SpecularColor.rgb * spec * _SpecularPower;
23 | }
24 |
25 | void GetSurfaceNormal_float(texture2D atlas, float textureWidth, float textureHeight, float2 uv, bool isFront, out float3 nornmal)
26 | {
27 | float3 delta = float3(1.0 / textureWidth, 1.0 / textureHeight, 0.0);
28 |
29 | // Read "height field"
30 | float4 h = float4(
31 | SAMPLE_TEXTURE2D(atlas, SamplerState_Linear_Clamp, uv - delta.xz).a,
32 | SAMPLE_TEXTURE2D(atlas, SamplerState_Linear_Clamp, uv + delta.xz).a,
33 | SAMPLE_TEXTURE2D(atlas, SamplerState_Linear_Clamp, uv - delta.zy).a,
34 | SAMPLE_TEXTURE2D(atlas, SamplerState_Linear_Clamp, uv + delta.zy).a);
35 |
36 | bool raisedBevel = _BevelType;
37 |
38 | h += _BevelOffset;
39 |
40 | float bevelWidth = max(.01, _BevelWidth);
41 |
42 | // Track outline
43 | h -= .5;
44 | h /= bevelWidth;
45 | h = saturate(h + .5);
46 |
47 | if (raisedBevel) h = 1 - abs(h * 2.0 - 1.0);
48 | h = lerp(h, sin(h * 3.141592 / 2.0), float4(_BevelRoundness, _BevelRoundness, _BevelRoundness, _BevelRoundness));
49 | h = min(h, 1.0 - float4(_BevelClamp, _BevelClamp, _BevelClamp, _BevelClamp));
50 | h *= _BevelAmount * bevelWidth * _GradientScale * -2.0;
51 |
52 | float3 va = normalize(float3(-1.0, 0.0, h.y - h.x));
53 | float3 vb = normalize(float3(0.0, 1.0, h.w - h.z));
54 |
55 | float3 f = float3(1, 1, 1);
56 | if (isFront) f = float3(1, 1, -1);
57 | nornmal = cross(va, vb) * f;
58 | }
59 |
60 | void EvaluateLight_float(float4 faceColor, float3 n, out float4 color)
61 | {
62 | n.z = abs(n.z);
63 | float3 light = normalize(float3(sin(_LightAngle), cos(_LightAngle), 1.0));
64 |
65 | float3 col = max(faceColor.rgb, 0) + GetSpecular(n, light)* faceColor.a;
66 | //faceColor.rgb += col * faceColor.a;
67 | col *= 1 - (dot(n, light) * _Diffuse);
68 | col *= lerp(_Ambient, 1, n.z * n.z);
69 |
70 | //fixed4 reflcol = texCUBE(_Cube, reflect(input.viewDir, -n));
71 | //faceColor.rgb += reflcol.rgb * lerp(_ReflectFaceColor.rgb, _ReflectOutlineColor.rgb, saturate(sd + outline * 0.5)) * faceColor.a;
72 |
73 | color = float4(col, faceColor.a);
74 | }
75 |
76 | // Add custom function to handle time in HDRP
77 |
78 |
79 | //
80 | void GenerateUV_float(float2 inUV, float4 transform, float2 animSpeed, out float2 outUV)
81 | {
82 | outUV = inUV * transform.xy + transform.zw + (animSpeed * _Time.y);
83 | }
84 |
85 | void ComputeUVOffset_float(float texWidth, float texHeight, float2 offset, float SDR, out float2 uvOffset)
86 | {
87 | uvOffset = float2(-offset.x * SDR / texWidth, -offset.y * SDR / texHeight);
88 | }
89 |
90 | void ScreenSpaceRatio2_float(float4x4 projection, float4 position, float2 objectScale, float screenWidth, float screenHeight, float fontScale, out float SSR)
91 | {
92 | float2 pixelSize = position.w;
93 | pixelSize /= (objectScale * mul((float2x2)projection, float2(screenWidth, screenHeight)));
94 | SSR = rsqrt(dot(pixelSize, pixelSize)*2) * fontScale;
95 | }
96 |
97 | // UV : Texture coordinate of the source distance field texture
98 | // TextureSize : Size of the source distance field texture
99 | // Filter : Enable perspective filter (soften)
100 | void ScreenSpaceRatio_float(float2 UV, float TextureSize, bool Filter, out float SSR)
101 | {
102 | if(Filter)
103 | {
104 | float2 a = float2(ddx(UV.x), ddy(UV.x));
105 | float2 b = float2(ddx(UV.y), ddy(UV.y));
106 | float s = lerp(dot(a,a), dot(b,b), 0.5);
107 | SSR = rsqrt(s) / TextureSize;
108 | }
109 | else
110 | {
111 | float s = rsqrt(abs(ddx(UV.x) * ddy(UV.y) - ddy(UV.x) * ddx(UV.y)));
112 | SSR = s / TextureSize;
113 | }
114 | }
115 |
116 | // SSR : Screen Space Ratio
117 | // SD : Signed Distance (encoded : Distance / SDR + .5)
118 | // SDR : Signed Distance Ratio
119 | //
120 | // IsoPerimeter : Dilate / Contract the shape
121 | void ComputeSDF_float(float SSR, float SD, float SDR, float isoPerimeter, float softness, out float outAlpha)
122 | {
123 | softness *= SSR * SDR;
124 | float d = (SD - 0.5) * SDR; // Signed distance to edge, in Texture space
125 | outAlpha = saturate((d * 2.0 * SSR + 0.5 + isoPerimeter * SDR * SSR + softness * 0.5) / (1.0 + softness)); // Screen pixel coverage (alpha)
126 | }
127 |
128 | void ComputeSDF2_float(float SSR, float SD, float SDR, float2 isoPerimeter, float2 softness, out float2 outAlpha)
129 | {
130 | softness *= SSR * SDR;
131 | float d = (SD - 0.5f) * SDR;
132 | outAlpha = saturate((d * 2.0f * SSR + 0.5f + isoPerimeter * SDR * SSR + softness * 0.5) / (1.0 + softness));
133 | }
134 |
135 | void ComputeSDF4_float(float SSR, float SD, float SDR, float4 isoPerimeter, float4 softness, out float4 outAlpha)
136 | {
137 | softness *= SSR * SDR;
138 | float d = (SD - 0.5f) * SDR;
139 | outAlpha = saturate((d * 2.0f * SSR + 0.5f + isoPerimeter * SDR * SSR + softness * 0.5) / (1.0 + softness));
140 | }
141 |
142 | void ComputeSDF44_float(float SSR, float4 SD, float SDR, float4 isoPerimeter, float4 softness, bool outline, out float4 outAlpha)
143 | {
144 | softness *= SSR * SDR;
145 | float4 d = (SD - 0.5f) * SDR;
146 | if(outline) d.w = max(max(d.x, d.y), d.z);
147 | outAlpha = saturate((d * 2.0f * SSR + 0.5f + isoPerimeter * SDR * SSR + softness * 0.5) / (1.0 + softness));
148 | }
149 |
150 | void Composite_float(float4 overlying, float4 underlying, out float4 outColor)
151 | {
152 | outColor = BlendARGB(overlying, underlying);
153 | }
154 |
155 | // Face only
156 | void Layer1_float(float alpha, float4 color0, out float4 outColor)
157 | {
158 | color0.a *= alpha;
159 | outColor = color0;
160 | }
161 |
162 | // Face + 1 Outline
163 | void Layer2_float(float2 alpha, float4 color0, float4 color1, out float4 outColor)
164 | {
165 | color1.a *= alpha.y;
166 | color0.rgb *= color0.a; color1.rgb *= color1.a;
167 | outColor = lerp(color1, color0, alpha.x);
168 | outColor.rgb /= outColor.a;
169 | }
170 |
171 | // Face + 3 Outline
172 | void Layer4_float(float4 alpha, float4 color0, float4 color1, float4 color2, float4 color3, out float4 outColor)
173 | {
174 | color3.a *= alpha.w;
175 | color0.rgb *= color0.a; color1.rgb *= color1.a; color2.rgb *= color2.a; color3.rgb *= color3.a;
176 | outColor = lerp(lerp(lerp(color3, color2, alpha.z), color1, alpha.y), color0, alpha.x);
177 | outColor.rgb /= outColor.a;
178 | }
179 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/SDFFunctions.hlsl.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 96de908384869cd409c75efa351d5edf
3 | ShaderImporter:
4 | externalObjects: {}
5 | defaultTextures: []
6 | nonModifiableTextures: []
7 | preprocessorOverride: 0
8 | userData:
9 | assetBundleName:
10 | assetBundleVariant:
11 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMP_Bitmap-Custom-Atlas.shader:
--------------------------------------------------------------------------------
1 | Shader "TextMeshPro/Bitmap Custom Atlas" {
2 |
3 | Properties {
4 | _MainTex ("Font Atlas", 2D) = "white" {}
5 | _FaceTex ("Font Texture", 2D) = "white" {}
6 | _FaceColor ("Text Color", Color) = (1,1,1,1)
7 |
8 | _VertexOffsetX ("Vertex OffsetX", float) = 0
9 | _VertexOffsetY ("Vertex OffsetY", float) = 0
10 | _MaskSoftnessX ("Mask SoftnessX", float) = 0
11 | _MaskSoftnessY ("Mask SoftnessY", float) = 0
12 |
13 | _ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
14 | _Padding ("Padding", float) = 0
15 |
16 | _StencilComp ("Stencil Comparison", Float) = 8
17 | _Stencil ("Stencil ID", Float) = 0
18 | _StencilOp ("Stencil Operation", Float) = 0
19 | _StencilWriteMask ("Stencil Write Mask", Float) = 255
20 | _StencilReadMask ("Stencil Read Mask", Float) = 255
21 |
22 | _CullMode ("Cull Mode", Float) = 0
23 | _ColorMask ("Color Mask", Float) = 15
24 | }
25 |
26 | SubShader{
27 |
28 | Tags { "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" }
29 |
30 | Stencil
31 | {
32 | Ref[_Stencil]
33 | Comp[_StencilComp]
34 | Pass[_StencilOp]
35 | ReadMask[_StencilReadMask]
36 | WriteMask[_StencilWriteMask]
37 | }
38 |
39 |
40 | Lighting Off
41 | Cull [_CullMode]
42 | ZTest [unity_GUIZTestMode]
43 | ZWrite Off
44 | Fog { Mode Off }
45 | Blend SrcAlpha OneMinusSrcAlpha
46 | ColorMask[_ColorMask]
47 |
48 | Pass {
49 | CGPROGRAM
50 | #pragma vertex vert
51 | #pragma fragment frag
52 |
53 | #pragma multi_compile __ UNITY_UI_CLIP_RECT
54 | #pragma multi_compile __ UNITY_UI_ALPHACLIP
55 |
56 |
57 | #include "UnityCG.cginc"
58 | #include "UnityUI.cginc"
59 |
60 | struct appdata_t
61 | {
62 | float4 vertex : POSITION;
63 | fixed4 color : COLOR;
64 | float4 texcoord0 : TEXCOORD0;
65 | float2 texcoord1 : TEXCOORD1;
66 | };
67 |
68 | struct v2f
69 | {
70 | float4 vertex : SV_POSITION;
71 | fixed4 color : COLOR;
72 | float2 texcoord0 : TEXCOORD0;
73 | float2 texcoord1 : TEXCOORD1;
74 | float4 mask : TEXCOORD2;
75 | };
76 |
77 | uniform sampler2D _MainTex;
78 | uniform sampler2D _FaceTex;
79 | uniform float4 _FaceTex_ST;
80 | uniform fixed4 _FaceColor;
81 |
82 | uniform float _VertexOffsetX;
83 | uniform float _VertexOffsetY;
84 | uniform float4 _ClipRect;
85 | uniform float _MaskSoftnessX;
86 | uniform float _MaskSoftnessY;
87 | uniform float _UIMaskSoftnessX;
88 | uniform float _UIMaskSoftnessY;
89 | uniform int _UIVertexColorAlwaysGammaSpace;
90 |
91 | v2f vert (appdata_t v)
92 | {
93 | float4 vert = v.vertex;
94 | vert.x += _VertexOffsetX;
95 | vert.y += _VertexOffsetY;
96 |
97 | vert.xy += (vert.w * 0.5) / _ScreenParams.xy;
98 |
99 | float4 vPosition = UnityPixelSnap(UnityObjectToClipPos(vert));
100 |
101 | if (_UIVertexColorAlwaysGammaSpace && !IsGammaSpace())
102 | {
103 | v.color.rgb = UIGammaToLinear(v.color.rgb);
104 | }
105 | fixed4 faceColor = v.color;
106 | faceColor *= _FaceColor;
107 |
108 | v2f OUT;
109 | OUT.vertex = vPosition;
110 | OUT.color = faceColor;
111 | OUT.texcoord0 = v.texcoord0;
112 | OUT.texcoord1 = TRANSFORM_TEX(v.texcoord1, _FaceTex);
113 | float2 pixelSize = vPosition.w;
114 | pixelSize /= abs(float2(_ScreenParams.x * UNITY_MATRIX_P[0][0], _ScreenParams.y * UNITY_MATRIX_P[1][1]));
115 |
116 | // Clamp _ClipRect to 16bit.
117 | const float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
118 | const half2 maskSoftness = half2(max(_UIMaskSoftnessX, _MaskSoftnessX), max(_UIMaskSoftnessY, _MaskSoftnessY));
119 | OUT.mask = float4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * maskSoftness + pixelSize.xy));
120 |
121 | return OUT;
122 | }
123 |
124 | fixed4 frag (v2f IN) : SV_Target
125 | {
126 | fixed4 color = tex2D(_MainTex, IN.texcoord0) * tex2D(_FaceTex, IN.texcoord1) * IN.color;
127 |
128 | // Alternative implementation to UnityGet2DClipping with support for softness.
129 | #if UNITY_UI_CLIP_RECT
130 | half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(IN.mask.xy)) * IN.mask.zw);
131 | color *= m.x * m.y;
132 | #endif
133 |
134 | #if UNITY_UI_ALPHACLIP
135 | clip(color.a - 0.001);
136 | #endif
137 |
138 | return color;
139 | }
140 | ENDCG
141 | }
142 | }
143 |
144 | CustomEditor "TMPro.EditorUtilities.TMP_BitmapShaderGUI"
145 | }
146 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMP_Bitmap-Custom-Atlas.shader.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 48bb5f55d8670e349b6e614913f9d910
3 | ShaderImporter:
4 | externalObjects: {}
5 | defaultTextures: []
6 | nonModifiableTextures: []
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMP_Bitmap-Mobile.shader:
--------------------------------------------------------------------------------
1 | Shader "TextMeshPro/Mobile/Bitmap" {
2 |
3 | Properties {
4 | _MainTex ("Font Atlas", 2D) = "white" {}
5 | _Color ("Text Color", Color) = (1,1,1,1)
6 | _DiffusePower ("Diffuse Power", Range(1.0,4.0)) = 1.0
7 |
8 | _VertexOffsetX ("Vertex OffsetX", float) = 0
9 | _VertexOffsetY ("Vertex OffsetY", float) = 0
10 | _MaskSoftnessX ("Mask SoftnessX", float) = 0
11 | _MaskSoftnessY ("Mask SoftnessY", float) = 0
12 |
13 | _ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
14 |
15 | _StencilComp ("Stencil Comparison", Float) = 8
16 | _Stencil ("Stencil ID", Float) = 0
17 | _StencilOp ("Stencil Operation", Float) = 0
18 | _StencilWriteMask ("Stencil Write Mask", Float) = 255
19 | _StencilReadMask ("Stencil Read Mask", Float) = 255
20 |
21 | _CullMode ("Cull Mode", Float) = 0
22 | _ColorMask ("Color Mask", Float) = 15
23 | }
24 |
25 | SubShader {
26 |
27 | Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
28 |
29 | Stencil
30 | {
31 | Ref[_Stencil]
32 | Comp[_StencilComp]
33 | Pass[_StencilOp]
34 | ReadMask[_StencilReadMask]
35 | WriteMask[_StencilWriteMask]
36 | }
37 |
38 |
39 | Lighting Off
40 | Cull [_CullMode]
41 | ZTest [unity_GUIZTestMode]
42 | ZWrite Off
43 | Fog { Mode Off }
44 | Blend SrcAlpha OneMinusSrcAlpha
45 | ColorMask[_ColorMask]
46 |
47 | Pass {
48 | CGPROGRAM
49 | #pragma vertex vert
50 | #pragma fragment frag
51 | #pragma fragmentoption ARB_precision_hint_fastest
52 |
53 | #pragma multi_compile __ UNITY_UI_CLIP_RECT
54 | #pragma multi_compile __ UNITY_UI_ALPHACLIP
55 |
56 |
57 | #include "UnityCG.cginc"
58 | #include "UnityUI.cginc"
59 |
60 | struct appdata_t
61 | {
62 | float4 vertex : POSITION;
63 | fixed4 color : COLOR;
64 | float2 texcoord0 : TEXCOORD0;
65 | float2 texcoord1 : TEXCOORD1;
66 | };
67 |
68 | struct v2f
69 | {
70 | float4 vertex : POSITION;
71 | fixed4 color : COLOR;
72 | float2 texcoord0 : TEXCOORD0;
73 | float4 mask : TEXCOORD2;
74 | };
75 |
76 | sampler2D _MainTex;
77 | fixed4 _Color;
78 | float _DiffusePower;
79 |
80 | uniform float _VertexOffsetX;
81 | uniform float _VertexOffsetY;
82 | uniform float4 _ClipRect;
83 | uniform float _MaskSoftnessX;
84 | uniform float _MaskSoftnessY;
85 | uniform float _UIMaskSoftnessX;
86 | uniform float _UIMaskSoftnessY;
87 | uniform int _UIVertexColorAlwaysGammaSpace;
88 |
89 | v2f vert (appdata_t v)
90 | {
91 | v2f OUT;
92 | float4 vert = v.vertex;
93 | vert.x += _VertexOffsetX;
94 | vert.y += _VertexOffsetY;
95 |
96 | vert.xy += (vert.w * 0.5) / _ScreenParams.xy;
97 | if (_UIVertexColorAlwaysGammaSpace && !IsGammaSpace())
98 | {
99 | v.color.rgb = UIGammaToLinear(v.color.rgb);
100 | }
101 | OUT.vertex = UnityPixelSnap(UnityObjectToClipPos(vert));
102 | OUT.color = v.color;
103 | OUT.color *= _Color;
104 | OUT.color.rgb *= _DiffusePower;
105 | OUT.texcoord0 = v.texcoord0;
106 |
107 | float2 pixelSize = OUT.vertex.w;
108 | //pixelSize /= abs(float2(_ScreenParams.x * UNITY_MATRIX_P[0][0], _ScreenParams.y * UNITY_MATRIX_P[1][1]));
109 |
110 | // Clamp _ClipRect to 16bit.
111 | const float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
112 | const half2 maskSoftness = half2(max(_UIMaskSoftnessX, _MaskSoftnessX), max(_UIMaskSoftnessY, _MaskSoftnessY));
113 | OUT.mask = float4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * maskSoftness + pixelSize.xy));
114 |
115 | return OUT;
116 | }
117 |
118 | fixed4 frag (v2f IN) : COLOR
119 | {
120 | fixed4 color = fixed4(IN.color.rgb, IN.color.a * tex2D(_MainTex, IN.texcoord0).a);
121 |
122 | // Alternative implementation to UnityGet2DClipping with support for softness.
123 | #if UNITY_UI_CLIP_RECT
124 | half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(IN.mask.xy)) * IN.mask.zw);
125 | color *= m.x * m.y;
126 | #endif
127 |
128 | #if UNITY_UI_ALPHACLIP
129 | clip(color.a - 0.001);
130 | #endif
131 |
132 | return color;
133 | }
134 | ENDCG
135 | }
136 | }
137 |
138 | SubShader {
139 | Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
140 | Lighting Off Cull Off ZTest Always ZWrite Off Fog { Mode Off }
141 | Blend SrcAlpha OneMinusSrcAlpha
142 | BindChannels {
143 | Bind "Color", color
144 | Bind "Vertex", vertex
145 | Bind "TexCoord", texcoord0
146 | }
147 | Pass {
148 | SetTexture [_MainTex] {
149 | constantColor [_Color] combine constant * primary, constant * texture
150 | }
151 | }
152 | }
153 |
154 | CustomEditor "TMPro.EditorUtilities.TMP_BitmapShaderGUI"
155 | }
156 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMP_Bitmap-Mobile.shader.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1e3b057af24249748ff873be7fafee47
3 | ShaderImporter:
4 | externalObjects: {}
5 | defaultTextures: []
6 | nonModifiableTextures: []
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMP_Bitmap.shader:
--------------------------------------------------------------------------------
1 | Shader "TextMeshPro/Bitmap" {
2 |
3 | Properties {
4 | _MainTex ("Font Atlas", 2D) = "white" {}
5 | _FaceTex ("Font Texture", 2D) = "white" {}
6 | _FaceColor ("Text Color", Color) = (1,1,1,1)
7 |
8 | _VertexOffsetX ("Vertex OffsetX", float) = 0
9 | _VertexOffsetY ("Vertex OffsetY", float) = 0
10 | _MaskSoftnessX ("Mask SoftnessX", float) = 0
11 | _MaskSoftnessY ("Mask SoftnessY", float) = 0
12 |
13 | _ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
14 |
15 | _StencilComp ("Stencil Comparison", Float) = 8
16 | _Stencil ("Stencil ID", Float) = 0
17 | _StencilOp ("Stencil Operation", Float) = 0
18 | _StencilWriteMask ("Stencil Write Mask", Float) = 255
19 | _StencilReadMask ("Stencil Read Mask", Float) = 255
20 |
21 | _CullMode ("Cull Mode", Float) = 0
22 | _ColorMask ("Color Mask", Float) = 15
23 | }
24 |
25 | SubShader{
26 |
27 | Tags { "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" }
28 |
29 | Stencil
30 | {
31 | Ref[_Stencil]
32 | Comp[_StencilComp]
33 | Pass[_StencilOp]
34 | ReadMask[_StencilReadMask]
35 | WriteMask[_StencilWriteMask]
36 | }
37 |
38 |
39 | Lighting Off
40 | Cull [_CullMode]
41 | ZTest [unity_GUIZTestMode]
42 | ZWrite Off
43 | Fog { Mode Off }
44 | Blend SrcAlpha OneMinusSrcAlpha
45 | ColorMask[_ColorMask]
46 |
47 | Pass {
48 | CGPROGRAM
49 | #pragma vertex vert
50 | #pragma fragment frag
51 |
52 | #pragma multi_compile __ UNITY_UI_CLIP_RECT
53 | #pragma multi_compile __ UNITY_UI_ALPHACLIP
54 |
55 |
56 | #include "UnityCG.cginc"
57 | #include "UnityUI.cginc"
58 |
59 | struct appdata_t
60 | {
61 | float4 vertex : POSITION;
62 | fixed4 color : COLOR;
63 | float4 texcoord0 : TEXCOORD0;
64 | float2 texcoord1 : TEXCOORD1;
65 | };
66 |
67 | struct v2f
68 | {
69 | float4 vertex : SV_POSITION;
70 | fixed4 color : COLOR;
71 | float2 texcoord0 : TEXCOORD0;
72 | float2 texcoord1 : TEXCOORD1;
73 | float4 mask : TEXCOORD2;
74 | };
75 |
76 | uniform sampler2D _MainTex;
77 | uniform sampler2D _FaceTex;
78 | uniform float4 _FaceTex_ST;
79 | uniform fixed4 _FaceColor;
80 |
81 | uniform float _VertexOffsetX;
82 | uniform float _VertexOffsetY;
83 | uniform float4 _ClipRect;
84 | uniform float _MaskSoftnessX;
85 | uniform float _MaskSoftnessY;
86 | uniform float _UIMaskSoftnessX;
87 | uniform float _UIMaskSoftnessY;
88 | uniform int _UIVertexColorAlwaysGammaSpace;
89 |
90 | v2f vert (appdata_t v)
91 | {
92 | float4 vert = v.vertex;
93 | vert.x += _VertexOffsetX;
94 | vert.y += _VertexOffsetY;
95 |
96 | vert.xy += (vert.w * 0.5) / _ScreenParams.xy;
97 |
98 | float4 vPosition = UnityPixelSnap(UnityObjectToClipPos(vert));
99 |
100 | if (_UIVertexColorAlwaysGammaSpace && !IsGammaSpace())
101 | {
102 | v.color.rgb = UIGammaToLinear(v.color.rgb);
103 | }
104 | fixed4 faceColor = v.color;
105 | faceColor *= _FaceColor;
106 |
107 | v2f OUT;
108 | OUT.vertex = vPosition;
109 | OUT.color = faceColor;
110 | OUT.texcoord0 = v.texcoord0;
111 | OUT.texcoord1 = TRANSFORM_TEX(v.texcoord1, _FaceTex);
112 | float2 pixelSize = vPosition.w;
113 | pixelSize /= abs(float2(_ScreenParams.x * UNITY_MATRIX_P[0][0], _ScreenParams.y * UNITY_MATRIX_P[1][1]));
114 |
115 | // Clamp _ClipRect to 16bit.
116 | const float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
117 | const half2 maskSoftness = half2(max(_UIMaskSoftnessX, _MaskSoftnessX), max(_UIMaskSoftnessY, _MaskSoftnessY));
118 | OUT.mask = float4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * maskSoftness + pixelSize.xy));
119 |
120 | return OUT;
121 | }
122 |
123 | fixed4 frag (v2f IN) : SV_Target
124 | {
125 | fixed4 color = tex2D(_MainTex, IN.texcoord0);
126 | color = fixed4 (tex2D(_FaceTex, IN.texcoord1).rgb * IN.color.rgb, IN.color.a * color.a);
127 |
128 | // Alternative implementation to UnityGet2DClipping with support for softness.
129 | #if UNITY_UI_CLIP_RECT
130 | half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(IN.mask.xy)) * IN.mask.zw);
131 | color *= m.x * m.y;
132 | #endif
133 |
134 | #if UNITY_UI_ALPHACLIP
135 | clip(color.a - 0.001);
136 | #endif
137 |
138 | return color;
139 | }
140 | ENDCG
141 | }
142 | }
143 |
144 | CustomEditor "TMPro.EditorUtilities.TMP_BitmapShaderGUI"
145 | }
146 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMP_Bitmap.shader.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 128e987d567d4e2c824d754223b3f3b0
3 | ShaderImporter:
4 | externalObjects: {}
5 | defaultTextures: []
6 | nonModifiableTextures: []
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMP_SDF Overlay.shader.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: dd89cf5b9246416f84610a006f916af7
3 | ShaderImporter:
4 | externalObjects: {}
5 | defaultTextures: []
6 | nonModifiableTextures: []
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMP_SDF SSD.shader.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 14eb328de4b8eb245bb7cea29e4ac00b
3 | ShaderImporter:
4 | externalObjects: {}
5 | defaultTextures: []
6 | nonModifiableTextures: []
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMP_SDF-HDRP LIT.shadergraph.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ca2ed216f98028c4dae6c5224a952b3c
3 | ScriptedImporter:
4 | internalIDToNameTable: []
5 | externalObjects: {}
6 | serializedVersion: 2
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 | script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}
11 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMP_SDF-HDRP UNLIT.shadergraph.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f63d574838ccfb44f84acc05fed0af48
3 | ScriptedImporter:
4 | internalIDToNameTable: []
5 | externalObjects: {}
6 | serializedVersion: 2
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 | script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}
11 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMP_SDF-Mobile Masking.shader:
--------------------------------------------------------------------------------
1 | // Simplified SDF shader:
2 | // - No Shading Option (bevel / bump / env map)
3 | // - No Glow Option
4 | // - Softness is applied on both side of the outline
5 |
6 | Shader "TextMeshPro/Mobile/Distance Field - Masking" {
7 |
8 | Properties {
9 | _FaceColor ("Face Color", Color) = (1,1,1,1)
10 | _FaceDilate ("Face Dilate", Range(-1,1)) = 0
11 |
12 | _OutlineColor ("Outline Color", Color) = (0,0,0,1)
13 | _OutlineWidth ("Outline Thickness", Range(0,1)) = 0
14 | _OutlineSoftness ("Outline Softness", Range(0,1)) = 0
15 |
16 | _UnderlayColor ("Border Color", Color) = (0,0,0,.5)
17 | _UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0
18 | _UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0
19 | _UnderlayDilate ("Border Dilate", Range(-1,1)) = 0
20 | _UnderlaySoftness ("Border Softness", Range(0,1)) = 0
21 |
22 | _WeightNormal ("Weight Normal", float) = 0
23 | _WeightBold ("Weight Bold", float) = .5
24 |
25 | _ShaderFlags ("Flags", float) = 0
26 | _ScaleRatioA ("Scale RatioA", float) = 1
27 | _ScaleRatioB ("Scale RatioB", float) = 1
28 | _ScaleRatioC ("Scale RatioC", float) = 1
29 |
30 | _MainTex ("Font Atlas", 2D) = "white" {}
31 | _TextureWidth ("Texture Width", float) = 512
32 | _TextureHeight ("Texture Height", float) = 512
33 | _GradientScale ("Gradient Scale", float) = 5
34 | _ScaleX ("Scale X", float) = 1
35 | _ScaleY ("Scale Y", float) = 1
36 | _PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875
37 | _Sharpness ("Sharpness", Range(-1,1)) = 0
38 |
39 | _VertexOffsetX ("Vertex OffsetX", float) = 0
40 | _VertexOffsetY ("Vertex OffsetY", float) = 0
41 |
42 | _ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
43 | _MaskSoftnessX ("Mask SoftnessX", float) = 0
44 | _MaskSoftnessY ("Mask SoftnessY", float) = 0
45 | _MaskTex ("Mask Texture", 2D) = "white" {}
46 | _MaskInverse ("Inverse", float) = 0
47 | _MaskEdgeColor ("Edge Color", Color) = (1,1,1,1)
48 | _MaskEdgeSoftness ("Edge Softness", Range(0, 1)) = 0.01
49 | _MaskWipeControl ("Wipe Position", Range(0, 1)) = 0.5
50 |
51 | _StencilComp ("Stencil Comparison", Float) = 8
52 | _Stencil ("Stencil ID", Float) = 0
53 | _StencilOp ("Stencil Operation", Float) = 0
54 | _StencilWriteMask ("Stencil Write Mask", Float) = 255
55 | _StencilReadMask ("Stencil Read Mask", Float) = 255
56 |
57 | _CullMode ("Cull Mode", Float) = 0
58 | _ColorMask ("Color Mask", Float) = 15
59 | }
60 |
61 | SubShader {
62 | Tags
63 | {
64 | "Queue"="Transparent"
65 | "IgnoreProjector"="True"
66 | "RenderType"="Transparent"
67 | }
68 |
69 |
70 | Stencil
71 | {
72 | Ref [_Stencil]
73 | Comp [_StencilComp]
74 | Pass [_StencilOp]
75 | ReadMask [_StencilReadMask]
76 | WriteMask [_StencilWriteMask]
77 | }
78 |
79 | Cull [_CullMode]
80 | ZWrite Off
81 | Lighting Off
82 | Fog { Mode Off }
83 | ZTest [unity_GUIZTestMode]
84 | Blend One OneMinusSrcAlpha
85 | ColorMask [_ColorMask]
86 |
87 | Pass {
88 | CGPROGRAM
89 | #pragma vertex VertShader
90 | #pragma fragment PixShader
91 | #pragma shader_feature __ OUTLINE_ON
92 | #pragma shader_feature __ UNDERLAY_ON UNDERLAY_INNER
93 |
94 | #pragma multi_compile __ UNITY_UI_CLIP_RECT
95 | #pragma multi_compile __ UNITY_UI_ALPHACLIP
96 |
97 |
98 | #include "UnityCG.cginc"
99 | #include "UnityUI.cginc"
100 | #include "TMPro_Properties.cginc"
101 |
102 | struct vertex_t
103 | {
104 | float4 vertex : POSITION;
105 | float3 normal : NORMAL;
106 | fixed4 color : COLOR;
107 | float4 texcoord0 : TEXCOORD0;
108 | float2 texcoord1 : TEXCOORD1;
109 | };
110 |
111 | struct pixel_t
112 | {
113 | float4 vertex : SV_POSITION;
114 | fixed4 faceColor : COLOR;
115 | fixed4 outlineColor : COLOR1;
116 | float4 texcoord0 : TEXCOORD0; // Texture UV, Mask UV
117 | half4 param : TEXCOORD1; // Scale(x), BiasIn(y), BiasOut(z), Bias(w)
118 | half4 mask : TEXCOORD2; // Position in clip space(xy), Softness(zw)
119 |
120 | #if (UNDERLAY_ON | UNDERLAY_INNER)
121 | float4 texcoord1 : TEXCOORD3; // Texture UV, alpha, reserved
122 | half2 underlayParam : TEXCOORD4; // Scale(x), Bias(y)
123 | #endif
124 | };
125 |
126 | float _MaskWipeControl;
127 | float _MaskEdgeSoftness;
128 | fixed4 _MaskEdgeColor;
129 | bool _MaskInverse;
130 | float _UIMaskSoftnessX;
131 | float _UIMaskSoftnessY;
132 | int _UIVertexColorAlwaysGammaSpace;
133 |
134 | pixel_t VertShader(vertex_t input)
135 | {
136 | float bold = step(input.texcoord0.w, 0);
137 |
138 | float4 vert = input.vertex;
139 | vert.x += _VertexOffsetX;
140 | vert.y += _VertexOffsetY;
141 | float4 vPosition = UnityObjectToClipPos(vert);
142 |
143 | float2 pixelSize = vPosition.w;
144 | pixelSize /= float2(_ScaleX, _ScaleY) * abs(mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy));
145 |
146 | float scale = rsqrt(dot(pixelSize, pixelSize));
147 | scale *= abs(input.texcoord0.w) * _GradientScale * (_Sharpness + 1);
148 | if(UNITY_MATRIX_P[3][3] == 0) scale = lerp(abs(scale) * (1 - _PerspectiveFilter), scale, abs(dot(UnityObjectToWorldNormal(input.normal.xyz), normalize(WorldSpaceViewDir(vert)))));
149 |
150 | float weight = lerp(_WeightNormal, _WeightBold, bold) / 4.0;
151 | weight = (weight + _FaceDilate) * _ScaleRatioA * 0.5;
152 |
153 | float layerScale = scale;
154 |
155 | scale /= 1 + (_OutlineSoftness * _ScaleRatioA * scale);
156 | float bias = (0.5 - weight) * scale - 0.5;
157 | float outline = _OutlineWidth * _ScaleRatioA * 0.5 * scale;
158 |
159 | if (_UIVertexColorAlwaysGammaSpace && !IsGammaSpace())
160 | {
161 | input.color.rgb = UIGammaToLinear(input.color.rgb);
162 | }
163 | float opacity = input.color.a;
164 | #if (UNDERLAY_ON | UNDERLAY_INNER)
165 | opacity = 1.0;
166 | #endif
167 |
168 | fixed4 faceColor = fixed4(input.color.rgb, opacity) * _FaceColor;
169 | faceColor.rgb *= faceColor.a;
170 |
171 | fixed4 outlineColor = _OutlineColor;
172 | outlineColor.a *= opacity;
173 | outlineColor.rgb *= outlineColor.a;
174 | outlineColor = lerp(faceColor, outlineColor, sqrt(min(1.0, (outline * 2))));
175 |
176 | #if (UNDERLAY_ON | UNDERLAY_INNER)
177 |
178 | layerScale /= 1 + ((_UnderlaySoftness * _ScaleRatioC) * layerScale);
179 | float layerBias = (.5 - weight) * layerScale - .5 - ((_UnderlayDilate * _ScaleRatioC) * .5 * layerScale);
180 |
181 | float x = -(_UnderlayOffsetX * _ScaleRatioC) * _GradientScale / _TextureWidth;
182 | float y = -(_UnderlayOffsetY * _ScaleRatioC) * _GradientScale / _TextureHeight;
183 | float2 layerOffset = float2(x, y);
184 | #endif
185 |
186 | // Generate UV for the Masking Texture
187 | float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
188 | float2 maskUV = (vert.xy - clampedRect.xy) / (clampedRect.zw - clampedRect.xy);
189 | const half2 maskSoftness = half2(max(_UIMaskSoftnessX, _MaskSoftnessX), max(_UIMaskSoftnessY, _MaskSoftnessY));
190 |
191 | // Structure for pixel shader
192 | pixel_t output = {
193 | vPosition,
194 | faceColor,
195 | outlineColor,
196 | float4(input.texcoord0.x, input.texcoord0.y, maskUV.x, maskUV.y),
197 | half4(scale, bias - outline, bias + outline, bias),
198 | half4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * maskSoftness + pixelSize.xy)),
199 | #if (UNDERLAY_ON | UNDERLAY_INNER)
200 | float4(input.texcoord0 + layerOffset, input.color.a, 0),
201 | half2(layerScale, layerBias),
202 | #endif
203 | };
204 |
205 | return output;
206 | }
207 |
208 |
209 | // PIXEL SHADER
210 | fixed4 PixShader(pixel_t input) : SV_Target
211 | {
212 | half d = tex2D(_MainTex, input.texcoord0.xy).a * input.param.x;
213 | half4 c = input.faceColor * saturate(d - input.param.w);
214 |
215 | #ifdef OUTLINE_ON
216 | c = lerp(input.outlineColor, input.faceColor, saturate(d - input.param.z));
217 | c *= saturate(d - input.param.y);
218 | #endif
219 |
220 | #if UNDERLAY_ON
221 | d = tex2D(_MainTex, input.texcoord1.xy).a * input.underlayParam.x;
222 | c += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * saturate(d - input.underlayParam.y) * (1 - c.a);
223 | #endif
224 |
225 | #if UNDERLAY_INNER
226 | half sd = saturate(d - input.param.z);
227 | d = tex2D(_MainTex, input.texcoord1.xy).a * input.underlayParam.x;
228 | c += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * (1 - saturate(d - input.underlayParam.y)) * sd * (1 - c.a);
229 | #endif
230 |
231 | // Alternative implementation to UnityGet2DClipping with support for softness.
232 | //#if UNITY_UI_CLIP_RECT
233 | half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(input.mask.xy)) * input.mask.zw);
234 | c *= m.x * m.y;
235 | //#endif
236 |
237 | float a = abs(_MaskInverse - tex2D(_MaskTex, input.texcoord0.zw).a);
238 | float t = a + (1 - _MaskWipeControl) * _MaskEdgeSoftness - _MaskWipeControl;
239 | a = saturate(t / _MaskEdgeSoftness);
240 | c.rgb = lerp(_MaskEdgeColor.rgb*c.a, c.rgb, a);
241 | c *= a;
242 |
243 | #if (UNDERLAY_ON | UNDERLAY_INNER)
244 | c *= input.texcoord1.z;
245 | #endif
246 |
247 | #if UNITY_UI_ALPHACLIP
248 | clip(c.a - 0.001);
249 | #endif
250 |
251 | return c;
252 | }
253 | ENDCG
254 | }
255 | }
256 |
257 | CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI"
258 | }
259 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMP_SDF-Mobile Masking.shader.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: bc1ede39bf3643ee8e493720e4259791
3 | ShaderImporter:
4 | externalObjects: {}
5 | defaultTextures: []
6 | nonModifiableTextures: []
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMP_SDF-Mobile Overlay.shader:
--------------------------------------------------------------------------------
1 | // Simplified SDF shader:
2 | // - No Shading Option (bevel / bump / env map)
3 | // - No Glow Option
4 | // - Softness is applied on both side of the outline
5 |
6 | Shader "TextMeshPro/Mobile/Distance Field Overlay" {
7 |
8 | Properties {
9 | _FaceColor ("Face Color", Color) = (1,1,1,1)
10 | _FaceDilate ("Face Dilate", Range(-1,1)) = 0
11 |
12 | _OutlineColor ("Outline Color", Color) = (0,0,0,1)
13 | _OutlineWidth ("Outline Thickness", Range(0,1)) = 0
14 | _OutlineSoftness ("Outline Softness", Range(0,1)) = 0
15 |
16 | _UnderlayColor ("Border Color", Color) = (0,0,0,.5)
17 | _UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0
18 | _UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0
19 | _UnderlayDilate ("Border Dilate", Range(-1,1)) = 0
20 | _UnderlaySoftness ("Border Softness", Range(0,1)) = 0
21 |
22 | _WeightNormal ("Weight Normal", float) = 0
23 | _WeightBold ("Weight Bold", float) = .5
24 |
25 | _ShaderFlags ("Flags", float) = 0
26 | _ScaleRatioA ("Scale RatioA", float) = 1
27 | _ScaleRatioB ("Scale RatioB", float) = 1
28 | _ScaleRatioC ("Scale RatioC", float) = 1
29 |
30 | _MainTex ("Font Atlas", 2D) = "white" {}
31 | _TextureWidth ("Texture Width", float) = 512
32 | _TextureHeight ("Texture Height", float) = 512
33 | _GradientScale ("Gradient Scale", float) = 5
34 | _ScaleX ("Scale X", float) = 1
35 | _ScaleY ("Scale Y", float) = 1
36 | _PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875
37 | _Sharpness ("Sharpness", Range(-1,1)) = 0
38 |
39 | _VertexOffsetX ("Vertex OffsetX", float) = 0
40 | _VertexOffsetY ("Vertex OffsetY", float) = 0
41 |
42 | _ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
43 | _MaskSoftnessX ("Mask SoftnessX", float) = 0
44 | _MaskSoftnessY ("Mask SoftnessY", float) = 0
45 |
46 | _StencilComp ("Stencil Comparison", Float) = 8
47 | _Stencil ("Stencil ID", Float) = 0
48 | _StencilOp ("Stencil Operation", Float) = 0
49 | _StencilWriteMask ("Stencil Write Mask", Float) = 255
50 | _StencilReadMask ("Stencil Read Mask", Float) = 255
51 |
52 | _CullMode ("Cull Mode", Float) = 0
53 | _ColorMask ("Color Mask", Float) = 15
54 | }
55 |
56 | SubShader {
57 | Tags
58 | {
59 | "Queue"="Overlay"
60 | "IgnoreProjector"="True"
61 | "RenderType"="Transparent"
62 | }
63 |
64 |
65 | Stencil
66 | {
67 | Ref [_Stencil]
68 | Comp [_StencilComp]
69 | Pass [_StencilOp]
70 | ReadMask [_StencilReadMask]
71 | WriteMask [_StencilWriteMask]
72 | }
73 |
74 | Cull [_CullMode]
75 | ZWrite Off
76 | Lighting Off
77 | Fog { Mode Off }
78 | ZTest Always
79 | Blend One OneMinusSrcAlpha
80 | ColorMask [_ColorMask]
81 |
82 | Pass {
83 | CGPROGRAM
84 | #pragma vertex VertShader
85 | #pragma fragment PixShader
86 | #pragma shader_feature __ OUTLINE_ON
87 | #pragma shader_feature __ UNDERLAY_ON UNDERLAY_INNER
88 |
89 | #pragma multi_compile __ UNITY_UI_CLIP_RECT
90 | #pragma multi_compile __ UNITY_UI_ALPHACLIP
91 |
92 | #include "UnityCG.cginc"
93 | #include "UnityUI.cginc"
94 | #include "TMPro_Properties.cginc"
95 |
96 | struct vertex_t
97 | {
98 | UNITY_VERTEX_INPUT_INSTANCE_ID
99 | float4 vertex : POSITION;
100 | float3 normal : NORMAL;
101 | fixed4 color : COLOR;
102 | float4 texcoord0 : TEXCOORD0;
103 | float2 texcoord1 : TEXCOORD1;
104 | };
105 |
106 | struct pixel_t
107 | {
108 | UNITY_VERTEX_INPUT_INSTANCE_ID
109 | UNITY_VERTEX_OUTPUT_STEREO
110 | float4 vertex : SV_POSITION;
111 | fixed4 faceColor : COLOR;
112 | fixed4 outlineColor : COLOR1;
113 | float4 texcoord0 : TEXCOORD0; // Texture UV, Mask UV
114 | half4 param : TEXCOORD1; // Scale(x), BiasIn(y), BiasOut(z), Bias(w)
115 | half4 mask : TEXCOORD2; // Position in clip space(xy), Softness(zw)
116 |
117 | #if (UNDERLAY_ON | UNDERLAY_INNER)
118 | float4 texcoord1 : TEXCOORD3; // Texture UV, alpha, reserved
119 | half2 underlayParam : TEXCOORD4; // Scale(x), Bias(y)
120 | #endif
121 | };
122 |
123 | float _UIMaskSoftnessX;
124 | float _UIMaskSoftnessY;
125 | int _UIVertexColorAlwaysGammaSpace;
126 |
127 |
128 | pixel_t VertShader(vertex_t input)
129 | {
130 | pixel_t output;
131 |
132 | UNITY_INITIALIZE_OUTPUT(pixel_t, output);
133 | UNITY_SETUP_INSTANCE_ID(input);
134 | UNITY_TRANSFER_INSTANCE_ID(input, output);
135 | UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
136 |
137 | float bold = step(input.texcoord0.w, 0);
138 |
139 | float4 vert = input.vertex;
140 | vert.x += _VertexOffsetX;
141 | vert.y += _VertexOffsetY;
142 | float4 vPosition = UnityObjectToClipPos(vert);
143 |
144 | float2 pixelSize = vPosition.w;
145 | pixelSize /= float2(_ScaleX, _ScaleY) * abs(mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy));
146 |
147 | float scale = rsqrt(dot(pixelSize, pixelSize));
148 | scale *= abs(input.texcoord0.w) * _GradientScale * (_Sharpness + 1);
149 | if(UNITY_MATRIX_P[3][3] == 0) scale = lerp(abs(scale) * (1 - _PerspectiveFilter), scale, abs(dot(UnityObjectToWorldNormal(input.normal.xyz), normalize(WorldSpaceViewDir(vert)))));
150 |
151 | float weight = lerp(_WeightNormal, _WeightBold, bold) / 4.0;
152 | weight = (weight + _FaceDilate) * _ScaleRatioA * 0.5;
153 |
154 | float layerScale = scale;
155 |
156 | scale /= 1 + (_OutlineSoftness * _ScaleRatioA * scale);
157 | float bias = (0.5 - weight) * scale - 0.5;
158 | float outline = _OutlineWidth * _ScaleRatioA * 0.5 * scale;
159 |
160 | if (_UIVertexColorAlwaysGammaSpace && !IsGammaSpace())
161 | {
162 | input.color.rgb = UIGammaToLinear(input.color.rgb);
163 | }
164 | float opacity = input.color.a;
165 | #if (UNDERLAY_ON | UNDERLAY_INNER)
166 | opacity = 1.0;
167 | #endif
168 |
169 | fixed4 faceColor = fixed4(input.color.rgb, opacity) * _FaceColor;
170 | faceColor.rgb *= faceColor.a;
171 |
172 | fixed4 outlineColor = _OutlineColor;
173 | outlineColor.a *= opacity;
174 | outlineColor.rgb *= outlineColor.a;
175 | outlineColor = lerp(faceColor, outlineColor, sqrt(min(1.0, (outline * 2))));
176 |
177 | #if (UNDERLAY_ON | UNDERLAY_INNER)
178 | layerScale /= 1 + ((_UnderlaySoftness * _ScaleRatioC) * layerScale);
179 | float layerBias = (.5 - weight) * layerScale - .5 - ((_UnderlayDilate * _ScaleRatioC) * .5 * layerScale);
180 |
181 | float x = -(_UnderlayOffsetX * _ScaleRatioC) * _GradientScale / _TextureWidth;
182 | float y = -(_UnderlayOffsetY * _ScaleRatioC) * _GradientScale / _TextureHeight;
183 | float2 layerOffset = float2(x, y);
184 | #endif
185 |
186 | // Generate UV for the Masking Texture
187 | float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
188 | float2 maskUV = (vert.xy - clampedRect.xy) / (clampedRect.zw - clampedRect.xy);
189 |
190 | // Populate structure for pixel shader
191 | output.vertex = vPosition;
192 | output.faceColor = faceColor;
193 | output.outlineColor = outlineColor;
194 | output.texcoord0 = float4(input.texcoord0.x, input.texcoord0.y, maskUV.x, maskUV.y);
195 | output.param = half4(scale, bias - outline, bias + outline, bias);
196 | const half2 maskSoftness = half2(max(_UIMaskSoftnessX, _MaskSoftnessX), max(_UIMaskSoftnessY, _MaskSoftnessY));
197 | output.mask = half4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * maskSoftness + pixelSize.xy));
198 | #if (UNDERLAY_ON || UNDERLAY_INNER)
199 | output.texcoord1 = float4(input.texcoord0 + layerOffset, input.color.a, 0);
200 | output.underlayParam = half2(layerScale, layerBias);
201 | #endif
202 |
203 | return output;
204 | }
205 |
206 |
207 | // PIXEL SHADER
208 | fixed4 PixShader(pixel_t input) : SV_Target
209 | {
210 | UNITY_SETUP_INSTANCE_ID(input);
211 |
212 | half d = tex2D(_MainTex, input.texcoord0.xy).a * input.param.x;
213 | half4 c = input.faceColor * saturate(d - input.param.w);
214 |
215 | #ifdef OUTLINE_ON
216 | c = lerp(input.outlineColor, input.faceColor, saturate(d - input.param.z));
217 | c *= saturate(d - input.param.y);
218 | #endif
219 |
220 | #if UNDERLAY_ON
221 | d = tex2D(_MainTex, input.texcoord1.xy).a * input.underlayParam.x;
222 | c += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * saturate(d - input.underlayParam.y) * (1 - c.a);
223 | #endif
224 |
225 | #if UNDERLAY_INNER
226 | half sd = saturate(d - input.param.z);
227 | d = tex2D(_MainTex, input.texcoord1.xy).a * input.underlayParam.x;
228 | c += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * (1 - saturate(d - input.underlayParam.y)) * sd * (1 - c.a);
229 | #endif
230 |
231 | // Alternative implementation to UnityGet2DClipping with support for softness.
232 | #if UNITY_UI_CLIP_RECT
233 | half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(input.mask.xy)) * input.mask.zw);
234 | c *= m.x * m.y;
235 | #endif
236 |
237 | #if (UNDERLAY_ON | UNDERLAY_INNER)
238 | c *= input.texcoord1.z;
239 | #endif
240 |
241 | #if UNITY_UI_ALPHACLIP
242 | clip(c.a - 0.001);
243 | #endif
244 |
245 | return c;
246 | }
247 | ENDCG
248 | }
249 | }
250 |
251 | CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI"
252 | }
253 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMP_SDF-Mobile Overlay.shader.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a02a7d8c237544f1962732b55a9aebf1
3 | ShaderImporter:
4 | externalObjects: {}
5 | defaultTextures: []
6 | nonModifiableTextures: []
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMP_SDF-Mobile SSD.shader:
--------------------------------------------------------------------------------
1 | // Simplified SDF shader:
2 | // - No Shading Option (bevel / bump / env map)
3 | // - No Glow Option
4 | // - Softness is applied on both side of the outline
5 |
6 | Shader "TextMeshPro/Mobile/Distance Field SSD" {
7 |
8 | Properties {
9 | _FaceColor ("Face Color", Color) = (1,1,1,1)
10 | _FaceDilate ("Face Dilate", Range(-1,1)) = 0
11 |
12 | _OutlineColor ("Outline Color", Color) = (0,0,0,1)
13 | _OutlineWidth ("Outline Thickness", Range(0,1)) = 0
14 | _OutlineSoftness ("Outline Softness", Range(0,1)) = 0
15 |
16 | _UnderlayColor ("Border Color", Color) = (0,0,0,.5)
17 | _UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0
18 | _UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0
19 | _UnderlayDilate ("Border Dilate", Range(-1,1)) = 0
20 | _UnderlaySoftness ("Border Softness", Range(0,1)) = 0
21 |
22 | _WeightNormal ("Weight Normal", float) = 0
23 | _WeightBold ("Weight Bold", float) = .5
24 |
25 | _ShaderFlags ("Flags", float) = 0
26 | _ScaleRatioA ("Scale RatioA", float) = 1
27 | _ScaleRatioB ("Scale RatioB", float) = 1
28 | _ScaleRatioC ("Scale RatioC", float) = 1
29 |
30 | _MainTex ("Font Atlas", 2D) = "white" {}
31 | _TextureWidth ("Texture Width", float) = 512
32 | _TextureHeight ("Texture Height", float) = 512
33 | _GradientScale ("Gradient Scale", float) = 5
34 | _ScaleX ("Scale X", float) = 1
35 | _ScaleY ("Scale Y", float) = 1
36 | _PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875
37 | _Sharpness ("Sharpness", Range(-1,1)) = 0
38 |
39 | _VertexOffsetX ("Vertex OffsetX", float) = 0
40 | _VertexOffsetY ("Vertex OffsetY", float) = 0
41 |
42 | _ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
43 | _MaskSoftnessX ("Mask SoftnessX", float) = 0
44 | _MaskSoftnessY ("Mask SoftnessY", float) = 0
45 | _MaskTex ("Mask Texture", 2D) = "white" {}
46 | _MaskInverse ("Inverse", float) = 0
47 | _MaskEdgeColor ("Edge Color", Color) = (1,1,1,1)
48 | _MaskEdgeSoftness ("Edge Softness", Range(0, 1)) = 0.01
49 | _MaskWipeControl ("Wipe Position", Range(0, 1)) = 0.5
50 |
51 | _StencilComp ("Stencil Comparison", Float) = 8
52 | _Stencil ("Stencil ID", Float) = 0
53 | _StencilOp ("Stencil Operation", Float) = 0
54 | _StencilWriteMask ("Stencil Write Mask", Float) = 255
55 | _StencilReadMask ("Stencil Read Mask", Float) = 255
56 |
57 | _CullMode ("Cull Mode", Float) = 0
58 | _ColorMask ("Color Mask", Float) = 15
59 | }
60 |
61 | SubShader {
62 | Tags {
63 | "Queue"="Transparent"
64 | "IgnoreProjector"="True"
65 | "RenderType"="Transparent"
66 | }
67 |
68 | Stencil
69 | {
70 | Ref [_Stencil]
71 | Comp [_StencilComp]
72 | Pass [_StencilOp]
73 | ReadMask [_StencilReadMask]
74 | WriteMask [_StencilWriteMask]
75 | }
76 |
77 | Cull [_CullMode]
78 | ZWrite Off
79 | Lighting Off
80 | Fog { Mode Off }
81 | ZTest [unity_GUIZTestMode]
82 | Blend One OneMinusSrcAlpha
83 | ColorMask [_ColorMask]
84 |
85 | Pass {
86 | CGPROGRAM
87 | #pragma vertex VertShader
88 | #pragma fragment PixShader
89 | #pragma shader_feature __ OUTLINE_ON
90 | #pragma shader_feature __ UNDERLAY_ON UNDERLAY_INNER
91 |
92 | #pragma multi_compile __ UNITY_UI_CLIP_RECT
93 | #pragma multi_compile __ UNITY_UI_ALPHACLIP
94 |
95 | #include "UnityCG.cginc"
96 | #include "UnityUI.cginc"
97 | #include "TMPro_Properties.cginc"
98 |
99 | #include "TMPro_Mobile.cginc"
100 |
101 | ENDCG
102 | }
103 | }
104 |
105 | CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI"
106 | }
107 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMP_SDF-Mobile SSD.shader.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c8d12adcee749c344b8117cf7c7eb912
3 | ShaderImporter:
4 | externalObjects: {}
5 | defaultTextures: []
6 | nonModifiableTextures: []
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMP_SDF-Mobile-2-Pass.shader.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0178fcb869bafef4690d177d31d17db8
3 | ShaderImporter:
4 | externalObjects: {}
5 | defaultTextures: []
6 | nonModifiableTextures: []
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMP_SDF-Mobile.shader:
--------------------------------------------------------------------------------
1 | // Simplified SDF shader:
2 | // - No Shading Option (bevel / bump / env map)
3 | // - No Glow Option
4 | // - Softness is applied on both side of the outline
5 |
6 | Shader "TextMeshPro/Mobile/Distance Field" {
7 |
8 | Properties {
9 | _FaceColor ("Face Color", Color) = (1,1,1,1)
10 | _FaceDilate ("Face Dilate", Range(-1,1)) = 0
11 |
12 | _OutlineColor ("Outline Color", Color) = (0,0,0,1)
13 | _OutlineWidth ("Outline Thickness", Range(0,1)) = 0
14 | _OutlineSoftness ("Outline Softness", Range(0,1)) = 0
15 |
16 | _UnderlayColor ("Border Color", Color) = (0,0,0,.5)
17 | _UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0
18 | _UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0
19 | _UnderlayDilate ("Border Dilate", Range(-1,1)) = 0
20 | _UnderlaySoftness ("Border Softness", Range(0,1)) = 0
21 |
22 | _WeightNormal ("Weight Normal", float) = 0
23 | _WeightBold ("Weight Bold", float) = .5
24 |
25 | _ShaderFlags ("Flags", float) = 0
26 | _ScaleRatioA ("Scale RatioA", float) = 1
27 | _ScaleRatioB ("Scale RatioB", float) = 1
28 | _ScaleRatioC ("Scale RatioC", float) = 1
29 |
30 | _MainTex ("Font Atlas", 2D) = "white" {}
31 | _TextureWidth ("Texture Width", float) = 512
32 | _TextureHeight ("Texture Height", float) = 512
33 | _GradientScale ("Gradient Scale", float) = 5
34 | _ScaleX ("Scale X", float) = 1
35 | _ScaleY ("Scale Y", float) = 1
36 | _PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875
37 | _Sharpness ("Sharpness", Range(-1,1)) = 0
38 |
39 | _VertexOffsetX ("Vertex OffsetX", float) = 0
40 | _VertexOffsetY ("Vertex OffsetY", float) = 0
41 |
42 | _ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
43 | _MaskSoftnessX ("Mask SoftnessX", float) = 0
44 | _MaskSoftnessY ("Mask SoftnessY", float) = 0
45 |
46 | _StencilComp ("Stencil Comparison", Float) = 8
47 | _Stencil ("Stencil ID", Float) = 0
48 | _StencilOp ("Stencil Operation", Float) = 0
49 | _StencilWriteMask ("Stencil Write Mask", Float) = 255
50 | _StencilReadMask ("Stencil Read Mask", Float) = 255
51 |
52 | _CullMode ("Cull Mode", Float) = 0
53 | _ColorMask ("Color Mask", Float) = 15
54 | }
55 |
56 | SubShader {
57 | Tags
58 | {
59 | "Queue"="Transparent"
60 | "IgnoreProjector"="True"
61 | "RenderType"="Transparent"
62 | }
63 |
64 |
65 | Stencil
66 | {
67 | Ref [_Stencil]
68 | Comp [_StencilComp]
69 | Pass [_StencilOp]
70 | ReadMask [_StencilReadMask]
71 | WriteMask [_StencilWriteMask]
72 | }
73 |
74 | Cull [_CullMode]
75 | ZWrite Off
76 | Lighting Off
77 | Fog { Mode Off }
78 | ZTest [unity_GUIZTestMode]
79 | Blend One OneMinusSrcAlpha
80 | ColorMask [_ColorMask]
81 |
82 | Pass {
83 | CGPROGRAM
84 | #pragma enable_d3d11_debug_symbols
85 | #pragma vertex VertShader
86 | #pragma fragment PixShader
87 | #pragma shader_feature __ OUTLINE_ON
88 | #pragma shader_feature __ UNDERLAY_ON UNDERLAY_INNER
89 |
90 | #pragma multi_compile __ UNITY_UI_CLIP_RECT
91 | #pragma multi_compile __ UNITY_UI_ALPHACLIP
92 |
93 | #include "UnityCG.cginc"
94 | #include "UnityUI.cginc"
95 | #include "TMPro_Properties.cginc"
96 |
97 | struct vertex_t {
98 | UNITY_VERTEX_INPUT_INSTANCE_ID
99 | float4 vertex : POSITION;
100 | float3 normal : NORMAL;
101 | fixed4 color : COLOR;
102 | float4 texcoord0 : TEXCOORD0;
103 | float2 texcoord1 : TEXCOORD1;
104 | };
105 |
106 | struct pixel_t {
107 | UNITY_VERTEX_INPUT_INSTANCE_ID
108 | UNITY_VERTEX_OUTPUT_STEREO
109 | float4 vertex : SV_POSITION;
110 | fixed4 faceColor : COLOR;
111 | fixed4 outlineColor : COLOR1;
112 | float4 texcoord0 : TEXCOORD0; // Texture UV, Mask UV
113 | half4 param : TEXCOORD1; // Scale(x), BiasIn(y), BiasOut(z), Bias(w)
114 | half4 mask : TEXCOORD2; // Position in clip space(xy), Softness(zw)
115 | #if (UNDERLAY_ON | UNDERLAY_INNER)
116 | float4 texcoord1 : TEXCOORD3; // Texture UV, alpha, reserved
117 | half2 underlayParam : TEXCOORD4; // Scale(x), Bias(y)
118 | #endif
119 | };
120 |
121 | float _UIMaskSoftnessX;
122 | float _UIMaskSoftnessY;
123 | int _UIVertexColorAlwaysGammaSpace;
124 |
125 | pixel_t VertShader(vertex_t input)
126 | {
127 | pixel_t output;
128 |
129 | UNITY_INITIALIZE_OUTPUT(pixel_t, output);
130 | UNITY_SETUP_INSTANCE_ID(input);
131 | UNITY_TRANSFER_INSTANCE_ID(input, output);
132 | UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
133 |
134 | float bold = step(input.texcoord0.w, 0);
135 |
136 | float4 vert = input.vertex;
137 | vert.x += _VertexOffsetX;
138 | vert.y += _VertexOffsetY;
139 | float4 vPosition = UnityObjectToClipPos(vert);
140 |
141 | float2 pixelSize = vPosition.w;
142 | pixelSize /= float2(_ScaleX, _ScaleY) * abs(mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy));
143 |
144 | float scale = rsqrt(dot(pixelSize, pixelSize));
145 | scale *= abs(input.texcoord0.w) * _GradientScale * (_Sharpness + 1);
146 | if(UNITY_MATRIX_P[3][3] == 0) scale = lerp(abs(scale) * (1 - _PerspectiveFilter), scale, abs(dot(UnityObjectToWorldNormal(input.normal.xyz), normalize(WorldSpaceViewDir(vert)))));
147 |
148 | float weight = lerp(_WeightNormal, _WeightBold, bold) / 4.0;
149 | weight = (weight + _FaceDilate) * _ScaleRatioA * 0.5;
150 |
151 | float layerScale = scale;
152 |
153 | scale /= 1 + (_OutlineSoftness * _ScaleRatioA * scale);
154 | float bias = (0.5 - weight) * scale - 0.5;
155 | float outline = _OutlineWidth * _ScaleRatioA * 0.5 * scale;
156 |
157 | if (_UIVertexColorAlwaysGammaSpace && !IsGammaSpace())
158 | {
159 | input.color.rgb = UIGammaToLinear(input.color.rgb);
160 | }
161 | float opacity = input.color.a;
162 | #if (UNDERLAY_ON | UNDERLAY_INNER)
163 | opacity = 1.0;
164 | #endif
165 |
166 | fixed4 faceColor = fixed4(input.color.rgb, opacity) * _FaceColor;
167 | faceColor.rgb *= faceColor.a;
168 |
169 | fixed4 outlineColor = _OutlineColor;
170 | outlineColor.a *= opacity;
171 | outlineColor.rgb *= outlineColor.a;
172 | outlineColor = lerp(faceColor, outlineColor, sqrt(min(1.0, (outline * 2))));
173 |
174 | #if (UNDERLAY_ON | UNDERLAY_INNER)
175 | layerScale /= 1 + ((_UnderlaySoftness * _ScaleRatioC) * layerScale);
176 | float layerBias = (.5 - weight) * layerScale - .5 - ((_UnderlayDilate * _ScaleRatioC) * .5 * layerScale);
177 |
178 | float x = -(_UnderlayOffsetX * _ScaleRatioC) * _GradientScale / _TextureWidth;
179 | float y = -(_UnderlayOffsetY * _ScaleRatioC) * _GradientScale / _TextureHeight;
180 | float2 layerOffset = float2(x, y);
181 | #endif
182 |
183 | // Generate UV for the Masking Texture
184 | float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
185 | float2 maskUV = (vert.xy - clampedRect.xy) / (clampedRect.zw - clampedRect.xy);
186 |
187 | // Populate structure for pixel shader
188 | output.vertex = vPosition;
189 | output.faceColor = faceColor;
190 | output.outlineColor = outlineColor;
191 | output.texcoord0 = float4(input.texcoord0.x, input.texcoord0.y, maskUV.x, maskUV.y);
192 | output.param = half4(scale, bias - outline, bias + outline, bias);
193 |
194 | const half2 maskSoftness = half2(max(_UIMaskSoftnessX, _MaskSoftnessX), max(_UIMaskSoftnessY, _MaskSoftnessY));
195 | output.mask = half4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * maskSoftness + pixelSize.xy));
196 | #if (UNDERLAY_ON || UNDERLAY_INNER)
197 | output.texcoord1 = float4(input.texcoord0 + layerOffset, input.color.a, 0);
198 | output.underlayParam = half2(layerScale, layerBias);
199 | #endif
200 |
201 | return output;
202 | }
203 |
204 |
205 | // PIXEL SHADER
206 | fixed4 PixShader(pixel_t input) : SV_Target
207 | {
208 | UNITY_SETUP_INSTANCE_ID(input);
209 |
210 | half d = tex2D(_MainTex, input.texcoord0.xy).a * input.param.x;
211 | half4 c = input.faceColor * saturate(d - input.param.w);
212 |
213 | #ifdef OUTLINE_ON
214 | c = lerp(input.outlineColor, input.faceColor, saturate(d - input.param.z));
215 | c *= saturate(d - input.param.y);
216 | #endif
217 |
218 | #if UNDERLAY_ON
219 | d = tex2D(_MainTex, input.texcoord1.xy).a * input.underlayParam.x;
220 | c += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * saturate(d - input.underlayParam.y) * (1 - c.a);
221 | #endif
222 |
223 | #if UNDERLAY_INNER
224 | half sd = saturate(d - input.param.z);
225 | d = tex2D(_MainTex, input.texcoord1.xy).a * input.underlayParam.x;
226 | c += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * (1 - saturate(d - input.underlayParam.y)) * sd * (1 - c.a);
227 | #endif
228 |
229 | // Alternative implementation to UnityGet2DClipping with support for softness.
230 | #if UNITY_UI_CLIP_RECT
231 | half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(input.mask.xy)) * input.mask.zw);
232 | c *= m.x * m.y;
233 | #endif
234 |
235 | #if (UNDERLAY_ON | UNDERLAY_INNER)
236 | c *= input.texcoord1.z;
237 | #endif
238 |
239 | #if UNITY_UI_ALPHACLIP
240 | clip(c.a - 0.001);
241 | #endif
242 |
243 | return c;
244 | }
245 | ENDCG
246 | }
247 | }
248 |
249 | CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI"
250 | }
251 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMP_SDF-Mobile.shader.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: fe393ace9b354375a9cb14cdbbc28be4
3 | ShaderImporter:
4 | externalObjects: {}
5 | defaultTextures: []
6 | nonModifiableTextures: []
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMP_SDF-Surface-Mobile.shader:
--------------------------------------------------------------------------------
1 | // Simplified version of the SDF Surface shader :
2 | // - No support for Bevel, Bump or envmap
3 | // - Diffuse only lighting
4 | // - Fully supports only 1 directional light. Other lights can affect it, but it will be per-vertex/SH.
5 |
6 | Shader "TextMeshPro/Mobile/Distance Field (Surface)" {
7 |
8 | Properties {
9 | _FaceTex ("Fill Texture", 2D) = "white" {}
10 | _FaceColor ("Fill Color", Color) = (1,1,1,1)
11 | _FaceDilate ("Face Dilate", Range(-1,1)) = 0
12 |
13 | _OutlineColor ("Outline Color", Color) = (0,0,0,1)
14 | _OutlineTex ("Outline Texture", 2D) = "white" {}
15 | _OutlineWidth ("Outline Thickness", Range(0, 1)) = 0
16 | _OutlineSoftness ("Outline Softness", Range(0,1)) = 0
17 |
18 | _GlowColor ("Color", Color) = (0, 1, 0, 0.5)
19 | _GlowOffset ("Offset", Range(-1,1)) = 0
20 | _GlowInner ("Inner", Range(0,1)) = 0.05
21 | _GlowOuter ("Outer", Range(0,1)) = 0.05
22 | _GlowPower ("Falloff", Range(1, 0)) = 0.75
23 |
24 | _WeightNormal ("Weight Normal", float) = 0
25 | _WeightBold ("Weight Bold", float) = 0.5
26 |
27 | // Should not be directly exposed to the user
28 | _ShaderFlags ("Flags", float) = 0
29 | _ScaleRatioA ("Scale RatioA", float) = 1
30 | _ScaleRatioB ("Scale RatioB", float) = 1
31 | _ScaleRatioC ("Scale RatioC", float) = 1
32 |
33 | _MainTex ("Font Atlas", 2D) = "white" {}
34 | _TextureWidth ("Texture Width", float) = 512
35 | _TextureHeight ("Texture Height", float) = 512
36 | _GradientScale ("Gradient Scale", float) = 5.0
37 | _ScaleX ("Scale X", float) = 1.0
38 | _ScaleY ("Scale Y", float) = 1.0
39 | _PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875
40 | _Sharpness ("Sharpness", Range(-1,1)) = 0
41 |
42 | _VertexOffsetX ("Vertex OffsetX", float) = 0
43 | _VertexOffsetY ("Vertex OffsetY", float) = 0
44 |
45 | _CullMode ("Cull Mode", Float) = 0
46 | //_MaskCoord ("Mask Coords", vector) = (0,0,0,0)
47 | //_MaskSoftness ("Mask Softness", float) = 0
48 | }
49 |
50 | SubShader {
51 |
52 | Tags {
53 | "Queue"="Transparent"
54 | "IgnoreProjector"="True"
55 | "RenderType"="Transparent"
56 | }
57 |
58 | LOD 300
59 | Cull [_CullMode]
60 |
61 | CGPROGRAM
62 | #pragma surface PixShader Lambert alpha:blend vertex:VertShader noforwardadd nolightmap nodirlightmap
63 | #pragma target 3.0
64 | #pragma shader_feature __ GLOW_ON
65 |
66 | #include "TMPro_Properties.cginc"
67 | #include "TMPro.cginc"
68 |
69 | half _FaceShininess;
70 | half _OutlineShininess;
71 |
72 | struct Input
73 | {
74 | fixed4 color : COLOR;
75 | float2 uv_MainTex;
76 | float2 uv2_FaceTex;
77 | float2 uv2_OutlineTex;
78 | float2 param; // Weight, Scale
79 | float3 viewDirEnv;
80 | };
81 |
82 | #include "TMPro_Surface.cginc"
83 |
84 | ENDCG
85 |
86 | // Pass to render object as a shadow caster
87 | Pass
88 | {
89 | Name "Caster"
90 | Tags { "LightMode" = "ShadowCaster" }
91 | Offset 1, 1
92 |
93 | Fog {Mode Off}
94 | ZWrite On ZTest LEqual Cull Off
95 |
96 | CGPROGRAM
97 | #pragma vertex vert
98 | #pragma fragment frag
99 | #pragma multi_compile_shadowcaster
100 | #include "UnityCG.cginc"
101 |
102 | struct v2f
103 | {
104 | V2F_SHADOW_CASTER;
105 | float2 uv : TEXCOORD1;
106 | float2 uv2 : TEXCOORD3;
107 | float alphaClip : TEXCOORD2;
108 | };
109 |
110 | uniform float4 _MainTex_ST;
111 | uniform float4 _OutlineTex_ST;
112 | float _OutlineWidth;
113 | float _FaceDilate;
114 | float _ScaleRatioA;
115 |
116 | v2f vert( appdata_base v )
117 | {
118 | v2f o;
119 | TRANSFER_SHADOW_CASTER(o)
120 | o.uv = TRANSFORM_TEX(v.texcoord, _MainTex);
121 | o.uv2 = TRANSFORM_TEX(v.texcoord, _OutlineTex);
122 | o.alphaClip = o.alphaClip = (1.0 - _OutlineWidth * _ScaleRatioA - _FaceDilate * _ScaleRatioA) / 2;
123 | return o;
124 | }
125 |
126 | uniform sampler2D _MainTex;
127 |
128 | float4 frag(v2f i) : COLOR
129 | {
130 | fixed4 texcol = tex2D(_MainTex, i.uv).a;
131 | clip(texcol.a - i.alphaClip);
132 | SHADOW_CASTER_FRAGMENT(i)
133 | }
134 | ENDCG
135 | }
136 | }
137 |
138 | CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI"
139 | }
140 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMP_SDF-Surface-Mobile.shader.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 85187c2149c549c5b33f0cdb02836b17
3 | ShaderImporter:
4 | externalObjects: {}
5 | defaultTextures: []
6 | nonModifiableTextures: []
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMP_SDF-Surface.shader:
--------------------------------------------------------------------------------
1 | Shader "TextMeshPro/Distance Field (Surface)" {
2 |
3 | Properties {
4 | _FaceTex ("Fill Texture", 2D) = "white" {}
5 | _FaceUVSpeedX ("Face UV Speed X", Range(-5, 5)) = 0.0
6 | _FaceUVSpeedY ("Face UV Speed Y", Range(-5, 5)) = 0.0
7 | _FaceColor ("Fill Color", Color) = (1,1,1,1)
8 | _FaceDilate ("Face Dilate", Range(-1,1)) = 0
9 |
10 | _OutlineColor ("Outline Color", Color) = (0,0,0,1)
11 | _OutlineTex ("Outline Texture", 2D) = "white" {}
12 | _OutlineUVSpeedX ("Outline UV Speed X", Range(-5, 5)) = 0.0
13 | _OutlineUVSpeedY ("Outline UV Speed Y", Range(-5, 5)) = 0.0
14 | _OutlineWidth ("Outline Thickness", Range(0, 1)) = 0
15 | _OutlineSoftness ("Outline Softness", Range(0,1)) = 0
16 |
17 | _Bevel ("Bevel", Range(0,1)) = 0.5
18 | _BevelOffset ("Bevel Offset", Range(-0.5,0.5)) = 0
19 | _BevelWidth ("Bevel Width", Range(-.5,0.5)) = 0
20 | _BevelClamp ("Bevel Clamp", Range(0,1)) = 0
21 | _BevelRoundness ("Bevel Roundness", Range(0,1)) = 0
22 |
23 | _BumpMap ("Normalmap", 2D) = "bump" {}
24 | _BumpOutline ("Bump Outline", Range(0,1)) = 0.5
25 | _BumpFace ("Bump Face", Range(0,1)) = 0.5
26 |
27 | _ReflectFaceColor ("Face Color", Color) = (0,0,0,1)
28 | _ReflectOutlineColor ("Outline Color", Color) = (0,0,0,1)
29 | _Cube ("Reflection Cubemap", Cube) = "black" { /* TexGen CubeReflect */ }
30 | _EnvMatrixRotation ("Texture Rotation", vector) = (0, 0, 0, 0)
31 | _SpecColor ("Specular Color", Color) = (0,0,0,1)
32 |
33 | _FaceShininess ("Face Shininess", Range(0,1)) = 0
34 | _OutlineShininess ("Outline Shininess", Range(0,1)) = 0
35 |
36 | _GlowColor ("Color", Color) = (0, 1, 0, 0.5)
37 | _GlowOffset ("Offset", Range(-1,1)) = 0
38 | _GlowInner ("Inner", Range(0,1)) = 0.05
39 | _GlowOuter ("Outer", Range(0,1)) = 0.05
40 | _GlowPower ("Falloff", Range(1, 0)) = 0.75
41 |
42 | _WeightNormal ("Weight Normal", float) = 0
43 | _WeightBold ("Weight Bold", float) = 0.5
44 |
45 | // Should not be directly exposed to the user
46 | _ShaderFlags ("Flags", float) = 0
47 | _ScaleRatioA ("Scale RatioA", float) = 1
48 | _ScaleRatioB ("Scale RatioB", float) = 1
49 | _ScaleRatioC ("Scale RatioC", float) = 1
50 |
51 | _MainTex ("Font Atlas", 2D) = "white" {}
52 | _TextureWidth ("Texture Width", float) = 512
53 | _TextureHeight ("Texture Height", float) = 512
54 | _GradientScale ("Gradient Scale", float) = 5.0
55 | _ScaleX ("Scale X", float) = 1.0
56 | _ScaleY ("Scale Y", float) = 1.0
57 | _PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875
58 | _Sharpness ("Sharpness", Range(-1,1)) = 0
59 |
60 | _VertexOffsetX ("Vertex OffsetX", float) = 0
61 | _VertexOffsetY ("Vertex OffsetY", float) = 0
62 |
63 | _CullMode ("Cull Mode", Float) = 0
64 | //_MaskCoord ("Mask Coords", vector) = (0,0,0,0)
65 | //_MaskSoftness ("Mask Softness", float) = 0
66 | }
67 |
68 | SubShader {
69 |
70 | Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
71 |
72 | LOD 300
73 | Cull [_CullMode]
74 |
75 | CGPROGRAM
76 | #pragma surface PixShader BlinnPhong alpha:blend vertex:VertShader nolightmap nodirlightmap
77 | #pragma target 3.0
78 | #pragma shader_feature __ GLOW_ON
79 | #pragma glsl
80 |
81 | #include "TMPro_Properties.cginc"
82 | #include "TMPro.cginc"
83 |
84 | half _FaceShininess;
85 | half _OutlineShininess;
86 |
87 | struct Input
88 | {
89 | fixed4 color : COLOR;
90 | float2 uv_MainTex;
91 | float2 uv2_FaceTex;
92 | float2 uv2_OutlineTex;
93 | float2 param; // Weight, Scale
94 | float3 viewDirEnv;
95 | };
96 |
97 |
98 | #define BEVEL_ON 1
99 | #include "TMPro_Surface.cginc"
100 |
101 | ENDCG
102 |
103 | // Pass to render object as a shadow caster
104 | Pass
105 | {
106 | Name "Caster"
107 | Tags { "LightMode" = "ShadowCaster" }
108 | Offset 1, 1
109 |
110 | Fog {Mode Off}
111 | ZWrite On
112 | ZTest LEqual
113 | Cull Off
114 |
115 | CGPROGRAM
116 | #pragma vertex vert
117 | #pragma fragment frag
118 | #pragma multi_compile_shadowcaster
119 | #include "UnityCG.cginc"
120 |
121 | struct v2f
122 | {
123 | V2F_SHADOW_CASTER;
124 | float2 uv : TEXCOORD1;
125 | float2 uv2 : TEXCOORD3;
126 | float alphaClip : TEXCOORD2;
127 | };
128 |
129 | uniform float4 _MainTex_ST;
130 | uniform float4 _OutlineTex_ST;
131 | float _OutlineWidth;
132 | float _FaceDilate;
133 | float _ScaleRatioA;
134 |
135 | v2f vert( appdata_base v )
136 | {
137 | v2f o;
138 | TRANSFER_SHADOW_CASTER(o)
139 | o.uv = TRANSFORM_TEX(v.texcoord, _MainTex);
140 | o.uv2 = TRANSFORM_TEX(v.texcoord, _OutlineTex);
141 | o.alphaClip = (1.0 - _OutlineWidth * _ScaleRatioA - _FaceDilate * _ScaleRatioA) / 2;
142 | return o;
143 | }
144 |
145 | uniform sampler2D _MainTex;
146 |
147 | float4 frag(v2f i) : COLOR
148 | {
149 | fixed4 texcol = tex2D(_MainTex, i.uv).a;
150 | clip(texcol.a - i.alphaClip);
151 | SHADOW_CASTER_FRAGMENT(i)
152 | }
153 | ENDCG
154 | }
155 | }
156 |
157 | CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI"
158 | }
159 |
160 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMP_SDF-Surface.shader.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f7ada0af4f174f0694ca6a487b8f543d
3 | ShaderImporter:
4 | externalObjects: {}
5 | defaultTextures: []
6 | nonModifiableTextures: []
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMP_SDF-URP Lit.shadergraph.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a3d800b099a06e0478fb790c5e79057a
3 | ScriptedImporter:
4 | internalIDToNameTable: []
5 | externalObjects: {}
6 | serializedVersion: 2
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 | script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}
11 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMP_SDF-URP Unlit.shadergraph.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 124c112a6e8f1a54e8b0870e881b56d8
3 | ScriptedImporter:
4 | internalIDToNameTable: []
5 | externalObjects: {}
6 | serializedVersion: 2
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 | script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}
11 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMP_SDF.shader.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 68e6db2ebdc24f95958faec2be5558d6
3 | ShaderImporter:
4 | externalObjects: {}
5 | defaultTextures: []
6 | nonModifiableTextures: []
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMP_Sprite.shader:
--------------------------------------------------------------------------------
1 | Shader "TextMeshPro/Sprite"
2 | {
3 | Properties
4 | {
5 | _MainTex ("Sprite Texture", 2D) = "white" {}
6 | _Color ("Tint", Color) = (1,1,1,1)
7 |
8 | _StencilComp ("Stencil Comparison", Float) = 8
9 | _Stencil ("Stencil ID", Float) = 0
10 | _StencilOp ("Stencil Operation", Float) = 0
11 | _StencilWriteMask ("Stencil Write Mask", Float) = 255
12 | _StencilReadMask ("Stencil Read Mask", Float) = 255
13 |
14 | _CullMode ("Cull Mode", Float) = 0
15 | _ColorMask ("Color Mask", Float) = 15
16 | _ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
17 |
18 | [Toggle(UNITY_UI_ALPHACLIP)] _UseUIAlphaClip ("Use Alpha Clip", Float) = 0
19 | }
20 |
21 | SubShader
22 | {
23 | Tags
24 | {
25 | "Queue"="Transparent"
26 | "IgnoreProjector"="True"
27 | "RenderType"="Transparent"
28 | "PreviewType"="Plane"
29 | "CanUseSpriteAtlas"="True"
30 | }
31 |
32 | Stencil
33 | {
34 | Ref [_Stencil]
35 | Comp [_StencilComp]
36 | Pass [_StencilOp]
37 | ReadMask [_StencilReadMask]
38 | WriteMask [_StencilWriteMask]
39 | }
40 |
41 | Cull [_CullMode]
42 | Lighting Off
43 | ZWrite Off
44 | ZTest [unity_GUIZTestMode]
45 | Blend SrcAlpha OneMinusSrcAlpha
46 | ColorMask [_ColorMask]
47 |
48 | Pass
49 | {
50 | Name "Default"
51 | CGPROGRAM
52 | #pragma vertex vert
53 | #pragma fragment frag
54 | #pragma target 2.0
55 |
56 | #include "UnityCG.cginc"
57 | #include "UnityUI.cginc"
58 |
59 | #pragma multi_compile __ UNITY_UI_CLIP_RECT
60 | #pragma multi_compile __ UNITY_UI_ALPHACLIP
61 |
62 | struct appdata_t
63 | {
64 | float4 vertex : POSITION;
65 | float4 color : COLOR;
66 | float2 texcoord : TEXCOORD0;
67 | UNITY_VERTEX_INPUT_INSTANCE_ID
68 | };
69 |
70 | struct v2f
71 | {
72 | float4 vertex : SV_POSITION;
73 | fixed4 color : COLOR;
74 | float2 texcoord : TEXCOORD0;
75 | float4 worldPosition : TEXCOORD1;
76 | float4 mask : TEXCOORD2;
77 | UNITY_VERTEX_OUTPUT_STEREO
78 | };
79 |
80 | sampler2D _MainTex;
81 | fixed4 _Color;
82 | fixed4 _TextureSampleAdd;
83 | float4 _ClipRect;
84 | float4 _MainTex_ST;
85 | float _UIMaskSoftnessX;
86 | float _UIMaskSoftnessY;
87 | int _UIVertexColorAlwaysGammaSpace;
88 |
89 | v2f vert(appdata_t v)
90 | {
91 | v2f OUT;
92 | UNITY_SETUP_INSTANCE_ID(v);
93 | UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(OUT);
94 | float4 vPosition = UnityObjectToClipPos(v.vertex);
95 | OUT.worldPosition = v.vertex;
96 | OUT.vertex = vPosition;
97 |
98 | float2 pixelSize = vPosition.w;
99 | pixelSize /= abs(mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy));
100 |
101 | float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
102 | OUT.texcoord = TRANSFORM_TEX(v.texcoord, _MainTex);
103 | OUT.mask = half4(v.vertex.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_UIMaskSoftnessX, _UIMaskSoftnessY) + abs(pixelSize.xy)));
104 |
105 | if (_UIVertexColorAlwaysGammaSpace && !IsGammaSpace())
106 | {
107 | v.color.rgb = UIGammaToLinear(v.color.rgb);
108 | }
109 | OUT.color = v.color * _Color;
110 | return OUT;
111 | }
112 |
113 | fixed4 frag(v2f IN) : SV_Target
114 | {
115 | half4 color = (tex2D(_MainTex, IN.texcoord) + _TextureSampleAdd) * IN.color;
116 |
117 | #if UNITY_UI_CLIP_RECT
118 | half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(IN.mask.xy)) * IN.mask.zw);
119 | color *= m.x * m.y;
120 | #endif
121 |
122 | #ifdef UNITY_UI_ALPHACLIP
123 | clip (color.a - 0.001);
124 | #endif
125 |
126 | return color;
127 | }
128 | ENDCG
129 | }
130 | }
131 | }
132 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMP_Sprite.shader.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: cf81c85f95fe47e1a27f6ae460cf182c
3 | ShaderImporter:
4 | externalObjects: {}
5 | defaultTextures: []
6 | nonModifiableTextures: []
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMPro.cginc:
--------------------------------------------------------------------------------
1 | float2 UnpackUV(float uv)
2 | {
3 | float2 output;
4 | output.x = floor(uv / 4096);
5 | output.y = uv - 4096 * output.x;
6 |
7 | return output * 0.001953125;
8 | }
9 |
10 | fixed4 GetColor(half d, fixed4 faceColor, fixed4 outlineColor, half outline, half softness)
11 | {
12 | half faceAlpha = 1-saturate((d - outline * 0.5 + softness * 0.5) / (1.0 + softness));
13 | half outlineAlpha = saturate((d + outline * 0.5)) * sqrt(min(1.0, outline));
14 |
15 | faceColor.rgb *= faceColor.a;
16 | outlineColor.rgb *= outlineColor.a;
17 |
18 | faceColor = lerp(faceColor, outlineColor, outlineAlpha);
19 |
20 | faceColor *= faceAlpha;
21 |
22 | return faceColor;
23 | }
24 |
25 | float3 GetSurfaceNormal(float4 h, float bias)
26 | {
27 | bool raisedBevel = step(1, fmod(_ShaderFlags, 2));
28 |
29 | h += bias+_BevelOffset;
30 |
31 | float bevelWidth = max(.01, _OutlineWidth+_BevelWidth);
32 |
33 | // Track outline
34 | h -= .5;
35 | h /= bevelWidth;
36 | h = saturate(h+.5);
37 |
38 | if(raisedBevel) h = 1 - abs(h*2.0 - 1.0);
39 | h = lerp(h, sin(h*3.141592/2.0), _BevelRoundness);
40 | h = min(h, 1.0-_BevelClamp);
41 | h *= _Bevel * bevelWidth * _GradientScale * -2.0;
42 |
43 | float3 va = normalize(float3(1.0, 0.0, h.y - h.x));
44 | float3 vb = normalize(float3(0.0, -1.0, h.w - h.z));
45 |
46 | return cross(va, vb);
47 | }
48 |
49 | float3 GetSurfaceNormal(float2 uv, float bias, float3 delta)
50 | {
51 | // Read "height field"
52 | float4 h = {tex2D(_MainTex, uv - delta.xz).a,
53 | tex2D(_MainTex, uv + delta.xz).a,
54 | tex2D(_MainTex, uv - delta.zy).a,
55 | tex2D(_MainTex, uv + delta.zy).a};
56 |
57 | return GetSurfaceNormal(h, bias);
58 | }
59 |
60 | float3 GetSpecular(float3 n, float3 l)
61 | {
62 | float spec = pow(max(0.0, dot(n, l)), _Reflectivity);
63 | return _SpecularColor.rgb * spec * _SpecularPower;
64 | }
65 |
66 | float4 GetGlowColor(float d, float scale)
67 | {
68 | float glow = d - (_GlowOffset*_ScaleRatioB) * 0.5 * scale;
69 | float t = lerp(_GlowInner, (_GlowOuter * _ScaleRatioB), step(0.0, glow)) * 0.5 * scale;
70 | glow = saturate(abs(glow/(1.0 + t)));
71 | glow = 1.0-pow(glow, _GlowPower);
72 | glow *= sqrt(min(1.0, t)); // Fade off glow thinner than 1 screen pixel
73 | return float4(_GlowColor.rgb, saturate(_GlowColor.a * glow * 2));
74 | }
75 |
76 | float4 BlendARGB(float4 overlying, float4 underlying)
77 | {
78 | overlying.rgb *= overlying.a;
79 | underlying.rgb *= underlying.a;
80 | float3 blended = overlying.rgb + ((1-overlying.a)*underlying.rgb);
81 | float alpha = underlying.a + (1-underlying.a)*overlying.a;
82 | return float4(blended, alpha);
83 | }
84 |
85 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMPro.cginc.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 407bc68d299748449bbf7f48ee690f8d
3 | ShaderImporter:
4 | externalObjects: {}
5 | defaultTextures: []
6 | nonModifiableTextures: []
7 | userData: Version 2.0
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMPro_Mobile.cginc:
--------------------------------------------------------------------------------
1 | struct vertex_t
2 | {
3 | UNITY_VERTEX_INPUT_INSTANCE_ID
4 | float4 position : POSITION;
5 | float3 normal : NORMAL;
6 | float4 color : COLOR;
7 | float4 texcoord0 : TEXCOORD0;
8 | float2 texcoord1 : TEXCOORD1;
9 | };
10 |
11 | struct pixel_t
12 | {
13 | UNITY_VERTEX_INPUT_INSTANCE_ID
14 | UNITY_VERTEX_OUTPUT_STEREO
15 | float4 position : SV_POSITION;
16 | float4 faceColor : COLOR;
17 | float4 outlineColor : COLOR1;
18 | float4 texcoord0 : TEXCOORD0;
19 | float4 param : TEXCOORD1; // x = weight, y = no longer used
20 | float2 mask : TEXCOORD2;
21 | #if (UNDERLAY_ON || UNDERLAY_INNER)
22 | float4 texcoord2 : TEXCOORD3;
23 | float4 underlayColor : COLOR2;
24 | #endif
25 | };
26 |
27 | float4 SRGBToLinear(float4 rgba)
28 | {
29 | return float4(lerp(rgba.rgb / 12.92f, pow((rgba.rgb + 0.055f) / 1.055f, 2.4f), step(0.04045f, rgba.rgb)), rgba.a);
30 | }
31 |
32 | float _UIMaskSoftnessX;
33 | float _UIMaskSoftnessY;
34 |
35 | pixel_t VertShader(vertex_t input)
36 | {
37 | pixel_t output;
38 |
39 | UNITY_INITIALIZE_OUTPUT(pixel_t, output);
40 | UNITY_SETUP_INSTANCE_ID(input);
41 | UNITY_TRANSFER_INSTANCE_ID(input, output);
42 | UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
43 |
44 | float bold = step(input.texcoord0.w, 0);
45 |
46 | float4 vert = input.position;
47 | vert.x += _VertexOffsetX;
48 | vert.y += _VertexOffsetY;
49 |
50 | float4 vPosition = UnityObjectToClipPos(vert);
51 |
52 | float weight = lerp(_WeightNormal, _WeightBold, bold) / 4.0;
53 | weight = (weight + _FaceDilate) * _ScaleRatioA * 0.5;
54 |
55 | // Generate UV for the Masking Texture
56 | float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
57 | float2 maskUV = (vert.xy - clampedRect.xy) / (clampedRect.zw - clampedRect.xy);
58 |
59 | float4 color = input.color;
60 | #if (FORCE_LINEAR && !UNITY_COLORSPACE_GAMMA)
61 | color = SRGBToLinear(input.color);
62 | #endif
63 |
64 | float opacity = color.a;
65 | #if (UNDERLAY_ON | UNDERLAY_INNER)
66 | opacity = 1.0;
67 | #endif
68 |
69 | float4 faceColor = float4(color.rgb, opacity) * _FaceColor;
70 | faceColor.rgb *= faceColor.a;
71 |
72 | float4 outlineColor = _OutlineColor;
73 | outlineColor.a *= opacity;
74 | outlineColor.rgb *= outlineColor.a;
75 |
76 | output.position = vPosition;
77 | output.faceColor = faceColor;
78 | output.outlineColor = outlineColor;
79 | output.texcoord0 = float4(input.texcoord0.xy, maskUV.xy);
80 | output.param = float4(0.5 - weight, 0, _OutlineWidth * _ScaleRatioA * 0.5, 0);
81 |
82 | float2 mask = float2(0, 0);
83 | #if UNITY_UI_CLIP_RECT
84 | mask = vert.xy * 2 - clampedRect.xy - clampedRect.zw;
85 | #endif
86 | output.mask = mask;
87 |
88 | #if (UNDERLAY_ON || UNDERLAY_INNER)
89 | float4 underlayColor = _UnderlayColor;
90 | underlayColor.rgb *= underlayColor.a;
91 |
92 | float x = -(_UnderlayOffsetX * _ScaleRatioC) * _GradientScale / _TextureWidth;
93 | float y = -(_UnderlayOffsetY * _ScaleRatioC) * _GradientScale / _TextureHeight;
94 |
95 | output.texcoord2 = float4(input.texcoord0 + float2(x, y), input.color.a, 0);
96 | output.underlayColor = underlayColor;
97 | #endif
98 |
99 | return output;
100 | }
101 |
102 | float4 PixShader(pixel_t input) : SV_Target
103 | {
104 | UNITY_SETUP_INSTANCE_ID(input);
105 |
106 | float d = tex2D(_MainTex, input.texcoord0.xy).a;
107 |
108 | float pixelSize = abs(ddx(input.texcoord0.y)) + abs(ddy(input.texcoord0.y));
109 | pixelSize *= _TextureHeight * 0.75;
110 | float scale = 1 / pixelSize * _GradientScale * (_Sharpness + 1);
111 |
112 | #if (UNDERLAY_ON | UNDERLAY_INNER)
113 | float layerScale = scale;
114 | layerScale /= 1 + ((_UnderlaySoftness * _ScaleRatioC) * layerScale);
115 | float layerBias = input.param.x * layerScale - .5 - ((_UnderlayDilate * _ScaleRatioC) * .5 * layerScale);
116 | #endif
117 |
118 | scale /= 1 + (_OutlineSoftness * _ScaleRatioA * scale);
119 |
120 | float4 faceColor = input.faceColor * saturate((d - input.param.x) * scale + 0.5);
121 |
122 | #if OUTLINE_ON
123 | float4 outlineColor = lerp(input.faceColor, input.outlineColor, sqrt(min(1.0, input.param.z * scale * 2)));
124 | faceColor = lerp(outlineColor, input.faceColor, saturate((d - input.param.x - input.param.z) * scale + 0.5));
125 | faceColor *= saturate((d - input.param.x + input.param.z) * scale + 0.5);
126 | #endif
127 |
128 | #if UNDERLAY_ON
129 | d = tex2D(_MainTex, input.texcoord2.xy).a * layerScale;
130 | faceColor += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * saturate(d - layerBias) * (1 - faceColor.a);
131 | #endif
132 |
133 | #if UNDERLAY_INNER
134 | float bias = input.param.x * scale - 0.5;
135 | float sd = saturate(d * scale - bias - input.param.z);
136 | d = tex2D(_MainTex, input.texcoord2.xy).a * layerScale;
137 | faceColor += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * (1 - saturate(d - layerBias)) * sd * (1 - faceColor.a);
138 | #endif
139 |
140 | #if MASKING
141 | float a = abs(_MaskInverse - tex2D(_MaskTex, input.texcoord0.zw).a);
142 | float t = a + (1 - _MaskWipeControl) * _MaskEdgeSoftness - _MaskWipeControl;
143 | a = saturate(t / _MaskEdgeSoftness);
144 | faceColor.rgb = lerp(_MaskEdgeColor.rgb * faceColor.a, faceColor.rgb, a);
145 | faceColor *= a;
146 | #endif
147 |
148 | // Alternative implementation to UnityGet2DClipping with support for softness
149 | #if UNITY_UI_CLIP_RECT
150 | half2 maskSoftness = half2(max(_UIMaskSoftnessX, _MaskSoftnessX), max(_UIMaskSoftnessY, _MaskSoftnessY));
151 | float2 maskZW = 0.25 / (0.25 * maskSoftness + 1 / scale);
152 | float2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(input.mask.xy)) * maskZW);
153 | faceColor *= m.x * m.y;
154 | #endif
155 |
156 | #if (UNDERLAY_ON | UNDERLAY_INNER)
157 | faceColor *= input.texcoord2.z;
158 | #endif
159 |
160 | #if UNITY_UI_ALPHACLIP
161 | clip(faceColor.a - 0.001);
162 | #endif
163 |
164 | return faceColor;
165 | }
166 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMPro_Mobile.cginc.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c334973cef89a9840b0b0c507e0377ab
3 | ShaderImporter:
4 | externalObjects: {}
5 | defaultTextures: []
6 | nonModifiableTextures: []
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMPro_Properties.cginc:
--------------------------------------------------------------------------------
1 | // UI Editable properties
2 | uniform sampler2D _FaceTex; // Alpha : Signed Distance
3 | uniform float _FaceUVSpeedX;
4 | uniform float _FaceUVSpeedY;
5 | uniform fixed4 _FaceColor; // RGBA : Color + Opacity
6 | uniform float _FaceDilate; // v[ 0, 1]
7 | uniform float _OutlineSoftness; // v[ 0, 1]
8 |
9 | uniform sampler2D _OutlineTex; // RGBA : Color + Opacity
10 | uniform float _OutlineUVSpeedX;
11 | uniform float _OutlineUVSpeedY;
12 | uniform fixed4 _OutlineColor; // RGBA : Color + Opacity
13 | uniform float _OutlineWidth; // v[ 0, 1]
14 |
15 | uniform float _Bevel; // v[ 0, 1]
16 | uniform float _BevelOffset; // v[-1, 1]
17 | uniform float _BevelWidth; // v[-1, 1]
18 | uniform float _BevelClamp; // v[ 0, 1]
19 | uniform float _BevelRoundness; // v[ 0, 1]
20 |
21 | uniform sampler2D _BumpMap; // Normal map
22 | uniform float _BumpOutline; // v[ 0, 1]
23 | uniform float _BumpFace; // v[ 0, 1]
24 |
25 | uniform samplerCUBE _Cube; // Cube / sphere map
26 | uniform fixed4 _ReflectFaceColor; // RGB intensity
27 | uniform fixed4 _ReflectOutlineColor;
28 | //uniform float _EnvTiltX; // v[-1, 1]
29 | //uniform float _EnvTiltY; // v[-1, 1]
30 | uniform float3 _EnvMatrixRotation;
31 | uniform float4x4 _EnvMatrix;
32 |
33 | uniform fixed4 _SpecularColor; // RGB intensity
34 | uniform float _LightAngle; // v[ 0,Tau]
35 | uniform float _SpecularPower; // v[ 0, 1]
36 | uniform float _Reflectivity; // v[ 5, 15]
37 | uniform float _Diffuse; // v[ 0, 1]
38 | uniform float _Ambient; // v[ 0, 1]
39 |
40 | uniform fixed4 _UnderlayColor; // RGBA : Color + Opacity
41 | uniform float _UnderlayOffsetX; // v[-1, 1]
42 | uniform float _UnderlayOffsetY; // v[-1, 1]
43 | uniform float _UnderlayDilate; // v[-1, 1]
44 | uniform float _UnderlaySoftness; // v[ 0, 1]
45 |
46 | uniform fixed4 _GlowColor; // RGBA : Color + Intesity
47 | uniform float _GlowOffset; // v[-1, 1]
48 | uniform float _GlowOuter; // v[ 0, 1]
49 | uniform float _GlowInner; // v[ 0, 1]
50 | uniform float _GlowPower; // v[ 1, 1/(1+4*4)]
51 |
52 | // API Editable properties
53 | uniform float _ShaderFlags;
54 | uniform float _WeightNormal;
55 | uniform float _WeightBold;
56 |
57 | uniform float _ScaleRatioA;
58 | uniform float _ScaleRatioB;
59 | uniform float _ScaleRatioC;
60 |
61 | uniform float _VertexOffsetX;
62 | uniform float _VertexOffsetY;
63 |
64 | //uniform float _UseClipRect;
65 | uniform float _MaskID;
66 | uniform sampler2D _MaskTex;
67 | uniform float4 _MaskCoord;
68 | uniform float4 _ClipRect; // bottom left(x,y) : top right(z,w)
69 | uniform float _MaskSoftnessX;
70 | uniform float _MaskSoftnessY;
71 |
72 | // Font Atlas properties
73 | uniform sampler2D _MainTex;
74 | uniform float _TextureWidth;
75 | uniform float _TextureHeight;
76 | uniform float _GradientScale;
77 | uniform float _ScaleX;
78 | uniform float _ScaleY;
79 | uniform float _PerspectiveFilter;
80 | uniform float _Sharpness;
81 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMPro_Properties.cginc.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3997e2241185407d80309a82f9148466
3 | ShaderImporter:
4 | externalObjects: {}
5 | defaultTextures: []
6 | nonModifiableTextures: []
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMPro_Surface.cginc:
--------------------------------------------------------------------------------
1 | void VertShader(inout appdata_full v, out Input data)
2 | {
3 | v.vertex.x += _VertexOffsetX;
4 | v.vertex.y += _VertexOffsetY;
5 |
6 | UNITY_INITIALIZE_OUTPUT(Input, data);
7 |
8 | float bold = step(v.texcoord.w, 0);
9 |
10 | // Generate normal for backface
11 | float3 view = ObjSpaceViewDir(v.vertex);
12 | v.normal *= sign(dot(v.normal, view));
13 |
14 | #if USE_DERIVATIVE
15 | data.param.y = 1;
16 | #else
17 | float4 vert = v.vertex;
18 | float4 vPosition = UnityObjectToClipPos(vert);
19 | float2 pixelSize = vPosition.w;
20 |
21 | pixelSize /= float2(_ScaleX, _ScaleY) * mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy);
22 | float scale = rsqrt(dot(pixelSize, pixelSize));
23 | scale *= abs(v.texcoord.w) * _GradientScale * (_Sharpness + 1);
24 | scale = lerp(scale * (1 - _PerspectiveFilter), scale, abs(dot(UnityObjectToWorldNormal(v.normal.xyz), normalize(WorldSpaceViewDir(vert)))));
25 | data.param.y = scale;
26 | #endif
27 |
28 | data.param.x = (lerp(_WeightNormal, _WeightBold, bold) / 4.0 + _FaceDilate) * _ScaleRatioA * 0.5; //
29 | data.viewDirEnv = mul((float3x3)_EnvMatrix, WorldSpaceViewDir(v.vertex));
30 | }
31 |
32 | void PixShader(Input input, inout SurfaceOutput o)
33 | {
34 |
35 | #if USE_DERIVATIVE
36 | float2 pixelSize = float2(ddx(input.uv_MainTex.y), ddy(input.uv_MainTex.y));
37 | pixelSize *= _TextureWidth * .75;
38 | float scale = rsqrt(dot(pixelSize, pixelSize)) * _GradientScale * (_Sharpness + 1);
39 | #else
40 | float scale = input.param.y;
41 | #endif
42 |
43 | // Signed distance
44 | float c = tex2D(_MainTex, input.uv_MainTex).a;
45 | float sd = (.5 - c - input.param.x) * scale + .5;
46 | float outline = _OutlineWidth*_ScaleRatioA * scale;
47 | float softness = _OutlineSoftness*_ScaleRatioA * scale;
48 |
49 | // Color & Alpha
50 | float4 faceColor = _FaceColor;
51 | float4 outlineColor = _OutlineColor;
52 | faceColor *= input.color;
53 | outlineColor.a *= input.color.a;
54 | faceColor *= tex2D(_FaceTex, float2(input.uv2_FaceTex.x + _FaceUVSpeedX * _Time.y, input.uv2_FaceTex.y + _FaceUVSpeedY * _Time.y));
55 | outlineColor *= tex2D(_OutlineTex, float2(input.uv2_OutlineTex.x + _OutlineUVSpeedX * _Time.y, input.uv2_OutlineTex.y + _OutlineUVSpeedY * _Time.y));
56 | faceColor = GetColor(sd, faceColor, outlineColor, outline, softness);
57 | faceColor.rgb /= max(faceColor.a, 0.0001);
58 |
59 | #if BEVEL_ON
60 | float3 delta = float3(1.0 / _TextureWidth, 1.0 / _TextureHeight, 0.0);
61 |
62 | float4 smp4x = {tex2D(_MainTex, input.uv_MainTex - delta.xz).a,
63 | tex2D(_MainTex, input.uv_MainTex + delta.xz).a,
64 | tex2D(_MainTex, input.uv_MainTex - delta.zy).a,
65 | tex2D(_MainTex, input.uv_MainTex + delta.zy).a };
66 |
67 | // Face Normal
68 | float3 n = GetSurfaceNormal(smp4x, input.param.x);
69 |
70 | // Bumpmap
71 | float3 bump = UnpackNormal(tex2D(_BumpMap, input.uv2_FaceTex.xy)).xyz;
72 | bump *= lerp(_BumpFace, _BumpOutline, saturate(sd + outline * 0.5));
73 | bump = lerp(float3(0, 0, 1), bump, faceColor.a);
74 | n = normalize(n - bump);
75 |
76 | // Cubemap reflection
77 | fixed4 reflcol = texCUBE(_Cube, reflect(input.viewDirEnv, mul((float3x3)unity_ObjectToWorld, n)));
78 | float3 emission = reflcol.rgb * lerp(_ReflectFaceColor.rgb, _ReflectOutlineColor.rgb, saturate(sd + outline * 0.5)) * faceColor.a;
79 | #else
80 | float3 n = float3(0, 0, -1);
81 | float3 emission = float3(0, 0, 0);
82 | #endif
83 |
84 | #if GLOW_ON
85 | float4 glowColor = GetGlowColor(sd, scale);
86 | glowColor.a *= input.color.a;
87 | emission += glowColor.rgb*glowColor.a;
88 | faceColor = BlendARGB(glowColor, faceColor);
89 | faceColor.rgb /= max(faceColor.a, 0.0001);
90 | #endif
91 |
92 | // Set Standard output structure
93 | o.Albedo = faceColor.rgb;
94 | o.Normal = -n;
95 | o.Emission = emission;
96 | o.Specular = lerp(_FaceShininess, _OutlineShininess, saturate(sd + outline * 0.5));
97 | o.Gloss = 1;
98 | o.Alpha = faceColor.a;
99 | }
100 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Shaders/TMPro_Surface.cginc.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d930090c0cd643c7b55f19a38538c162
3 | ShaderImporter:
4 | externalObjects: {}
5 | defaultTextures: []
6 | nonModifiableTextures: []
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Sprites.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d0603b6d5186471b96c778c3949c7ce2
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Sprites/EmojiOne Attribution.txt:
--------------------------------------------------------------------------------
1 | This sample of beautiful emojis are provided by EmojiOne https://www.emojione.com/
2 |
3 | Please visit their website to view the complete set of their emojis and review their licensing terms.
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Sprites/EmojiOne Attribution.txt.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 381dcb09d5029d14897e55f98031fca5
3 | TextScriptImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Sprites/EmojiOne.json:
--------------------------------------------------------------------------------
1 | {"frames": [
2 |
3 | {
4 | "filename": "1f60a.png",
5 | "frame": {"x":0,"y":0,"w":128,"h":128},
6 | "rotated": false,
7 | "trimmed": false,
8 | "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128},
9 | "sourceSize": {"w":128,"h":128},
10 | "pivot": {"x":0.5,"y":0.5}
11 | },
12 | {
13 | "filename": "1f60b.png",
14 | "frame": {"x":128,"y":0,"w":128,"h":128},
15 | "rotated": false,
16 | "trimmed": false,
17 | "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128},
18 | "sourceSize": {"w":128,"h":128},
19 | "pivot": {"x":0.5,"y":0.5}
20 | },
21 | {
22 | "filename": "1f60d.png",
23 | "frame": {"x":256,"y":0,"w":128,"h":128},
24 | "rotated": false,
25 | "trimmed": false,
26 | "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128},
27 | "sourceSize": {"w":128,"h":128},
28 | "pivot": {"x":0.5,"y":0.5}
29 | },
30 | {
31 | "filename": "1f60e.png",
32 | "frame": {"x":384,"y":0,"w":128,"h":128},
33 | "rotated": false,
34 | "trimmed": false,
35 | "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128},
36 | "sourceSize": {"w":128,"h":128},
37 | "pivot": {"x":0.5,"y":0.5}
38 | },
39 | {
40 | "filename": "1f600.png",
41 | "frame": {"x":0,"y":128,"w":128,"h":128},
42 | "rotated": false,
43 | "trimmed": false,
44 | "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128},
45 | "sourceSize": {"w":128,"h":128},
46 | "pivot": {"x":0.5,"y":0.5}
47 | },
48 | {
49 | "filename": "1f601.png",
50 | "frame": {"x":128,"y":128,"w":128,"h":128},
51 | "rotated": false,
52 | "trimmed": false,
53 | "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128},
54 | "sourceSize": {"w":128,"h":128},
55 | "pivot": {"x":0.5,"y":0.5}
56 | },
57 | {
58 | "filename": "1f602.png",
59 | "frame": {"x":256,"y":128,"w":128,"h":128},
60 | "rotated": false,
61 | "trimmed": false,
62 | "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128},
63 | "sourceSize": {"w":128,"h":128},
64 | "pivot": {"x":0.5,"y":0.5}
65 | },
66 | {
67 | "filename": "1f603.png",
68 | "frame": {"x":384,"y":128,"w":128,"h":128},
69 | "rotated": false,
70 | "trimmed": false,
71 | "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128},
72 | "sourceSize": {"w":128,"h":128},
73 | "pivot": {"x":0.5,"y":0.5}
74 | },
75 | {
76 | "filename": "1f604.png",
77 | "frame": {"x":0,"y":256,"w":128,"h":128},
78 | "rotated": false,
79 | "trimmed": false,
80 | "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128},
81 | "sourceSize": {"w":128,"h":128},
82 | "pivot": {"x":0.5,"y":0.5}
83 | },
84 | {
85 | "filename": "1f605.png",
86 | "frame": {"x":128,"y":256,"w":128,"h":128},
87 | "rotated": false,
88 | "trimmed": false,
89 | "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128},
90 | "sourceSize": {"w":128,"h":128},
91 | "pivot": {"x":0.5,"y":0.5}
92 | },
93 | {
94 | "filename": "1f606.png",
95 | "frame": {"x":256,"y":256,"w":128,"h":128},
96 | "rotated": false,
97 | "trimmed": false,
98 | "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128},
99 | "sourceSize": {"w":128,"h":128},
100 | "pivot": {"x":0.5,"y":0.5}
101 | },
102 | {
103 | "filename": "1f609.png",
104 | "frame": {"x":384,"y":256,"w":128,"h":128},
105 | "rotated": false,
106 | "trimmed": false,
107 | "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128},
108 | "sourceSize": {"w":128,"h":128},
109 | "pivot": {"x":0.5,"y":0.5}
110 | },
111 | {
112 | "filename": "1f618.png",
113 | "frame": {"x":0,"y":384,"w":128,"h":128},
114 | "rotated": false,
115 | "trimmed": false,
116 | "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128},
117 | "sourceSize": {"w":128,"h":128},
118 | "pivot": {"x":0.5,"y":0.5}
119 | },
120 | {
121 | "filename": "1f923.png",
122 | "frame": {"x":128,"y":384,"w":128,"h":128},
123 | "rotated": false,
124 | "trimmed": false,
125 | "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128},
126 | "sourceSize": {"w":128,"h":128},
127 | "pivot": {"x":0.5,"y":0.5}
128 | },
129 | {
130 | "filename": "263a.png",
131 | "frame": {"x":256,"y":384,"w":128,"h":128},
132 | "rotated": false,
133 | "trimmed": false,
134 | "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128},
135 | "sourceSize": {"w":128,"h":128},
136 | "pivot": {"x":0.5,"y":0.5}
137 | },
138 | {
139 | "filename": "2639.png",
140 | "frame": {"x":384,"y":384,"w":128,"h":128},
141 | "rotated": false,
142 | "trimmed": false,
143 | "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128},
144 | "sourceSize": {"w":128,"h":128},
145 | "pivot": {"x":0.5,"y":0.5}
146 | }],
147 | "meta": {
148 | "app": "http://www.codeandweb.com/texturepacker",
149 | "version": "1.0",
150 | "image": "EmojiOne.png",
151 | "format": "RGBA8888",
152 | "size": {"w":512,"h":512},
153 | "scale": "1",
154 | "smartupdate": "$TexturePacker:SmartUpdate:196a26a2e149d875b91ffc8fa3581e76:fc928c7e275404b7e0649307410475cb:424723c3774975ddb2053fd5c4b85f6e$"
155 | }
156 | }
157 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Sprites/EmojiOne.json.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8f05276190cf498a8153f6cbe761d4e6
3 | timeCreated: 1480316860
4 | licenseType: Pro
5 | TextScriptImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Sprites/EmojiOne.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/skykim/piper-unity/f244185b52c12c378accecd5b5537edb1ff147d8/Assets/TextMesh Pro/Sprites/EmojiOne.png
--------------------------------------------------------------------------------
/Assets/TextMesh Pro/Sprites/EmojiOne.png.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: dffef66376be4fa480fb02b19edbe903
3 | TextureImporter:
4 | fileIDToRecycleName:
5 | 21300000: EmojiOne_0
6 | 21300002: EmojiOne_1
7 | 21300004: EmojiOne_2
8 | 21300006: EmojiOne_3
9 | 21300008: EmojiOne_4
10 | 21300010: EmojiOne_6
11 | 21300012: EmojiOne_7
12 | 21300014: EmojiOne_8
13 | 21300016: EmojiOne_9
14 | 21300018: EmojiOne_10
15 | 21300020: EmojiOne_11
16 | 21300022: EmojiOne_12
17 | 21300024: EmojiOne_13
18 | 21300026: EmojiOne_5
19 | 21300028: EmojiOne_14
20 | externalObjects: {}
21 | serializedVersion: 5
22 | mipmaps:
23 | mipMapMode: 0
24 | enableMipMap: 1
25 | sRGBTexture: 1
26 | linearTexture: 0
27 | fadeOut: 0
28 | borderMipMap: 0
29 | mipMapsPreserveCoverage: 0
30 | alphaTestReferenceValue: 0.5
31 | mipMapFadeDistanceStart: 1
32 | mipMapFadeDistanceEnd: 3
33 | bumpmap:
34 | convertToNormalMap: 0
35 | externalNormalMap: 0
36 | heightScale: 0.25
37 | normalMapFilter: 0
38 | isReadable: 0
39 | grayScaleToAlpha: 0
40 | generateCubemap: 6
41 | cubemapConvolution: 0
42 | seamlessCubemap: 0
43 | textureFormat: -1
44 | maxTextureSize: 2048
45 | textureSettings:
46 | serializedVersion: 2
47 | filterMode: -1
48 | aniso: -1
49 | mipBias: -1
50 | wrapU: 1
51 | wrapV: 1
52 | wrapW: 1
53 | nPOTScale: 0
54 | lightmap: 0
55 | compressionQuality: 50
56 | spriteMode: 2
57 | spriteExtrude: 1
58 | spriteMeshType: 1
59 | alignment: 0
60 | spritePivot: {x: 0.5, y: 0.5}
61 | spriteBorder: {x: 0, y: 0, z: 0, w: 0}
62 | spritePixelsToUnits: 100
63 | alphaUsage: 1
64 | alphaIsTransparency: 1
65 | spriteTessellationDetail: -1
66 | textureType: 0
67 | textureShape: 1
68 | singleChannelComponent: 0
69 | maxTextureSizeSet: 0
70 | compressionQualitySet: 0
71 | textureFormatSet: 0
72 | platformSettings:
73 | - serializedVersion: 2
74 | buildTarget: DefaultTexturePlatform
75 | maxTextureSize: 512
76 | resizeAlgorithm: 0
77 | textureFormat: -1
78 | textureCompression: 1
79 | compressionQuality: 50
80 | crunchedCompression: 0
81 | allowsAlphaSplitting: 0
82 | overridden: 0
83 | androidETC2FallbackOverride: 0
84 | - serializedVersion: 2
85 | buildTarget: Standalone
86 | maxTextureSize: 512
87 | resizeAlgorithm: 0
88 | textureFormat: -1
89 | textureCompression: 1
90 | compressionQuality: 50
91 | crunchedCompression: 0
92 | allowsAlphaSplitting: 0
93 | overridden: 0
94 | androidETC2FallbackOverride: 0
95 | - serializedVersion: 2
96 | buildTarget: iPhone
97 | maxTextureSize: 512
98 | resizeAlgorithm: 0
99 | textureFormat: -1
100 | textureCompression: 1
101 | compressionQuality: 50
102 | crunchedCompression: 0
103 | allowsAlphaSplitting: 0
104 | overridden: 0
105 | androidETC2FallbackOverride: 0
106 | - serializedVersion: 2
107 | buildTarget: Android
108 | maxTextureSize: 512
109 | resizeAlgorithm: 0
110 | textureFormat: -1
111 | textureCompression: 1
112 | compressionQuality: 50
113 | crunchedCompression: 0
114 | allowsAlphaSplitting: 0
115 | overridden: 0
116 | androidETC2FallbackOverride: 0
117 | spriteSheet:
118 | serializedVersion: 2
119 | sprites:
120 | - serializedVersion: 2
121 | name: EmojiOne_0
122 | rect:
123 | serializedVersion: 2
124 | x: 0
125 | y: 384
126 | width: 128
127 | height: 128
128 | alignment: 0
129 | pivot: {x: 0.5, y: 0.5}
130 | border: {x: 0, y: 0, z: 0, w: 0}
131 | outline: []
132 | physicsShape: []
133 | tessellationDetail: 0
134 | bones: []
135 | spriteID: 4bcc36da2108f2c4ba3de5c921d25c3c
136 | vertices: []
137 | indices:
138 | edges: []
139 | weights: []
140 | - serializedVersion: 2
141 | name: EmojiOne_1
142 | rect:
143 | serializedVersion: 2
144 | x: 128
145 | y: 384
146 | width: 128
147 | height: 128
148 | alignment: 0
149 | pivot: {x: 0.5, y: 0.5}
150 | border: {x: 0, y: 0, z: 0, w: 0}
151 | outline: []
152 | physicsShape: []
153 | tessellationDetail: 0
154 | bones: []
155 | spriteID: e9eea8093eaeaee4d901c4553f572c22
156 | vertices: []
157 | indices:
158 | edges: []
159 | weights: []
160 | - serializedVersion: 2
161 | name: EmojiOne_2
162 | rect:
163 | serializedVersion: 2
164 | x: 256
165 | y: 384
166 | width: 128
167 | height: 128
168 | alignment: 0
169 | pivot: {x: 0.5, y: 0.5}
170 | border: {x: 0, y: 0, z: 0, w: 0}
171 | outline: []
172 | physicsShape: []
173 | tessellationDetail: 0
174 | bones: []
175 | spriteID: 49451da35411dcc42a3692e39b0fde70
176 | vertices: []
177 | indices:
178 | edges: []
179 | weights: []
180 | - serializedVersion: 2
181 | name: EmojiOne_3
182 | rect:
183 | serializedVersion: 2
184 | x: 384
185 | y: 384
186 | width: 128
187 | height: 128
188 | alignment: 0
189 | pivot: {x: 0.5, y: 0.5}
190 | border: {x: 0, y: 0, z: 0, w: 0}
191 | outline: []
192 | physicsShape: []
193 | tessellationDetail: 0
194 | bones: []
195 | spriteID: f65709664b924904790c850a50ca82bc
196 | vertices: []
197 | indices:
198 | edges: []
199 | weights: []
200 | - serializedVersion: 2
201 | name: EmojiOne_4
202 | rect:
203 | serializedVersion: 2
204 | x: 0
205 | y: 256
206 | width: 128
207 | height: 128
208 | alignment: 0
209 | pivot: {x: 0.5, y: 0.5}
210 | border: {x: 0, y: 0, z: 0, w: 0}
211 | outline: []
212 | physicsShape: []
213 | tessellationDetail: 0
214 | bones: []
215 | spriteID: 5b92c568a5ec9ad4b9ed90e271f1c9a8
216 | vertices: []
217 | indices:
218 | edges: []
219 | weights: []
220 | - serializedVersion: 2
221 | name: EmojiOne_6
222 | rect:
223 | serializedVersion: 2
224 | x: 256
225 | y: 256
226 | width: 128
227 | height: 128
228 | alignment: 0
229 | pivot: {x: 0.5, y: 0.5}
230 | border: {x: 0, y: 0, z: 0, w: 0}
231 | outline: []
232 | physicsShape: []
233 | tessellationDetail: 0
234 | bones: []
235 | spriteID: b10f2b48b7281594bb8a24a6511a35af
236 | vertices: []
237 | indices:
238 | edges: []
239 | weights: []
240 | - serializedVersion: 2
241 | name: EmojiOne_7
242 | rect:
243 | serializedVersion: 2
244 | x: 384
245 | y: 256
246 | width: 128
247 | height: 128
248 | alignment: 0
249 | pivot: {x: 0.5, y: 0.5}
250 | border: {x: 0, y: 0, z: 0, w: 0}
251 | outline: []
252 | physicsShape: []
253 | tessellationDetail: 0
254 | bones: []
255 | spriteID: 10a600f9329dc2246a897e89f4d283cd
256 | vertices: []
257 | indices:
258 | edges: []
259 | weights: []
260 | - serializedVersion: 2
261 | name: EmojiOne_8
262 | rect:
263 | serializedVersion: 2
264 | x: 0
265 | y: 128
266 | width: 128
267 | height: 128
268 | alignment: 0
269 | pivot: {x: 0.5, y: 0.5}
270 | border: {x: 0, y: 0, z: 0, w: 0}
271 | outline: []
272 | physicsShape: []
273 | tessellationDetail: 0
274 | bones: []
275 | spriteID: 66cffa363b90ab14787d8a5b90cf4502
276 | vertices: []
277 | indices:
278 | edges: []
279 | weights: []
280 | - serializedVersion: 2
281 | name: EmojiOne_9
282 | rect:
283 | serializedVersion: 2
284 | x: 128
285 | y: 128
286 | width: 128
287 | height: 128
288 | alignment: 0
289 | pivot: {x: 0.5, y: 0.5}
290 | border: {x: 0, y: 0, z: 0, w: 0}
291 | outline: []
292 | physicsShape: []
293 | tessellationDetail: 0
294 | bones: []
295 | spriteID: 55cf3d409c9b89349b1e1bdc1cc224ad
296 | vertices: []
297 | indices:
298 | edges: []
299 | weights: []
300 | - serializedVersion: 2
301 | name: EmojiOne_10
302 | rect:
303 | serializedVersion: 2
304 | x: 256
305 | y: 128
306 | width: 128
307 | height: 128
308 | alignment: 0
309 | pivot: {x: 0.5, y: 0.5}
310 | border: {x: 0, y: 0, z: 0, w: 0}
311 | outline: []
312 | physicsShape: []
313 | tessellationDetail: 0
314 | bones: []
315 | spriteID: 2a9e58eaf96feef42bcefa1cf257193f
316 | vertices: []
317 | indices:
318 | edges: []
319 | weights: []
320 | - serializedVersion: 2
321 | name: EmojiOne_11
322 | rect:
323 | serializedVersion: 2
324 | x: 384
325 | y: 128
326 | width: 128
327 | height: 128
328 | alignment: 0
329 | pivot: {x: 0.5, y: 0.5}
330 | border: {x: 0, y: 0, z: 0, w: 0}
331 | outline: []
332 | physicsShape: []
333 | tessellationDetail: 0
334 | bones: []
335 | spriteID: 2489120affc155840ae6a7be2e93ce19
336 | vertices: []
337 | indices:
338 | edges: []
339 | weights: []
340 | - serializedVersion: 2
341 | name: EmojiOne_12
342 | rect:
343 | serializedVersion: 2
344 | x: 0
345 | y: 0
346 | width: 128
347 | height: 128
348 | alignment: 0
349 | pivot: {x: 0.5, y: 0.5}
350 | border: {x: 0, y: 0, z: 0, w: 0}
351 | outline: []
352 | physicsShape: []
353 | tessellationDetail: 0
354 | bones: []
355 | spriteID: 412349a150598d14da4d7140df5c0286
356 | vertices: []
357 | indices:
358 | edges: []
359 | weights: []
360 | - serializedVersion: 2
361 | name: EmojiOne_13
362 | rect:
363 | serializedVersion: 2
364 | x: 128
365 | y: 0
366 | width: 128
367 | height: 128
368 | alignment: 0
369 | pivot: {x: 0.5, y: 0.5}
370 | border: {x: 0, y: 0, z: 0, w: 0}
371 | outline: []
372 | physicsShape: []
373 | tessellationDetail: 0
374 | bones: []
375 | spriteID: a937464b42bb3634782dea34c6becb6c
376 | vertices: []
377 | indices:
378 | edges: []
379 | weights: []
380 | - serializedVersion: 2
381 | name: EmojiOne_5
382 | rect:
383 | serializedVersion: 2
384 | x: 256
385 | y: 0
386 | width: 128
387 | height: 128
388 | alignment: 0
389 | pivot: {x: 0, y: 0}
390 | border: {x: 0, y: 0, z: 0, w: 0}
391 | outline: []
392 | physicsShape: []
393 | tessellationDetail: 0
394 | bones: []
395 | spriteID: b0f933b217682124dbfc5e6b89abe3d0
396 | vertices: []
397 | indices:
398 | edges: []
399 | weights: []
400 | - serializedVersion: 2
401 | name: EmojiOne_14
402 | rect:
403 | serializedVersion: 2
404 | x: 128
405 | y: 256
406 | width: 128
407 | height: 128
408 | alignment: 0
409 | pivot: {x: 0, y: 0}
410 | border: {x: 0, y: 0, z: 0, w: 0}
411 | outline: []
412 | physicsShape: []
413 | tessellationDetail: 0
414 | bones: []
415 | spriteID: f7235c763afe4434e8bb666750a41096
416 | vertices: []
417 | indices:
418 | edges: []
419 | weights: []
420 | outline: []
421 | physicsShape: []
422 | bones: []
423 | spriteID: 3e32d8f5477abfc43b19066e8ad5032e
424 | vertices: []
425 | indices:
426 | edges: []
427 | weights: []
428 | spritePackingTag:
429 | userData:
430 | assetBundleName:
431 | assetBundleVariant:
432 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2025 Sky Kim (김한얼)
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Packages/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "dependencies": {
3 | "com.unity.ai.inference": "2.3.0",
4 | "com.unity.ai.navigation": "2.0.7",
5 | "com.unity.collab-proxy": "2.8.2",
6 | "com.unity.ide.rider": "3.0.36",
7 | "com.unity.ide.visualstudio": "2.0.23",
8 | "com.unity.inputsystem": "1.14.0",
9 | "com.unity.multiplayer.center": "1.0.0",
10 | "com.unity.nuget.newtonsoft-json": "3.2.1",
11 | "com.unity.recorder": "5.1.2",
12 | "com.unity.render-pipelines.universal": "17.0.4",
13 | "com.unity.test-framework": "1.5.1",
14 | "com.unity.timeline": "1.8.7",
15 | "com.unity.ugui": "2.0.0",
16 | "com.unity.visualscripting": "1.9.6",
17 | "com.unity.modules.accessibility": "1.0.0",
18 | "com.unity.modules.ai": "1.0.0",
19 | "com.unity.modules.androidjni": "1.0.0",
20 | "com.unity.modules.animation": "1.0.0",
21 | "com.unity.modules.assetbundle": "1.0.0",
22 | "com.unity.modules.audio": "1.0.0",
23 | "com.unity.modules.cloth": "1.0.0",
24 | "com.unity.modules.director": "1.0.0",
25 | "com.unity.modules.imageconversion": "1.0.0",
26 | "com.unity.modules.imgui": "1.0.0",
27 | "com.unity.modules.jsonserialize": "1.0.0",
28 | "com.unity.modules.particlesystem": "1.0.0",
29 | "com.unity.modules.physics": "1.0.0",
30 | "com.unity.modules.physics2d": "1.0.0",
31 | "com.unity.modules.screencapture": "1.0.0",
32 | "com.unity.modules.terrain": "1.0.0",
33 | "com.unity.modules.terrainphysics": "1.0.0",
34 | "com.unity.modules.tilemap": "1.0.0",
35 | "com.unity.modules.ui": "1.0.0",
36 | "com.unity.modules.uielements": "1.0.0",
37 | "com.unity.modules.umbra": "1.0.0",
38 | "com.unity.modules.unityanalytics": "1.0.0",
39 | "com.unity.modules.unitywebrequest": "1.0.0",
40 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0",
41 | "com.unity.modules.unitywebrequestaudio": "1.0.0",
42 | "com.unity.modules.unitywebrequesttexture": "1.0.0",
43 | "com.unity.modules.unitywebrequestwww": "1.0.0",
44 | "com.unity.modules.vehicles": "1.0.0",
45 | "com.unity.modules.video": "1.0.0",
46 | "com.unity.modules.vr": "1.0.0",
47 | "com.unity.modules.wind": "1.0.0",
48 | "com.unity.modules.xr": "1.0.0"
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/ProjectSettings/AudioManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!11 &1
4 | AudioManager:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_Volume: 1
8 | Rolloff Scale: 1
9 | Doppler Factor: 1
10 | Default Speaker Mode: 2
11 | m_SampleRate: 0
12 | m_DSPBufferSize: 1024
13 | m_VirtualVoiceCount: 512
14 | m_RealVoiceCount: 32
15 | m_SpatializerPlugin:
16 | m_AmbisonicDecoderPlugin:
17 | m_DisableAudio: 0
18 | m_VirtualizeEffects: 1
19 | m_RequestedDSPBufferSize: 0
20 |
--------------------------------------------------------------------------------
/ProjectSettings/ClusterInputManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!236 &1
4 | ClusterInputManager:
5 | m_ObjectHideFlags: 0
6 | m_Inputs: []
7 |
--------------------------------------------------------------------------------
/ProjectSettings/DynamicsManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!55 &1
4 | PhysicsManager:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 13
7 | m_Gravity: {x: 0, y: -9.81, z: 0}
8 | m_DefaultMaterial: {fileID: 0}
9 | m_BounceThreshold: 2
10 | m_SleepThreshold: 0.005
11 | m_DefaultContactOffset: 0.01
12 | m_DefaultSolverIterations: 6
13 | m_DefaultSolverVelocityIterations: 1
14 | m_QueriesHitBackfaces: 0
15 | m_QueriesHitTriggers: 1
16 | m_EnableAdaptiveForce: 0
17 | m_ClothInterCollisionDistance: 0.1
18 | m_ClothInterCollisionStiffness: 0.2
19 | m_ContactsGeneration: 1
20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
21 | m_AutoSimulation: 1
22 | m_AutoSyncTransforms: 0
23 | m_ReuseCollisionCallbacks: 1
24 | m_ClothInterCollisionSettingsToggle: 0
25 | m_ClothGravity: {x: 0, y: -9.81, z: 0}
26 | m_ContactPairsMode: 0
27 | m_BroadphaseType: 0
28 | m_WorldBounds:
29 | m_Center: {x: 0, y: 0, z: 0}
30 | m_Extent: {x: 250, y: 250, z: 250}
31 | m_WorldSubdivisions: 8
32 | m_FrictionType: 0
33 | m_EnableEnhancedDeterminism: 0
34 | m_EnableUnifiedHeightmaps: 1
35 | m_SolverType: 0
36 | m_DefaultMaxAngularSpeed: 50
37 |
--------------------------------------------------------------------------------
/ProjectSettings/EditorBuildSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!1045 &1
4 | EditorBuildSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_Scenes:
8 | - enabled: 1
9 | path: Assets/Scenes/PiperScene.unity
10 | guid: 99c9720ab356a0642a771bea13969a05
11 | m_configObjects:
12 | com.unity.input.settings.actions: {fileID: -944628639613478452, guid: 052faaac586de48259a63d0c4782560b, type: 3}
13 | m_UseUCBPForAssetBundles: 0
14 |
--------------------------------------------------------------------------------
/ProjectSettings/EditorSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!159 &1
4 | EditorSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 14
7 | m_SerializationMode: 2
8 | m_LineEndingsForNewScripts: 0
9 | m_DefaultBehaviorMode: 0
10 | m_PrefabRegularEnvironment: {fileID: 0}
11 | m_PrefabUIEnvironment: {fileID: 0}
12 | m_SpritePackerMode: 0
13 | m_SpritePackerCacheSize: 10
14 | m_SpritePackerPaddingPower: 1
15 | m_Bc7TextureCompressor: 0
16 | m_EtcTextureCompressorBehavior: 1
17 | m_EtcTextureFastCompressor: 1
18 | m_EtcTextureNormalCompressor: 2
19 | m_EtcTextureBestCompressor: 4
20 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;rsp;asmref
21 | m_ProjectGenerationRootNamespace:
22 | m_EnableTextureStreamingInEditMode: 1
23 | m_EnableTextureStreamingInPlayMode: 1
24 | m_EnableEditorAsyncCPUTextureLoading: 0
25 | m_AsyncShaderCompilation: 1
26 | m_PrefabModeAllowAutoSave: 1
27 | m_EnterPlayModeOptionsEnabled: 1
28 | m_EnterPlayModeOptions: 0
29 | m_GameObjectNamingDigits: 1
30 | m_GameObjectNamingScheme: 0
31 | m_AssetNamingUsesSpace: 1
32 | m_InspectorUseIMGUIDefaultInspector: 0
33 | m_UseLegacyProbeSampleCount: 0
34 | m_SerializeInlineMappingsOnOneLine: 1
35 | m_DisableCookiesInLightmapper: 0
36 | m_ShadowmaskStitching: 0
37 | m_AssetPipelineMode: 1
38 | m_RefreshImportMode: 0
39 | m_CacheServerMode: 0
40 | m_CacheServerEndpoint:
41 | m_CacheServerNamespacePrefix: default
42 | m_CacheServerEnableDownload: 1
43 | m_CacheServerEnableUpload: 1
44 | m_CacheServerEnableAuth: 0
45 | m_CacheServerEnableTls: 0
46 | m_CacheServerValidationMode: 2
47 | m_CacheServerDownloadBatchSize: 128
48 | m_EnableEnlightenBakedGI: 0
49 | m_ReferencedClipsExactNaming: 1
50 |
--------------------------------------------------------------------------------
/ProjectSettings/GraphicsSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!30 &1
4 | GraphicsSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 16
7 | m_Deferred:
8 | m_Mode: 1
9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0}
10 | m_DeferredReflections:
11 | m_Mode: 1
12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0}
13 | m_ScreenSpaceShadows:
14 | m_Mode: 1
15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0}
16 | m_DepthNormals:
17 | m_Mode: 1
18 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0}
19 | m_MotionVectors:
20 | m_Mode: 1
21 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0}
22 | m_LightHalo:
23 | m_Mode: 1
24 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0}
25 | m_LensFlare:
26 | m_Mode: 1
27 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0}
28 | m_VideoShadersIncludeMode: 2
29 | m_AlwaysIncludedShaders:
30 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0}
31 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0}
32 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0}
33 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0}
34 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0}
35 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0}
36 | - {fileID: 10783, guid: 0000000000000000f000000000000000, type: 0}
37 | m_PreloadedShaders: []
38 | m_PreloadShadersBatchTimeLimit: -1
39 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
40 | m_CustomRenderPipeline: {fileID: 11400000, guid: 4b83569d67af61e458304325a23e5dfd, type: 2}
41 | m_TransparencySortMode: 0
42 | m_TransparencySortAxis: {x: 0, y: 0, z: 1}
43 | m_DefaultRenderingPath: 1
44 | m_DefaultMobileRenderingPath: 1
45 | m_TierSettings: []
46 | m_LightmapStripping: 0
47 | m_FogStripping: 0
48 | m_InstancingStripping: 0
49 | m_BrgStripping: 0
50 | m_LightmapKeepPlain: 1
51 | m_LightmapKeepDirCombined: 1
52 | m_LightmapKeepDynamicPlain: 1
53 | m_LightmapKeepDynamicDirCombined: 1
54 | m_LightmapKeepShadowMask: 1
55 | m_LightmapKeepSubtractive: 1
56 | m_FogKeepLinear: 1
57 | m_FogKeepExp: 1
58 | m_FogKeepExp2: 1
59 | m_AlbedoSwatchInfos: []
60 | m_RenderPipelineGlobalSettingsMap:
61 | UnityEngine.Rendering.Universal.UniversalRenderPipeline: {fileID: 11400000, guid: 18dc0cd2c080841dea60987a38ce93fa, type: 2}
62 | m_LightsUseLinearIntensity: 1
63 | m_LightsUseColorTemperature: 1
64 | m_LogWhenShaderIsCompiled: 0
65 | m_LightProbeOutsideHullStrategy: 0
66 | m_CameraRelativeLightCulling: 0
67 | m_CameraRelativeShadowCulling: 0
68 |
--------------------------------------------------------------------------------
/ProjectSettings/MemorySettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!387306366 &1
4 | MemorySettings:
5 | m_ObjectHideFlags: 0
6 | m_EditorMemorySettings:
7 | m_MainAllocatorBlockSize: -1
8 | m_ThreadAllocatorBlockSize: -1
9 | m_MainGfxBlockSize: -1
10 | m_ThreadGfxBlockSize: -1
11 | m_CacheBlockSize: -1
12 | m_TypetreeBlockSize: -1
13 | m_ProfilerBlockSize: -1
14 | m_ProfilerEditorBlockSize: -1
15 | m_BucketAllocatorGranularity: -1
16 | m_BucketAllocatorBucketsCount: -1
17 | m_BucketAllocatorBlockSize: -1
18 | m_BucketAllocatorBlockCount: -1
19 | m_ProfilerBucketAllocatorGranularity: -1
20 | m_ProfilerBucketAllocatorBucketsCount: -1
21 | m_ProfilerBucketAllocatorBlockSize: -1
22 | m_ProfilerBucketAllocatorBlockCount: -1
23 | m_TempAllocatorSizeMain: -1
24 | m_JobTempAllocatorBlockSize: -1
25 | m_BackgroundJobTempAllocatorBlockSize: -1
26 | m_JobTempAllocatorReducedBlockSize: -1
27 | m_TempAllocatorSizeGIBakingWorker: -1
28 | m_TempAllocatorSizeNavMeshWorker: -1
29 | m_TempAllocatorSizeAudioWorker: -1
30 | m_TempAllocatorSizeCloudWorker: -1
31 | m_TempAllocatorSizeGfx: -1
32 | m_TempAllocatorSizeJobWorker: -1
33 | m_TempAllocatorSizeBackgroundWorker: -1
34 | m_TempAllocatorSizePreloadManager: -1
35 | m_PlatformMemorySettings: {}
36 |
--------------------------------------------------------------------------------
/ProjectSettings/MultiplayerManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!655991488 &1
4 | MultiplayerManager:
5 | m_ObjectHideFlags: 0
6 | m_EnableMultiplayerRoles: 0
7 | m_StrippingTypes: {}
8 |
--------------------------------------------------------------------------------
/ProjectSettings/NavMeshAreas.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!126 &1
4 | NavMeshProjectSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | areas:
8 | - name: Walkable
9 | cost: 1
10 | - name: Not Walkable
11 | cost: 1
12 | - name: Jump
13 | cost: 2
14 | - name:
15 | cost: 1
16 | - name:
17 | cost: 1
18 | - name:
19 | cost: 1
20 | - name:
21 | cost: 1
22 | - name:
23 | cost: 1
24 | - name:
25 | cost: 1
26 | - name:
27 | cost: 1
28 | - name:
29 | cost: 1
30 | - name:
31 | cost: 1
32 | - name:
33 | cost: 1
34 | - name:
35 | cost: 1
36 | - name:
37 | cost: 1
38 | - name:
39 | cost: 1
40 | - name:
41 | cost: 1
42 | - name:
43 | cost: 1
44 | - name:
45 | cost: 1
46 | - name:
47 | cost: 1
48 | - name:
49 | cost: 1
50 | - name:
51 | cost: 1
52 | - name:
53 | cost: 1
54 | - name:
55 | cost: 1
56 | - name:
57 | cost: 1
58 | - name:
59 | cost: 1
60 | - name:
61 | cost: 1
62 | - name:
63 | cost: 1
64 | - name:
65 | cost: 1
66 | - name:
67 | cost: 1
68 | - name:
69 | cost: 1
70 | - name:
71 | cost: 1
72 | m_LastAgentTypeID: -887442657
73 | m_Settings:
74 | - serializedVersion: 2
75 | agentTypeID: 0
76 | agentRadius: 0.5
77 | agentHeight: 2
78 | agentSlope: 45
79 | agentClimb: 0.75
80 | ledgeDropHeight: 0
81 | maxJumpAcrossDistance: 0
82 | minRegionArea: 2
83 | manualCellSize: 0
84 | cellSize: 0.16666667
85 | manualTileSize: 0
86 | tileSize: 256
87 | accuratePlacement: 0
88 | debug:
89 | m_Flags: 0
90 | m_SettingNames:
91 | - Humanoid
92 |
--------------------------------------------------------------------------------
/ProjectSettings/PackageManagerSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!114 &1
4 | MonoBehaviour:
5 | m_ObjectHideFlags: 61
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | m_GameObject: {fileID: 0}
10 | m_Enabled: 1
11 | m_EditorHideFlags: 0
12 | m_Script: {fileID: 13964, guid: 0000000000000000e000000000000000, type: 0}
13 | m_Name:
14 | m_EditorClassIdentifier:
15 | m_EnablePreviewPackages: 0
16 | m_EnablePackageDependencies: 0
17 | m_AdvancedSettingsExpanded: 1
18 | m_ScopedRegistriesSettingsExpanded: 1
19 | oneTimeWarningShown: 0
20 | m_Registries:
21 | - m_Id: main
22 | m_Name:
23 | m_Url: https://packages.unity.com
24 | m_Scopes: []
25 | m_IsDefault: 1
26 | m_Capabilities: 7
27 | m_UserSelectedRegistryName:
28 | m_UserAddingNewScopedRegistry: 0
29 | m_RegistryInfoDraft:
30 | m_ErrorMessage:
31 | m_Original:
32 | m_Id:
33 | m_Name:
34 | m_Url:
35 | m_Scopes: []
36 | m_IsDefault: 0
37 | m_Capabilities: 0
38 | m_Modified: 0
39 | m_Name:
40 | m_Url:
41 | m_Scopes:
42 | -
43 | m_SelectedScopeIndex: 0
44 |
--------------------------------------------------------------------------------
/ProjectSettings/Physics2DSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!19 &1
4 | Physics2DSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 4
7 | m_Gravity: {x: 0, y: -9.81}
8 | m_DefaultMaterial: {fileID: 0}
9 | m_VelocityIterations: 8
10 | m_PositionIterations: 3
11 | m_VelocityThreshold: 1
12 | m_MaxLinearCorrection: 0.2
13 | m_MaxAngularCorrection: 8
14 | m_MaxTranslationSpeed: 100
15 | m_MaxRotationSpeed: 360
16 | m_BaumgarteScale: 0.2
17 | m_BaumgarteTimeOfImpactScale: 0.75
18 | m_TimeToSleep: 0.5
19 | m_LinearSleepTolerance: 0.01
20 | m_AngularSleepTolerance: 2
21 | m_DefaultContactOffset: 0.01
22 | m_JobOptions:
23 | serializedVersion: 2
24 | useMultithreading: 0
25 | useConsistencySorting: 0
26 | m_InterpolationPosesPerJob: 100
27 | m_NewContactsPerJob: 30
28 | m_CollideContactsPerJob: 100
29 | m_ClearFlagsPerJob: 200
30 | m_ClearBodyForcesPerJob: 200
31 | m_SyncDiscreteFixturesPerJob: 50
32 | m_SyncContinuousFixturesPerJob: 50
33 | m_FindNearestContactsPerJob: 100
34 | m_UpdateTriggerContactsPerJob: 100
35 | m_IslandSolverCostThreshold: 100
36 | m_IslandSolverBodyCostScale: 1
37 | m_IslandSolverContactCostScale: 10
38 | m_IslandSolverJointCostScale: 10
39 | m_IslandSolverBodiesPerJob: 50
40 | m_IslandSolverContactsPerJob: 50
41 | m_AutoSimulation: 1
42 | m_QueriesHitTriggers: 1
43 | m_QueriesStartInColliders: 1
44 | m_CallbacksOnDisable: 1
45 | m_ReuseCollisionCallbacks: 0
46 | m_AutoSyncTransforms: 0
47 | m_AlwaysShowColliders: 0
48 | m_ShowColliderSleep: 1
49 | m_ShowColliderContacts: 0
50 | m_ShowColliderAABB: 0
51 | m_ContactArrowScale: 0.2
52 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412}
53 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432}
54 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745}
55 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804}
56 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
57 |
--------------------------------------------------------------------------------
/ProjectSettings/PresetManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!1386491679 &1
4 | PresetManager:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_DefaultPresets: {}
8 |
--------------------------------------------------------------------------------
/ProjectSettings/ProjectVersion.txt:
--------------------------------------------------------------------------------
1 | m_EditorVersion: 6000.0.50f1
2 | m_EditorVersionWithRevision: 6000.0.50f1 (f1ef1dca8bff)
3 |
--------------------------------------------------------------------------------
/ProjectSettings/QualitySettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!47 &1
4 | QualitySettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 5
7 | m_CurrentQuality: 1
8 | m_QualitySettings:
9 | - serializedVersion: 4
10 | name: Mobile
11 | pixelLightCount: 2
12 | shadows: 2
13 | shadowResolution: 1
14 | shadowProjection: 1
15 | shadowCascades: 2
16 | shadowDistance: 40
17 | shadowNearPlaneOffset: 3
18 | shadowCascade2Split: 0.33333334
19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
20 | shadowmaskMode: 0
21 | skinWeights: 2
22 | globalTextureMipmapLimit: 0
23 | textureMipmapLimitSettings: []
24 | anisotropicTextures: 1
25 | antiAliasing: 0
26 | softParticles: 0
27 | softVegetation: 1
28 | realtimeReflectionProbes: 0
29 | billboardsFaceCameraPosition: 1
30 | useLegacyDetailDistribution: 1
31 | adaptiveVsync: 0
32 | vSyncCount: 0
33 | realtimeGICPUUsage: 100
34 | adaptiveVsyncExtraA: 0
35 | adaptiveVsyncExtraB: 0
36 | lodBias: 1
37 | maximumLODLevel: 0
38 | enableLODCrossFade: 1
39 | streamingMipmapsActive: 0
40 | streamingMipmapsAddAllCameras: 1
41 | streamingMipmapsMemoryBudget: 512
42 | streamingMipmapsRenderersPerFrame: 512
43 | streamingMipmapsMaxLevelReduction: 2
44 | streamingMipmapsMaxFileIORequests: 1024
45 | particleRaycastBudget: 256
46 | asyncUploadTimeSlice: 2
47 | asyncUploadBufferSize: 16
48 | asyncUploadPersistentBuffer: 1
49 | resolutionScalingFixedDPIFactor: 1
50 | customRenderPipeline: {fileID: 11400000, guid: 5e6cbd92db86f4b18aec3ed561671858,
51 | type: 2}
52 | terrainQualityOverrides: 0
53 | terrainPixelError: 1
54 | terrainDetailDensityScale: 1
55 | terrainBasemapDistance: 1000
56 | terrainDetailDistance: 80
57 | terrainTreeDistance: 5000
58 | terrainBillboardStart: 50
59 | terrainFadeLength: 5
60 | terrainMaxTrees: 50
61 | excludedTargetPlatforms:
62 | - Standalone
63 | - serializedVersion: 4
64 | name: PC
65 | pixelLightCount: 2
66 | shadows: 2
67 | shadowResolution: 1
68 | shadowProjection: 1
69 | shadowCascades: 2
70 | shadowDistance: 40
71 | shadowNearPlaneOffset: 3
72 | shadowCascade2Split: 0.33333334
73 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
74 | shadowmaskMode: 1
75 | skinWeights: 4
76 | globalTextureMipmapLimit: 0
77 | textureMipmapLimitSettings: []
78 | anisotropicTextures: 2
79 | antiAliasing: 0
80 | softParticles: 0
81 | softVegetation: 1
82 | realtimeReflectionProbes: 0
83 | billboardsFaceCameraPosition: 1
84 | useLegacyDetailDistribution: 1
85 | adaptiveVsync: 0
86 | vSyncCount: 0
87 | realtimeGICPUUsage: 100
88 | adaptiveVsyncExtraA: 0
89 | adaptiveVsyncExtraB: 0
90 | lodBias: 2
91 | maximumLODLevel: 0
92 | enableLODCrossFade: 1
93 | streamingMipmapsActive: 0
94 | streamingMipmapsAddAllCameras: 1
95 | streamingMipmapsMemoryBudget: 512
96 | streamingMipmapsRenderersPerFrame: 512
97 | streamingMipmapsMaxLevelReduction: 2
98 | streamingMipmapsMaxFileIORequests: 1024
99 | particleRaycastBudget: 256
100 | asyncUploadTimeSlice: 2
101 | asyncUploadBufferSize: 16
102 | asyncUploadPersistentBuffer: 1
103 | resolutionScalingFixedDPIFactor: 1
104 | customRenderPipeline: {fileID: 11400000, guid: 4b83569d67af61e458304325a23e5dfd,
105 | type: 2}
106 | terrainQualityOverrides: 0
107 | terrainPixelError: 1
108 | terrainDetailDensityScale: 1
109 | terrainBasemapDistance: 1000
110 | terrainDetailDistance: 80
111 | terrainTreeDistance: 5000
112 | terrainBillboardStart: 50
113 | terrainFadeLength: 5
114 | terrainMaxTrees: 50
115 | excludedTargetPlatforms:
116 | - Android
117 | - iPhone
118 | m_TextureMipmapLimitGroupNames: []
119 | m_PerPlatformDefaultQuality:
120 | Android: 0
121 | GameCoreScarlett: 1
122 | GameCoreXboxOne: 1
123 | Lumin: 0
124 | Nintendo Switch: 1
125 | PS4: 1
126 | PS5: 1
127 | Server: 0
128 | Stadia: 0
129 | Standalone: 1
130 | WebGL: 0
131 | Windows Store Apps: 0
132 | XboxOne: 0
133 | iPhone: 0
134 | tvOS: 0
135 |
--------------------------------------------------------------------------------
/ProjectSettings/SceneTemplateSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "templatePinStates": [],
3 | "dependencyTypeInfos": [
4 | {
5 | "userAdded": false,
6 | "type": "UnityEngine.AnimationClip",
7 | "defaultInstantiationMode": 0
8 | },
9 | {
10 | "userAdded": false,
11 | "type": "UnityEditor.Animations.AnimatorController",
12 | "defaultInstantiationMode": 0
13 | },
14 | {
15 | "userAdded": false,
16 | "type": "UnityEngine.AnimatorOverrideController",
17 | "defaultInstantiationMode": 0
18 | },
19 | {
20 | "userAdded": false,
21 | "type": "UnityEditor.Audio.AudioMixerController",
22 | "defaultInstantiationMode": 0
23 | },
24 | {
25 | "userAdded": false,
26 | "type": "UnityEngine.ComputeShader",
27 | "defaultInstantiationMode": 1
28 | },
29 | {
30 | "userAdded": false,
31 | "type": "UnityEngine.Cubemap",
32 | "defaultInstantiationMode": 0
33 | },
34 | {
35 | "userAdded": false,
36 | "type": "UnityEngine.GameObject",
37 | "defaultInstantiationMode": 0
38 | },
39 | {
40 | "userAdded": false,
41 | "type": "UnityEditor.LightingDataAsset",
42 | "defaultInstantiationMode": 0
43 | },
44 | {
45 | "userAdded": false,
46 | "type": "UnityEngine.LightingSettings",
47 | "defaultInstantiationMode": 0
48 | },
49 | {
50 | "userAdded": false,
51 | "type": "UnityEngine.Material",
52 | "defaultInstantiationMode": 0
53 | },
54 | {
55 | "userAdded": false,
56 | "type": "UnityEditor.MonoScript",
57 | "defaultInstantiationMode": 1
58 | },
59 | {
60 | "userAdded": false,
61 | "type": "UnityEngine.PhysicsMaterial",
62 | "defaultInstantiationMode": 0
63 | },
64 | {
65 | "userAdded": false,
66 | "type": "UnityEngine.PhysicsMaterial2D",
67 | "defaultInstantiationMode": 0
68 | },
69 | {
70 | "userAdded": false,
71 | "type": "UnityEngine.Rendering.PostProcessing.PostProcessProfile",
72 | "defaultInstantiationMode": 0
73 | },
74 | {
75 | "userAdded": false,
76 | "type": "UnityEngine.Rendering.PostProcessing.PostProcessResources",
77 | "defaultInstantiationMode": 0
78 | },
79 | {
80 | "userAdded": false,
81 | "type": "UnityEngine.Rendering.VolumeProfile",
82 | "defaultInstantiationMode": 0
83 | },
84 | {
85 | "userAdded": false,
86 | "type": "UnityEditor.SceneAsset",
87 | "defaultInstantiationMode": 1
88 | },
89 | {
90 | "userAdded": false,
91 | "type": "UnityEngine.Shader",
92 | "defaultInstantiationMode": 1
93 | },
94 | {
95 | "userAdded": false,
96 | "type": "UnityEngine.ShaderVariantCollection",
97 | "defaultInstantiationMode": 1
98 | },
99 | {
100 | "userAdded": false,
101 | "type": "UnityEngine.Texture",
102 | "defaultInstantiationMode": 0
103 | },
104 | {
105 | "userAdded": false,
106 | "type": "UnityEngine.Texture2D",
107 | "defaultInstantiationMode": 0
108 | },
109 | {
110 | "userAdded": false,
111 | "type": "UnityEngine.Timeline.TimelineAsset",
112 | "defaultInstantiationMode": 0
113 | }
114 | ],
115 | "defaultDependencyTypeInfo": {
116 | "userAdded": false,
117 | "type": "",
118 | "defaultInstantiationMode": 1
119 | },
120 | "newSceneOverride": 0
121 | }
--------------------------------------------------------------------------------
/ProjectSettings/ShaderGraphSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!114 &1
4 | MonoBehaviour:
5 | m_ObjectHideFlags: 61
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | m_GameObject: {fileID: 0}
10 | m_Enabled: 1
11 | m_EditorHideFlags: 0
12 | m_Script: {fileID: 11500000, guid: de02f9e1d18f588468e474319d09a723, type: 3}
13 | m_Name:
14 | m_EditorClassIdentifier:
15 | shaderVariantLimit: 128
16 | customInterpolatorErrorThreshold: 32
17 | customInterpolatorWarningThreshold: 16
18 | customHeatmapValues: {fileID: 0}
19 |
--------------------------------------------------------------------------------
/ProjectSettings/TagManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!78 &1
4 | TagManager:
5 | serializedVersion: 2
6 | tags: []
7 | layers:
8 | - Default
9 | - TransparentFX
10 | - Ignore Raycast
11 | -
12 | - Water
13 | - UI
14 | -
15 | -
16 | -
17 | -
18 | -
19 | -
20 | -
21 | -
22 | -
23 | -
24 | -
25 | -
26 | -
27 | -
28 | -
29 | -
30 | -
31 | -
32 | -
33 | -
34 | -
35 | -
36 | -
37 | -
38 | -
39 | -
40 | m_SortingLayers:
41 | - name: Default
42 | uniqueID: 0
43 | locked: 0
44 | m_RenderingLayers:
45 | - Default
46 | - Light Layer 1
47 | - Light Layer 2
48 | - Light Layer 3
49 | - Light Layer 4
50 | - Light Layer 5
51 | - Light Layer 6
52 | - Light Layer 7
53 | -
54 | -
55 | -
56 | -
57 | -
58 | -
59 | -
60 | -
61 | -
62 | -
63 | -
64 | -
65 | -
66 | -
67 | -
68 | -
69 | -
70 | -
71 | -
72 | -
73 | -
74 | -
75 | -
76 | -
77 |
--------------------------------------------------------------------------------
/ProjectSettings/TimeManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!5 &1
4 | TimeManager:
5 | m_ObjectHideFlags: 0
6 | Fixed Timestep: 0.02
7 | Maximum Allowed Timestep: 0.33333334
8 | m_TimeScale: 1
9 | Maximum Particle Timestep: 0.03
10 |
--------------------------------------------------------------------------------
/ProjectSettings/URPProjectSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!114 &1
4 | MonoBehaviour:
5 | m_ObjectHideFlags: 61
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | m_GameObject: {fileID: 0}
10 | m_Enabled: 1
11 | m_EditorHideFlags: 0
12 | m_Script: {fileID: 11500000, guid: 247994e1f5a72c2419c26a37e9334c01, type: 3}
13 | m_Name:
14 | m_EditorClassIdentifier:
15 | m_LastMaterialVersion: 9
16 |
--------------------------------------------------------------------------------
/ProjectSettings/UnityConnectSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!310 &1
4 | UnityConnectSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 1
7 | m_Enabled: 0
8 | m_TestMode: 0
9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events
10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events
11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com
12 | m_DashboardUrl: https://dashboard.unity3d.com
13 | m_TestInitMode: 0
14 | CrashReportingSettings:
15 | m_EventUrl: https://perf-events.cloud.unity3d.com
16 | m_Enabled: 0
17 | m_LogBufferSize: 10
18 | m_CaptureEditorExceptions: 1
19 | UnityPurchasingSettings:
20 | m_Enabled: 0
21 | m_TestMode: 0
22 | UnityAnalyticsSettings:
23 | m_Enabled: 0
24 | m_TestMode: 0
25 | m_InitializeOnStartup: 1
26 | m_PackageRequiringCoreStatsPresent: 0
27 | UnityAdsSettings:
28 | m_Enabled: 0
29 | m_InitializeOnStartup: 1
30 | m_TestMode: 0
31 | m_IosGameId:
32 | m_AndroidGameId:
33 | m_GameIds: {}
34 | m_GameId:
35 | PerformanceReportingSettings:
36 | m_Enabled: 0
37 |
--------------------------------------------------------------------------------
/ProjectSettings/VFXManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!937362698 &1
4 | VFXManager:
5 | m_ObjectHideFlags: 0
6 | m_IndirectShader: {fileID: 0}
7 | m_CopyBufferShader: {fileID: 0}
8 | m_SortShader: {fileID: 0}
9 | m_StripUpdateShader: {fileID: 0}
10 | m_RenderPipeSettingsPath:
11 | m_FixedTimeStep: 0.016666668
12 | m_MaxDeltaTime: 0.05
13 |
--------------------------------------------------------------------------------
/ProjectSettings/VersionControlSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!890905787 &1
4 | VersionControlSettings:
5 | m_ObjectHideFlags: 0
6 | m_Mode: Visible Meta Files
7 | m_CollabEditorSettings:
8 | inProgressEnabled: 1
9 |
--------------------------------------------------------------------------------
/ProjectSettings/XRSettings.asset:
--------------------------------------------------------------------------------
1 | {
2 | "m_SettingKeys": [
3 | "VR Device Disabled",
4 | "VR Device User Alert"
5 | ],
6 | "m_SettingValues": [
7 | "False",
8 | "False"
9 | ]
10 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # piper-unity
2 |
3 | A Fast, Local Neural Text-to-Speech System: Piper in Unity for Multi-Platform
4 |
5 | ## Overview
6 |
7 | Piper is a lightweight, on-device text-to-speech system designed for real-time performance, which is one of the [Open Home Foundation Projects](https://www.openhomefoundation.org/projects/). The neural models are optimized for fast inference while maintaining high-quality speech synthesis. By using pre-trained voices, you can easily switch between different voice nationalities through [Piper Voices](https://rhasspy.github.io/piper-samples/).
8 |
9 | This repository provides Unity integration for Piper, enabling cross-platform text-to-speech capabilities with real-time performance on Windows, macOS, and Android mobile devices.
10 |
11 | ## Features
12 |
13 | - ✅ Multi-platform support: Windows, macOS, and Android
14 | - ✅ 100+ languages and accents: Powered by espeak-ng phoneme generation
15 | - ✅ On-device processing: No internet connection required
16 | - ✅ Lightweight models: Compact voice models (20~60MB) for efficient deployment
17 | - ✅ Pre-built libraries: Ready-to-use binaries included
18 | - ✅ Extensive voice collection: Access to various pre-trained voice models
19 |
20 | ## Requirements
21 |
22 | - **Unity**: `6000.0.50f1`
23 | - **Inference Engine**: `2.2.1`
24 | - **espeak-ng**: `1.5.2`
25 |
26 | ## Architecture
27 |
28 | ### 1. Phoneme Generation (espeak-ng)
29 |
30 | This repository includes a Unity port of [espeak-ng](https://github.com/espeak-ng/espeak-ng) for multilingual phoneme generation. The library supports more than 100 languages and accents.
31 |
32 | **Pre-built libraries included:**
33 | - Windows: `.dll`
34 | - macOS: `.dylib`
35 | - Android: `.so`
36 |
37 | ### 2. Pre-trained Voice Models
38 |
39 | The system uses pre-trained neural voice models that can be easily downloaded and integrated into your Unity project.
40 |
41 | ## Getting Started
42 |
43 | ### 1. Project Setup
44 |
45 | - Clone or download this repository
46 | - Unzip the provided [StreamingAssets.zip](https://drive.google.com/file/d/1Wir241YUVQgDu11T9rwMWgsrL614GhVt/view?usp=sharing) file and place its contents into the `/Assets/StreamingAssets` directory in your project
47 |
48 | ### 2. Run the Demo Scene
49 |
50 | - Open the `/Assets/Scenes/PiperScene.unity` scene in the Unity Editor
51 | - Run the scene to see the piper tts tests in action
52 |
53 | ### 3. Voice Models
54 |
55 | To find and download additional pre-trained voices:
56 |
57 | 1. Browse available voices: [Piper Voice Samples](https://rhasspy.github.io/piper-samples/)
58 | 2. Check the complete voice list: [VOICES.md](https://github.com/rhasspy/piper/blob/master/VOICES.md)
59 | 3. Import the `.onnx` and `.json` files into your Unity project's Assets folder
60 | (A few voice models are not compatible with the current version of the Inference Engine and cannot be imported.)
61 |
62 | ### 4. Custom Voice Training
63 |
64 | Want to train your own voice model? Follow the official training guide:
65 | [TRAINING.md](https://github.com/rhasspy/piper/blob/master/TRAINING.md)
66 |
67 | ## Platform Support
68 |
69 | | Platform | Status | Library Format |
70 | |----------|--------|----------------|
71 | | Windows | ✅ | `.dll` |
72 | | macOS | ✅ | `.dylib` |
73 | | Android | ✅ | `.so` |
74 |
75 | * If not executable on Windows, install [espeak-ng.msi](https://github.com/espeak-ng/espeak-ng/releases/tag/1.52.0) manually.
76 |
77 | ## Installation
78 |
79 | 1. Follow the Project Setup steps in the [Getting Started](#-getting-started) section
80 | 2. Import the appropriate platform libraries
81 | 3. Configure the TTS system in your Unity scenes
82 |
83 | ## Demo
84 |
85 | Experience piper-unity in action! Check out our demo showcasing:
86 |
87 | [](https://www.youtube.com/watch?v=i2LvqWICb40)
88 |
89 | ## Links
90 |
91 | - [Piper Official Repository](https://github.com/rhasspy/piper)
92 | - [Piper Voice Samples](https://rhasspy.github.io/piper-samples/)
93 | - [espeak-ng](https://github.com/espeak-ng/espeak-ng)
94 | - [Open Home Foundation](https://www.openhomefoundation.org/projects/)
95 |
96 | ## License
97 |
98 | This project follows the licensing terms of its underlying components. Please refer to the original Piper and espeak-ng repositories for detailed license information.
99 |
--------------------------------------------------------------------------------