├── ProjectSettings ├── ProjectVersion.txt ├── ClusterInputManager.asset ├── NetworkManager.asset ├── TimeManager.asset ├── EditorBuildSettings.asset ├── AudioManager.asset ├── TagManager.asset ├── EditorSettings.asset ├── PresetManager.asset ├── UnityConnectSettings.asset ├── DynamicsManager.asset ├── Physics2DSettings.asset ├── NavMeshAreas.asset ├── GraphicsSettings.asset ├── QualitySettings.asset └── InputManager.asset ├── Assets ├── Resources │ ├── TextMesh Pro │ │ ├── Resources │ │ │ ├── LineBreaking Leading Characters.txt │ │ │ ├── LineBreaking Following Characters.txt │ │ │ ├── Shaders │ │ │ │ ├── TMPro.cginc.meta │ │ │ │ ├── TMP_Bitmap.shader.meta │ │ │ │ ├── TMP_SDF.shader.meta │ │ │ │ ├── TMP_SDF Overlay.shader.meta │ │ │ │ ├── TMP_SDF-Mobile.shader.meta │ │ │ │ ├── TMP_SDF-Surface.shader.meta │ │ │ │ ├── TMPro_Properties.cginc.meta │ │ │ │ ├── TMPro_Surface.cginc.meta │ │ │ │ ├── TMP_Bitmap-Mobile.shader.meta │ │ │ │ ├── TMP_Bitmap-Custom-Atlas.shader.meta │ │ │ │ ├── TMP_SDF-Mobile Overlay.shader.meta │ │ │ │ ├── TMP_SDF-Surface-Mobile.shader.meta │ │ │ │ ├── TMP_Sprite.shader.meta │ │ │ │ ├── TMP_SDF-Mobile Masking.shader.meta │ │ │ │ ├── TMPro.cginc │ │ │ │ ├── TMP_Sprite.shader │ │ │ │ ├── TMPro_Properties.cginc │ │ │ │ ├── TMP_SDF-Surface-Mobile.shader │ │ │ │ ├── TMP_Bitmap.shader │ │ │ │ ├── TMP_Bitmap-Custom-Atlas.shader │ │ │ │ ├── TMP_Bitmap-Mobile.shader │ │ │ │ ├── TMPro_Surface.cginc │ │ │ │ ├── TMP_SDF-Surface.shader │ │ │ │ └── TMP_SDF-Mobile Overlay.shader │ │ │ ├── TMP Settings.asset.meta │ │ │ ├── Sprite Assets │ │ │ │ ├── EmojiOne.asset.meta │ │ │ │ └── EmojiOne.asset │ │ │ ├── LineBreaking Following Characters.txt.meta │ │ │ ├── LineBreaking Leading Characters.txt.meta │ │ │ ├── Shaders.meta │ │ │ ├── Fonts & Materials │ │ │ │ ├── LiberationSans SDF.asset.meta │ │ │ │ ├── LiberationSans SDF - Outline.mat.meta │ │ │ │ ├── LiberationSans SDF - Drop Shadow.mat.meta │ │ │ │ ├── LiberationSans SDF - Outline.mat │ │ │ │ └── LiberationSans SDF - Drop Shadow.mat │ │ │ ├── Sprite Assets.meta │ │ │ ├── Style Sheets.meta │ │ │ ├── Style Sheets │ │ │ │ ├── Default Style Sheet.asset.meta │ │ │ │ └── Default Style Sheet.asset │ │ │ ├── Fonts & Materials.meta │ │ │ └── TMP Settings.asset │ │ ├── Sprites │ │ │ ├── EmojiOne.png │ │ │ ├── EmojiOne Attribution.txt.meta │ │ │ ├── EmojiOne Attribution.txt │ │ │ ├── EmojiOne.json.meta │ │ │ └── EmojiOne.json │ │ ├── Documentation │ │ │ ├── TextMesh Pro User Guide 2016.pdf │ │ │ └── TextMesh Pro User Guide 2016.pdf.meta │ │ ├── Resources.meta │ │ ├── Sprites.meta │ │ └── Documentation.meta │ └── TextMesh Pro.meta ├── Models │ ├── cube.fbx │ ├── half_torus.fbx │ ├── extrude-outline.fbx │ ├── sphere-highpoly.fbx │ ├── cube.fbx.meta │ ├── extrude-outline.fbx.meta │ ├── sphere-highpoly.fbx.meta │ └── half_torus.fbx.meta ├── Textures │ ├── trail.tiff │ ├── Lightning.psd │ ├── heightmap.tiff │ ├── tiles bump.png │ ├── trail.tiff.meta │ ├── Lightning.psd.meta │ ├── heightmap.tiff.meta │ └── tiles bump.png.meta ├── _Scenes │ ├── Extrusion.unity.meta │ ├── Twist.unity.meta │ ├── Lightning bolt.unity.meta │ ├── Tron trail.unity.meta │ ├── Fractal texture.unity.meta │ ├── Heightmap generator.unity.meta │ ├── Sculpt vertices.unity.meta │ ├── Crumple mesh modifier.unity.meta │ ├── Sinus curve modifier.unity.meta │ └── Smooth random position.unity.meta ├── Models.meta ├── Physics.meta ├── Scripts.meta ├── _Scenes.meta ├── Animations.meta ├── Animators.meta ├── Materials.meta ├── Resources.meta ├── Textures.meta ├── Scripts │ ├── Utils.meta │ ├── Twist.cs.meta │ ├── CrumpleMesh.cs.meta │ ├── TronTrail.cs.meta │ ├── FractalTexture.cs.meta │ ├── LightningBolt.cs.meta │ ├── PaintVertices.cs.meta │ ├── Utils │ │ ├── Perlin.cs.meta │ │ ├── DragTransform.cs.meta │ │ ├── FractalNoise.cs.meta │ │ ├── KeyboardOrbit.cs.meta │ │ ├── MeshExtrusion.cs.meta │ │ ├── SmoothRandom.cs.meta │ │ ├── SmoothRandom.cs │ │ ├── DragTransform.cs │ │ ├── KeyboardOrbit.cs │ │ └── FractalNoise.cs │ ├── ExtrudedMeshTrail.cs.meta │ ├── HeightmapGenerator.cs.meta │ ├── SinusCurveModifier.cs.meta │ ├── SmoothRandomPosition.cs.meta │ ├── InitialRigidbodyVelocity.cs.meta │ ├── InitialRigidbodyVelocity.cs │ ├── SmoothRandomPosition.cs │ ├── SinusCurveModifier.cs │ ├── CrumpleMesh.cs │ ├── Twist.cs │ ├── FractalTexture.cs │ ├── LightningBolt.cs │ ├── HeightmapGenerator.cs │ ├── ExtrudedMeshTrail.cs │ ├── TronTrail.cs │ └── PaintVertices.cs ├── Materials │ ├── diffuse.mat.meta │ ├── trail.mat.meta │ ├── heightmap.mat.meta │ ├── Lightning Mat.mat.meta │ ├── a sphere-lambert1.mat.meta │ ├── extrude-plane-lambert2.mat.meta │ ├── diffuse.mat │ ├── a sphere-lambert1.mat │ ├── heightmap.mat │ ├── extrude-plane-lambert2.mat │ ├── trail.mat │ └── Lightning Mat.mat ├── Animations │ ├── Tron Trail.anim.meta │ └── Tron Trail.anim ├── Physics │ ├── bouncy.physicMaterial.meta │ └── bouncy.physicMaterial └── Animators │ ├── Tron Trail Controller.controller.meta │ └── Tron Trail Controller.controller ├── Procedural Examples - Updated.unitypackage ├── LICENSE.md ├── README.md ├── Packages └── manifest.json └── .gitignore /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2018.2.12f1 2 | -------------------------------------------------------------------------------- /Assets/Resources/TextMesh Pro/Resources/LineBreaking Leading Characters.txt: -------------------------------------------------------------------------------- 1 | ([{〔〈《「『【〘〖〝‘“⦅«$—…‥〳〴〵\[({£¥"々〇〉》」$⦆¥₩ # -------------------------------------------------------------------------------- /Assets/Models/cube.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knapeczadam/unity-procedural-examples-updated/HEAD/Assets/Models/cube.fbx -------------------------------------------------------------------------------- /Assets/Textures/trail.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knapeczadam/unity-procedural-examples-updated/HEAD/Assets/Textures/trail.tiff -------------------------------------------------------------------------------- /Assets/Models/half_torus.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knapeczadam/unity-procedural-examples-updated/HEAD/Assets/Models/half_torus.fbx -------------------------------------------------------------------------------- /Assets/Textures/Lightning.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knapeczadam/unity-procedural-examples-updated/HEAD/Assets/Textures/Lightning.psd -------------------------------------------------------------------------------- /Assets/Textures/heightmap.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knapeczadam/unity-procedural-examples-updated/HEAD/Assets/Textures/heightmap.tiff -------------------------------------------------------------------------------- /Assets/Textures/tiles bump.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knapeczadam/unity-procedural-examples-updated/HEAD/Assets/Textures/tiles bump.png -------------------------------------------------------------------------------- /Assets/Models/extrude-outline.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knapeczadam/unity-procedural-examples-updated/HEAD/Assets/Models/extrude-outline.fbx -------------------------------------------------------------------------------- /Assets/Models/sphere-highpoly.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knapeczadam/unity-procedural-examples-updated/HEAD/Assets/Models/sphere-highpoly.fbx -------------------------------------------------------------------------------- /Procedural Examples - Updated.unitypackage: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knapeczadam/unity-procedural-examples-updated/HEAD/Procedural Examples - Updated.unitypackage -------------------------------------------------------------------------------- /Assets/Resources/TextMesh Pro/Resources/LineBreaking Following Characters.txt: -------------------------------------------------------------------------------- 1 | )]}〕〉》」』】〙〗〟’”⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、%,.:;。!?]):;=}¢°"†‡℃〆%,. -------------------------------------------------------------------------------- /Assets/Resources/TextMesh Pro/Sprites/EmojiOne.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knapeczadam/unity-procedural-examples-updated/HEAD/Assets/Resources/TextMesh Pro/Sprites/EmojiOne.png -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /Assets/_Scenes/Extrusion.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 29c7a105ee91cca40abeb8ece8d67a5a 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/_Scenes/Twist.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a4387d6d35b5e7a449b7e55d86a68349 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Models.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9fa0123641e655f4882a34015bc8c323 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Physics.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d865efb0695217142af1de88dab80f2b 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 922aba21ac1a5a84395b9e06ada853bb 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/_Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4f704ae4b4f98ae41a0bce26658850c1 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/_Scenes/Lightning bolt.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d664f17b239679646a5ff8f82a0bffeb 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/_Scenes/Tron trail.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6c96a51335601cf43bca8489f1cf650f 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!149 &1 4 | NetworkManager: 5 | m_ObjectHideFlags: 0 6 | m_DebugLevel: 0 7 | m_Sendrate: 15 8 | m_AssetToPrefab: {} 9 | -------------------------------------------------------------------------------- /Assets/Animations.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c6dcbd4258456e8499c713df834be3ee 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Animators.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 458207d5da632bd41ab29afba83023a8 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0d176bfaa05ce804fa4c794f36932aeb 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Resources.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bf21419a5cdd5f641bcbd31dd228dbea 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Textures.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 217ab5c8ec2566644a95731bd6bc9204 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/_Scenes/Fractal texture.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bc8a2aec6ceb3a748bebe77a97a818aa 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/_Scenes/Heightmap generator.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c1717316d03012f4bb2c59857df490aa 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/_Scenes/Sculpt vertices.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0f910d4936d69da44a48e17a8463fe8d 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Resources/TextMesh Pro/Documentation/TextMesh Pro User Guide 2016.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knapeczadam/unity-procedural-examples-updated/HEAD/Assets/Resources/TextMesh Pro/Documentation/TextMesh Pro User Guide 2016.pdf -------------------------------------------------------------------------------- /Assets/Scripts/Utils.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0cc8328e3f04de14ba44ce1d688b33a7 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/_Scenes/Crumple mesh modifier.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 99c9720ab356a0642a771bea13969a05 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/_Scenes/Sinus curve modifier.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 43c62419762b32443bccc5829d4ec46b 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/_Scenes/Smooth random position.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f848bb9d62c9b154db3689a59a39292e 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Resources/TextMesh Pro.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f54d1bd14bd3ca042bd867b519fee8cc 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Resources/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/Resources/TextMesh Pro/Resources/Shaders/TMPro.cginc.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 407bc68d299748449bbf7f48ee690f8d 3 | ShaderImporter: 4 | defaultTextures: [] 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Resources/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/Materials/diffuse.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: df003447eb80d9641b6c5c4b8f25a01c 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Materials/trail.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f9a61361f7799ee41845d544cea6018a 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Resources/TextMesh Pro/Documentation.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8e7e8f5a82a3a134e91c54efd2274ea9 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Resources/TextMesh Pro/Resources/Shaders/TMP_Bitmap.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 128e987d567d4e2c824d754223b3f3b0 3 | ShaderImporter: 4 | defaultTextures: [] 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Resources/TextMesh Pro/Resources/Shaders/TMP_SDF.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 68e6db2ebdc24f95958faec2be5558d6 3 | ShaderImporter: 4 | defaultTextures: [] 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Resources/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/Animations/Tron Trail.anim.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9e2e84749115ed344b002b6729d46d34 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 7400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Materials/heightmap.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4eb6ee5c70063db40a5209520cd0e7d8 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Resources/TextMesh Pro/Resources/Shaders/TMP_SDF Overlay.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dd89cf5b9246416f84610a006f916af7 3 | ShaderImporter: 4 | defaultTextures: [] 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Resources/TextMesh Pro/Resources/Shaders/TMP_SDF-Mobile.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fe393ace9b354375a9cb14cdbbc28be4 3 | ShaderImporter: 4 | defaultTextures: [] 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Resources/TextMesh Pro/Resources/Shaders/TMP_SDF-Surface.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f7ada0af4f174f0694ca6a487b8f543d 3 | ShaderImporter: 4 | defaultTextures: [] 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Resources/TextMesh Pro/Resources/Shaders/TMPro_Properties.cginc.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3997e2241185407d80309a82f9148466 3 | ShaderImporter: 4 | defaultTextures: [] 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Resources/TextMesh Pro/Resources/Shaders/TMPro_Surface.cginc.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d930090c0cd643c7b55f19a38538c162 3 | ShaderImporter: 4 | defaultTextures: [] 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Resources/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/Materials/Lightning Mat.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1353738137e607c45bcfaf4e9558e2ed 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Materials/a sphere-lambert1.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fe819721963b8c842a9e936f0b691fd6 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Physics/bouncy.physicMaterial.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 155921b43b8a1fd4c84183f00668d331 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 13400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Resources/TextMesh Pro/Resources/Shaders/TMP_Bitmap-Mobile.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1e3b057af24249748ff873be7fafee47 3 | ShaderImporter: 4 | defaultTextures: [] 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Materials/extrude-plane-lambert2.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5dcc0a9e196a4af4faa816169a9f7155 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Resources/TextMesh Pro/Documentation/TextMesh Pro User Guide 2016.pdf.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1b8d251f9af63b746bf2f7ffe00ebb9b 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Resources/TextMesh Pro/Resources/Shaders/TMP_Bitmap-Custom-Atlas.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 48bb5f55d8670e349b6e614913f9d910 3 | ShaderImporter: 4 | defaultTextures: [] 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Resources/TextMesh Pro/Resources/Shaders/TMP_SDF-Mobile Overlay.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a02a7d8c237544f1962732b55a9aebf1 3 | ShaderImporter: 4 | defaultTextures: [] 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Resources/TextMesh Pro/Resources/Shaders/TMP_SDF-Surface-Mobile.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 85187c2149c549c5b33f0cdb02836b17 3 | ShaderImporter: 4 | defaultTextures: [] 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Resources/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/Animators/Tron Trail Controller.controller.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6d24d6446383f074798b22e0e7b30607 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 9100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Resources/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 | -------------------------------------------------------------------------------- /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.1 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /Assets/Resources/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/Resources/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/Resources/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/Resources/TextMesh Pro/Resources/Shaders.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 99f836c9cb9345dba2e72c4a1f2d0695 3 | folderAsset: yes 4 | timeCreated: 1436068007 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Resources/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/Resources/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/Resources/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/Resources/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/Resources/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/Resources/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/Resources/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/Resources/TextMesh Pro/Resources/Shaders/TMP_Sprite.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cf81c85f95fe47e1a27f6ae460cf182c 3 | timeCreated: 1450517184 4 | licenseType: Pro 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Resources/TextMesh Pro/Resources/Shaders/TMP_SDF-Mobile Masking.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bc1ede39bf3643ee8e493720e4259791 3 | timeCreated: 1463704911 4 | licenseType: Pro 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Scripts/Twist.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 285e3725e2a12534e9422c1baadf40d8 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/CrumpleMesh.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 25580c2cc7960e344827774fdd4c11f3 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/TronTrail.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7641d5c7aa9c9324cbc7e0a517ec6a67 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/FractalTexture.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2990c19549fb4f1458e17cfb6d4bb8cd 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/LightningBolt.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7d38e87feffb65042b9ca368281e625d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/PaintVertices.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1551293afc46c32479fceeaccb6f9790 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Utils/Perlin.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9e5c055b56d283541bd313f6e094c21a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/ExtrudedMeshTrail.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fe6e38f09c9b8ec41a165329af04323f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/HeightmapGenerator.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7ee7097cd2189b147a29c232f6b28422 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/SinusCurveModifier.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bbd1f6c61733e6a44a7ae2fa3ca5f47d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/SmoothRandomPosition.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1613f2b1e3df7a74a90d8ea79d370cf4 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Utils/DragTransform.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c4a88f29dcdb2d945a5a37c6bc57e39e 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Utils/FractalNoise.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6641324894bb2da49ad9abf63b7eb99d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Utils/KeyboardOrbit.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a51c42561c9de5c4aa6ca06aaf2b681d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Utils/MeshExtrusion.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 22fd82c60864ad149a90dbaff9266bbc 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Utils/SmoothRandom.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3d679003558045e48b388675fb82e0be 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/InitialRigidbodyVelocity.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 729752c175a234743b40e9012c9617a1 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /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/SampleScene.unity 10 | guid: 99c9720ab356a0642a771bea13969a05 11 | m_configObjects: {} 12 | -------------------------------------------------------------------------------- /Assets/Scripts/InitialRigidbodyVelocity.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | [RequireComponent(typeof(Rigidbody))] 4 | public class InitialRigidbodyVelocity : MonoBehaviour 5 | { 6 | public float speed = 10.0f; 7 | 8 | void Start() 9 | { 10 | GetComponent().velocity = transform.TransformDirection(Vector3.forward) * speed; 11 | } 12 | } -------------------------------------------------------------------------------- /Assets/Physics/bouncy.physicMaterial: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!134 &13400000 4 | PhysicMaterial: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_Name: bouncy 9 | dynamicFriction: 0.4 10 | staticFriction: 0.4 11 | bounciness: 1 12 | frictionCombine: 0 13 | bounceCombine: 3 14 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright © 2012 Unity Technologies ApS 2 | 3 | Licensed under the Unity Companion License for Unity-dependent projects--see Unity Companion License. 4 | 5 | Unless expressly provided otherwise, the Software under this license is made available strictly on an “AS IS” BASIS WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. Please review the license for details on these and other terms and conditions. 6 | -------------------------------------------------------------------------------- /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 | m_Volume: 1 7 | Rolloff Scale: 1 8 | Doppler Factor: 1 9 | Default Speaker Mode: 2 10 | m_SampleRate: 0 11 | m_DSPBufferSize: 1024 12 | m_VirtualVoiceCount: 512 13 | m_RealVoiceCount: 32 14 | m_SpatializerPlugin: 15 | m_AmbisonicDecoderPlugin: 16 | m_DisableAudio: 0 17 | m_VirtualizeEffects: 1 18 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Unity-Procedural-Examples-Updated 2 | 3 | ### Used versions 4 | * Unity: 2018.2.12f1 5 | * .NET: 4.x 6 | 7 | Clone or download or import as a Unity package. 8 | The original project is available in the Unity Assets Store. 9 | -------------------------------------------------------------------------------- /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 | - PostProcessing 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 | -------------------------------------------------------------------------------- /Assets/Scripts/SmoothRandomPosition.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | // This script is placed in public domain. The author takes no responsibility for any possible harm. 4 | // Moves the object along as far as range units randomly but in a smooth way. 5 | public class SmoothRandomPosition : MonoBehaviour 6 | { 7 | 8 | public float speed = 1.0f; 9 | public Vector3 range = Vector3.one; 10 | 11 | private Vector3 position; 12 | 13 | void Start() 14 | { 15 | position = transform.position; 16 | } 17 | 18 | void Update() 19 | { 20 | transform.position = position + Vector3.Scale(SmoothRandom.GetVector3(speed), range); 21 | } 22 | } -------------------------------------------------------------------------------- /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: 7 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_LineEndingsForNewScripts: 2 10 | m_DefaultBehaviorMode: 0 11 | m_SpritePackerMode: 0 12 | m_SpritePackerPaddingPower: 1 13 | m_EtcTextureCompressorBehavior: 1 14 | m_EtcTextureFastCompressor: 1 15 | m_EtcTextureNormalCompressor: 2 16 | m_EtcTextureBestCompressor: 4 17 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef 18 | m_ProjectGenerationRootNamespace: 19 | m_UserGeneratedProjectSuffix: 20 | m_CollabEditorSettings: 21 | inProgressEnabled: 1 22 | m_EnableTextureStreamingInPlayMode: 1 23 | -------------------------------------------------------------------------------- /Assets/Scripts/Utils/SmoothRandom.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public class SmoothRandom 4 | { 5 | public static Vector3 GetVector3(float speed) 6 | { 7 | float time = Time.time * 0.01F * speed; 8 | return new Vector3(Get().HybridMultifractal(time, 15.73F, 0.58F), Get().HybridMultifractal(time, 63.94F, 0.58F), 9 | Get().HybridMultifractal(time, 0.2F, 0.58F)); 10 | } 11 | 12 | public static float Get(float speed) 13 | { 14 | float time = Time.time * 0.01F * speed; 15 | return Get().HybridMultifractal(time * 0.01F, 15.7F, 0.65F); 16 | } 17 | 18 | private static FractalNoise Get() 19 | { 20 | if (s_Noise == null) 21 | { 22 | s_Noise = new FractalNoise(1.27F, 2.04F, 8.36F); 23 | } 24 | return s_Noise; 25 | } 26 | 27 | private static FractalNoise s_Noise; 28 | } -------------------------------------------------------------------------------- /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 | m_DefaultList: 7 | - type: 8 | m_NativeTypeID: 108 9 | m_ManagedTypePPtr: {fileID: 0} 10 | m_ManagedTypeFallback: 11 | defaultPresets: 12 | - m_Preset: {fileID: 2655988077585873504, guid: c1cf8506f04ef2c4a88b64b6c4202eea, 13 | type: 2} 14 | - type: 15 | m_NativeTypeID: 1020 16 | m_ManagedTypePPtr: {fileID: 0} 17 | m_ManagedTypeFallback: 18 | defaultPresets: 19 | - m_Preset: {fileID: 2655988077585873504, guid: 0cd792cc87e492d43b4e95b205fc5cc6, 20 | type: 2} 21 | - type: 22 | m_NativeTypeID: 1006 23 | m_ManagedTypePPtr: {fileID: 0} 24 | m_ManagedTypeFallback: 25 | defaultPresets: 26 | - m_Preset: {fileID: 2655988077585873504, guid: 7a99f8aa944efe94cb9bd74562b7d5f9, 27 | type: 2} 28 | -------------------------------------------------------------------------------- /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 | m_Enabled: 0 7 | m_TestMode: 0 8 | m_TestEventUrl: 9 | m_TestConfigUrl: 10 | m_TestInitMode: 0 11 | CrashReportingSettings: 12 | m_EventUrl: https://perf-events.cloud.unity3d.com/api/events/crashes 13 | m_NativeEventUrl: https://perf-events.cloud.unity3d.com/symbolicate 14 | m_Enabled: 0 15 | m_CaptureEditorExceptions: 1 16 | UnityPurchasingSettings: 17 | m_Enabled: 0 18 | m_TestMode: 0 19 | UnityAnalyticsSettings: 20 | m_Enabled: 0 21 | m_InitializeOnStartup: 1 22 | m_TestMode: 0 23 | m_TestEventUrl: 24 | m_TestConfigUrl: 25 | UnityAdsSettings: 26 | m_Enabled: 0 27 | m_InitializeOnStartup: 1 28 | m_TestMode: 0 29 | m_IosGameId: 30 | m_AndroidGameId: 31 | m_GameIds: {} 32 | m_GameId: 33 | PerformanceReportingSettings: 34 | m_Enabled: 0 35 | -------------------------------------------------------------------------------- /Assets/Scripts/SinusCurveModifier.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | // This script is placed in public domain. The author takes no responsibility for any possible harm. 4 | public class SinusCurveModifier : MonoBehaviour 5 | { 6 | public float scale = 10.0f; 7 | public float speed = 1.0f; 8 | private Vector3[] baseHeight; 9 | 10 | private void Update() 11 | { 12 | Mesh mesh = GetComponent().mesh; 13 | 14 | if (baseHeight == null) 15 | { 16 | baseHeight = mesh.vertices; 17 | } 18 | 19 | Vector3[] vertices = new Vector3[baseHeight.Length]; 20 | for (int i = 0; i < vertices.Length; i++) 21 | { 22 | Vector3 vertex = baseHeight[i]; 23 | vertex.y += Mathf.Sin(Time.time * speed + baseHeight[i].x + baseHeight[i].y + baseHeight[i].z) * scale; 24 | vertices[i] = vertex; 25 | } 26 | 27 | mesh.vertices = vertices; 28 | mesh.RecalculateNormals(); 29 | } 30 | } -------------------------------------------------------------------------------- /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: 7 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 18 | m_ClothInterCollisionStiffness: 0 19 | m_ContactsGeneration: 1 20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 21 | m_AutoSimulation: 1 22 | m_AutoSyncTransforms: 1 23 | m_ClothInterCollisionSettingsToggle: 0 24 | m_ContactPairsMode: 0 25 | m_BroadphaseType: 0 26 | m_WorldBounds: 27 | m_Center: {x: 0, y: 0, z: 0} 28 | m_Extent: {x: 250, y: 250, z: 250} 29 | m_WorldSubdivisions: 8 30 | -------------------------------------------------------------------------------- /Assets/Scripts/Utils/DragTransform.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using UnityEngine; 3 | 4 | public class DragTransform : MonoBehaviour 5 | { 6 | public Color mouseOverColor = Color.blue; 7 | private Color originalColor; 8 | 9 | void Start() 10 | { 11 | originalColor = GetComponent().sharedMaterial.color; 12 | } 13 | 14 | private void OnMouseEnter() 15 | { 16 | GetComponent().material.color = mouseOverColor; 17 | } 18 | 19 | private void OnMouseExit() 20 | { 21 | GetComponent().material.color = originalColor; 22 | } 23 | 24 | private IEnumerator OnMouseDown() 25 | { 26 | Vector3 screenSpace = Camera.main.WorldToScreenPoint(transform.position); 27 | Vector3 offset = transform.position - 28 | Camera.main.ScreenToWorldPoint(new Vector3(Input.mousePosition.x, Input.mousePosition.y, 29 | screenSpace.z)); 30 | while (Input.GetMouseButton(0)) 31 | { 32 | Vector3 curScreenSpace = new Vector3(Input.mousePosition.x, Input.mousePosition.y, screenSpace.z); 33 | Vector3 curPosition = Camera.main.ScreenToWorldPoint(curScreenSpace) + offset; 34 | transform.position = curPosition; 35 | yield return null; 36 | } 37 | } 38 | } -------------------------------------------------------------------------------- /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: 3 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_AutoSimulation: 1 23 | m_QueriesHitTriggers: 1 24 | m_QueriesStartInColliders: 1 25 | m_ChangeStopsCallbacks: 0 26 | m_CallbacksOnDisable: 1 27 | m_AutoSyncTransforms: 1 28 | m_AlwaysShowColliders: 0 29 | m_ShowColliderSleep: 1 30 | m_ShowColliderContacts: 0 31 | m_ShowColliderAABB: 0 32 | m_ContactArrowScale: 0.2 33 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 34 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 35 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 36 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 37 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 38 | -------------------------------------------------------------------------------- /Assets/Scripts/CrumpleMesh.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | // This script is placed in public domain. The author takes no responsibility for any possible harm. 4 | public class CrumpleMesh : MonoBehaviour 5 | { 6 | public float scale = 1.0f; 7 | public float speed = 1.0f; 8 | public bool recalculateNormals = false; 9 | 10 | private Perlin noise; 11 | private Vector3[] baseVertices; 12 | 13 | private void Start() 14 | { 15 | noise = new Perlin(); 16 | } 17 | 18 | void Update() 19 | { 20 | Mesh mesh = GetComponent().mesh; 21 | 22 | if (baseVertices == null) 23 | { 24 | baseVertices = mesh.vertices; 25 | } 26 | 27 | Vector3[] vertices = new Vector3[baseVertices.Length]; 28 | 29 | float timeX = Time.time * speed + 0.1365143f; 30 | float timeY = Time.time * speed + 1.21688f; 31 | float timeZ = Time.time * speed + 2.5564f; 32 | 33 | for (int i = 0; i < vertices.Length; i++) 34 | { 35 | Vector3 vertex = baseVertices[i]; 36 | vertex.x += noise.Noise(timeX + vertex.x, timeX + vertex.y, timeX + vertex.z) * scale; 37 | vertex.y += noise.Noise(timeY + vertex.x, timeY + vertex.y, timeY + vertex.z) * scale; 38 | vertex.z += noise.Noise(timeZ + vertex.x, timeZ + vertex.y, timeZ + vertex.z) * scale; 39 | 40 | vertices[i] = vertex; 41 | } 42 | 43 | mesh.vertices = vertices; 44 | 45 | if (recalculateNormals) 46 | { 47 | mesh.RecalculateNormals(); 48 | } 49 | mesh.RecalculateBounds(); 50 | } 51 | } -------------------------------------------------------------------------------- /Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.ads": "2.0.8", 4 | "com.unity.analytics": "2.0.16", 5 | "com.unity.package-manager-ui": "1.9.11", 6 | "com.unity.purchasing": "2.0.3", 7 | "com.unity.textmeshpro": "1.2.4", 8 | "com.unity.modules.ai": "1.0.0", 9 | "com.unity.modules.animation": "1.0.0", 10 | "com.unity.modules.assetbundle": "1.0.0", 11 | "com.unity.modules.audio": "1.0.0", 12 | "com.unity.modules.cloth": "1.0.0", 13 | "com.unity.modules.director": "1.0.0", 14 | "com.unity.modules.imageconversion": "1.0.0", 15 | "com.unity.modules.imgui": "1.0.0", 16 | "com.unity.modules.jsonserialize": "1.0.0", 17 | "com.unity.modules.particlesystem": "1.0.0", 18 | "com.unity.modules.physics": "1.0.0", 19 | "com.unity.modules.physics2d": "1.0.0", 20 | "com.unity.modules.screencapture": "1.0.0", 21 | "com.unity.modules.terrain": "1.0.0", 22 | "com.unity.modules.terrainphysics": "1.0.0", 23 | "com.unity.modules.tilemap": "1.0.0", 24 | "com.unity.modules.ui": "1.0.0", 25 | "com.unity.modules.uielements": "1.0.0", 26 | "com.unity.modules.umbra": "1.0.0", 27 | "com.unity.modules.unityanalytics": "1.0.0", 28 | "com.unity.modules.unitywebrequest": "1.0.0", 29 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 30 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 31 | "com.unity.modules.unitywebrequesttexture": "1.0.0", 32 | "com.unity.modules.unitywebrequestwww": "1.0.0", 33 | "com.unity.modules.vehicles": "1.0.0", 34 | "com.unity.modules.video": "1.0.0", 35 | "com.unity.modules.vr": "1.0.0", 36 | "com.unity.modules.wind": "1.0.0", 37 | "com.unity.modules.xr": "1.0.0" 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /Assets/Scripts/Twist.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | // This script is placed in public domain. The author takes no responsibility for any possible harm. 4 | // twist a mesh by this amount 5 | public class Twist : MonoBehaviour 6 | { 7 | public float twist = 1.0f; 8 | 9 | public float inputSensitivity = 1.5f; 10 | 11 | private Vector3[] baseVertices; 12 | private Vector3[] baseNormals; 13 | 14 | private void Update() 15 | { 16 | twist += Input.GetAxis("Horizontal") * inputSensitivity * Time.deltaTime; 17 | 18 | Mesh mesh = GetComponent().mesh; 19 | 20 | if (baseVertices == null) 21 | { 22 | baseVertices = mesh.vertices; 23 | } 24 | 25 | if (baseNormals == null) 26 | { 27 | baseNormals = mesh.normals; 28 | } 29 | 30 | Vector3[] vertices = new Vector3[baseVertices.Length]; 31 | Vector3[] normals = new Vector3[baseVertices.Length]; 32 | 33 | for (int i = 0; i < vertices.Length; i++) 34 | { 35 | vertices[i] = DoTwist(baseVertices[i], baseVertices[i].y * twist); 36 | normals[i] = DoTwist(baseNormals[i], baseVertices[i].y * twist); 37 | } 38 | 39 | mesh.vertices = vertices; 40 | mesh.normals = vertices; 41 | 42 | mesh.RecalculateNormals(); 43 | mesh.RecalculateBounds(); 44 | } 45 | 46 | private Vector3 DoTwist(Vector3 pos, float t) 47 | { 48 | float st = Mathf.Sin(t); 49 | float ct = Mathf.Cos(t); 50 | Vector3 new_pos = Vector3.zero; 51 | 52 | new_pos.x = pos.x * ct - pos.z * st; 53 | new_pos.z = pos.x * st + pos.z * ct; 54 | new_pos.y = pos.y; 55 | 56 | return new_pos; 57 | } 58 | } -------------------------------------------------------------------------------- /Assets/Scripts/Utils/KeyboardOrbit.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | [AddComponentMenu("Camera-Control/Key Mouse Orbit")] 4 | public class KeyboardOrbit : MonoBehaviour 5 | { 6 | public Transform target; 7 | public float distanceMin = 10.0f; 8 | public float distanceMax = 15.0f; 9 | public float distanceInitial = 12.5f; 10 | public float scrollSpeed = 1.0f; 11 | 12 | public float xSpeed = 250.0f; 13 | public float ySpeed = 120.0f; 14 | 15 | public int yMinLimit = -20; 16 | public int yMaxLimit = 80; 17 | 18 | private float x = 0.0f; 19 | private float y = 0.0f; 20 | private float distanceCurrent = 0.0f; 21 | 22 | void Start() 23 | { 24 | Vector3 angles = transform.eulerAngles; 25 | x = angles.y; 26 | y = angles.x; 27 | 28 | distanceCurrent = distanceInitial; 29 | 30 | // Make the rigid body not change rotation 31 | if (GetComponent()) 32 | { 33 | GetComponent().freezeRotation = true; 34 | } 35 | } 36 | 37 | private void LateUpdate() 38 | { 39 | if (target) 40 | { 41 | x += Input.GetAxis("Horizontal") * xSpeed * 0.02f; 42 | y -= Input.GetAxis("Vertical") * ySpeed * 0.02f; 43 | distanceCurrent -= Input.GetAxis("Mouse ScrollWheel") * scrollSpeed; 44 | 45 | distanceCurrent = Mathf.Clamp(distanceCurrent, distanceMin, distanceMax); 46 | y = ClampAngle(y, yMinLimit, yMaxLimit); 47 | 48 | Quaternion rotation = Quaternion.Euler(y, x, 0); 49 | Vector3 position = rotation * new Vector3(0.0f, 0.0f, -distanceCurrent) + target.position; 50 | 51 | transform.rotation = rotation; 52 | transform.position = position; 53 | } 54 | } 55 | 56 | private static float ClampAngle(float angle, float min, float max) 57 | { 58 | if (angle < -360) 59 | { 60 | angle += 360; 61 | } 62 | 63 | if (angle > 360) 64 | { 65 | angle -= 360; 66 | } 67 | 68 | return Mathf.Clamp(angle, min, max); 69 | } 70 | } -------------------------------------------------------------------------------- /Assets/Scripts/FractalTexture.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | // This script is placed in public domain. The author takes no responsibility for any possible harm. 4 | public class FractalTexture : MonoBehaviour 5 | { 6 | public bool gray = true; 7 | public int width = 128; 8 | public int height = 128; 9 | 10 | public float lacunarity = 6.18f; 11 | public float h = 0.69f; 12 | public float octaves = 8.379f; 13 | public float offset = 0.75f; 14 | public float scale = 0.09f; 15 | 16 | public float offsetPos = 0.0f; 17 | 18 | private Texture2D texture; 19 | private Perlin perlin; 20 | private FractalNoise fractal; 21 | 22 | void Start() 23 | { 24 | texture = new Texture2D(width, height, TextureFormat.RGB24, false); 25 | GetComponent().material.mainTexture = texture; 26 | } 27 | 28 | void Update() 29 | { 30 | Calculate(); 31 | } 32 | 33 | private void Calculate() 34 | { 35 | if (perlin == null) 36 | { 37 | perlin = new Perlin(); 38 | } 39 | fractal = new FractalNoise(h, lacunarity, octaves, perlin); 40 | 41 | for (int y = 0; y < height; y++) 42 | { 43 | for (int x = 0; x < width; x++) 44 | { 45 | if (gray) 46 | { 47 | float value = fractal.HybridMultifractal(x * scale + Time.time, y * scale + Time.time, offset); 48 | texture.SetPixel(x, y, new Color(value, value, value, value)); 49 | } 50 | else 51 | { 52 | offsetPos = Time.time; 53 | float valuex = fractal.HybridMultifractal(x * scale + offsetPos * 0.6f, y * scale + offsetPos * 0.6f, offset); 54 | float valuey = fractal.HybridMultifractal(x * scale + 161.7f + offsetPos * 0.2f, y * scale + 161.7f + offsetPos * 0.3f, offset); 55 | float valuez = fractal.HybridMultifractal(x * scale + 591.1f + offsetPos, y * scale + 591.1f + offsetPos * 0.1f, offset); 56 | texture.SetPixel(x, y, new Color(valuex, valuey, valuez, 1)); 57 | } 58 | } 59 | } 60 | texture.Apply(); 61 | } 62 | } -------------------------------------------------------------------------------- /Assets/Materials/diffuse.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_PrefabInternal: {fileID: 0} 9 | m_Name: diffuse 10 | m_Shader: {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _BumpMap: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | - _DetailAlbedoMap: 26 | m_Texture: {fileID: 0} 27 | m_Scale: {x: 1, y: 1} 28 | m_Offset: {x: 0, y: 0} 29 | - _DetailMask: 30 | m_Texture: {fileID: 0} 31 | m_Scale: {x: 1, y: 1} 32 | m_Offset: {x: 0, y: 0} 33 | - _DetailNormalMap: 34 | m_Texture: {fileID: 0} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | - _EmissionMap: 38 | m_Texture: {fileID: 0} 39 | m_Scale: {x: 1, y: 1} 40 | m_Offset: {x: 0, y: 0} 41 | - _MainTex: 42 | m_Texture: {fileID: 0} 43 | m_Scale: {x: 1, y: 1} 44 | m_Offset: {x: 0, y: 0} 45 | - _MetallicGlossMap: 46 | m_Texture: {fileID: 0} 47 | m_Scale: {x: 1, y: 1} 48 | m_Offset: {x: 0, y: 0} 49 | - _OcclusionMap: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | - _ParallaxMap: 54 | m_Texture: {fileID: 0} 55 | m_Scale: {x: 1, y: 1} 56 | m_Offset: {x: 0, y: 0} 57 | m_Floats: 58 | - _BumpScale: 1 59 | - _Cutoff: 0.5 60 | - _DetailNormalMapScale: 1 61 | - _DstBlend: 0 62 | - _GlossMapScale: 1 63 | - _Glossiness: 0.5 64 | - _GlossyReflections: 1 65 | - _Metallic: 0 66 | - _Mode: 0 67 | - _OcclusionStrength: 1 68 | - _Parallax: 0.02 69 | - _SmoothnessTextureChannel: 0 70 | - _SpecularHighlights: 1 71 | - _SrcBlend: 1 72 | - _UVSec: 0 73 | - _ZWrite: 1 74 | m_Colors: 75 | - _Color: {r: 1, g: 1, b: 1, a: 1} 76 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 77 | -------------------------------------------------------------------------------- /Assets/Materials/a sphere-lambert1.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_PrefabInternal: {fileID: 0} 9 | m_Name: a sphere-lambert1 10 | m_Shader: {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _BumpMap: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | - _DetailAlbedoMap: 26 | m_Texture: {fileID: 0} 27 | m_Scale: {x: 1, y: 1} 28 | m_Offset: {x: 0, y: 0} 29 | - _DetailMask: 30 | m_Texture: {fileID: 0} 31 | m_Scale: {x: 1, y: 1} 32 | m_Offset: {x: 0, y: 0} 33 | - _DetailNormalMap: 34 | m_Texture: {fileID: 0} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | - _EmissionMap: 38 | m_Texture: {fileID: 0} 39 | m_Scale: {x: 1, y: 1} 40 | m_Offset: {x: 0, y: 0} 41 | - _MainTex: 42 | m_Texture: {fileID: 0} 43 | m_Scale: {x: 1, y: 1} 44 | m_Offset: {x: 0, y: 0} 45 | - _MetallicGlossMap: 46 | m_Texture: {fileID: 0} 47 | m_Scale: {x: 1, y: 1} 48 | m_Offset: {x: 0, y: 0} 49 | - _OcclusionMap: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | - _ParallaxMap: 54 | m_Texture: {fileID: 0} 55 | m_Scale: {x: 1, y: 1} 56 | m_Offset: {x: 0, y: 0} 57 | m_Floats: 58 | - _BumpScale: 1 59 | - _Cutoff: 0.5 60 | - _DetailNormalMapScale: 1 61 | - _DstBlend: 0 62 | - _GlossMapScale: 1 63 | - _Glossiness: 0.5 64 | - _GlossyReflections: 1 65 | - _Metallic: 0 66 | - _Mode: 0 67 | - _OcclusionStrength: 1 68 | - _Parallax: 0.02 69 | - _SmoothnessTextureChannel: 0 70 | - _SpecularHighlights: 1 71 | - _SrcBlend: 1 72 | - _UVSec: 0 73 | - _ZWrite: 1 74 | m_Colors: 75 | - _Color: {r: 1, g: 1, b: 1, a: 0.6509804} 76 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 77 | -------------------------------------------------------------------------------- /Assets/Materials/heightmap.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_PrefabInternal: {fileID: 0} 9 | m_Name: heightmap 10 | m_Shader: {fileID: 2, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _BumpMap: 22 | m_Texture: {fileID: 2800000, guid: 9b1593171cad40f44bf699d6cec7fc61, type: 3} 23 | m_Scale: {x: 5, y: 5} 24 | m_Offset: {x: 0, y: 0} 25 | - _DetailAlbedoMap: 26 | m_Texture: {fileID: 0} 27 | m_Scale: {x: 1, y: 1} 28 | m_Offset: {x: 0, y: 0} 29 | - _DetailMask: 30 | m_Texture: {fileID: 0} 31 | m_Scale: {x: 1, y: 1} 32 | m_Offset: {x: 0, y: 0} 33 | - _DetailNormalMap: 34 | m_Texture: {fileID: 0} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | - _EmissionMap: 38 | m_Texture: {fileID: 0} 39 | m_Scale: {x: 1, y: 1} 40 | m_Offset: {x: 0, y: 0} 41 | - _MainTex: 42 | m_Texture: {fileID: 2800000, guid: fde20554bf6fd7841b2466980ccc177c, type: 3} 43 | m_Scale: {x: 1, y: 1} 44 | m_Offset: {x: 0, y: 0} 45 | - _MetallicGlossMap: 46 | m_Texture: {fileID: 0} 47 | m_Scale: {x: 1, y: 1} 48 | m_Offset: {x: 0, y: 0} 49 | - _OcclusionMap: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | - _ParallaxMap: 54 | m_Texture: {fileID: 0} 55 | m_Scale: {x: 1, y: 1} 56 | m_Offset: {x: 0, y: 0} 57 | m_Floats: 58 | - _BumpScale: 1 59 | - _Cutoff: 0.5 60 | - _DetailNormalMapScale: 1 61 | - _DstBlend: 0 62 | - _GlossMapScale: 1 63 | - _Glossiness: 0.5 64 | - _GlossyReflections: 1 65 | - _Metallic: 0 66 | - _Mode: 0 67 | - _OcclusionStrength: 1 68 | - _Parallax: 0.02 69 | - _SmoothnessTextureChannel: 0 70 | - _SpecularHighlights: 1 71 | - _SrcBlend: 1 72 | - _UVSec: 0 73 | - _ZWrite: 1 74 | m_Colors: 75 | - _Color: {r: 1, g: 1, b: 1, a: 1} 76 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 77 | -------------------------------------------------------------------------------- /Assets/Materials/extrude-plane-lambert2.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_PrefabInternal: {fileID: 0} 9 | m_Name: extrude-plane-lambert2 10 | m_Shader: {fileID: 3, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _BumpMap: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | - _DetailAlbedoMap: 26 | m_Texture: {fileID: 0} 27 | m_Scale: {x: 1, y: 1} 28 | m_Offset: {x: 0, y: 0} 29 | - _DetailMask: 30 | m_Texture: {fileID: 0} 31 | m_Scale: {x: 1, y: 1} 32 | m_Offset: {x: 0, y: 0} 33 | - _DetailNormalMap: 34 | m_Texture: {fileID: 0} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | - _EmissionMap: 38 | m_Texture: {fileID: 0} 39 | m_Scale: {x: 1, y: 1} 40 | m_Offset: {x: 0, y: 0} 41 | - _MainTex: 42 | m_Texture: {fileID: 0} 43 | m_Scale: {x: 1, y: 1} 44 | m_Offset: {x: 0, y: 0} 45 | - _MetallicGlossMap: 46 | m_Texture: {fileID: 0} 47 | m_Scale: {x: 1, y: 1} 48 | m_Offset: {x: 0, y: 0} 49 | - _OcclusionMap: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | - _ParallaxMap: 54 | m_Texture: {fileID: 0} 55 | m_Scale: {x: 1, y: 1} 56 | m_Offset: {x: 0, y: 0} 57 | m_Floats: 58 | - _BumpScale: 1 59 | - _Cutoff: 0.5 60 | - _DetailNormalMapScale: 1 61 | - _DstBlend: 0 62 | - _GlossMapScale: 1 63 | - _Glossiness: 0.5 64 | - _GlossyReflections: 1 65 | - _Metallic: 0 66 | - _Mode: 0 67 | - _OcclusionStrength: 1 68 | - _Parallax: 0.02 69 | - _Shininess: 0.078125 70 | - _SmoothnessTextureChannel: 0 71 | - _SpecularHighlights: 1 72 | - _SrcBlend: 1 73 | - _UVSec: 0 74 | - _ZWrite: 1 75 | m_Colors: 76 | - _Color: {r: 0.6627451, g: 0.69411767, b: 1, a: 1} 77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 78 | - _SpecColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 79 | -------------------------------------------------------------------------------- /Assets/Materials/trail.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_PrefabInternal: {fileID: 0} 9 | m_Name: trail 10 | m_Shader: {fileID: 200, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _BumpMap: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | - _DetailAlbedoMap: 26 | m_Texture: {fileID: 0} 27 | m_Scale: {x: 1, y: 1} 28 | m_Offset: {x: 0, y: 0} 29 | - _DetailMask: 30 | m_Texture: {fileID: 0} 31 | m_Scale: {x: 1, y: 1} 32 | m_Offset: {x: 0, y: 0} 33 | - _DetailNormalMap: 34 | m_Texture: {fileID: 0} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | - _EmissionMap: 38 | m_Texture: {fileID: 0} 39 | m_Scale: {x: 1, y: 1} 40 | m_Offset: {x: 0, y: 0} 41 | - _MainTex: 42 | m_Texture: {fileID: 2800000, guid: 787b5ac2baa18df41b995966f986fe64, type: 3} 43 | m_Scale: {x: 1, y: 1} 44 | m_Offset: {x: 0, y: 0} 45 | - _MetallicGlossMap: 46 | m_Texture: {fileID: 0} 47 | m_Scale: {x: 1, y: 1} 48 | m_Offset: {x: 0, y: 0} 49 | - _OcclusionMap: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | - _ParallaxMap: 54 | m_Texture: {fileID: 0} 55 | m_Scale: {x: 1, y: 1} 56 | m_Offset: {x: 0, y: 0} 57 | m_Floats: 58 | - _BumpScale: 1 59 | - _Cutoff: 0.5 60 | - _DetailNormalMapScale: 1 61 | - _DstBlend: 0 62 | - _GlossMapScale: 1 63 | - _Glossiness: 0.5 64 | - _GlossyReflections: 1 65 | - _InvFade: 1 66 | - _Metallic: 0 67 | - _Mode: 0 68 | - _OcclusionStrength: 1 69 | - _Parallax: 0.02 70 | - _SmoothnessTextureChannel: 0 71 | - _SpecularHighlights: 1 72 | - _SrcBlend: 1 73 | - _UVSec: 0 74 | - _ZWrite: 1 75 | m_Colors: 76 | - _Color: {r: 1, g: 1, b: 1, a: 1} 77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 78 | - _TintColor: {r: 0.5, g: 0.5, b: 0.5, a: 0.5} 79 | -------------------------------------------------------------------------------- /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: 12 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_LegacyDeferred: 17 | m_Mode: 1 18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 19 | m_DepthNormals: 20 | m_Mode: 1 21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 22 | m_MotionVectors: 23 | m_Mode: 1 24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LightHalo: 26 | m_Mode: 1 27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 28 | m_LensFlare: 29 | m_Mode: 1 30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 31 | m_AlwaysIncludedShaders: 32 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 33 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} 37 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 38 | - {fileID: 10783, guid: 0000000000000000f000000000000000, type: 0} 39 | m_PreloadedShaders: [] 40 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 41 | type: 0} 42 | m_CustomRenderPipeline: {fileID: 0} 43 | m_TransparencySortMode: 0 44 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 45 | m_DefaultRenderingPath: 1 46 | m_DefaultMobileRenderingPath: 1 47 | m_TierSettings: [] 48 | m_LightmapStripping: 0 49 | m_FogStripping: 0 50 | m_InstancingStripping: 0 51 | m_LightmapKeepPlain: 1 52 | m_LightmapKeepDirCombined: 1 53 | m_LightmapKeepDynamicPlain: 1 54 | m_LightmapKeepDynamicDirCombined: 1 55 | m_LightmapKeepShadowMask: 1 56 | m_LightmapKeepSubtractive: 1 57 | m_FogKeepLinear: 1 58 | m_FogKeepExp: 1 59 | m_FogKeepExp2: 1 60 | m_AlbedoSwatchInfos: [] 61 | m_LightsUseLinearIntensity: 0 62 | m_LightsUseColorTemperature: 0 63 | -------------------------------------------------------------------------------- /Assets/Materials/Lightning Mat.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_PrefabInternal: {fileID: 0} 9 | m_Name: Lightning Mat 10 | m_Shader: {fileID: 200, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _BumpMap: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | - _DetailAlbedoMap: 26 | m_Texture: {fileID: 0} 27 | m_Scale: {x: 1, y: 1} 28 | m_Offset: {x: 0, y: 0} 29 | - _DetailMask: 30 | m_Texture: {fileID: 0} 31 | m_Scale: {x: 1, y: 1} 32 | m_Offset: {x: 0, y: 0} 33 | - _DetailNormalMap: 34 | m_Texture: {fileID: 0} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | - _EmissionMap: 38 | m_Texture: {fileID: 0} 39 | m_Scale: {x: 1, y: 1} 40 | m_Offset: {x: 0, y: 0} 41 | - _MainTex: 42 | m_Texture: {fileID: 2800000, guid: 62fea5a345bfe924981c3a5091973ea9, type: 3} 43 | m_Scale: {x: 1, y: 1} 44 | m_Offset: {x: 0, y: 0} 45 | - _MetallicGlossMap: 46 | m_Texture: {fileID: 0} 47 | m_Scale: {x: 1, y: 1} 48 | m_Offset: {x: 0, y: 0} 49 | - _OcclusionMap: 50 | m_Texture: {fileID: 0} 51 | m_Scale: {x: 1, y: 1} 52 | m_Offset: {x: 0, y: 0} 53 | - _ParallaxMap: 54 | m_Texture: {fileID: 0} 55 | m_Scale: {x: 1, y: 1} 56 | m_Offset: {x: 0, y: 0} 57 | m_Floats: 58 | - _BumpScale: 1 59 | - _Cutoff: 0.5 60 | - _DetailNormalMapScale: 1 61 | - _DstBlend: 0 62 | - _GlossMapScale: 1 63 | - _Glossiness: 0.5 64 | - _GlossyReflections: 1 65 | - _InvFade: 1 66 | - _Metallic: 0 67 | - _Mode: 0 68 | - _OcclusionStrength: 1 69 | - _Parallax: 0.02 70 | - _SmoothnessTextureChannel: 0 71 | - _SpecularHighlights: 1 72 | - _SrcBlend: 1 73 | - _UVSec: 0 74 | - _ZWrite: 1 75 | m_Colors: 76 | - _Color: {r: 1, g: 1, b: 1, a: 1} 77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 78 | - _TintColor: {r: 0.4509804, g: 0.7294118, b: 1, a: 0.30980393} 79 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Created by https://www.gitignore.io/api/rider,unity 2 | 3 | ### Rider ### 4 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm 5 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 6 | 7 | # User-specific stuff 8 | .idea/**/workspace.xml 9 | .idea/**/tasks.xml 10 | .idea/**/usage.statistics.xml 11 | .idea/**/dictionaries 12 | .idea/**/shelf 13 | 14 | # Generated files 15 | .idea/**/contentModel.xml 16 | 17 | # Sensitive or high-churn files 18 | .idea/**/dataSources/ 19 | .idea/**/dataSources.ids 20 | .idea/**/dataSources.local.xml 21 | .idea/**/sqlDataSources.xml 22 | .idea/**/dynamic.xml 23 | .idea/**/uiDesigner.xml 24 | .idea/**/dbnavigator.xml 25 | 26 | # Gradle 27 | .idea/**/gradle.xml 28 | .idea/**/libraries 29 | 30 | # Gradle and Maven with auto-import 31 | # When using Gradle or Maven with auto-import, you should exclude module files, 32 | # since they will be recreated, and may cause churn. Uncomment if using 33 | # auto-import. 34 | # .idea/modules.xml 35 | # .idea/*.iml 36 | # .idea/modules 37 | 38 | # CMake 39 | cmake-build-*/ 40 | 41 | # Mongo Explorer plugin 42 | .idea/**/mongoSettings.xml 43 | 44 | # File-based project format 45 | *.iws 46 | 47 | # IntelliJ 48 | out/ 49 | 50 | # mpeltonen/sbt-idea plugin 51 | .idea_modules/ 52 | 53 | # JIRA plugin 54 | atlassian-ide-plugin.xml 55 | 56 | # Cursive Clojure plugin 57 | .idea/replstate.xml 58 | 59 | # Crashlytics plugin (for Android Studio and IntelliJ) 60 | com_crashlytics_export_strings.xml 61 | crashlytics.properties 62 | crashlytics-build.properties 63 | fabric.properties 64 | 65 | # Editor-based Rest Client 66 | .idea/httpRequests 67 | 68 | # Android studio 3.1+ serialized cache file 69 | .idea/caches/build_file_checksums.ser 70 | 71 | ### Unity ### 72 | [Ll]ibrary/ 73 | [Tt]emp/ 74 | [Oo]bj/ 75 | [Bb]uild/ 76 | [Bb]uilds/ 77 | Assets/AssetStoreTools* 78 | 79 | # Visual Studio cache directory 80 | .vs/ 81 | 82 | # Autogenerated VS/MD/Consulo solution and project files 83 | ExportedObj/ 84 | .consulo/ 85 | *.csproj 86 | *.unityproj 87 | *.sln 88 | *.suo 89 | *.tmp 90 | *.user 91 | *.userprefs 92 | *.pidb 93 | *.booproj 94 | *.svd 95 | *.pdb 96 | *.opendb 97 | *.VC.db 98 | 99 | # Unity3D generated meta files 100 | *.pidb.meta 101 | *.pdb.meta 102 | 103 | # Unity3D Generated File On Crash Reports 104 | sysinfo.txt 105 | 106 | # Builds 107 | *.apk 108 | *.unitypackage 109 | 110 | # End of https://www.gitignore.io/api/rider,unity -------------------------------------------------------------------------------- /Assets/Resources/TextMesh Pro/Resources/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/Models/cube.fbx.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a79abc9759caee04c86280502fec9393 3 | ModelImporter: 4 | serializedVersion: 23 5 | fileIDToRecycleName: 6 | 100000: //RootNode 7 | 400000: //RootNode 8 | 2100000: lambert1 9 | 2300000: //RootNode 10 | 3300000: //RootNode 11 | 4300000: pCube1 12 | externalObjects: {} 13 | materials: 14 | importMaterials: 0 15 | materialName: 0 16 | materialSearch: 1 17 | materialLocation: 1 18 | animations: 19 | legacyGenerateAnimations: 4 20 | bakeSimulation: 0 21 | resampleCurves: 1 22 | optimizeGameObjects: 0 23 | motionNodeName: 24 | rigImportErrors: 25 | rigImportWarnings: 26 | animationImportErrors: 27 | animationImportWarnings: 28 | animationRetargetingWarnings: 29 | animationDoRetargetingWarnings: 0 30 | importAnimatedCustomProperties: 0 31 | importConstraints: 0 32 | animationCompression: 1 33 | animationRotationError: 0.5 34 | animationPositionError: 0.5 35 | animationScaleError: 0.5 36 | animationWrapMode: 0 37 | extraExposedTransformPaths: [] 38 | extraUserProperties: [] 39 | clipAnimations: [] 40 | isReadable: 1 41 | meshes: 42 | lODScreenPercentages: [] 43 | globalScale: 1 44 | meshCompression: 0 45 | addColliders: 0 46 | importVisibility: 0 47 | importBlendShapes: 1 48 | importCameras: 0 49 | importLights: 0 50 | swapUVChannels: 0 51 | generateSecondaryUV: 0 52 | useFileUnits: 1 53 | optimizeMeshForGPU: 1 54 | keepQuads: 0 55 | weldVertices: 1 56 | preserveHierarchy: 0 57 | indexFormat: 0 58 | secondaryUVAngleDistortion: 8 59 | secondaryUVAreaDistortion: 15.000001 60 | secondaryUVHardAngle: 88 61 | secondaryUVPackMargin: 4 62 | useFileScale: 0 63 | previousCalculatedGlobalScale: 1 64 | hasPreviousCalculatedGlobalScale: 0 65 | tangentSpace: 66 | normalSmoothAngle: 60 67 | normalImportMode: 1 68 | tangentImportMode: 3 69 | normalCalculationMode: 4 70 | importAnimation: 0 71 | copyAvatar: 0 72 | humanDescription: 73 | serializedVersion: 2 74 | human: [] 75 | skeleton: [] 76 | armTwist: 0.5 77 | foreArmTwist: 0.5 78 | upperLegTwist: 0.5 79 | legTwist: 0.5 80 | armStretch: 0.05 81 | legStretch: 0.05 82 | feetSpacing: 0 83 | rootMotionBoneName: 84 | rootMotionBoneRotation: {x: 0, y: 0, z: 0, w: 1} 85 | hasTranslationDoF: 0 86 | hasExtraRoot: 0 87 | skeletonHasParents: 1 88 | lastHumanDescriptionAvatarSource: {instanceID: 0} 89 | animationType: 0 90 | humanoidOversampling: 1 91 | additionalBone: 0 92 | userData: 93 | assetBundleName: 94 | assetBundleVariant: 95 | -------------------------------------------------------------------------------- /Assets/Models/extrude-outline.fbx.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0641ae73baa887047aacecd5fe85b378 3 | ModelImporter: 4 | serializedVersion: 23 5 | fileIDToRecycleName: 6 | 100000: //RootNode 7 | 400000: //RootNode 8 | 2100000: lambert2 9 | 2300000: //RootNode 10 | 3300000: //RootNode 11 | 4300000: pPlane1 12 | externalObjects: {} 13 | materials: 14 | importMaterials: 0 15 | materialName: 0 16 | materialSearch: 1 17 | materialLocation: 1 18 | animations: 19 | legacyGenerateAnimations: 4 20 | bakeSimulation: 0 21 | resampleCurves: 1 22 | optimizeGameObjects: 0 23 | motionNodeName: 24 | rigImportErrors: 25 | rigImportWarnings: 26 | animationImportErrors: 27 | animationImportWarnings: 28 | animationRetargetingWarnings: 29 | animationDoRetargetingWarnings: 0 30 | importAnimatedCustomProperties: 0 31 | importConstraints: 0 32 | animationCompression: 1 33 | animationRotationError: 0.5 34 | animationPositionError: 0.5 35 | animationScaleError: 0.5 36 | animationWrapMode: 0 37 | extraExposedTransformPaths: [] 38 | extraUserProperties: [] 39 | clipAnimations: [] 40 | isReadable: 1 41 | meshes: 42 | lODScreenPercentages: [] 43 | globalScale: 1 44 | meshCompression: 0 45 | addColliders: 0 46 | importVisibility: 0 47 | importBlendShapes: 1 48 | importCameras: 0 49 | importLights: 0 50 | swapUVChannels: 0 51 | generateSecondaryUV: 0 52 | useFileUnits: 1 53 | optimizeMeshForGPU: 1 54 | keepQuads: 0 55 | weldVertices: 1 56 | preserveHierarchy: 0 57 | indexFormat: 0 58 | secondaryUVAngleDistortion: 8 59 | secondaryUVAreaDistortion: 15.000001 60 | secondaryUVHardAngle: 88 61 | secondaryUVPackMargin: 4 62 | useFileScale: 0 63 | previousCalculatedGlobalScale: 1 64 | hasPreviousCalculatedGlobalScale: 0 65 | tangentSpace: 66 | normalSmoothAngle: 60 67 | normalImportMode: 1 68 | tangentImportMode: 3 69 | normalCalculationMode: 4 70 | importAnimation: 0 71 | copyAvatar: 0 72 | humanDescription: 73 | serializedVersion: 2 74 | human: [] 75 | skeleton: [] 76 | armTwist: 0.5 77 | foreArmTwist: 0.5 78 | upperLegTwist: 0.5 79 | legTwist: 0.5 80 | armStretch: 0.05 81 | legStretch: 0.05 82 | feetSpacing: 0 83 | rootMotionBoneName: 84 | rootMotionBoneRotation: {x: 0, y: 0, z: 0, w: 1} 85 | hasTranslationDoF: 0 86 | hasExtraRoot: 0 87 | skeletonHasParents: 1 88 | lastHumanDescriptionAvatarSource: {instanceID: 0} 89 | animationType: 0 90 | humanoidOversampling: 1 91 | additionalBone: 0 92 | userData: 93 | assetBundleName: 94 | assetBundleVariant: 95 | -------------------------------------------------------------------------------- /Assets/Models/sphere-highpoly.fbx.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 586e1fe31629e24429edf7574deb94f0 3 | ModelImporter: 4 | serializedVersion: 23 5 | fileIDToRecycleName: 6 | 100000: //RootNode 7 | 400000: //RootNode 8 | 2100000: lambert2 9 | 2300000: //RootNode 10 | 3300000: //RootNode 11 | 4300000: subdivSphere1 12 | externalObjects: {} 13 | materials: 14 | importMaterials: 0 15 | materialName: 0 16 | materialSearch: 1 17 | materialLocation: 1 18 | animations: 19 | legacyGenerateAnimations: 4 20 | bakeSimulation: 0 21 | resampleCurves: 1 22 | optimizeGameObjects: 0 23 | motionNodeName: 24 | rigImportErrors: 25 | rigImportWarnings: 26 | animationImportErrors: 27 | animationImportWarnings: 28 | animationRetargetingWarnings: 29 | animationDoRetargetingWarnings: 0 30 | importAnimatedCustomProperties: 0 31 | importConstraints: 0 32 | animationCompression: 1 33 | animationRotationError: 0.5 34 | animationPositionError: 0.5 35 | animationScaleError: 0.5 36 | animationWrapMode: 0 37 | extraExposedTransformPaths: [] 38 | extraUserProperties: [] 39 | clipAnimations: [] 40 | isReadable: 1 41 | meshes: 42 | lODScreenPercentages: [] 43 | globalScale: 1 44 | meshCompression: 0 45 | addColliders: 0 46 | importVisibility: 0 47 | importBlendShapes: 1 48 | importCameras: 0 49 | importLights: 0 50 | swapUVChannels: 0 51 | generateSecondaryUV: 0 52 | useFileUnits: 1 53 | optimizeMeshForGPU: 1 54 | keepQuads: 0 55 | weldVertices: 1 56 | preserveHierarchy: 0 57 | indexFormat: 1 58 | secondaryUVAngleDistortion: 8 59 | secondaryUVAreaDistortion: 15.000001 60 | secondaryUVHardAngle: 88 61 | secondaryUVPackMargin: 4 62 | useFileScale: 0 63 | previousCalculatedGlobalScale: 1 64 | hasPreviousCalculatedGlobalScale: 0 65 | tangentSpace: 66 | normalSmoothAngle: 60 67 | normalImportMode: 1 68 | tangentImportMode: 3 69 | normalCalculationMode: 0 70 | importAnimation: 0 71 | copyAvatar: 0 72 | humanDescription: 73 | serializedVersion: 2 74 | human: [] 75 | skeleton: [] 76 | armTwist: 0.5 77 | foreArmTwist: 0.5 78 | upperLegTwist: 0.5 79 | legTwist: 0.5 80 | armStretch: 0.05 81 | legStretch: 0.05 82 | feetSpacing: 0 83 | rootMotionBoneName: 84 | rootMotionBoneRotation: {x: 0, y: 0, z: 0, w: 1} 85 | hasTranslationDoF: 0 86 | hasExtraRoot: 0 87 | skeletonHasParents: 1 88 | lastHumanDescriptionAvatarSource: {instanceID: 0} 89 | animationType: 0 90 | humanoidOversampling: 1 91 | additionalBone: 0 92 | userData: 93 | assetBundleName: 94 | assetBundleVariant: 95 | -------------------------------------------------------------------------------- /Assets/Textures/trail.tiff.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 787b5ac2baa18df41b995966f986fe64 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | externalObjects: {} 6 | serializedVersion: 7 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 0 53 | spriteTessellationDetail: -1 54 | textureType: 0 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 64 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | - serializedVersion: 2 73 | buildTarget: Standalone 74 | maxTextureSize: 64 75 | resizeAlgorithm: 0 76 | textureFormat: -1 77 | textureCompression: 1 78 | compressionQuality: 50 79 | crunchedCompression: 0 80 | allowsAlphaSplitting: 0 81 | overridden: 0 82 | androidETC2FallbackOverride: 0 83 | spriteSheet: 84 | serializedVersion: 2 85 | sprites: [] 86 | outline: [] 87 | physicsShape: [] 88 | bones: [] 89 | spriteID: 90 | vertices: [] 91 | indices: 92 | edges: [] 93 | weights: [] 94 | spritePackingTag: 95 | pSDRemoveMatte: 0 96 | pSDShowRemoveMatteOption: 0 97 | userData: 98 | assetBundleName: 99 | assetBundleVariant: 100 | -------------------------------------------------------------------------------- /Assets/Textures/Lightning.psd.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 62fea5a345bfe924981c3a5091973ea9 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | externalObjects: {} 6 | serializedVersion: 7 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 0 53 | spriteTessellationDetail: -1 54 | textureType: 0 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 128 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | - serializedVersion: 2 73 | buildTarget: Standalone 74 | maxTextureSize: 128 75 | resizeAlgorithm: 0 76 | textureFormat: -1 77 | textureCompression: 1 78 | compressionQuality: 50 79 | crunchedCompression: 0 80 | allowsAlphaSplitting: 0 81 | overridden: 0 82 | androidETC2FallbackOverride: 0 83 | spriteSheet: 84 | serializedVersion: 2 85 | sprites: [] 86 | outline: [] 87 | physicsShape: [] 88 | bones: [] 89 | spriteID: 90 | vertices: [] 91 | indices: 92 | edges: [] 93 | weights: [] 94 | spritePackingTag: 95 | pSDRemoveMatte: 0 96 | pSDShowRemoveMatteOption: 0 97 | userData: 98 | assetBundleName: 99 | assetBundleVariant: 100 | -------------------------------------------------------------------------------- /Assets/Textures/heightmap.tiff.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fde20554bf6fd7841b2466980ccc177c 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | externalObjects: {} 6 | serializedVersion: 7 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 1 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 0 53 | spriteTessellationDetail: -1 54 | textureType: 0 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 128 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 0 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | - serializedVersion: 2 73 | buildTarget: Standalone 74 | maxTextureSize: 128 75 | resizeAlgorithm: 0 76 | textureFormat: -1 77 | textureCompression: 0 78 | compressionQuality: 50 79 | crunchedCompression: 0 80 | allowsAlphaSplitting: 0 81 | overridden: 0 82 | androidETC2FallbackOverride: 0 83 | spriteSheet: 84 | serializedVersion: 2 85 | sprites: [] 86 | outline: [] 87 | physicsShape: [] 88 | bones: [] 89 | spriteID: 90 | vertices: [] 91 | indices: 92 | edges: [] 93 | weights: [] 94 | spritePackingTag: 95 | pSDRemoveMatte: 0 96 | pSDShowRemoveMatteOption: 0 97 | userData: 98 | assetBundleName: 99 | assetBundleVariant: 100 | -------------------------------------------------------------------------------- /Assets/Models/half_torus.fbx.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 82dd491eb79e7ff47abf217be438cec7 3 | ModelImporter: 4 | serializedVersion: 23 5 | fileIDToRecycleName: 6 | 100000: //RootNode 7 | 400000: //RootNode 8 | 2100000: lambert1 9 | 2300000: //RootNode 10 | 3300000: //RootNode 11 | 4300000: pTorus1 12 | 2186277476908879412: ImportLogs 13 | externalObjects: {} 14 | materials: 15 | importMaterials: 0 16 | materialName: 0 17 | materialSearch: 1 18 | materialLocation: 1 19 | animations: 20 | legacyGenerateAnimations: 4 21 | bakeSimulation: 0 22 | resampleCurves: 1 23 | optimizeGameObjects: 0 24 | motionNodeName: 25 | rigImportErrors: 26 | rigImportWarnings: 27 | animationImportErrors: 28 | animationImportWarnings: 29 | animationRetargetingWarnings: 30 | animationDoRetargetingWarnings: 0 31 | importAnimatedCustomProperties: 0 32 | importConstraints: 0 33 | animationCompression: 1 34 | animationRotationError: 0.5 35 | animationPositionError: 0.5 36 | animationScaleError: 0.5 37 | animationWrapMode: 0 38 | extraExposedTransformPaths: [] 39 | extraUserProperties: [] 40 | clipAnimations: [] 41 | isReadable: 1 42 | meshes: 43 | lODScreenPercentages: [] 44 | globalScale: 1 45 | meshCompression: 0 46 | addColliders: 0 47 | importVisibility: 0 48 | importBlendShapes: 1 49 | importCameras: 0 50 | importLights: 0 51 | swapUVChannels: 0 52 | generateSecondaryUV: 0 53 | useFileUnits: 1 54 | optimizeMeshForGPU: 1 55 | keepQuads: 0 56 | weldVertices: 1 57 | preserveHierarchy: 0 58 | indexFormat: 0 59 | secondaryUVAngleDistortion: 8 60 | secondaryUVAreaDistortion: 15.000001 61 | secondaryUVHardAngle: 88 62 | secondaryUVPackMargin: 4 63 | useFileScale: 0 64 | previousCalculatedGlobalScale: 1 65 | hasPreviousCalculatedGlobalScale: 0 66 | tangentSpace: 67 | normalSmoothAngle: 1 68 | normalImportMode: 1 69 | tangentImportMode: 3 70 | normalCalculationMode: 4 71 | importAnimation: 0 72 | copyAvatar: 0 73 | humanDescription: 74 | serializedVersion: 2 75 | human: [] 76 | skeleton: [] 77 | armTwist: 0.5 78 | foreArmTwist: 0.5 79 | upperLegTwist: 0.5 80 | legTwist: 0.5 81 | armStretch: 0.05 82 | legStretch: 0.05 83 | feetSpacing: 0 84 | rootMotionBoneName: 85 | rootMotionBoneRotation: {x: 0, y: 0, z: 0, w: 1} 86 | hasTranslationDoF: 0 87 | hasExtraRoot: 0 88 | skeletonHasParents: 1 89 | lastHumanDescriptionAvatarSource: {instanceID: 0} 90 | animationType: 0 91 | humanoidOversampling: 1 92 | additionalBone: 0 93 | userData: 94 | assetBundleName: 95 | assetBundleVariant: 96 | -------------------------------------------------------------------------------- /Assets/Textures/tiles bump.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9b1593171cad40f44bf699d6cec7fc61 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | externalObjects: {} 6 | serializedVersion: 7 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 0 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 1 20 | externalNormalMap: 0 21 | heightScale: 0.06096774 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 0 53 | spriteTessellationDetail: -1 54 | textureType: 1 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 1024 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | - serializedVersion: 2 73 | buildTarget: Standalone 74 | maxTextureSize: 1024 75 | resizeAlgorithm: 0 76 | textureFormat: -1 77 | textureCompression: 1 78 | compressionQuality: 50 79 | crunchedCompression: 0 80 | allowsAlphaSplitting: 0 81 | overridden: 0 82 | androidETC2FallbackOverride: 0 83 | spriteSheet: 84 | serializedVersion: 2 85 | sprites: [] 86 | outline: [] 87 | physicsShape: [] 88 | bones: [] 89 | spriteID: 90 | vertices: [] 91 | indices: 92 | edges: [] 93 | weights: [] 94 | spritePackingTag: 95 | pSDRemoveMatte: 0 96 | pSDShowRemoveMatteOption: 0 97 | userData: 98 | assetBundleName: 99 | assetBundleVariant: 100 | -------------------------------------------------------------------------------- /Assets/Resources/TextMesh Pro/Resources/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 | _ColorMask ("Color Mask", Float) = 15 15 | _ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767) 16 | 17 | [Toggle(UNITY_UI_ALPHACLIP)] _UseUIAlphaClip ("Use Alpha Clip", Float) = 0 18 | } 19 | 20 | SubShader 21 | { 22 | Tags 23 | { 24 | "Queue"="Transparent" 25 | "IgnoreProjector"="True" 26 | "RenderType"="Transparent" 27 | "PreviewType"="Plane" 28 | "CanUseSpriteAtlas"="True" 29 | } 30 | 31 | Stencil 32 | { 33 | Ref [_Stencil] 34 | Comp [_StencilComp] 35 | Pass [_StencilOp] 36 | ReadMask [_StencilReadMask] 37 | WriteMask [_StencilWriteMask] 38 | } 39 | 40 | Cull Off 41 | Lighting Off 42 | ZWrite Off 43 | ZTest [unity_GUIZTestMode] 44 | Blend SrcAlpha OneMinusSrcAlpha 45 | ColorMask [_ColorMask] 46 | 47 | Pass 48 | { 49 | CGPROGRAM 50 | #pragma vertex vert 51 | #pragma fragment frag 52 | 53 | #include "UnityCG.cginc" 54 | #include "UnityUI.cginc" 55 | 56 | #pragma multi_compile __ UNITY_UI_CLIP_RECT 57 | #pragma multi_compile __ UNITY_UI_ALPHACLIP 58 | 59 | struct appdata_t 60 | { 61 | float4 vertex : POSITION; 62 | float4 color : COLOR; 63 | float2 texcoord : TEXCOORD0; 64 | }; 65 | 66 | struct v2f 67 | { 68 | float4 vertex : SV_POSITION; 69 | fixed4 color : COLOR; 70 | half2 texcoord : TEXCOORD0; 71 | float4 worldPosition : TEXCOORD1; 72 | }; 73 | 74 | fixed4 _Color; 75 | fixed4 _TextureSampleAdd; 76 | float4 _ClipRect; 77 | 78 | v2f vert(appdata_t IN) 79 | { 80 | v2f OUT; 81 | OUT.worldPosition = IN.vertex; 82 | OUT.vertex = UnityObjectToClipPos(OUT.worldPosition); 83 | 84 | OUT.texcoord = IN.texcoord; 85 | 86 | #ifdef UNITY_HALF_TEXEL_OFFSET 87 | OUT.vertex.xy += (_ScreenParams.zw-1.0)*float2(-1,1); 88 | #endif 89 | 90 | OUT.color = IN.color * _Color; 91 | return OUT; 92 | } 93 | 94 | sampler2D _MainTex; 95 | 96 | fixed4 frag(v2f IN) : SV_Target 97 | { 98 | half4 color = (tex2D(_MainTex, IN.texcoord) + _TextureSampleAdd) * IN.color; 99 | 100 | #if UNITY_UI_CLIP_RECT 101 | color.a *= UnityGet2DClipping(IN.worldPosition.xy, _ClipRect); 102 | #endif 103 | 104 | #ifdef UNITY_UI_ALPHACLIP 105 | clip (color.a - 0.001); 106 | #endif 107 | 108 | return color; 109 | } 110 | ENDCG 111 | } 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /Assets/Scripts/LightningBolt.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | /* 5 | This script is placed in public domain. The author takes no responsibility for any possible harm. 6 | Contributed by Jonathan Czeck 7 | */ 8 | [RequireComponent(typeof(ParticleSystem))] 9 | public class LightningBolt : MonoBehaviour 10 | { 11 | public Transform target; 12 | public int zigs = 100; 13 | public float speed = 1f; 14 | public float scale = 1f; 15 | public Light startLight; 16 | public Light endLight; 17 | 18 | Perlin noise; 19 | float oneOverZigs; 20 | 21 | private ParticleSystem _particleSystem; 22 | private ParticleSystem.Particle[] particles; 23 | 24 | void Start() 25 | { 26 | oneOverZigs = 1f / (float) zigs; 27 | 28 | GetComponent().Emit(zigs); 29 | 30 | } 31 | 32 | void LateUpdate() 33 | { 34 | InitializeIfNeeded(); 35 | 36 | int numParticlesAlive = GetComponent().GetParticles(particles); 37 | 38 | if (noise == null) 39 | { 40 | noise = new Perlin(); 41 | } 42 | 43 | float timex = Time.time * speed * 0.1365143f; 44 | float timey = Time.time * speed * 1.21688f; 45 | float timez = Time.time * speed * 2.5564f; 46 | 47 | for (int i = 0; i < particles.Length; i++) 48 | { 49 | Vector3 position = Vector3.Lerp(transform.position, target.position, oneOverZigs * (float) i); 50 | Vector3 offset = new Vector3(noise.Noise(timex + position.x, timex + position.y, timex + position.z), 51 | noise.Noise(timey + position.x, timey + position.y, timey + position.z), 52 | noise.Noise(timez + position.x, timez + position.y, timez + position.z)); 53 | position += (offset * scale * ((float) i * oneOverZigs)); 54 | 55 | particles[i].position = position; 56 | particles[i].startColor = Color.white; 57 | particles[i].remainingLifetime = 1f; 58 | } 59 | 60 | GetComponent().SetParticles(particles, numParticlesAlive); 61 | 62 | if (GetComponent().particleCount >= 2) 63 | { 64 | if (startLight) 65 | { 66 | startLight.transform.position = particles[0].position; 67 | } 68 | 69 | if (endLight) 70 | { 71 | endLight.transform.position = particles[particles.Length - 1].position; 72 | } 73 | } 74 | } 75 | 76 | void InitializeIfNeeded() 77 | { 78 | if (_particleSystem == null) 79 | { 80 | _particleSystem = GetComponent(); 81 | } 82 | 83 | if (particles == null || particles.Length < _particleSystem.main.maxParticles) 84 | { 85 | particles = new ParticleSystem.Particle[_particleSystem.main.maxParticles]; 86 | 87 | } 88 | } 89 | } -------------------------------------------------------------------------------- /Assets/Resources/TextMesh Pro/Resources/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 _MaskWipeControl; 70 | //uniform float _MaskEdgeSoftness; 71 | //uniform fixed4 _MaskEdgeColor; 72 | //uniform bool _MaskInverse; 73 | 74 | uniform float _MaskSoftnessX; 75 | uniform float _MaskSoftnessY; 76 | 77 | // Font Atlas properties 78 | uniform sampler2D _MainTex; 79 | uniform float _TextureWidth; 80 | uniform float _TextureHeight; 81 | uniform float _GradientScale; 82 | uniform float _ScaleX; 83 | uniform float _ScaleY; 84 | uniform float _PerspectiveFilter; 85 | -------------------------------------------------------------------------------- /Assets/Resources/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_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: LiberationSans SDF - Outline 10 | m_Shader: {fileID: 4800000, guid: fe393ace9b354375a9cb14cdbbc28be4, type: 3} 11 | m_ShaderKeywords: OUTLINE_ON 12 | m_LightmapFlags: 5 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: 3000 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _BumpMap: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | - _Cube: 26 | m_Texture: {fileID: 0} 27 | m_Scale: {x: 1, y: 1} 28 | m_Offset: {x: 0, y: 0} 29 | - _FaceTex: 30 | m_Texture: {fileID: 0} 31 | m_Scale: {x: 1, y: 1} 32 | m_Offset: {x: 0, y: 0} 33 | - _MainTex: 34 | m_Texture: {fileID: 2846298, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | - _OutlineTex: 38 | m_Texture: {fileID: 0} 39 | m_Scale: {x: 1, y: 1} 40 | m_Offset: {x: 0, y: 0} 41 | m_Floats: 42 | - _Ambient: 0.5 43 | - _Bevel: 0.5 44 | - _BevelClamp: 0 45 | - _BevelOffset: 0 46 | - _BevelRoundness: 0 47 | - _BevelWidth: 0 48 | - _BumpFace: 0 49 | - _BumpOutline: 0 50 | - _ColorMask: 15 51 | - _Diffuse: 0.5 52 | - _FaceDilate: 0.1 53 | - _FaceUVSpeedX: 0 54 | - _FaceUVSpeedY: 0 55 | - _GlowInner: 0.05 56 | - _GlowOffset: 0 57 | - _GlowOuter: 0.05 58 | - _GlowPower: 0.75 59 | - _GradientScale: 10 60 | - _LightAngle: 3.1416 61 | - _MaskSoftnessX: 0 62 | - _MaskSoftnessY: 0 63 | - _OutlineSoftness: 0 64 | - _OutlineUVSpeedX: 0 65 | - _OutlineUVSpeedY: 0 66 | - _OutlineWidth: 0.1 67 | - _PerspectiveFilter: 0.875 68 | - _Reflectivity: 10 69 | - _ScaleRatioA: 0.9 70 | - _ScaleRatioB: 0.73125 71 | - _ScaleRatioC: 0.64125 72 | - _ScaleX: 1 73 | - _ScaleY: 1 74 | - _ShaderFlags: 0 75 | - _SpecularPower: 2 76 | - _Stencil: 0 77 | - _StencilComp: 8 78 | - _StencilOp: 0 79 | - _StencilReadMask: 255 80 | - _StencilWriteMask: 255 81 | - _TextureHeight: 1024 82 | - _TextureWidth: 1024 83 | - _UnderlayDilate: 0 84 | - _UnderlayOffsetX: 0 85 | - _UnderlayOffsetY: 0 86 | - _UnderlaySoftness: 0 87 | - _VertexOffsetX: 0 88 | - _VertexOffsetY: 0 89 | - _WeightBold: 0.75 90 | - _WeightNormal: 0 91 | m_Colors: 92 | - _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767} 93 | - _EnvMatrixRotation: {r: 0, g: 0, b: 0, a: 0} 94 | - _FaceColor: {r: 1, g: 1, b: 1, a: 1} 95 | - _GlowColor: {r: 0, g: 1, b: 0, a: 0.5} 96 | - _MaskCoord: {r: 0, g: 0, b: 32767, a: 32767} 97 | - _OutlineColor: {r: 0, g: 0, b: 0, a: 1} 98 | - _ReflectFaceColor: {r: 0, g: 0, b: 0, a: 1} 99 | - _ReflectOutlineColor: {r: 0, g: 0, b: 0, a: 1} 100 | - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} 101 | - _UnderlayColor: {r: 0, g: 0, b: 0, a: 0.5} 102 | -------------------------------------------------------------------------------- /Assets/Resources/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_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: LiberationSans SDF - Drop Shadow 10 | m_Shader: {fileID: 4800000, guid: fe393ace9b354375a9cb14cdbbc28be4, type: 3} 11 | m_ShaderKeywords: OUTLINE_ON UNDERLAY_ON 12 | m_LightmapFlags: 5 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _BumpMap: 22 | m_Texture: {fileID: 0} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | - _Cube: 26 | m_Texture: {fileID: 0} 27 | m_Scale: {x: 1, y: 1} 28 | m_Offset: {x: 0, y: 0} 29 | - _FaceTex: 30 | m_Texture: {fileID: 0} 31 | m_Scale: {x: 1, y: 1} 32 | m_Offset: {x: 0, y: 0} 33 | - _MainTex: 34 | m_Texture: {fileID: 2846298, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: 0} 37 | - _OutlineTex: 38 | m_Texture: {fileID: 0} 39 | m_Scale: {x: 1, y: 1} 40 | m_Offset: {x: 0, y: 0} 41 | m_Floats: 42 | - _Ambient: 0.5 43 | - _Bevel: 0.5 44 | - _BevelClamp: 0 45 | - _BevelOffset: 0 46 | - _BevelRoundness: 0 47 | - _BevelWidth: 0 48 | - _BumpFace: 0 49 | - _BumpOutline: 0 50 | - _ColorMask: 15 51 | - _Diffuse: 0.5 52 | - _DiffusePower: 1 53 | - _FaceDilate: 0.1 54 | - _FaceUVSpeedX: 0 55 | - _FaceUVSpeedY: 0 56 | - _GlowInner: 0.05 57 | - _GlowOffset: 0 58 | - _GlowOuter: 0.05 59 | - _GlowPower: 0.75 60 | - _GradientScale: 10 61 | - _LightAngle: 3.1416 62 | - _MaskSoftnessX: 0 63 | - _MaskSoftnessY: 0 64 | - _OutlineSoftness: 0 65 | - _OutlineUVSpeedX: 0 66 | - _OutlineUVSpeedY: 0 67 | - _OutlineWidth: 0.1 68 | - _PerspectiveFilter: 0.875 69 | - _Reflectivity: 10 70 | - _ScaleRatioA: 0.9 71 | - _ScaleRatioB: 0.73125 72 | - _ScaleRatioC: 0.64125 73 | - _ScaleX: 1 74 | - _ScaleY: 1 75 | - _ShaderFlags: 0 76 | - _SpecularPower: 2 77 | - _Stencil: 0 78 | - _StencilComp: 8 79 | - _StencilOp: 0 80 | - _StencilReadMask: 255 81 | - _StencilWriteMask: 255 82 | - _TextureHeight: 1024 83 | - _TextureWidth: 1024 84 | - _UnderlayDilate: 0 85 | - _UnderlayOffsetX: 0.5 86 | - _UnderlayOffsetY: -0.5 87 | - _UnderlaySoftness: 0.05 88 | - _VertexOffsetX: 0 89 | - _VertexOffsetY: 0 90 | - _WeightBold: 0.75 91 | - _WeightNormal: 0 92 | m_Colors: 93 | - _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767} 94 | - _Color: {r: 1, g: 1, b: 1, a: 1} 95 | - _EnvMatrixRotation: {r: 0, g: 0, b: 0, a: 0} 96 | - _FaceColor: {r: 1, g: 1, b: 1, a: 1} 97 | - _GlowColor: {r: 0, g: 1, b: 0, a: 0.5} 98 | - _MaskCoord: {r: 0, g: 0, b: 32767, a: 32767} 99 | - _OutlineColor: {r: 0, g: 0, b: 0, a: 1} 100 | - _ReflectFaceColor: {r: 0, g: 0, b: 0, a: 1} 101 | - _ReflectOutlineColor: {r: 0, g: 0, b: 0, a: 1} 102 | - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} 103 | - _UnderlayColor: {r: 0, g: 0, b: 0, a: 0.5} 104 | -------------------------------------------------------------------------------- /Assets/Scripts/Utils/FractalNoise.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | public class FractalNoise 5 | { 6 | private Perlin m_Noise; 7 | private float[] m_Exponent; 8 | private int m_IntOctaves; 9 | private float m_Octaves; 10 | private float m_Lacunarity; 11 | 12 | public FractalNoise(float inH, float inLacunarity, float inOctaves) 13 | : this(inH, inLacunarity, inOctaves, null) 14 | { 15 | } 16 | 17 | public FractalNoise(float inH, float inLacunarity, float inOctaves, Perlin noise) 18 | { 19 | m_Lacunarity = inLacunarity; 20 | m_Octaves = inOctaves; 21 | m_IntOctaves = (int) inOctaves; 22 | m_Exponent = new float[m_IntOctaves + 1]; 23 | float frequency = 1.0F; 24 | for (int i = 0; i < m_IntOctaves + 1; i++) 25 | { 26 | m_Exponent[i] = (float) Math.Pow(m_Lacunarity, -inH); 27 | frequency *= m_Lacunarity; 28 | } 29 | 30 | if (noise == null) 31 | { 32 | m_Noise = new Perlin(); 33 | } 34 | else 35 | { 36 | m_Noise = noise; 37 | } 38 | } 39 | 40 | 41 | public float HybridMultifractal(float x, float y, float offset) 42 | { 43 | float weight, signal, remainder, result; 44 | 45 | result = (m_Noise.Noise(x, y) + offset) * m_Exponent[0]; 46 | weight = result; 47 | x *= m_Lacunarity; 48 | y *= m_Lacunarity; 49 | int i; 50 | for (i = 1; i < m_IntOctaves; i++) 51 | { 52 | if (weight > 1.0F) 53 | { 54 | weight = 1.0F; 55 | } 56 | 57 | signal = (m_Noise.Noise(x, y) + offset) * m_Exponent[i]; 58 | result += weight * signal; 59 | weight *= signal; 60 | x *= m_Lacunarity; 61 | y *= m_Lacunarity; 62 | } 63 | 64 | remainder = m_Octaves - m_IntOctaves; 65 | result += remainder * m_Noise.Noise(x, y) * m_Exponent[i]; 66 | 67 | return result; 68 | } 69 | 70 | public float RidgedMultifractal(float x, float y, float offset, float gain) 71 | { 72 | float weight, signal, result; 73 | int i; 74 | 75 | signal = Mathf.Abs(m_Noise.Noise(x, y)); 76 | signal = offset - signal; 77 | signal *= signal; 78 | result = signal; 79 | weight = 1.0F; 80 | 81 | for (i = 1; i < m_IntOctaves; i++) 82 | { 83 | x *= m_Lacunarity; 84 | y *= m_Lacunarity; 85 | 86 | weight = signal * gain; 87 | weight = Mathf.Clamp01(weight); 88 | 89 | signal = Mathf.Abs(m_Noise.Noise(x, y)); 90 | signal = offset - signal; 91 | signal *= signal; 92 | signal *= weight; 93 | result += signal * m_Exponent[i]; 94 | } 95 | 96 | return result; 97 | } 98 | 99 | public float BrownianMotion(float x, float y) 100 | { 101 | float value, remainder; 102 | long i; 103 | 104 | value = 0.0F; 105 | for (i = 0; i < m_IntOctaves; i++) 106 | { 107 | value = m_Noise.Noise(x, y) * m_Exponent[i]; 108 | x *= m_Lacunarity; 109 | y *= m_Lacunarity; 110 | } 111 | 112 | remainder = m_Octaves - m_IntOctaves; 113 | value += remainder * m_Noise.Noise(x, y) * m_Exponent[i]; 114 | 115 | return value; 116 | } 117 | } -------------------------------------------------------------------------------- /Assets/Scripts/HeightmapGenerator.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | // This script is placed in public domain. The author takes no responsibility for any possible harm. 4 | public class HeightmapGenerator : MonoBehaviour 5 | { 6 | public Texture2D heightMap; 7 | public Material material; 8 | public Vector3 size = new Vector3(200, 30, 200); 9 | 10 | void Start() 11 | { 12 | GenerateHeightmap(); 13 | } 14 | 15 | private void GenerateHeightmap() 16 | { 17 | // Create the game object containing the renderer 18 | gameObject.AddComponent(); 19 | gameObject.AddComponent(); 20 | if (material) 21 | { 22 | GetComponent().material = material; 23 | } 24 | else 25 | { 26 | GetComponent().material.color = Color.white; 27 | } 28 | 29 | // Retrieve a mesh instance 30 | Mesh mesh = GetComponent().mesh; 31 | 32 | int width = Mathf.Min(heightMap.width, 255); 33 | int height = Mathf.Min(heightMap.height, 255); 34 | int y = 0; 35 | int x = 0; 36 | 37 | // Build vertices and UVs 38 | Vector3[] vertices = new Vector3[height * width]; 39 | Vector2[] uv = new Vector2[height * width]; 40 | Vector4[] tangents = new Vector4[height * width]; 41 | 42 | Vector2 uvScale = new Vector2(1.0f / (width - 1), 1.0f / (height - 1)); 43 | Vector3 sizeScale = new Vector3(size.x / (width - 1), size.y, size.z / (height - 1)); 44 | 45 | for (y = 0; y < height; y++) 46 | { 47 | for (x = 0; x < width; x++) 48 | { 49 | float pixelHeight = heightMap.GetPixel(x, y).grayscale; 50 | Vector3 vertex = new Vector3(x, pixelHeight, y); 51 | vertices[y * width + x] = Vector3.Scale(sizeScale, vertex); 52 | uv[y * width + x] = Vector2.Scale(new Vector2(x, y), uvScale); 53 | 54 | // Calculate tangent vector: a vector that goes from previous vertex 55 | // to next along X direction. We need tangents if we intend to 56 | // use bumpmap shaders on the mesh. 57 | Vector3 vertexL = new Vector3(x - 1, heightMap.GetPixel(x - 1, y).grayscale, y); 58 | Vector3 vertexR = new Vector3(x + 1, heightMap.GetPixel(x + 1, y).grayscale, y); 59 | Vector3 tan = Vector3.Scale(sizeScale, vertexR - vertexL).normalized; 60 | tangents[y * width + x] = new Vector4(tan.x, tan.y, tan.z, -1.0f); 61 | } 62 | } 63 | 64 | // Assign them to the mesh 65 | mesh.vertices = vertices; 66 | mesh.uv = uv; 67 | 68 | // Build triangle indices: 3 indices into vertex array for each triangle 69 | int[] triangles = new int[(height - 1) * (width - 1) * 6]; 70 | int index = 0; 71 | for (y = 0; y < height - 1; y++) 72 | { 73 | for (x = 0; x < width - 1; x++) 74 | { 75 | // For each grid cell output two triangles 76 | triangles[index++] = (y * width) + x; 77 | triangles[index++] = ((y + 1) * width) + x; 78 | triangles[index++] = (y * width) + x + 1; 79 | 80 | triangles[index++] = ((y + 1) * width) + x; 81 | triangles[index++] = ((y + 1) * width) + x + 1; 82 | triangles[index++] = (y * width) + x + 1; 83 | } 84 | } 85 | 86 | // And assign them to the mesh 87 | mesh.triangles = triangles; 88 | 89 | // Auto-calculate vertex normals from the mesh 90 | mesh.RecalculateNormals(); 91 | 92 | // Assign tangents after recalculating normals 93 | mesh.tangents = tangents; 94 | } 95 | } -------------------------------------------------------------------------------- /Assets/Resources/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_PrefabParentObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_GameObject: {fileID: 0} 9 | m_Enabled: 1 10 | m_EditorHideFlags: 0 11 | m_Script: {fileID: 11500000, guid: 2705215ac5b84b70bacc50632be6e391, type: 3} 12 | m_Name: TMP Settings 13 | m_EditorClassIdentifier: 14 | m_enableWordWrapping: 1 15 | m_enableKerning: 1 16 | m_enableExtraPadding: 0 17 | m_enableTintAllSprites: 0 18 | m_enableParseEscapeCharacters: 1 19 | m_missingGlyphCharacter: 0 20 | m_warningsDisabled: 0 21 | m_defaultFontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} 22 | m_defaultFontAssetPath: Fonts & Materials/ 23 | m_defaultFontSize: 36 24 | m_defaultAutoSizeMinRatio: 0.5 25 | m_defaultAutoSizeMaxRatio: 2 26 | m_defaultTextMeshProTextContainerSize: {x: 20, y: 5} 27 | m_defaultTextMeshProUITextContainerSize: {x: 200, y: 50} 28 | m_autoSizeTextContainer: 0 29 | m_fallbackFontAssets: [] 30 | m_matchMaterialPreset: 1 31 | m_defaultSpriteAsset: {fileID: 11400000, guid: c41005c129ba4d66911b75229fd70b45, 32 | type: 2} 33 | m_defaultSpriteAssetPath: Sprite Assets/ 34 | m_defaultColorGradientPresetsPath: Color Gradient Presets/ 35 | m_enableEmojiSupport: 1 36 | m_defaultStyleSheet: {fileID: 11400000, guid: f952c082cb03451daed3ee968ac6c63e, 37 | type: 2} 38 | m_leadingCharacters: {fileID: 4900000, guid: d82c1b31c7e74239bff1220585707d2b, type: 3} 39 | m_followingCharacters: {fileID: 4900000, guid: fade42e8bc714b018fac513c043d323b, 40 | type: 3} 41 | m_FontCreatorRecentSettings: 42 | - sourceFontFileName: 43 | sourceFontFileGUID: edcaa01543603ae4cb6b2edf25967e21 44 | pointSizeSamplingMode: 1 45 | pointSize: 109 46 | padding: 12 47 | packingMode: 0 48 | atlasWidth: 128 49 | atlasHeight: 128 50 | characterSetSelectionMode: 5 51 | characterSequence: 64 52 | fontStyle: 0 53 | fontStyleModifier: 2 54 | renderMode: 281 55 | includeFontFeatures: 0 56 | referenceFontAssetGUID: 903613a9fe4b65946aa20dfcce07abec 57 | - sourceFontFileName: 58 | sourceFontFileGUID: edcaa01543603ae4cb6b2edf25967e21 59 | pointSizeSamplingMode: 0 60 | pointSize: 108 61 | padding: 12 62 | packingMode: 0 63 | atlasWidth: 128 64 | atlasHeight: 128 65 | characterSetSelectionMode: 5 66 | characterSequence: 64 67 | fontStyle: 0 68 | fontStyleModifier: 2 69 | renderMode: 2090 70 | includeFontFeatures: 0 71 | referenceFontAssetGUID: 70cf10c1d306ada42aa6cd7268db990d 72 | - sourceFontFileName: 73 | sourceFontFileGUID: edcaa01543603ae4cb6b2edf25967e21 74 | pointSizeSamplingMode: 1 75 | pointSize: 109 76 | padding: 12 77 | packingMode: 0 78 | atlasWidth: 128 79 | atlasHeight: 128 80 | characterSetSelectionMode: 5 81 | characterSequence: 64 82 | fontStyle: 0 83 | fontStyleModifier: 2 84 | renderMode: 329 85 | includeFontFeatures: 0 86 | referenceFontAssetGUID: 396d465a5821ead47b589b228da7e980 87 | - sourceFontFileName: 88 | sourceFontFileGUID: edcaa01543603ae4cb6b2edf25967e21 89 | pointSizeSamplingMode: 1 90 | pointSize: 338 91 | padding: 36 92 | packingMode: 0 93 | atlasWidth: 4096 94 | atlasHeight: 4096 95 | characterSetSelectionMode: 1 96 | characterSequence: 32 - 126, 160 - 255, 8192 - 8303, 8364, 8482, 9633 97 | fontStyle: 0 98 | fontStyleModifier: 2 99 | renderMode: 329 100 | includeFontFeatures: 0 101 | referenceFontAssetGUID: 3a4171c252e1112499af739474d9f48e 102 | m_CreationSettingsSelectionIndex: 0 103 | m_CreationSettingsIndex: 0 104 | -------------------------------------------------------------------------------- /Assets/Resources/TextMesh Pro/Resources/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 | 41 | _VertexOffsetX ("Vertex OffsetX", float) = 0 42 | _VertexOffsetY ("Vertex OffsetY", float) = 0 43 | 44 | //_MaskCoord ("Mask Coords", vector) = (0,0,0,0) 45 | //_MaskSoftness ("Mask Softness", float) = 0 46 | } 47 | 48 | SubShader { 49 | 50 | Tags { 51 | "Queue"="Transparent" 52 | "IgnoreProjector"="True" 53 | "RenderType"="Transparent" 54 | } 55 | 56 | LOD 300 57 | Cull [_CullMode] 58 | 59 | CGPROGRAM 60 | #pragma surface PixShader Lambert alpha:blend vertex:VertShader noforwardadd nolightmap nodirlightmap 61 | #pragma target 3.0 62 | #pragma shader_feature __ GLOW_ON 63 | 64 | #include "TMPro_Properties.cginc" 65 | #include "TMPro.cginc" 66 | 67 | half _FaceShininess; 68 | half _OutlineShininess; 69 | 70 | struct Input 71 | { 72 | fixed4 color : COLOR; 73 | float2 uv_MainTex; 74 | float2 uv2_FaceTex; 75 | float2 uv2_OutlineTex; 76 | float2 param; // Weight, Scale 77 | float3 viewDirEnv; 78 | }; 79 | 80 | #include "TMPro_Surface.cginc" 81 | 82 | ENDCG 83 | 84 | // Pass to render object as a shadow caster 85 | Pass 86 | { 87 | Name "Caster" 88 | Tags { "LightMode" = "ShadowCaster" } 89 | Offset 1, 1 90 | 91 | Fog {Mode Off} 92 | ZWrite On ZTest LEqual Cull Off 93 | 94 | CGPROGRAM 95 | #pragma vertex vert 96 | #pragma fragment frag 97 | #pragma multi_compile_shadowcaster 98 | #include "UnityCG.cginc" 99 | 100 | struct v2f { 101 | V2F_SHADOW_CASTER; 102 | float2 uv : TEXCOORD1; 103 | float2 uv2 : TEXCOORD3; 104 | float alphaClip : TEXCOORD2; 105 | }; 106 | 107 | uniform float4 _MainTex_ST; 108 | uniform float4 _OutlineTex_ST; 109 | float _OutlineWidth; 110 | float _FaceDilate; 111 | float _ScaleRatioA; 112 | 113 | v2f vert( appdata_base v ) 114 | { 115 | v2f o; 116 | TRANSFER_SHADOW_CASTER(o) 117 | o.uv = TRANSFORM_TEX(v.texcoord, _MainTex); 118 | o.uv2 = TRANSFORM_TEX(v.texcoord, _OutlineTex); 119 | o.alphaClip = o.alphaClip = (1.0 - _OutlineWidth * _ScaleRatioA - _FaceDilate * _ScaleRatioA) / 2; 120 | return o; 121 | } 122 | 123 | uniform sampler2D _MainTex; 124 | 125 | float4 frag(v2f i) : COLOR 126 | { 127 | fixed4 texcol = tex2D(_MainTex, i.uv).a; 128 | clip(texcol.a - i.alphaClip); 129 | SHADOW_CASTER_FRAGMENT(i) 130 | } 131 | ENDCG 132 | } 133 | } 134 | 135 | CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI" 136 | } 137 | -------------------------------------------------------------------------------- /Assets/Resources/TextMesh Pro/Resources/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 | _ColorMask("Color Mask", Float) = 15 22 | } 23 | 24 | SubShader{ 25 | 26 | Tags { "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" } 27 | 28 | Stencil 29 | { 30 | Ref[_Stencil] 31 | Comp[_StencilComp] 32 | Pass[_StencilOp] 33 | ReadMask[_StencilReadMask] 34 | WriteMask[_StencilWriteMask] 35 | } 36 | 37 | 38 | Lighting Off 39 | Cull [_CullMode] 40 | ZTest [unity_GUIZTestMode] 41 | ZWrite Off 42 | Fog { Mode Off } 43 | Blend SrcAlpha OneMinusSrcAlpha 44 | ColorMask[_ColorMask] 45 | 46 | Pass { 47 | CGPROGRAM 48 | #pragma vertex vert 49 | #pragma fragment frag 50 | 51 | #pragma multi_compile __ UNITY_UI_CLIP_RECT 52 | #pragma multi_compile __ UNITY_UI_ALPHACLIP 53 | 54 | 55 | #include "UnityCG.cginc" 56 | 57 | struct appdata_t { 58 | float4 vertex : POSITION; 59 | fixed4 color : COLOR; 60 | float2 texcoord0 : TEXCOORD0; 61 | float2 texcoord1 : TEXCOORD1; 62 | }; 63 | 64 | struct v2f { 65 | float4 vertex : SV_POSITION; 66 | fixed4 color : COLOR; 67 | float2 texcoord0 : TEXCOORD0; 68 | float2 texcoord1 : TEXCOORD1; 69 | float4 mask : TEXCOORD2; 70 | }; 71 | 72 | uniform sampler2D _MainTex; 73 | uniform sampler2D _FaceTex; 74 | uniform float4 _FaceTex_ST; 75 | uniform fixed4 _FaceColor; 76 | 77 | uniform float _VertexOffsetX; 78 | uniform float _VertexOffsetY; 79 | uniform float4 _ClipRect; 80 | uniform float _MaskSoftnessX; 81 | uniform float _MaskSoftnessY; 82 | 83 | float2 UnpackUV(float uv) 84 | { 85 | float2 output; 86 | output.x = floor(uv / 4096); 87 | output.y = uv - 4096 * output.x; 88 | 89 | return output * 0.001953125; 90 | } 91 | 92 | v2f vert (appdata_t v) 93 | { 94 | float4 vert = v.vertex; 95 | vert.x += _VertexOffsetX; 96 | vert.y += _VertexOffsetY; 97 | 98 | vert.xy += (vert.w * 0.5) / _ScreenParams.xy; 99 | 100 | float4 vPosition = UnityPixelSnap(UnityObjectToClipPos(vert)); 101 | 102 | fixed4 faceColor = v.color; 103 | faceColor *= _FaceColor; 104 | 105 | v2f OUT; 106 | OUT.vertex = vPosition; 107 | OUT.color = faceColor; 108 | OUT.texcoord0 = v.texcoord0; 109 | OUT.texcoord1 = TRANSFORM_TEX(UnpackUV(v.texcoord1), _FaceTex); 110 | float2 pixelSize = vPosition.w; 111 | pixelSize /= abs(float2(_ScreenParams.x * UNITY_MATRIX_P[0][0], _ScreenParams.y * UNITY_MATRIX_P[1][1])); 112 | 113 | // Clamp _ClipRect to 16bit. 114 | float4 clampedRect = clamp(_ClipRect, -2e10, 2e10); 115 | OUT.mask = float4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy)); 116 | 117 | return OUT; 118 | } 119 | 120 | fixed4 frag (v2f IN) : SV_Target 121 | { 122 | fixed4 color = tex2D(_MainTex, IN.texcoord0); 123 | color = fixed4 (tex2D(_FaceTex, IN.texcoord1).rgb * IN.color.rgb, IN.color.a * color.a); 124 | 125 | // Alternative implementation to UnityGet2DClipping with support for softness. 126 | #if UNITY_UI_CLIP_RECT 127 | half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(IN.mask.xy)) * IN.mask.zw); 128 | color *= m.x * m.y; 129 | #endif 130 | 131 | #if UNITY_UI_ALPHACLIP 132 | clip(color.a - 0.001); 133 | #endif 134 | 135 | return color; 136 | } 137 | ENDCG 138 | } 139 | } 140 | 141 | CustomEditor "TMPro.EditorUtilities.TMP_BitmapShaderGUI" 142 | } 143 | -------------------------------------------------------------------------------- /Assets/Resources/TextMesh Pro/Resources/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 | _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 | 58 | struct appdata_t { 59 | float4 vertex : POSITION; 60 | fixed4 color : COLOR; 61 | float2 texcoord0 : TEXCOORD0; 62 | float2 texcoord1 : TEXCOORD1; 63 | }; 64 | 65 | struct v2f { 66 | float4 vertex : SV_POSITION; 67 | fixed4 color : COLOR; 68 | float2 texcoord0 : TEXCOORD0; 69 | float2 texcoord1 : TEXCOORD1; 70 | float4 mask : TEXCOORD2; 71 | }; 72 | 73 | uniform sampler2D _MainTex; 74 | uniform sampler2D _FaceTex; 75 | uniform float4 _FaceTex_ST; 76 | uniform fixed4 _FaceColor; 77 | 78 | uniform float _VertexOffsetX; 79 | uniform float _VertexOffsetY; 80 | uniform float4 _ClipRect; 81 | uniform float _MaskSoftnessX; 82 | uniform float _MaskSoftnessY; 83 | 84 | float2 UnpackUV(float uv) 85 | { 86 | float2 output; 87 | output.x = floor(uv / 4096); 88 | output.y = uv - 4096 * output.x; 89 | 90 | return output * 0.001953125; 91 | } 92 | 93 | v2f vert (appdata_t v) 94 | { 95 | float4 vert = v.vertex; 96 | vert.x += _VertexOffsetX; 97 | vert.y += _VertexOffsetY; 98 | 99 | vert.xy += (vert.w * 0.5) / _ScreenParams.xy; 100 | 101 | float4 vPosition = UnityPixelSnap(UnityObjectToClipPos(vert)); 102 | 103 | fixed4 faceColor = v.color; 104 | faceColor *= _FaceColor; 105 | 106 | v2f OUT; 107 | OUT.vertex = vPosition; 108 | OUT.color = faceColor; 109 | OUT.texcoord0 = v.texcoord0; 110 | OUT.texcoord1 = TRANSFORM_TEX(UnpackUV(v.texcoord1), _FaceTex); 111 | float2 pixelSize = vPosition.w; 112 | pixelSize /= abs(float2(_ScreenParams.x * UNITY_MATRIX_P[0][0], _ScreenParams.y * UNITY_MATRIX_P[1][1])); 113 | 114 | // Clamp _ClipRect to 16bit. 115 | float4 clampedRect = clamp(_ClipRect, -2e10, 2e10); 116 | OUT.mask = float4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy)); 117 | 118 | return OUT; 119 | } 120 | 121 | fixed4 frag (v2f IN) : SV_Target 122 | { 123 | fixed4 color = tex2D(_MainTex, IN.texcoord0) * tex2D(_FaceTex, IN.texcoord1) * IN.color; 124 | 125 | // Alternative implementation to UnityGet2DClipping with support for softness. 126 | #if UNITY_UI_CLIP_RECT 127 | half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(IN.mask.xy)) * IN.mask.zw); 128 | color *= m.x * m.y; 129 | #endif 130 | 131 | #if UNITY_UI_ALPHACLIP 132 | clip(color.a - 0.001); 133 | #endif 134 | 135 | return color; 136 | } 137 | ENDCG 138 | } 139 | } 140 | 141 | CustomEditor "TMPro.EditorUtilities.TMP_BitmapShaderGUI" 142 | } 143 | -------------------------------------------------------------------------------- /Assets/Resources/TextMesh Pro/Resources/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 | _ColorMask("Color Mask", Float) = 15 22 | } 23 | 24 | SubShader { 25 | 26 | Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" } 27 | 28 | Stencil 29 | { 30 | Ref[_Stencil] 31 | Comp[_StencilComp] 32 | Pass[_StencilOp] 33 | ReadMask[_StencilReadMask] 34 | WriteMask[_StencilWriteMask] 35 | } 36 | 37 | 38 | Lighting Off 39 | Cull Off 40 | ZTest [unity_GUIZTestMode] 41 | ZWrite Off 42 | Fog { Mode Off } 43 | Blend SrcAlpha OneMinusSrcAlpha 44 | ColorMask[_ColorMask] 45 | 46 | Pass { 47 | CGPROGRAM 48 | #pragma vertex vert 49 | #pragma fragment frag 50 | #pragma fragmentoption ARB_precision_hint_fastest 51 | 52 | #pragma multi_compile __ UNITY_UI_CLIP_RECT 53 | #pragma multi_compile __ UNITY_UI_ALPHACLIP 54 | 55 | 56 | #include "UnityCG.cginc" 57 | 58 | struct appdata_t { 59 | float4 vertex : POSITION; 60 | fixed4 color : COLOR; 61 | float2 texcoord0 : TEXCOORD0; 62 | float2 texcoord1 : TEXCOORD1; 63 | }; 64 | 65 | struct v2f { 66 | float4 vertex : POSITION; 67 | fixed4 color : COLOR; 68 | float2 texcoord0 : TEXCOORD0; 69 | float4 mask : TEXCOORD2; 70 | }; 71 | 72 | sampler2D _MainTex; 73 | fixed4 _Color; 74 | float _DiffusePower; 75 | 76 | uniform float _VertexOffsetX; 77 | uniform float _VertexOffsetY; 78 | uniform float4 _ClipRect; 79 | uniform float _MaskSoftnessX; 80 | uniform float _MaskSoftnessY; 81 | 82 | v2f vert (appdata_t v) 83 | { 84 | v2f OUT; 85 | float4 vert = v.vertex; 86 | vert.x += _VertexOffsetX; 87 | vert.y += _VertexOffsetY; 88 | 89 | vert.xy += (vert.w * 0.5) / _ScreenParams.xy; 90 | 91 | OUT.vertex = UnityPixelSnap(UnityObjectToClipPos(vert)); 92 | OUT.color = v.color; 93 | OUT.color *= _Color; 94 | OUT.color.rgb *= _DiffusePower; 95 | OUT.texcoord0 = v.texcoord0; 96 | 97 | float2 pixelSize = OUT.vertex.w; 98 | //pixelSize /= abs(float2(_ScreenParams.x * UNITY_MATRIX_P[0][0], _ScreenParams.y * UNITY_MATRIX_P[1][1])); 99 | 100 | // Clamp _ClipRect to 16bit. 101 | float4 clampedRect = clamp(_ClipRect, -2e10, 2e10); 102 | OUT.mask = float4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy)); 103 | 104 | return OUT; 105 | } 106 | 107 | fixed4 frag (v2f IN) : COLOR 108 | { 109 | fixed4 color = fixed4(IN.color.rgb, IN.color.a * tex2D(_MainTex, IN.texcoord0).a); 110 | 111 | // Alternative implementation to UnityGet2DClipping with support for softness. 112 | #if UNITY_UI_CLIP_RECT 113 | half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(IN.mask.xy)) * IN.mask.zw); 114 | color *= m.x * m.y; 115 | #endif 116 | 117 | #if UNITY_UI_ALPHACLIP 118 | clip(color.a - 0.001); 119 | #endif 120 | 121 | return color; 122 | } 123 | ENDCG 124 | } 125 | } 126 | 127 | SubShader { 128 | Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" } 129 | Lighting Off Cull Off ZTest Always ZWrite Off Fog { Mode Off } 130 | Blend SrcAlpha OneMinusSrcAlpha 131 | BindChannels { 132 | Bind "Color", color 133 | Bind "Vertex", vertex 134 | Bind "TexCoord", texcoord0 135 | } 136 | Pass { 137 | SetTexture [_MainTex] { 138 | constantColor [_Color] combine constant * primary, constant * texture 139 | } 140 | } 141 | } 142 | 143 | CustomEditor "TMPro.EditorUtilities.TMP_BitmapShaderGUI" 144 | } 145 | -------------------------------------------------------------------------------- /Assets/Scripts/ExtrudedMeshTrail.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using UnityEngine; 3 | 4 | // Generates an extrusion trail from the attached mesh 5 | // Uses the MeshExtrusion algorithm in MeshExtrusion.cs to generate and preprocess the mesh. 6 | [RequireComponent(typeof(MeshFilter))] 7 | public class ExtrudedMeshTrail : MonoBehaviour 8 | { 9 | public float time = 2.0f; 10 | public bool autoCalculateOrientation = true; 11 | public float minDistance = 0.1f; 12 | public bool invertFaces = false; 13 | 14 | private Mesh srcMesh; 15 | private MeshExtrusion.Edge[] precomputedEdges; 16 | private List sections = new List(); 17 | 18 | void Start() 19 | { 20 | srcMesh = GetComponent().sharedMesh; 21 | precomputedEdges = MeshExtrusion.BuildManifoldEdges(srcMesh); 22 | } 23 | 24 | void LateUpdate() 25 | { 26 | Vector3 position = transform.position; 27 | float now = Time.time; 28 | 29 | while (sections.Count > 0 && now > sections[sections.Count - 1].time + time) 30 | { 31 | sections.RemoveAt(sections.Count - 1); 32 | } 33 | 34 | // Add a new trail section to beginning of array 35 | if (sections.Count == 0 || (sections[0].point - position).sqrMagnitude > minDistance * minDistance) 36 | { 37 | ExtrudedTrailSection section = new ExtrudedTrailSection(); 38 | section.point = position; 39 | section.matrix = transform.localToWorldMatrix; 40 | section.time = now; 41 | sections.Insert(0, section); 42 | } 43 | 44 | // We need at least 2 sections to create the line 45 | if (sections.Count < 2) 46 | { 47 | return; 48 | } 49 | 50 | Matrix4x4 worldToLocal = transform.worldToLocalMatrix; 51 | Matrix4x4[] finalSections = new Matrix4x4[sections.Count]; 52 | Quaternion previousRotation = new Quaternion(); 53 | 54 | for (int i = 0; i < sections.Count; i++) 55 | { 56 | if (autoCalculateOrientation) 57 | { 58 | if (i == 0) 59 | { 60 | Vector3 direction = sections[0].point - sections[1].point; 61 | Quaternion rotation = Quaternion.LookRotation(direction, Vector3.up); 62 | previousRotation = rotation; 63 | finalSections[i] = worldToLocal * Matrix4x4.TRS(position, rotation, Vector3.one); 64 | } 65 | // all elements get the direction by looking up the next section 66 | else if (i != sections.Count - 1) 67 | { 68 | Vector3 direction = sections[i].point - sections[i + 1].point; 69 | Quaternion rotation = Quaternion.LookRotation(direction, Vector3.up); 70 | 71 | // When the angle of the rotation compared to the last segment is too high 72 | // smooth the rotation a little bit. Optimally we would smooth the entire sections array. 73 | if (Quaternion.Angle(previousRotation, rotation) > 20) 74 | { 75 | rotation = Quaternion.Slerp(previousRotation, rotation, 0.5f); 76 | } 77 | 78 | previousRotation = rotation; 79 | finalSections[i] = worldToLocal * Matrix4x4.TRS(sections[i].point, rotation, Vector3.one); 80 | } 81 | // except the last one, which just copies the previous one 82 | else 83 | { 84 | finalSections[i] = finalSections[i - 1]; 85 | } 86 | } 87 | else 88 | { 89 | if (i == 0) 90 | { 91 | finalSections[i] = Matrix4x4.identity; 92 | } 93 | else 94 | { 95 | finalSections[i] = worldToLocal * sections[i].matrix; 96 | } 97 | } 98 | } 99 | MeshExtrusion.ExtrudeMesh (srcMesh, GetComponent().mesh, finalSections, precomputedEdges, invertFaces); 100 | } 101 | 102 | class ExtrudedTrailSection 103 | { 104 | public Vector3 point; 105 | public Matrix4x4 matrix; 106 | public float time; 107 | } 108 | } -------------------------------------------------------------------------------- /Assets/Animators/Tron Trail Controller.controller: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!91 &9100000 4 | AnimatorController: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_Name: Tron Trail Controller 9 | serializedVersion: 5 10 | m_AnimatorParameters: [] 11 | m_AnimatorLayers: 12 | - serializedVersion: 5 13 | m_Name: Base Layer 14 | m_StateMachine: {fileID: 1107521353673429526} 15 | m_Mask: {fileID: 0} 16 | m_Motions: [] 17 | m_Behaviours: [] 18 | m_BlendingMode: 0 19 | m_SyncedLayerIndex: -1 20 | m_DefaultWeight: 0 21 | m_IKPass: 0 22 | m_SyncedLayerAffectsTiming: 0 23 | m_Controller: {fileID: 9100000} 24 | --- !u!1101 &1101005050954388876 25 | AnimatorStateTransition: 26 | m_ObjectHideFlags: 1 27 | m_CorrespondingSourceObject: {fileID: 0} 28 | m_PrefabInternal: {fileID: 0} 29 | m_Name: 30 | m_Conditions: [] 31 | m_DstStateMachine: {fileID: 0} 32 | m_DstState: {fileID: 1102387053107459214} 33 | m_Solo: 0 34 | m_Mute: 0 35 | m_IsExit: 0 36 | serializedVersion: 3 37 | m_TransitionDuration: 0.25 38 | m_TransitionOffset: 0 39 | m_ExitTime: 0.8965517 40 | m_HasExitTime: 1 41 | m_HasFixedDuration: 1 42 | m_InterruptionSource: 0 43 | m_OrderedInterruption: 1 44 | m_CanTransitionToSelf: 1 45 | --- !u!1101 &1101651949675324480 46 | AnimatorStateTransition: 47 | m_ObjectHideFlags: 1 48 | m_CorrespondingSourceObject: {fileID: 0} 49 | m_PrefabInternal: {fileID: 0} 50 | m_Name: 51 | m_Conditions: [] 52 | m_DstStateMachine: {fileID: 0} 53 | m_DstState: {fileID: 1102214317935141464} 54 | m_Solo: 0 55 | m_Mute: 0 56 | m_IsExit: 0 57 | serializedVersion: 3 58 | m_TransitionDuration: 0.25 59 | m_TransitionOffset: 0 60 | m_ExitTime: 0.8965517 61 | m_HasExitTime: 1 62 | m_HasFixedDuration: 1 63 | m_InterruptionSource: 0 64 | m_OrderedInterruption: 1 65 | m_CanTransitionToSelf: 1 66 | --- !u!1102 &1102214317935141464 67 | AnimatorState: 68 | serializedVersion: 5 69 | m_ObjectHideFlags: 3 70 | m_CorrespondingSourceObject: {fileID: 0} 71 | m_PrefabInternal: {fileID: 0} 72 | m_Name: Pong 73 | m_Speed: -1 74 | m_CycleOffset: 0 75 | m_Transitions: 76 | - {fileID: 1101005050954388876} 77 | m_StateMachineBehaviours: [] 78 | m_Position: {x: 50, y: 50, z: 0} 79 | m_IKOnFeet: 0 80 | m_WriteDefaultValues: 1 81 | m_Mirror: 0 82 | m_SpeedParameterActive: 0 83 | m_MirrorParameterActive: 0 84 | m_CycleOffsetParameterActive: 0 85 | m_TimeParameterActive: 0 86 | m_Motion: {fileID: 7400000, guid: 9e2e84749115ed344b002b6729d46d34, type: 2} 87 | m_Tag: 88 | m_SpeedParameter: 89 | m_MirrorParameter: 90 | m_CycleOffsetParameter: 91 | m_TimeParameter: 92 | --- !u!1102 &1102387053107459214 93 | AnimatorState: 94 | serializedVersion: 5 95 | m_ObjectHideFlags: 1 96 | m_CorrespondingSourceObject: {fileID: 0} 97 | m_PrefabInternal: {fileID: 0} 98 | m_Name: Ping 99 | m_Speed: 1 100 | m_CycleOffset: 0 101 | m_Transitions: 102 | - {fileID: 1101651949675324480} 103 | m_StateMachineBehaviours: [] 104 | m_Position: {x: 50, y: 50, z: 0} 105 | m_IKOnFeet: 0 106 | m_WriteDefaultValues: 1 107 | m_Mirror: 0 108 | m_SpeedParameterActive: 0 109 | m_MirrorParameterActive: 0 110 | m_CycleOffsetParameterActive: 0 111 | m_TimeParameterActive: 0 112 | m_Motion: {fileID: 7400000, guid: 9e2e84749115ed344b002b6729d46d34, type: 2} 113 | m_Tag: 114 | m_SpeedParameter: 115 | m_MirrorParameter: 116 | m_CycleOffsetParameter: 117 | m_TimeParameter: 118 | --- !u!1107 &1107521353673429526 119 | AnimatorStateMachine: 120 | serializedVersion: 5 121 | m_ObjectHideFlags: 1 122 | m_CorrespondingSourceObject: {fileID: 0} 123 | m_PrefabInternal: {fileID: 0} 124 | m_Name: Base Layer 125 | m_ChildStates: 126 | - serializedVersion: 1 127 | m_State: {fileID: 1102387053107459214} 128 | m_Position: {x: 372, y: 24, z: 0} 129 | - serializedVersion: 1 130 | m_State: {fileID: 1102214317935141464} 131 | m_Position: {x: 324, y: 216, z: 0} 132 | m_ChildStateMachines: [] 133 | m_AnyStateTransitions: [] 134 | m_EntryTransitions: [] 135 | m_StateMachineTransitions: {} 136 | m_StateMachineBehaviours: [] 137 | m_AnyStatePosition: {x: 50, y: 20, z: 0} 138 | m_EntryPosition: {x: 50, y: 120, z: 0} 139 | m_ExitPosition: {x: 800, y: 120, z: 0} 140 | m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} 141 | m_DefaultState: {fileID: 1102387053107459214} 142 | -------------------------------------------------------------------------------- /Assets/Resources/TextMesh Pro/Resources/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.texcoord1.y, 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.texcoord1.y) * _GradientScale * 1.5; 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 | //float opacity = v.color.a; 29 | 30 | data.param.x = (lerp(_WeightNormal, _WeightBold, bold) / 4.0 + _FaceDilate) * _ScaleRatioA * 0.5; // 31 | 32 | v.texcoord1.xy = UnpackUV(v.texcoord1.x); 33 | data.viewDirEnv = mul((float3x3)_EnvMatrix, WorldSpaceViewDir(v.vertex)); 34 | } 35 | 36 | void PixShader(Input input, inout SurfaceOutput o) 37 | { 38 | 39 | #if USE_DERIVATIVE | BEVEL_ON 40 | float3 delta = float3(1.0 / _TextureWidth, 1.0 / _TextureHeight, 0.0); 41 | 42 | float4 smp4x = { tex2D(_MainTex, input.uv_MainTex - delta.xz).a, 43 | tex2D(_MainTex, input.uv_MainTex + delta.xz).a, 44 | tex2D(_MainTex, input.uv_MainTex - delta.zy).a, 45 | tex2D(_MainTex, input.uv_MainTex + delta.zy).a }; 46 | #endif 47 | 48 | #if USE_DERIVATIVE 49 | // Screen space scaling reciprocal with anisotropic correction 50 | float2 edgeNormal = Normalize(float2(smp4x.x - smp4x.y, smp4x.z - smp4x.w)); 51 | float2 res = float2(_TextureWidth * input.param.y, _TextureHeight); 52 | float2 tdx = ddx(input.uv_MainTex)*res; 53 | float2 tdy = ddy(input.uv_MainTex)*res; 54 | float lx = length(tdx); 55 | float ly = length(tdy); 56 | float s = sqrt(min(lx, ly) / max(lx, ly)); 57 | s = lerp(1, s, abs(dot(normalize(tdx + tdy), edgeNormal))); 58 | float scale = rsqrt(abs(tdx.x * tdy.y - tdx.y * tdy.x)) * (_GradientScale * 2) * s; 59 | #else 60 | float scale = input.param.y; 61 | #endif 62 | 63 | // Signed distance 64 | float c = tex2D(_MainTex, input.uv_MainTex).a; 65 | float sd = (.5 - c - input.param.x) * scale + .5; 66 | float outline = _OutlineWidth*_ScaleRatioA * scale; 67 | float softness = _OutlineSoftness*_ScaleRatioA * scale; 68 | 69 | // Color & Alpha 70 | float4 faceColor = _FaceColor; 71 | float4 outlineColor = _OutlineColor; 72 | faceColor *= input.color; 73 | outlineColor.a *= input.color.a; 74 | faceColor *= tex2D(_FaceTex, float2(input.uv2_FaceTex.x + _FaceUVSpeedX * _Time.y, input.uv2_FaceTex.y + _FaceUVSpeedY * _Time.y)); 75 | outlineColor *= tex2D(_OutlineTex, float2(input.uv2_OutlineTex.x + _OutlineUVSpeedX * _Time.y, input.uv2_OutlineTex.y + _OutlineUVSpeedY * _Time.y)); 76 | faceColor = GetColor(sd, faceColor, outlineColor, outline, softness); 77 | faceColor.rgb /= max(faceColor.a, 0.0001); 78 | 79 | 80 | #if BEVEL_ON 81 | // Face Normal 82 | float3 n = GetSurfaceNormal(smp4x, input.param.x); 83 | 84 | // Bumpmap 85 | float3 bump = UnpackNormal(tex2D(_BumpMap, input.uv2_FaceTex.xy)).xyz; 86 | bump *= lerp(_BumpFace, _BumpOutline, saturate(sd + outline * 0.5)); 87 | bump = lerp(float3(0, 0, 1), bump, faceColor.a); 88 | n = normalize(n - bump); 89 | 90 | // Cubemap reflection 91 | fixed4 reflcol = texCUBE(_Cube, reflect(input.viewDirEnv, mul((float3x3)unity_ObjectToWorld, n))); 92 | float3 emission = reflcol.rgb * lerp(_ReflectFaceColor.rgb, _ReflectOutlineColor.rgb, saturate(sd + outline * 0.5)) * faceColor.a; 93 | #else 94 | float3 n = float3(0, 0, -1); 95 | float3 emission = float3(0, 0, 0); 96 | #endif 97 | 98 | 99 | 100 | #if GLOW_ON 101 | float4 glowColor = GetGlowColor(sd, scale); 102 | glowColor.a *= input.color.a; 103 | emission += glowColor.rgb*glowColor.a; 104 | faceColor = BlendARGB(glowColor, faceColor); 105 | faceColor.rgb /= max(faceColor.a, 0.0001); 106 | #endif 107 | 108 | // Set Standard output structure 109 | o.Albedo = faceColor.rgb; 110 | o.Normal = -n; 111 | o.Emission = emission; 112 | o.Specular = lerp(_FaceShininess, _OutlineShininess, saturate(sd + outline * 0.5)); 113 | o.Gloss = 1; 114 | o.Alpha = faceColor.a; 115 | } 116 | -------------------------------------------------------------------------------- /Assets/Scripts/TronTrail.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | /* 6 | Generates a trail that is always facing upwards using the scriptable mesh interface. 7 | vertex colors and uv's are generated similar to the builtin Trail Renderer. 8 | To use it 9 | 1. create an empty game object 10 | 2. attach this script and a MeshRenderer 11 | 3. Then assign a particle material to the mesh renderer 12 | */ 13 | [RequireComponent(typeof(MeshFilter))] 14 | public class TronTrail : MonoBehaviour 15 | { 16 | public float height = 2.0f; 17 | public float time = 2.0f; 18 | public bool alwaysUp = false; 19 | public float minDistance = 0.1f; 20 | 21 | public Color startColor = Color.white; 22 | public Color endColor = new Color(1, 1, 1, 0); 23 | 24 | private List sections = new List(); 25 | 26 | private void LateUpdate() 27 | { 28 | Vector3 position = transform.position; 29 | float now = Time.time; 30 | 31 | // Remove old sections 32 | while (sections.Count > 0 && now > sections[sections.Count - 1].time + time) 33 | { 34 | sections.RemoveAt(sections.Count - 1); 35 | } 36 | 37 | // Add a new trail section 38 | if (sections.Count == 0 || (sections[0].point - position).sqrMagnitude > minDistance * minDistance) 39 | { 40 | TronTrailSection section = new TronTrailSection(); 41 | section.point = position; 42 | if (alwaysUp) 43 | { 44 | section.upDir = Vector3.up; 45 | } 46 | else 47 | { 48 | section.upDir = transform.TransformDirection(Vector3.up); 49 | } 50 | 51 | section.time = now; 52 | 53 | sections.Insert(0, section); 54 | } 55 | 56 | // Rebuild the mesh 57 | Mesh mesh = GetComponent().mesh; 58 | mesh.Clear(); 59 | 60 | // We need at least 2 sections to create the line 61 | if (sections.Count < 2) 62 | { 63 | return; 64 | } 65 | 66 | Vector3[] vertices = new Vector3[sections.Count * 2]; 67 | Color[] colors = new Color[sections.Count * 2]; 68 | Vector2[] uv = new Vector2[sections.Count * 2]; 69 | 70 | TronTrailSection previousSection = sections[0]; 71 | TronTrailSection currentSection = sections[0]; 72 | 73 | // Use matrix instead of transform.TransformPoint for performance reasons 74 | Matrix4x4 localSpaceTransform = transform.worldToLocalMatrix; 75 | 76 | // Generate vertex, uv and colors 77 | for (int i = 0; i < sections.Count; i++) 78 | { 79 | previousSection = currentSection; 80 | currentSection = sections[i]; 81 | // Calculate u for texture uv and color interpolation 82 | float u = 0.0f; 83 | if (i != 0) 84 | { 85 | u = Mathf.Clamp01((Time.time - currentSection.time) / time); 86 | } 87 | 88 | // Calculate upwards direction 89 | Vector3 upDir = currentSection.upDir; 90 | 91 | // Generate vertices 92 | vertices[i * 2 + 0] = localSpaceTransform.MultiplyPoint(currentSection.point); 93 | vertices[i * 2 + 1] = localSpaceTransform.MultiplyPoint(currentSection.point + upDir * height); 94 | 95 | uv[i * 2 + 0] = new Vector2(u, 0); 96 | uv[i * 2 + 1] = new Vector2(u, 1); 97 | 98 | // fade colors out over time 99 | Color interpolatedColor = Color.Lerp(startColor, endColor, u); 100 | colors[i * 2 + 0] = interpolatedColor; 101 | colors[i * 2 + 1] = interpolatedColor; 102 | } 103 | 104 | // Generate triangles indices 105 | int[] triangles = new int[(sections.Count - 1) * 2 * 3]; 106 | for (int i = 0; i < triangles.Length / 6; i++) 107 | { 108 | triangles[i * 6 + 0] = i * 2; 109 | triangles[i * 6 + 1] = i * 2 + 1; 110 | triangles[i * 6 + 2] = i * 2 + 2; 111 | 112 | triangles[i * 6 + 3] = i * 2 + 2; 113 | triangles[i * 6 + 4] = i * 2 + 1; 114 | triangles[i * 6 + 5] = i * 2 + 3; 115 | } 116 | 117 | // Assign to mesh 118 | mesh.vertices = vertices; 119 | mesh.colors = colors; 120 | mesh.uv = uv; 121 | mesh.triangles = triangles; 122 | } 123 | } 124 | 125 | class TronTrailSection 126 | { 127 | public Vector3 point; 128 | public Vector3 upDir; 129 | public float time; 130 | } -------------------------------------------------------------------------------- /Assets/Scripts/PaintVertices.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public class PaintVertices : MonoBehaviour 4 | { 5 | public float radius = 1.0f; 6 | public float pull = 10.0f; 7 | private MeshFilter unappliedMesh; 8 | public FallOff fallOff = FallOff.Gauss; 9 | 10 | void Start() 11 | { 12 | } 13 | 14 | void Update() 15 | { 16 | // When no button is pressed we update the mesh collider 17 | if (!Input.GetMouseButton(0)) 18 | { 19 | // Apply collision mesh when we let go of button 20 | ApplyMeshCollider(); 21 | return; 22 | } 23 | 24 | 25 | // Did we hit the surface? 26 | RaycastHit hit; 27 | Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); 28 | if (Physics.Raycast(ray, out hit)) 29 | { 30 | MeshFilter filter = hit.collider.GetComponent(); 31 | if (filter) 32 | { 33 | // Don't update mesh collider every frame since physX 34 | // does some heavy processing to optimize the collision mesh. 35 | // So this is not fast enough for real time updating every frame 36 | if (filter != unappliedMesh) 37 | { 38 | ApplyMeshCollider(); 39 | unappliedMesh = filter; 40 | } 41 | 42 | // Deform mesh 43 | Vector3 relativePoint = filter.transform.InverseTransformPoint(hit.point); 44 | DeformMesh(filter.mesh, relativePoint, pull * Time.deltaTime, radius); 45 | } 46 | } 47 | } 48 | 49 | private void ApplyMeshCollider() 50 | { 51 | if (unappliedMesh && unappliedMesh.GetComponent()) 52 | { 53 | unappliedMesh.GetComponent().sharedMesh = unappliedMesh.sharedMesh; 54 | } 55 | 56 | unappliedMesh = null; 57 | } 58 | 59 | private float NeedleFalloff(float dist, float inRadius) 60 | { 61 | return -(dist * dist) / (inRadius * inRadius) + 1.0f; 62 | } 63 | 64 | private void DeformMesh(Mesh mesh, Vector3 position, float power, float inRadius) 65 | { 66 | Vector3[] vertices = mesh.vertices; 67 | Vector3[] normals = mesh.normals; 68 | float sqrRadius = inRadius * inRadius; 69 | 70 | // Calculate averaged normal of all surrounding vertices 71 | Vector3 averageNormal = Vector3.zero; 72 | for (int i = 0; i < vertices.Length; i++) 73 | { 74 | float sqrMagnitude = (vertices[i] - position).sqrMagnitude; 75 | // Early out if too far away 76 | if (sqrMagnitude > sqrRadius) 77 | { 78 | continue; 79 | } 80 | 81 | float distance = Mathf.Sqrt(sqrMagnitude); 82 | float falloff = LinearFalloff(distance, inRadius); 83 | averageNormal += falloff * normals[i]; 84 | } 85 | 86 | averageNormal = averageNormal.normalized; 87 | 88 | // Deform vertices along averaged normal 89 | for (int i = 0; i < vertices.Length; i++) 90 | { 91 | float sqrMagnitude = (vertices[i] - position).sqrMagnitude; 92 | // Early out if too far away 93 | if (sqrMagnitude > sqrRadius) 94 | { 95 | continue; 96 | } 97 | 98 | float distance = Mathf.Sqrt(sqrMagnitude); 99 | float falloff; 100 | switch (fallOff) 101 | { 102 | case FallOff.Gauss: 103 | falloff = GaussFalloff(distance, inRadius); 104 | break; 105 | case FallOff.Needle: 106 | falloff = NeedleFalloff(distance, inRadius); 107 | break; 108 | default: 109 | falloff = LinearFalloff(distance, inRadius); 110 | break; 111 | } 112 | 113 | vertices[i] += averageNormal * falloff * power; 114 | } 115 | 116 | mesh.vertices = vertices; 117 | mesh.RecalculateNormals(); 118 | mesh.RecalculateBounds(); 119 | } 120 | 121 | private static float LinearFalloff(float distance, float inRadius) 122 | { 123 | return Mathf.Clamp01(1.0f - distance / inRadius); 124 | } 125 | 126 | private static float GaussFalloff(float distance, float inRadius) 127 | { 128 | return Mathf.Clamp01(Mathf.Pow(360.0f, -Mathf.Pow(distance / inRadius, 2.5f) - 0.01f)); 129 | } 130 | } 131 | 132 | public enum FallOff 133 | { 134 | Gauss, 135 | Linear, 136 | Needle 137 | } -------------------------------------------------------------------------------- /Assets/Resources/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/Resources/TextMesh Pro/Resources/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 | 59 | _VertexOffsetX ("Vertex OffsetX", float) = 0 60 | _VertexOffsetY ("Vertex OffsetY", float) = 0 61 | //_MaskCoord ("Mask Coords", vector) = (0,0,0,0) 62 | //_MaskSoftness ("Mask Softness", float) = 0 63 | } 64 | 65 | SubShader { 66 | 67 | Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" } 68 | 69 | LOD 300 70 | Cull [_CullMode] 71 | 72 | CGPROGRAM 73 | #pragma surface PixShader BlinnPhong alpha:blend vertex:VertShader nolightmap nodirlightmap 74 | #pragma target 3.0 75 | #pragma shader_feature __ GLOW_ON 76 | #pragma glsl 77 | 78 | #include "TMPro_Properties.cginc" 79 | #include "TMPro.cginc" 80 | 81 | half _FaceShininess; 82 | half _OutlineShininess; 83 | 84 | struct Input 85 | { 86 | fixed4 color : COLOR; 87 | float2 uv_MainTex; 88 | float2 uv2_FaceTex; 89 | float2 uv2_OutlineTex; 90 | float2 param; // Weight, Scale 91 | float3 viewDirEnv; 92 | }; 93 | 94 | 95 | #define BEVEL_ON 1 96 | #include "TMPro_Surface.cginc" 97 | 98 | ENDCG 99 | 100 | // Pass to render object as a shadow caster 101 | Pass 102 | { 103 | Name "Caster" 104 | Tags { "LightMode" = "ShadowCaster" } 105 | Offset 1, 1 106 | 107 | Fog {Mode Off} 108 | ZWrite On 109 | ZTest LEqual 110 | Cull Off 111 | 112 | CGPROGRAM 113 | #pragma vertex vert 114 | #pragma fragment frag 115 | #pragma multi_compile_shadowcaster 116 | #include "UnityCG.cginc" 117 | 118 | struct v2f { 119 | V2F_SHADOW_CASTER; 120 | float2 uv : TEXCOORD1; 121 | float2 uv2 : TEXCOORD3; 122 | float alphaClip : TEXCOORD2; 123 | }; 124 | 125 | uniform float4 _MainTex_ST; 126 | uniform float4 _OutlineTex_ST; 127 | float _OutlineWidth; 128 | float _FaceDilate; 129 | float _ScaleRatioA; 130 | 131 | v2f vert( appdata_base v ) 132 | { 133 | v2f o; 134 | TRANSFER_SHADOW_CASTER(o) 135 | o.uv = TRANSFORM_TEX(v.texcoord, _MainTex); 136 | o.uv2 = TRANSFORM_TEX(v.texcoord, _OutlineTex); 137 | o.alphaClip = (1.0 - _OutlineWidth * _ScaleRatioA - _FaceDilate * _ScaleRatioA) / 2; 138 | return o; 139 | } 140 | 141 | uniform sampler2D _MainTex; 142 | 143 | float4 frag(v2f i) : COLOR 144 | { 145 | fixed4 texcol = tex2D(_MainTex, i.uv).a; 146 | clip(texcol.a - i.alphaClip); 147 | SHADOW_CASTER_FRAGMENT(i) 148 | } 149 | ENDCG 150 | } 151 | } 152 | 153 | CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI" 154 | } 155 | 156 | -------------------------------------------------------------------------------- /Assets/Resources/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_PrefabParentObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_GameObject: {fileID: 0} 9 | m_Enabled: 1 10 | m_EditorHideFlags: 0 11 | m_Script: {fileID: 11500000, guid: ab2114bdc8544297b417dfefe9f1e410, type: 3} 12 | m_Name: Default Style Sheet 13 | m_EditorClassIdentifier: 14 | m_StyleList: 15 | - m_Name: H1 16 | m_HashCode: 2425 17 | m_OpeningDefinition: <#40ff80>* 18 | m_ClosingDefinition: '*' 19 | m_OpeningTagArray: 3c00000073000000690000007a000000650000003d00000032000000650000006d0000003e0000003c000000620000003e0000003c000000230000003400000030000000660000006600000038000000300000003e0000002a000000 20 | m_ClosingTagArray: 2a0000003c0000002f00000073000000690000007a000000650000003e0000003c0000002f000000620000003e0000003c0000002f000000630000006f0000006c0000006f000000720000003e000000 21 | - m_Name: Quote 22 | m_HashCode: 92254330 23 | m_OpeningDefinition: 24 | m_ClosingDefinition: 25 | m_OpeningTagArray: 3c000000690000003e0000003c00000073000000690000007a000000650000003d0000003700000035000000250000003e0000003c0000006d000000610000007200000067000000690000006e0000003d0000003100000030000000250000003e000000 26 | m_ClosingTagArray: 3c0000002f000000690000003e0000003c0000002f00000073000000690000007a000000650000003e0000003c0000002f00000077000000690000006400000074000000680000003e0000003c0000002f0000006d000000610000007200000067000000690000006e0000003e000000 27 | - m_Name: Link 28 | m_HashCode: 2687968 29 | m_OpeningDefinition: <#40a0ff> 30 | m_ClosingDefinition: 31 | m_OpeningTagArray: 3c000000750000003e0000003c000000230000003400000030000000610000003000000066000000660000003e0000003c0000006c000000690000006e0000006b0000003d0000002200000049000000440000005f0000003000000031000000220000003e000000 32 | m_ClosingTagArray: 3c0000002f000000750000003e0000003c0000002f000000630000006f0000006c0000006f000000720000003e0000003c0000002f0000006c000000690000006e0000006b0000003e000000 33 | - m_Name: Title 34 | m_HashCode: 98732960 35 | m_OpeningDefinition: 36 | m_ClosingDefinition: 37 | m_OpeningTagArray: 3c00000073000000690000007a000000650000003d000000310000003200000035000000250000003e0000003c000000620000003e0000003c000000610000006c00000069000000670000006e0000003d00000063000000650000006e0000007400000065000000720000003e000000 38 | m_ClosingTagArray: 3c0000002f00000073000000690000007a000000650000003e0000003c0000002f000000620000003e0000003c0000002f000000610000006c00000069000000670000006e0000003e000000 39 | - m_Name: H2 40 | m_HashCode: 2426 41 | m_OpeningDefinition: <#4080FF> 42 | m_ClosingDefinition: 43 | m_OpeningTagArray: 3c00000073000000690000007a000000650000003d000000310000002e00000035000000650000006d0000003e0000003c000000620000003e0000003c000000230000003400000030000000380000003000000046000000460000003e000000 44 | m_ClosingTagArray: 3c0000002f00000073000000690000007a000000650000003e0000003c0000002f000000620000003e0000003c0000002f000000630000006f0000006c0000006f000000720000003e000000 45 | - m_Name: H3 46 | m_HashCode: 2427 47 | m_OpeningDefinition: <#FF8040> 48 | m_ClosingDefinition: 49 | m_OpeningTagArray: 3c00000073000000690000007a000000650000003d000000310000002e0000003100000037000000650000006d0000003e0000003c000000620000003e0000003c000000230000004600000046000000380000003000000034000000300000003e000000 50 | m_ClosingTagArray: 3c0000002f00000073000000690000007a000000650000003e0000003c0000002f000000620000003e0000003c0000002f000000630000006f0000006c0000006f000000720000003e000000 51 | - m_Name: C1 52 | m_HashCode: 2194 53 | m_OpeningDefinition: 54 | m_ClosingDefinition: 55 | m_OpeningTagArray: 3c000000630000006f0000006c0000006f000000720000003d000000230000006600000066000000660000006600000034000000300000003e000000 56 | m_ClosingTagArray: 3c0000002f000000630000006f0000006c0000006f000000720000003e000000 57 | - m_Name: C2 58 | m_HashCode: 2193 59 | m_OpeningDefinition: 60 | m_ClosingDefinition: 61 | m_OpeningTagArray: 3c000000630000006f0000006c0000006f000000720000003d000000230000006600000066000000340000003000000046000000460000003e0000003c00000073000000690000007a000000650000003d000000310000003200000035000000250000003e000000 62 | m_ClosingTagArray: 3c0000002f000000630000006f0000006c0000006f000000720000003e0000003c0000002f00000073000000690000007a000000650000003e000000 63 | - m_Name: C3 64 | m_HashCode: 2192 65 | m_OpeningDefinition: 66 | m_ClosingDefinition: 67 | m_OpeningTagArray: 3c000000630000006f0000006c0000006f000000720000003d000000230000003800000030000000410000003000000046000000460000003e0000003c000000620000003e000000 68 | m_ClosingTagArray: 3c0000002f000000630000006f0000006c0000006f000000720000003e0000003c0000002f000000620000003e000000 69 | -------------------------------------------------------------------------------- /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: 4 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: Very Low 11 | pixelLightCount: 0 12 | shadows: 0 13 | shadowResolution: 0 14 | shadowProjection: 1 15 | shadowCascades: 1 16 | shadowDistance: 15 17 | shadowNearPlaneOffset: 3 18 | shadowCascade2Split: 0.33333334 19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 20 | shadowmaskMode: 0 21 | blendWeights: 1 22 | textureQuality: 1 23 | anisotropicTextures: 0 24 | antiAliasing: 0 25 | softParticles: 0 26 | softVegetation: 0 27 | realtimeReflectionProbes: 0 28 | billboardsFaceCameraPosition: 0 29 | vSyncCount: 0 30 | lodBias: 0.3 31 | maximumLODLevel: 0 32 | particleRaycastBudget: 4 33 | asyncUploadTimeSlice: 2 34 | asyncUploadBufferSize: 4 35 | resolutionScalingFixedDPIFactor: 1 36 | excludedTargetPlatforms: [] 37 | - serializedVersion: 2 38 | name: Low 39 | pixelLightCount: 0 40 | shadows: 0 41 | shadowResolution: 0 42 | shadowProjection: 1 43 | shadowCascades: 1 44 | shadowDistance: 20 45 | shadowNearPlaneOffset: 3 46 | shadowCascade2Split: 0.33333334 47 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 48 | shadowmaskMode: 0 49 | blendWeights: 2 50 | textureQuality: 0 51 | anisotropicTextures: 0 52 | antiAliasing: 0 53 | softParticles: 0 54 | softVegetation: 0 55 | realtimeReflectionProbes: 0 56 | billboardsFaceCameraPosition: 0 57 | vSyncCount: 0 58 | lodBias: 0.4 59 | maximumLODLevel: 0 60 | particleRaycastBudget: 16 61 | asyncUploadTimeSlice: 2 62 | asyncUploadBufferSize: 4 63 | resolutionScalingFixedDPIFactor: 1 64 | excludedTargetPlatforms: [] 65 | - serializedVersion: 2 66 | name: Medium 67 | pixelLightCount: 1 68 | shadows: 1 69 | shadowResolution: 0 70 | shadowProjection: 1 71 | shadowCascades: 1 72 | shadowDistance: 20 73 | shadowNearPlaneOffset: 3 74 | shadowCascade2Split: 0.33333334 75 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 76 | shadowmaskMode: 0 77 | blendWeights: 2 78 | textureQuality: 0 79 | anisotropicTextures: 1 80 | antiAliasing: 0 81 | softParticles: 0 82 | softVegetation: 0 83 | realtimeReflectionProbes: 0 84 | billboardsFaceCameraPosition: 0 85 | vSyncCount: 1 86 | lodBias: 0.7 87 | maximumLODLevel: 0 88 | particleRaycastBudget: 64 89 | asyncUploadTimeSlice: 2 90 | asyncUploadBufferSize: 4 91 | resolutionScalingFixedDPIFactor: 1 92 | excludedTargetPlatforms: [] 93 | - serializedVersion: 2 94 | name: High 95 | pixelLightCount: 2 96 | shadows: 2 97 | shadowResolution: 1 98 | shadowProjection: 1 99 | shadowCascades: 2 100 | shadowDistance: 40 101 | shadowNearPlaneOffset: 3 102 | shadowCascade2Split: 0.33333334 103 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 104 | shadowmaskMode: 1 105 | blendWeights: 2 106 | textureQuality: 0 107 | anisotropicTextures: 1 108 | antiAliasing: 2 109 | softParticles: 0 110 | softVegetation: 1 111 | realtimeReflectionProbes: 1 112 | billboardsFaceCameraPosition: 1 113 | vSyncCount: 1 114 | lodBias: 1 115 | maximumLODLevel: 0 116 | particleRaycastBudget: 256 117 | asyncUploadTimeSlice: 2 118 | asyncUploadBufferSize: 4 119 | resolutionScalingFixedDPIFactor: 1 120 | excludedTargetPlatforms: [] 121 | - serializedVersion: 2 122 | name: Very High 123 | pixelLightCount: 3 124 | shadows: 2 125 | shadowResolution: 2 126 | shadowProjection: 1 127 | shadowCascades: 2 128 | shadowDistance: 40 129 | shadowNearPlaneOffset: 3 130 | shadowCascade2Split: 0.33333334 131 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 132 | shadowmaskMode: 1 133 | blendWeights: 4 134 | textureQuality: 0 135 | anisotropicTextures: 1 136 | antiAliasing: 4 137 | softParticles: 1 138 | softVegetation: 1 139 | realtimeReflectionProbes: 1 140 | billboardsFaceCameraPosition: 1 141 | vSyncCount: 1 142 | lodBias: 1.5 143 | maximumLODLevel: 0 144 | particleRaycastBudget: 1024 145 | asyncUploadTimeSlice: 2 146 | asyncUploadBufferSize: 4 147 | resolutionScalingFixedDPIFactor: 1 148 | excludedTargetPlatforms: [] 149 | - serializedVersion: 2 150 | name: Ultra 151 | pixelLightCount: 4 152 | shadows: 2 153 | shadowResolution: 2 154 | shadowProjection: 1 155 | shadowCascades: 4 156 | shadowDistance: 150 157 | shadowNearPlaneOffset: 3 158 | shadowCascade2Split: 0.33333334 159 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 160 | shadowmaskMode: 1 161 | blendWeights: 4 162 | textureQuality: 0 163 | anisotropicTextures: 1 164 | antiAliasing: 4 165 | softParticles: 1 166 | softVegetation: 1 167 | realtimeReflectionProbes: 1 168 | billboardsFaceCameraPosition: 1 169 | vSyncCount: 1 170 | lodBias: 2 171 | maximumLODLevel: 0 172 | particleRaycastBudget: 4096 173 | asyncUploadTimeSlice: 2 174 | asyncUploadBufferSize: 4 175 | resolutionScalingFixedDPIFactor: 1 176 | excludedTargetPlatforms: [] 177 | m_PerPlatformDefaultQuality: 178 | Android: 2 179 | Nintendo 3DS: 5 180 | Nintendo Switch: 5 181 | PS4: 5 182 | PSP2: 2 183 | Standalone: 5 184 | Tizen: 2 185 | WebGL: 3 186 | WiiU: 5 187 | Windows Store Apps: 5 188 | XboxOne: 5 189 | iPhone: 2 190 | tvOS: 2 191 | -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!13 &1 4 | InputManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Axes: 8 | - serializedVersion: 3 9 | m_Name: Horizontal 10 | descriptiveName: 11 | descriptiveNegativeName: 12 | negativeButton: left 13 | positiveButton: right 14 | altNegativeButton: a 15 | altPositiveButton: d 16 | gravity: 3 17 | dead: 0.001 18 | sensitivity: 3 19 | snap: 1 20 | invert: 0 21 | type: 0 22 | axis: 0 23 | joyNum: 0 24 | - serializedVersion: 3 25 | m_Name: Vertical 26 | descriptiveName: 27 | descriptiveNegativeName: 28 | negativeButton: down 29 | positiveButton: up 30 | altNegativeButton: s 31 | altPositiveButton: w 32 | gravity: 3 33 | dead: 0.001 34 | sensitivity: 3 35 | snap: 1 36 | invert: 0 37 | type: 0 38 | axis: 0 39 | joyNum: 0 40 | - serializedVersion: 3 41 | m_Name: Fire1 42 | descriptiveName: 43 | descriptiveNegativeName: 44 | negativeButton: 45 | positiveButton: left ctrl 46 | altNegativeButton: 47 | altPositiveButton: mouse 0 48 | gravity: 1000 49 | dead: 0.001 50 | sensitivity: 1000 51 | snap: 0 52 | invert: 0 53 | type: 0 54 | axis: 0 55 | joyNum: 0 56 | - serializedVersion: 3 57 | m_Name: Fire2 58 | descriptiveName: 59 | descriptiveNegativeName: 60 | negativeButton: 61 | positiveButton: left alt 62 | altNegativeButton: 63 | altPositiveButton: mouse 1 64 | gravity: 1000 65 | dead: 0.001 66 | sensitivity: 1000 67 | snap: 0 68 | invert: 0 69 | type: 0 70 | axis: 0 71 | joyNum: 0 72 | - serializedVersion: 3 73 | m_Name: Fire3 74 | descriptiveName: 75 | descriptiveNegativeName: 76 | negativeButton: 77 | positiveButton: left shift 78 | altNegativeButton: 79 | altPositiveButton: mouse 2 80 | gravity: 1000 81 | dead: 0.001 82 | sensitivity: 1000 83 | snap: 0 84 | invert: 0 85 | type: 0 86 | axis: 0 87 | joyNum: 0 88 | - serializedVersion: 3 89 | m_Name: Jump 90 | descriptiveName: 91 | descriptiveNegativeName: 92 | negativeButton: 93 | positiveButton: space 94 | altNegativeButton: 95 | altPositiveButton: 96 | gravity: 1000 97 | dead: 0.001 98 | sensitivity: 1000 99 | snap: 0 100 | invert: 0 101 | type: 0 102 | axis: 0 103 | joyNum: 0 104 | - serializedVersion: 3 105 | m_Name: Mouse X 106 | descriptiveName: 107 | descriptiveNegativeName: 108 | negativeButton: 109 | positiveButton: 110 | altNegativeButton: 111 | altPositiveButton: 112 | gravity: 0 113 | dead: 0 114 | sensitivity: 0.1 115 | snap: 0 116 | invert: 0 117 | type: 1 118 | axis: 0 119 | joyNum: 0 120 | - serializedVersion: 3 121 | m_Name: Mouse Y 122 | descriptiveName: 123 | descriptiveNegativeName: 124 | negativeButton: 125 | positiveButton: 126 | altNegativeButton: 127 | altPositiveButton: 128 | gravity: 0 129 | dead: 0 130 | sensitivity: 0.1 131 | snap: 0 132 | invert: 0 133 | type: 1 134 | axis: 1 135 | joyNum: 0 136 | - serializedVersion: 3 137 | m_Name: Mouse ScrollWheel 138 | descriptiveName: 139 | descriptiveNegativeName: 140 | negativeButton: 141 | positiveButton: 142 | altNegativeButton: 143 | altPositiveButton: 144 | gravity: 0 145 | dead: 0 146 | sensitivity: 0.1 147 | snap: 0 148 | invert: 0 149 | type: 1 150 | axis: 2 151 | joyNum: 0 152 | - serializedVersion: 3 153 | m_Name: Horizontal 154 | descriptiveName: 155 | descriptiveNegativeName: 156 | negativeButton: 157 | positiveButton: 158 | altNegativeButton: 159 | altPositiveButton: 160 | gravity: 0 161 | dead: 0.19 162 | sensitivity: 1 163 | snap: 0 164 | invert: 0 165 | type: 2 166 | axis: 0 167 | joyNum: 0 168 | - serializedVersion: 3 169 | m_Name: Vertical 170 | descriptiveName: 171 | descriptiveNegativeName: 172 | negativeButton: 173 | positiveButton: 174 | altNegativeButton: 175 | altPositiveButton: 176 | gravity: 0 177 | dead: 0.19 178 | sensitivity: 1 179 | snap: 0 180 | invert: 1 181 | type: 2 182 | axis: 1 183 | joyNum: 0 184 | - serializedVersion: 3 185 | m_Name: Fire1 186 | descriptiveName: 187 | descriptiveNegativeName: 188 | negativeButton: 189 | positiveButton: joystick button 0 190 | altNegativeButton: 191 | altPositiveButton: 192 | gravity: 1000 193 | dead: 0.001 194 | sensitivity: 1000 195 | snap: 0 196 | invert: 0 197 | type: 0 198 | axis: 0 199 | joyNum: 0 200 | - serializedVersion: 3 201 | m_Name: Fire2 202 | descriptiveName: 203 | descriptiveNegativeName: 204 | negativeButton: 205 | positiveButton: joystick button 1 206 | altNegativeButton: 207 | altPositiveButton: 208 | gravity: 1000 209 | dead: 0.001 210 | sensitivity: 1000 211 | snap: 0 212 | invert: 0 213 | type: 0 214 | axis: 0 215 | joyNum: 0 216 | - serializedVersion: 3 217 | m_Name: Fire3 218 | descriptiveName: 219 | descriptiveNegativeName: 220 | negativeButton: 221 | positiveButton: joystick button 2 222 | altNegativeButton: 223 | altPositiveButton: 224 | gravity: 1000 225 | dead: 0.001 226 | sensitivity: 1000 227 | snap: 0 228 | invert: 0 229 | type: 0 230 | axis: 0 231 | joyNum: 0 232 | - serializedVersion: 3 233 | m_Name: Jump 234 | descriptiveName: 235 | descriptiveNegativeName: 236 | negativeButton: 237 | positiveButton: joystick button 3 238 | altNegativeButton: 239 | altPositiveButton: 240 | gravity: 1000 241 | dead: 0.001 242 | sensitivity: 1000 243 | snap: 0 244 | invert: 0 245 | type: 0 246 | axis: 0 247 | joyNum: 0 248 | - serializedVersion: 3 249 | m_Name: Submit 250 | descriptiveName: 251 | descriptiveNegativeName: 252 | negativeButton: 253 | positiveButton: return 254 | altNegativeButton: 255 | altPositiveButton: joystick button 0 256 | gravity: 1000 257 | dead: 0.001 258 | sensitivity: 1000 259 | snap: 0 260 | invert: 0 261 | type: 0 262 | axis: 0 263 | joyNum: 0 264 | - serializedVersion: 3 265 | m_Name: Submit 266 | descriptiveName: 267 | descriptiveNegativeName: 268 | negativeButton: 269 | positiveButton: enter 270 | altNegativeButton: 271 | altPositiveButton: space 272 | gravity: 1000 273 | dead: 0.001 274 | sensitivity: 1000 275 | snap: 0 276 | invert: 0 277 | type: 0 278 | axis: 0 279 | joyNum: 0 280 | - serializedVersion: 3 281 | m_Name: Cancel 282 | descriptiveName: 283 | descriptiveNegativeName: 284 | negativeButton: 285 | positiveButton: escape 286 | altNegativeButton: 287 | altPositiveButton: joystick button 1 288 | gravity: 1000 289 | dead: 0.001 290 | sensitivity: 1000 291 | snap: 0 292 | invert: 0 293 | type: 0 294 | axis: 0 295 | joyNum: 0 296 | -------------------------------------------------------------------------------- /Assets/Resources/TextMesh Pro/Resources/Sprite Assets/EmojiOne.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2103686 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 1 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: TextMeshPro/Sprite 10 | m_Shader: {fileID: 4800000, guid: cf81c85f95fe47e1a27f6ae460cf182c, type: 3} 11 | m_ShaderKeywords: UNITY_UI_CLIP_RECT 12 | m_LightmapFlags: 5 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _MainTex: 22 | m_Texture: {fileID: 2800000, guid: dffef66376be4fa480fb02b19edbe903, type: 3} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | m_Floats: 26 | - _ColorMask: 15 27 | - _Stencil: 0 28 | - _StencilComp: 8 29 | - _StencilOp: 0 30 | - _StencilReadMask: 255 31 | - _StencilWriteMask: 255 32 | - _UseUIAlphaClip: 0 33 | m_Colors: 34 | - _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767} 35 | - _Color: {r: 1, g: 1, b: 1, a: 1} 36 | --- !u!114 &11400000 37 | MonoBehaviour: 38 | m_ObjectHideFlags: 0 39 | m_PrefabParentObject: {fileID: 0} 40 | m_PrefabInternal: {fileID: 0} 41 | m_GameObject: {fileID: 0} 42 | m_Enabled: 1 43 | m_EditorHideFlags: 0 44 | m_Script: {fileID: 11500000, guid: 84a92b25f83d49b9bc132d206b370281, type: 3} 45 | m_Name: EmojiOne 46 | m_EditorClassIdentifier: 47 | hashCode: -1836805472 48 | material: {fileID: 2103686} 49 | materialHashCode: 0 50 | spriteSheet: {fileID: 2800000, guid: dffef66376be4fa480fb02b19edbe903, type: 3} 51 | spriteInfoList: 52 | - id: 0 53 | x: 0 54 | y: 384 55 | width: 128 56 | height: 128 57 | xOffset: 0 58 | yOffset: 115.6 59 | xAdvance: 128 60 | scale: 1 61 | name: Smiling face with smiling eyes 62 | hashCode: -1318250903 63 | unicode: 128522 64 | pivot: {x: 0.5, y: 0.5} 65 | sprite: {fileID: 0} 66 | - id: 1 67 | x: 128 68 | y: 384 69 | width: 128 70 | height: 128 71 | xOffset: 0 72 | yOffset: 115.6 73 | xAdvance: 128 74 | scale: 1 75 | name: 1f60b 76 | hashCode: 57188339 77 | unicode: 128523 78 | pivot: {x: 0.5, y: 0.5} 79 | sprite: {fileID: 0} 80 | - id: 2 81 | x: 256 82 | y: 384 83 | width: 128 84 | height: 128 85 | xOffset: 0 86 | yOffset: 115.6 87 | xAdvance: 128 88 | scale: 1 89 | name: 1f60d 90 | hashCode: 57188341 91 | unicode: 128525 92 | pivot: {x: 0.5, y: 0.5} 93 | sprite: {fileID: 0} 94 | - id: 3 95 | x: 384 96 | y: 384 97 | width: 128 98 | height: 128 99 | xOffset: 0 100 | yOffset: 115.6 101 | xAdvance: 128 102 | scale: 1 103 | name: 1f60e 104 | hashCode: 57188340 105 | unicode: 128526 106 | pivot: {x: 0.5, y: 0.5} 107 | sprite: {fileID: 0} 108 | - id: 4 109 | x: 0 110 | y: 256 111 | width: 128 112 | height: 128 113 | xOffset: 0 114 | yOffset: 115.6 115 | xAdvance: 128 116 | scale: 1 117 | name: Grinning face 118 | hashCode: -95541379 119 | unicode: 128512 120 | pivot: {x: 0.5, y: 0.5} 121 | sprite: {fileID: 0} 122 | - id: 5 123 | x: 128 124 | y: 256 125 | width: 128 126 | height: 128 127 | xOffset: 0 128 | yOffset: 115.6 129 | xAdvance: 128 130 | scale: 1 131 | name: 1f601 132 | hashCode: 57188256 133 | unicode: 128513 134 | pivot: {x: 0.5, y: 0.5} 135 | sprite: {fileID: 0} 136 | - id: 6 137 | x: 256 138 | y: 256 139 | width: 128 140 | height: 128 141 | xOffset: 0 142 | yOffset: 115.6 143 | xAdvance: 128 144 | scale: 1 145 | name: Face with tears of joy 146 | hashCode: 239522663 147 | unicode: 128514 148 | pivot: {x: 0.5, y: 0.5} 149 | sprite: {fileID: 0} 150 | - id: 7 151 | x: 384 152 | y: 256 153 | width: 128 154 | height: 128 155 | xOffset: 0 156 | yOffset: 115.6 157 | xAdvance: 128 158 | scale: 1 159 | name: 1f603 160 | hashCode: 57188258 161 | unicode: 128515 162 | pivot: {x: 0.5, y: 0.5} 163 | sprite: {fileID: 0} 164 | - id: 8 165 | x: 0 166 | y: 128 167 | width: 128 168 | height: 128 169 | xOffset: 0 170 | yOffset: 115.6 171 | xAdvance: 128 172 | scale: 1 173 | name: 1f604 174 | hashCode: 57188261 175 | unicode: 128516 176 | pivot: {x: 0.5, y: 0.5} 177 | sprite: {fileID: 0} 178 | - id: 9 179 | x: 128 180 | y: 128 181 | width: 128 182 | height: 128 183 | xOffset: 0 184 | yOffset: 115.6 185 | xAdvance: 128 186 | scale: 1 187 | name: 1f605 188 | hashCode: 57188260 189 | unicode: 128517 190 | pivot: {x: 0.5, y: 0.5} 191 | sprite: {fileID: 0} 192 | - id: 10 193 | x: 256 194 | y: 128 195 | width: 128 196 | height: 128 197 | xOffset: 0 198 | yOffset: 115.6 199 | xAdvance: 128 200 | scale: 1 201 | name: 1f606 202 | hashCode: 57188263 203 | unicode: 128518 204 | pivot: {x: 0.5, y: 0.5} 205 | sprite: {fileID: 0} 206 | - id: 11 207 | x: 384 208 | y: 128 209 | width: 128 210 | height: 128 211 | xOffset: 0 212 | yOffset: 115.6 213 | xAdvance: 128 214 | scale: 1 215 | name: 1f609 216 | hashCode: 57188264 217 | unicode: 128521 218 | pivot: {x: 0.5, y: 0.5} 219 | sprite: {fileID: 0} 220 | - id: 12 221 | x: 0 222 | y: 0 223 | width: 128 224 | height: 128 225 | xOffset: 0 226 | yOffset: 115.6 227 | xAdvance: 128 228 | scale: 1 229 | name: 1f618 230 | hashCode: 57188168 231 | unicode: 128536 232 | pivot: {x: 0.5, y: 0.5} 233 | sprite: {fileID: 0} 234 | - id: 13 235 | x: 128 236 | y: 0 237 | width: 128 238 | height: 128 239 | xOffset: 0 240 | yOffset: 115.6 241 | xAdvance: 128 242 | scale: 1 243 | name: 1f923 244 | hashCode: 57200239 245 | unicode: 129315 246 | pivot: {x: 0.5, y: 0.5} 247 | sprite: {fileID: 0} 248 | - id: 14 249 | x: 256 250 | y: 0 251 | width: 128 252 | height: 128 253 | xOffset: 0 254 | yOffset: 115.6 255 | xAdvance: 128 256 | scale: 1 257 | name: 263a 258 | hashCode: 1748406 259 | unicode: 9786 260 | pivot: {x: 0.5, y: 0.5} 261 | sprite: {fileID: 0} 262 | - id: 15 263 | x: 384 264 | y: 0 265 | width: 128 266 | height: 128 267 | xOffset: 0 268 | yOffset: 115.6 269 | xAdvance: 128 270 | scale: 1 271 | name: 2639 272 | hashCode: 1748462 273 | unicode: 9785 274 | pivot: {x: 0.5, y: 0.5} 275 | sprite: {fileID: 0} 276 | fallbackSpriteAssets: [] 277 | --- !u!21 &1369835458 278 | Material: 279 | serializedVersion: 6 280 | m_ObjectHideFlags: 1 281 | m_PrefabParentObject: {fileID: 0} 282 | m_PrefabInternal: {fileID: 0} 283 | m_Name: TextMeshPro/Sprite 284 | m_Shader: {fileID: 4800000, guid: cf81c85f95fe47e1a27f6ae460cf182c, type: 3} 285 | m_ShaderKeywords: 286 | m_LightmapFlags: 5 287 | m_EnableInstancingVariants: 0 288 | m_DoubleSidedGI: 0 289 | m_CustomRenderQueue: -1 290 | stringTagMap: {} 291 | disabledShaderPasses: [] 292 | m_SavedProperties: 293 | serializedVersion: 3 294 | m_TexEnvs: [] 295 | m_Floats: [] 296 | m_Colors: [] 297 | -------------------------------------------------------------------------------- /Assets/Animations/Tron Trail.anim: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!74 &7400000 4 | AnimationClip: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_Name: Tron Trail 9 | serializedVersion: 6 10 | m_Legacy: 0 11 | m_Compressed: 0 12 | m_UseHighQualityCurve: 1 13 | m_RotationCurves: [] 14 | m_CompressedRotationCurves: [] 15 | m_EulerCurves: [] 16 | m_PositionCurves: 17 | - curve: 18 | serializedVersion: 2 19 | m_Curve: 20 | - serializedVersion: 3 21 | time: 0 22 | value: {x: -6.5814, y: -16.8, z: -18.618} 23 | inSlope: {x: 9.849795, y: 0, z: -13.52449} 24 | outSlope: {x: 9.849795, y: 0, z: -13.52449} 25 | tangentMode: 0 26 | weightedMode: 0 27 | inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} 28 | outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} 29 | - serializedVersion: 3 30 | time: 0.81666666 31 | value: {x: 1.4626, y: -16.8, z: -29.663} 32 | inSlope: {x: 4.9248977, y: 0, z: 0.96411943} 33 | outSlope: {x: 4.9248977, y: 0, z: 0.96411943} 34 | tangentMode: 0 35 | weightedMode: 0 36 | inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} 37 | outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} 38 | - serializedVersion: 3 39 | time: 1.55 40 | value: {x: 1.4626, y: -16.8, z: -18.331} 41 | inSlope: {x: 5.908053, y: 0, z: 7.7263646} 42 | outSlope: {x: 5.908053, y: 0, z: 7.7263646} 43 | tangentMode: 0 44 | weightedMode: 0 45 | inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} 46 | outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} 47 | - serializedVersion: 3 48 | time: 2.1666667 49 | value: {x: 8.7492, y: -16.8, z: -18.331} 50 | inSlope: {x: -23.329748, y: 0, z: -27.028} 51 | outSlope: {x: -23.329748, y: 0, z: -27.028} 52 | tangentMode: 0 53 | weightedMode: 0 54 | inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} 55 | outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} 56 | - serializedVersion: 3 57 | time: 2.4166667 58 | value: {x: -5.8697, y: -16.8, z: -31.845} 59 | inSlope: {x: -58.4756, y: 0, z: -54.056} 60 | outSlope: {x: -58.4756, y: 0, z: -54.056} 61 | tangentMode: 0 62 | weightedMode: 0 63 | inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} 64 | outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} 65 | m_PreInfinity: 2 66 | m_PostInfinity: 2 67 | m_RotationOrder: 4 68 | path: 69 | m_ScaleCurves: [] 70 | m_FloatCurves: [] 71 | m_PPtrCurves: [] 72 | m_SampleRate: 60 73 | m_WrapMode: 0 74 | m_Bounds: 75 | m_Center: {x: 0, y: 0, z: 0} 76 | m_Extent: {x: 0, y: 0, z: 0} 77 | m_ClipBindingConstant: 78 | genericBindings: 79 | - serializedVersion: 2 80 | path: 0 81 | attribute: 1 82 | script: {fileID: 0} 83 | typeID: 4 84 | customType: 0 85 | isPPtrCurve: 0 86 | pptrCurveMapping: [] 87 | m_AnimationClipSettings: 88 | serializedVersion: 2 89 | m_AdditiveReferencePoseClip: {fileID: 0} 90 | m_AdditiveReferencePoseTime: 0 91 | m_StartTime: 0 92 | m_StopTime: 2.4166667 93 | m_OrientationOffsetY: 0 94 | m_Level: 0 95 | m_CycleOffset: 0 96 | m_HasAdditiveReferencePose: 0 97 | m_LoopTime: 1 98 | m_LoopBlend: 0 99 | m_LoopBlendOrientation: 0 100 | m_LoopBlendPositionY: 0 101 | m_LoopBlendPositionXZ: 0 102 | m_KeepOriginalOrientation: 0 103 | m_KeepOriginalPositionY: 1 104 | m_KeepOriginalPositionXZ: 0 105 | m_HeightFromFeet: 0 106 | m_Mirror: 0 107 | m_EditorCurves: 108 | - curve: 109 | serializedVersion: 2 110 | m_Curve: 111 | - serializedVersion: 3 112 | time: 0 113 | value: -6.5814 114 | inSlope: 9.849795 115 | outSlope: 9.849795 116 | tangentMode: 34 117 | weightedMode: 0 118 | inWeight: 0.33333334 119 | outWeight: 0.33333334 120 | - serializedVersion: 3 121 | time: 0.81666666 122 | value: 1.4626 123 | inSlope: 4.9248977 124 | outSlope: 4.9248977 125 | tangentMode: 34 126 | weightedMode: 0 127 | inWeight: 0.33333334 128 | outWeight: 0.33333334 129 | - serializedVersion: 3 130 | time: 1.55 131 | value: 1.4626 132 | inSlope: 5.908053 133 | outSlope: 5.908053 134 | tangentMode: 34 135 | weightedMode: 0 136 | inWeight: 0.33333334 137 | outWeight: 0.33333334 138 | - serializedVersion: 3 139 | time: 2.1666667 140 | value: 8.7492 141 | inSlope: -23.329748 142 | outSlope: -23.329748 143 | tangentMode: 34 144 | weightedMode: 0 145 | inWeight: 0.33333334 146 | outWeight: 0.33333334 147 | - serializedVersion: 3 148 | time: 2.4166667 149 | value: -5.8697 150 | inSlope: -58.4756 151 | outSlope: -58.4756 152 | tangentMode: 34 153 | weightedMode: 0 154 | inWeight: 0.33333334 155 | outWeight: 0.33333334 156 | m_PreInfinity: 2 157 | m_PostInfinity: 2 158 | m_RotationOrder: 4 159 | attribute: m_LocalPosition.x 160 | path: 161 | classID: 4 162 | script: {fileID: 0} 163 | - curve: 164 | serializedVersion: 2 165 | m_Curve: 166 | - serializedVersion: 3 167 | time: 0 168 | value: -16.8 169 | inSlope: 0 170 | outSlope: 0 171 | tangentMode: 136 172 | weightedMode: 0 173 | inWeight: 0.33333334 174 | outWeight: 0.33333334 175 | m_PreInfinity: 2 176 | m_PostInfinity: 2 177 | m_RotationOrder: 4 178 | attribute: m_LocalPosition.y 179 | path: 180 | classID: 4 181 | script: {fileID: 0} 182 | - curve: 183 | serializedVersion: 2 184 | m_Curve: 185 | - serializedVersion: 3 186 | time: 0 187 | value: -18.618 188 | inSlope: -13.52449 189 | outSlope: -13.52449 190 | tangentMode: 34 191 | weightedMode: 0 192 | inWeight: 0.33333334 193 | outWeight: 0.33333334 194 | - serializedVersion: 3 195 | time: 0.81666666 196 | value: -29.663 197 | inSlope: 0.96411943 198 | outSlope: 0.96411943 199 | tangentMode: 34 200 | weightedMode: 0 201 | inWeight: 0.33333334 202 | outWeight: 0.33333334 203 | - serializedVersion: 3 204 | time: 1.55 205 | value: -18.331 206 | inSlope: 7.7263646 207 | outSlope: 7.7263646 208 | tangentMode: 34 209 | weightedMode: 0 210 | inWeight: 0.33333334 211 | outWeight: 0.33333334 212 | - serializedVersion: 3 213 | time: 2.1666667 214 | value: -18.331 215 | inSlope: -27.028 216 | outSlope: -27.028 217 | tangentMode: 34 218 | weightedMode: 0 219 | inWeight: 0.33333334 220 | outWeight: 0.33333334 221 | - serializedVersion: 3 222 | time: 2.4166667 223 | value: -31.845 224 | inSlope: -54.056 225 | outSlope: -54.056 226 | tangentMode: 34 227 | weightedMode: 0 228 | inWeight: 0.33333334 229 | outWeight: 0.33333334 230 | m_PreInfinity: 2 231 | m_PostInfinity: 2 232 | m_RotationOrder: 4 233 | attribute: m_LocalPosition.z 234 | path: 235 | classID: 4 236 | script: {fileID: 0} 237 | m_EulerEditorCurves: [] 238 | m_HasGenericRootTransform: 1 239 | m_HasMotionFloatCurves: 0 240 | m_GenerateMotionCurves: 0 241 | m_Events: [] 242 | -------------------------------------------------------------------------------- /Assets/Resources/TextMesh Pro/Resources/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 | 38 | _VertexOffsetX ("Vertex OffsetX", float) = 0 39 | _VertexOffsetY ("Vertex OffsetY", float) = 0 40 | 41 | _ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767) 42 | _MaskSoftnessX ("Mask SoftnessX", float) = 0 43 | _MaskSoftnessY ("Mask SoftnessY", float) = 0 44 | 45 | _StencilComp ("Stencil Comparison", Float) = 8 46 | _Stencil ("Stencil ID", Float) = 0 47 | _StencilOp ("Stencil Operation", Float) = 0 48 | _StencilWriteMask ("Stencil Write Mask", Float) = 255 49 | _StencilReadMask ("Stencil Read Mask", Float) = 255 50 | 51 | _ColorMask ("Color Mask", Float) = 15 52 | } 53 | 54 | SubShader { 55 | Tags 56 | { 57 | "Queue"="Overlay" 58 | "IgnoreProjector"="True" 59 | "RenderType"="Transparent" 60 | } 61 | 62 | 63 | Stencil 64 | { 65 | Ref [_Stencil] 66 | Comp [_StencilComp] 67 | Pass [_StencilOp] 68 | ReadMask [_StencilReadMask] 69 | WriteMask [_StencilWriteMask] 70 | } 71 | 72 | Cull [_CullMode] 73 | ZWrite Off 74 | Lighting Off 75 | Fog { Mode Off } 76 | ZTest Always 77 | Blend One OneMinusSrcAlpha 78 | ColorMask [_ColorMask] 79 | 80 | Pass { 81 | CGPROGRAM 82 | #pragma vertex VertShader 83 | #pragma fragment PixShader 84 | #pragma shader_feature __ OUTLINE_ON 85 | #pragma shader_feature __ UNDERLAY_ON UNDERLAY_INNER 86 | 87 | #pragma multi_compile __ UNITY_UI_CLIP_RECT 88 | #pragma multi_compile __ UNITY_UI_ALPHACLIP 89 | 90 | #include "UnityCG.cginc" 91 | #include "UnityUI.cginc" 92 | #include "TMPro_Properties.cginc" 93 | 94 | struct vertex_t { 95 | float4 vertex : POSITION; 96 | float3 normal : NORMAL; 97 | fixed4 color : COLOR; 98 | float2 texcoord0 : TEXCOORD0; 99 | float2 texcoord1 : TEXCOORD1; 100 | }; 101 | 102 | struct pixel_t { 103 | float4 vertex : SV_POSITION; 104 | fixed4 faceColor : COLOR; 105 | fixed4 outlineColor : COLOR1; 106 | float4 texcoord0 : TEXCOORD0; // Texture UV, Mask UV 107 | half4 param : TEXCOORD1; // Scale(x), BiasIn(y), BiasOut(z), Bias(w) 108 | half4 mask : TEXCOORD2; // Position in clip space(xy), Softness(zw) 109 | #if (UNDERLAY_ON | UNDERLAY_INNER) 110 | float4 texcoord1 : TEXCOORD3; // Texture UV, alpha, reserved 111 | half2 underlayParam : TEXCOORD4; // Scale(x), Bias(y) 112 | #endif 113 | }; 114 | 115 | 116 | pixel_t VertShader(vertex_t input) 117 | { 118 | float bold = step(input.texcoord1.y, 0); 119 | 120 | float4 vert = input.vertex; 121 | vert.x += _VertexOffsetX; 122 | vert.y += _VertexOffsetY; 123 | float4 vPosition = UnityObjectToClipPos(vert); 124 | 125 | float2 pixelSize = vPosition.w; 126 | pixelSize /= float2(_ScaleX, _ScaleY) * abs(mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy)); 127 | 128 | float scale = rsqrt(dot(pixelSize, pixelSize)); 129 | scale *= abs(input.texcoord1.y) * _GradientScale * 1.5; 130 | if(UNITY_MATRIX_P[3][3] == 0) scale = lerp(abs(scale) * (1 - _PerspectiveFilter), scale, abs(dot(UnityObjectToWorldNormal(input.normal.xyz), normalize(WorldSpaceViewDir(vert))))); 131 | 132 | float weight = lerp(_WeightNormal, _WeightBold, bold) / 4.0; 133 | weight = (weight + _FaceDilate) * _ScaleRatioA * 0.5; 134 | 135 | float layerScale = scale; 136 | 137 | scale /= 1 + (_OutlineSoftness * _ScaleRatioA * scale); 138 | float bias = (0.5 - weight) * scale - 0.5; 139 | float outline = _OutlineWidth * _ScaleRatioA * 0.5 * scale; 140 | 141 | float opacity = input.color.a; 142 | #if (UNDERLAY_ON | UNDERLAY_INNER) 143 | opacity = 1.0; 144 | #endif 145 | 146 | fixed4 faceColor = fixed4(input.color.rgb, opacity) * _FaceColor; 147 | faceColor.rgb *= faceColor.a; 148 | 149 | fixed4 outlineColor = _OutlineColor; 150 | outlineColor.a *= opacity; 151 | outlineColor.rgb *= outlineColor.a; 152 | outlineColor = lerp(faceColor, outlineColor, sqrt(min(1.0, (outline * 2)))); 153 | 154 | #if (UNDERLAY_ON | UNDERLAY_INNER) 155 | 156 | layerScale /= 1 + ((_UnderlaySoftness * _ScaleRatioC) * layerScale); 157 | float layerBias = (.5 - weight) * layerScale - .5 - ((_UnderlayDilate * _ScaleRatioC) * .5 * layerScale); 158 | 159 | float x = -(_UnderlayOffsetX * _ScaleRatioC) * _GradientScale / _TextureWidth; 160 | float y = -(_UnderlayOffsetY * _ScaleRatioC) * _GradientScale / _TextureHeight; 161 | float2 layerOffset = float2(x, y); 162 | #endif 163 | 164 | // Generate UV for the Masking Texture 165 | float4 clampedRect = clamp(_ClipRect, -2e10, 2e10); 166 | float2 maskUV = (vert.xy - clampedRect.xy) / (clampedRect.zw - clampedRect.xy); 167 | 168 | // Structure for pixel shader 169 | pixel_t output = { 170 | vPosition, 171 | faceColor, 172 | outlineColor, 173 | float4(input.texcoord0.x, input.texcoord0.y, maskUV.x, maskUV.y), 174 | half4(scale, bias - outline, bias + outline, bias), 175 | half4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy)), 176 | #if (UNDERLAY_ON | UNDERLAY_INNER) 177 | float4(input.texcoord0 + layerOffset, input.color.a, 0), 178 | half2(layerScale, layerBias), 179 | #endif 180 | }; 181 | 182 | return output; 183 | } 184 | 185 | 186 | // PIXEL SHADER 187 | fixed4 PixShader(pixel_t input) : SV_Target 188 | { 189 | half d = tex2D(_MainTex, input.texcoord0.xy).a * input.param.x; 190 | half4 c = input.faceColor * saturate(d - input.param.w); 191 | 192 | #ifdef OUTLINE_ON 193 | c = lerp(input.outlineColor, input.faceColor, saturate(d - input.param.z)); 194 | c *= saturate(d - input.param.y); 195 | #endif 196 | 197 | #if UNDERLAY_ON 198 | d = tex2D(_MainTex, input.texcoord1.xy).a * input.underlayParam.x; 199 | c += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * saturate(d - input.underlayParam.y) * (1 - c.a); 200 | #endif 201 | 202 | #if UNDERLAY_INNER 203 | half sd = saturate(d - input.param.z); 204 | d = tex2D(_MainTex, input.texcoord1.xy).a * input.underlayParam.x; 205 | c += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * (1 - saturate(d - input.underlayParam.y)) * sd * (1 - c.a); 206 | #endif 207 | 208 | // Alternative implementation to UnityGet2DClipping with support for softness. 209 | #if UNITY_UI_CLIP_RECT 210 | half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(input.mask.xy)) * input.mask.zw); 211 | c *= m.x * m.y; 212 | #endif 213 | 214 | #if (UNDERLAY_ON | UNDERLAY_INNER) 215 | c *= input.texcoord1.z; 216 | #endif 217 | 218 | #if UNITY_UI_ALPHACLIP 219 | clip(c.a - 0.001); 220 | #endif 221 | 222 | return c; 223 | } 224 | ENDCG 225 | } 226 | } 227 | 228 | CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI" 229 | } 230 | --------------------------------------------------------------------------------