├── .gitignore ├── Assets ├── Audio.meta ├── Audio │ ├── Explosion_Small.wav │ ├── Explosion_Small.wav.meta │ ├── SoundFX.cfxr │ └── SoundFX.cfxr.meta ├── Materials.meta ├── Materials │ ├── Default.mat │ ├── Default.mat.meta │ ├── Flares.mat │ ├── Flares.mat.meta │ ├── Ground.mat │ ├── Ground.mat.meta │ ├── Mesh Particles.mat │ ├── Mesh Particles.mat.meta │ ├── Shockwave.mat │ ├── Shockwave.mat.meta │ ├── burn-mark.mat │ ├── burn-mark.mat.meta │ ├── heat-distortion.mat │ ├── heat-distortion.mat.meta │ ├── particle-blur.mat │ ├── particle-blur.mat.meta │ ├── particle-default-hard-edge.mat │ ├── particle-default-hard-edge.mat.meta │ ├── particles-diffuse.mat │ ├── particles-diffuse.mat.meta │ ├── volumetric-explosion.mat │ └── volumetric-explosion.mat.meta ├── Prefabs.meta ├── Prefabs │ ├── Flares.prefab │ ├── Flares.prefab.meta │ ├── Heat Distortion.prefab │ ├── Heat Distortion.prefab.meta │ ├── Light.prefab │ ├── Light.prefab.meta │ ├── Shockwave.prefab │ ├── Shockwave.prefab.meta │ ├── Smoke Trail.prefab │ ├── Smoke Trail.prefab.meta │ ├── Sparks.prefab │ ├── Sparks.prefab.meta │ ├── Volumetric Explosion (Small).prefab │ ├── Volumetric Explosion (Small).prefab.meta │ ├── Volumetric Explosion.prefab │ └── Volumetric Explosion.prefab.meta ├── Scenes.meta ├── Scenes │ ├── explosions.unity │ └── explosions.unity.meta ├── Scripts.meta ├── Scripts │ ├── ObjectPool.cs │ ├── ObjectPool.cs.meta │ ├── ObjectPoolEditor.cs │ ├── ObjectPoolEditor.cs.meta │ ├── PixelBoy.cs │ ├── PixelBoy.cs.meta │ ├── SceneManager.cs │ ├── SceneManager.cs.meta │ ├── SmokeTrail.cs │ ├── SmokeTrail.cs.meta │ ├── VolumetricExplosion.cs │ └── VolumetricExplosion.cs.meta ├── Shaders.meta ├── Shaders │ ├── Explosion.shader │ ├── Explosion.shader.meta │ ├── HeatDistortion.shader │ ├── HeatDistortion.shader.meta │ ├── VolumetricExplosion.shader │ └── VolumetricExplosion.shader.meta ├── Textures.meta └── Textures │ ├── 02.png │ ├── 02.png.meta │ ├── 03.psd │ ├── 03.psd.meta │ ├── Shockwave 1.psd.meta │ ├── Shockwave.psd │ ├── Shockwave.psd.meta │ ├── burn-mark.png │ ├── burn-mark.png.meta │ ├── cr_cold.psd.meta │ ├── cr_explosion.psd.meta │ ├── cr_smoke.psd.meta │ ├── cr_toon.psd.meta │ ├── particle-blur.psd.meta │ ├── particle-glow.psd.meta │ ├── particle-hard-edge.psd │ ├── particle-hard-edge.psd.meta │ ├── worley-noise-2-rgb.psd.meta │ ├── worley-noise-2.psd.meta │ ├── worley-noise.psd.meta │ ├── worley-repeating-rgb.psd.meta │ └── worley-repeating.psd.meta ├── Dec-09-2016 15-10-47.gif ├── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── NetworkManager.asset ├── Physics2DSettings.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── TagManager.asset ├── TimeManager.asset ├── UnityAdsSettings.asset └── UnityConnectSettings.asset └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | /[Ll]ibrary/ 2 | /[Tt]emp/ 3 | /[Oo]bj/ 4 | /[Bb]uild/ 5 | /[Bb]uilds/ 6 | /Assets/AssetStoreTools* 7 | 8 | # Autogenerated VS/MD solution and project files 9 | ExportedObj/ 10 | *.csproj 11 | *.unityproj 12 | *.sln 13 | *.suo 14 | *.tmp 15 | *.user 16 | *.userprefs 17 | *.pidb 18 | *.booproj 19 | *.svd 20 | 21 | 22 | # Unity3D generated meta files 23 | *.pidb.meta 24 | 25 | # Unity3D Generated File On Crash Reports 26 | sysinfo.txt 27 | 28 | # Builds 29 | *.apk 30 | *.unitypackage 31 | 32 | # Custom ignore 33 | *.psd -------------------------------------------------------------------------------- /Assets/Audio.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d218fcf9b16cb423cb074a0fd3ada5e0 3 | folderAsset: yes 4 | timeCreated: 1465689190 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Audio/Explosion_Small.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stuffmattdoes/Unity-Volumetric-Explosions/9b03338b1216f6bb1d13afa53f5f09aa1d46b582/Assets/Audio/Explosion_Small.wav -------------------------------------------------------------------------------- /Assets/Audio/Explosion_Small.wav.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fc6ac6da1a7984b0a8bcf79496a00b84 3 | timeCreated: 1465689190 4 | licenseType: Free 5 | AudioImporter: 6 | serializedVersion: 6 7 | defaultSettings: 8 | loadType: 0 9 | sampleRateSetting: 0 10 | sampleRateOverride: 44100 11 | compressionFormat: 1 12 | quality: 1 13 | conversionMode: 0 14 | platformSettingOverrides: {} 15 | forceToMono: 0 16 | normalize: 1 17 | preloadAudioData: 1 18 | loadInBackground: 0 19 | 3D: 1 20 | userData: 21 | assetBundleName: 22 | assetBundleVariant: 23 | -------------------------------------------------------------------------------- /Assets/Audio/SoundFX.cfxr: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 134481920 7 | DA98FC6A-97A6-4142-A02A-DFC388E8BFCA 8 | 110 9 | 10 | 11 | 12 | NSPersistenceFrameworkVersion 13 | 641 14 | NSStoreModelVersionHashes 15 | 16 | Sound 17 | 18 | wy4SDui5IGPY7g9G3fJH1r4mKKX2gcBIry7qkNv/wRU= 19 | 20 | 21 | NSStoreModelVersionHashesVersion 22 | 3 23 | NSStoreModelVersionIdentifiers 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 3 33 | 50 34 | 0 35 | 0.1396072 36 | 0.30478 37 | 0.6971831 38 | 0.1422205 39 | -0.2015845 40 | 44100 41 | 100 42 | Explosion Sm 43 | 1 44 | 11 45 | 0.4134848 46 | 16 47 | 0 48 | 49 | 50 | 3 51 | 50 52 | 0 53 | 0.09900418 54 | 0.34375 55 | 0.209232 56 | 0.1424406 57 | -0.118618 58 | 44100 59 | 0 60 | 0 61 | -0.11778 62 | -0.18651 63 | Explosion 64 | 1 65 | 42 66 | 0.008362651 67 | -0.01160872 68 | 0.2511004 69 | 0.4729864 70 | -0.009407997 71 | 16 72 | 0 73 | 74 | -------------------------------------------------------------------------------- /Assets/Audio/SoundFX.cfxr.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2fa526bbe19af475ab1c0381672e9bbc 3 | timeCreated: 1465698564 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 55eef63ed1ba341249d72c7c1780f322 3 | folderAsset: yes 4 | timeCreated: 1465338864 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Materials/Default.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stuffmattdoes/Unity-Volumetric-Explosions/9b03338b1216f6bb1d13afa53f5f09aa1d46b582/Assets/Materials/Default.mat -------------------------------------------------------------------------------- /Assets/Materials/Default.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: af499b0707ec54e27bcfe26a6ea54d68 3 | timeCreated: 1465669202 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Materials/Flares.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stuffmattdoes/Unity-Volumetric-Explosions/9b03338b1216f6bb1d13afa53f5f09aa1d46b582/Assets/Materials/Flares.mat -------------------------------------------------------------------------------- /Assets/Materials/Flares.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5412768ef65c24833b8bafa8fae82558 3 | timeCreated: 1465708346 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Materials/Ground.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stuffmattdoes/Unity-Volumetric-Explosions/9b03338b1216f6bb1d13afa53f5f09aa1d46b582/Assets/Materials/Ground.mat -------------------------------------------------------------------------------- /Assets/Materials/Ground.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 093ac96664a0d40ca9b2a80ac9e08f00 3 | timeCreated: 1465605564 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Materials/Mesh Particles.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stuffmattdoes/Unity-Volumetric-Explosions/9b03338b1216f6bb1d13afa53f5f09aa1d46b582/Assets/Materials/Mesh Particles.mat -------------------------------------------------------------------------------- /Assets/Materials/Mesh Particles.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eb13c034b7c9d416ca7fc52a73503792 3 | timeCreated: 1466124871 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Materials/Shockwave.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stuffmattdoes/Unity-Volumetric-Explosions/9b03338b1216f6bb1d13afa53f5f09aa1d46b582/Assets/Materials/Shockwave.mat -------------------------------------------------------------------------------- /Assets/Materials/Shockwave.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d48ab867ee5244278bbca44cdbcf9a5a 3 | timeCreated: 1465703234 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Materials/burn-mark.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stuffmattdoes/Unity-Volumetric-Explosions/9b03338b1216f6bb1d13afa53f5f09aa1d46b582/Assets/Materials/burn-mark.mat -------------------------------------------------------------------------------- /Assets/Materials/burn-mark.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3cdc00d0145714d19af89e986c203663 3 | timeCreated: 1476206414 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Materials/heat-distortion.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stuffmattdoes/Unity-Volumetric-Explosions/9b03338b1216f6bb1d13afa53f5f09aa1d46b582/Assets/Materials/heat-distortion.mat -------------------------------------------------------------------------------- /Assets/Materials/heat-distortion.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5cd4f1b52f38c4b558fe0397647bfc55 3 | timeCreated: 1466030385 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Materials/particle-blur.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stuffmattdoes/Unity-Volumetric-Explosions/9b03338b1216f6bb1d13afa53f5f09aa1d46b582/Assets/Materials/particle-blur.mat -------------------------------------------------------------------------------- /Assets/Materials/particle-blur.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bd348579f2dc34ee2ad8993fe43b2d74 3 | timeCreated: 1466182138 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Materials/particle-default-hard-edge.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stuffmattdoes/Unity-Volumetric-Explosions/9b03338b1216f6bb1d13afa53f5f09aa1d46b582/Assets/Materials/particle-default-hard-edge.mat -------------------------------------------------------------------------------- /Assets/Materials/particle-default-hard-edge.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0915a36781de54ccd9168c7fe1432abb 3 | timeCreated: 1465609523 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Materials/particles-diffuse.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stuffmattdoes/Unity-Volumetric-Explosions/9b03338b1216f6bb1d13afa53f5f09aa1d46b582/Assets/Materials/particles-diffuse.mat -------------------------------------------------------------------------------- /Assets/Materials/particles-diffuse.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9a48c3afc9d1d4e86895729c6fb9be67 3 | timeCreated: 1466055553 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Materials/volumetric-explosion.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stuffmattdoes/Unity-Volumetric-Explosions/9b03338b1216f6bb1d13afa53f5f09aa1d46b582/Assets/Materials/volumetric-explosion.mat -------------------------------------------------------------------------------- /Assets/Materials/volumetric-explosion.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6848aa5dd17864755a31b1bcc5573154 3 | timeCreated: 1465536887 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Prefabs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f8e2d3d1c55b941b3b9feb5d9cbecbef 3 | folderAsset: yes 4 | timeCreated: 1465359538 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Prefabs/Flares.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stuffmattdoes/Unity-Volumetric-Explosions/9b03338b1216f6bb1d13afa53f5f09aa1d46b582/Assets/Prefabs/Flares.prefab -------------------------------------------------------------------------------- /Assets/Prefabs/Flares.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 580445ce3bdbb485a9b29aacb9b6e1f9 3 | timeCreated: 1465704661 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Prefabs/Heat Distortion.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stuffmattdoes/Unity-Volumetric-Explosions/9b03338b1216f6bb1d13afa53f5f09aa1d46b582/Assets/Prefabs/Heat Distortion.prefab -------------------------------------------------------------------------------- /Assets/Prefabs/Heat Distortion.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 390df32a9d723448c84d4163b654cd6f 3 | timeCreated: 1466047404 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Prefabs/Light.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stuffmattdoes/Unity-Volumetric-Explosions/9b03338b1216f6bb1d13afa53f5f09aa1d46b582/Assets/Prefabs/Light.prefab -------------------------------------------------------------------------------- /Assets/Prefabs/Light.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 35f2b30f5547e48b085aa6a8749f057d 3 | timeCreated: 1465704652 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Prefabs/Shockwave.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stuffmattdoes/Unity-Volumetric-Explosions/9b03338b1216f6bb1d13afa53f5f09aa1d46b582/Assets/Prefabs/Shockwave.prefab -------------------------------------------------------------------------------- /Assets/Prefabs/Shockwave.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 819296bd7a36a4fc68d83cb512dc6cb0 3 | timeCreated: 1465704648 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Prefabs/Smoke Trail.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stuffmattdoes/Unity-Volumetric-Explosions/9b03338b1216f6bb1d13afa53f5f09aa1d46b582/Assets/Prefabs/Smoke Trail.prefab -------------------------------------------------------------------------------- /Assets/Prefabs/Smoke Trail.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 701b46c756f1140fba98c73c901f3c46 3 | timeCreated: 1465846357 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Prefabs/Sparks.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stuffmattdoes/Unity-Volumetric-Explosions/9b03338b1216f6bb1d13afa53f5f09aa1d46b582/Assets/Prefabs/Sparks.prefab -------------------------------------------------------------------------------- /Assets/Prefabs/Sparks.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ef3ac663d7545412aa9041781fdc7353 3 | timeCreated: 1465704646 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Prefabs/Volumetric Explosion (Small).prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stuffmattdoes/Unity-Volumetric-Explosions/9b03338b1216f6bb1d13afa53f5f09aa1d46b582/Assets/Prefabs/Volumetric Explosion (Small).prefab -------------------------------------------------------------------------------- /Assets/Prefabs/Volumetric Explosion (Small).prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5e31b57b76f99429ab242fc8eee7f804 3 | timeCreated: 1466362642 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Prefabs/Volumetric Explosion.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stuffmattdoes/Unity-Volumetric-Explosions/9b03338b1216f6bb1d13afa53f5f09aa1d46b582/Assets/Prefabs/Volumetric Explosion.prefab -------------------------------------------------------------------------------- /Assets/Prefabs/Volumetric Explosion.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eea6afb41de1244bd8321b934aba810c 3 | timeCreated: 1465607142 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2f88406d51be74775b5aa374e7c0ad62 3 | folderAsset: yes 4 | timeCreated: 1465338857 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Scenes/explosions.unity: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stuffmattdoes/Unity-Volumetric-Explosions/9b03338b1216f6bb1d13afa53f5f09aa1d46b582/Assets/Scenes/explosions.unity -------------------------------------------------------------------------------- /Assets/Scenes/explosions.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2b1848d58c6ff4933bd00dfb4fafaa71 3 | timeCreated: 1465338853 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b8478e79616234e80a416523a4cebb66 3 | folderAsset: yes 4 | timeCreated: 1465338873 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Scripts/ObjectPool.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | 5 | public class ObjectPool : MonoBehaviour { 6 | 7 | #region member 8 | public static ObjectPool instance { get; private set; } 9 | 10 | // Member class for a prefab entered into the object pool 11 | // "Serializable" is used to embed a class with sub properties in the inspector. 12 | [System.Serializable] 13 | public class ObjectPoolEntry { 14 | 15 | // The object to pre instantiate 16 | [SerializeField] 17 | public GameObject Prefab; 18 | 19 | // Quantity of object to pre-instantiate 20 | [SerializeField] 21 | public int Amount; 22 | } 23 | #endregion 24 | 25 | // Array of properties for our pooled objects 26 | public bool GrowIfUnavailable = true; 27 | public ObjectPoolEntry[] Entries; 28 | public string containerSuffix = "(Pool)"; 29 | 30 | // The pooled objecst currently available 31 | // This list is composed of even more lists (one for each prefab entry) 32 | // which then contains the quantity of prefab entry to be pooled 33 | // [HideInInspector]s 34 | public List AvailablePool; 35 | 36 | // Array that will be used to create empty game objects to serve 37 | // as containers for each pooled object type. Purely for organization :D 38 | protected GameObject[] ContainerObject; 39 | 40 | void OnEnable() { 41 | instance = this; 42 | } 43 | 44 | void Start() { 45 | 46 | // Resize our container array equal to the number of our prefab entries in the inspector 47 | ContainerObject = new GameObject[Entries.Length]; 48 | 49 | // Let's loop through our complete prefab entry array 50 | for (int i = 0; i < Entries.Length; i ++) { 51 | 52 | if (Entries[i] != null) { 53 | // Create a new game object container, and rename it based on the prefab's name 54 | ContainerObject[i] = new GameObject (containerSuffix + " " + Entries[i].Prefab.name); 55 | 56 | // Add each of our prefab entries to this here 57 | var objectPrefab = Entries[i]; 58 | 59 | // Loop through each prefab entry by the specified amount for each 60 | for (int n = 0; n < objectPrefab.Amount; n++) { 61 | var newObj = Instantiate(objectPrefab.Prefab) as GameObject; 62 | newObj.name = objectPrefab.Prefab.name; 63 | PoolObject(newObj); 64 | } 65 | } 66 | } 67 | } 68 | 69 | // Used to create the prefabs to be pooled 70 | public void PoolObject(GameObject obj) { 71 | 72 | for (int i = 0; i < Entries.Length; i++) { 73 | 74 | // Keep iterating though our entries until our new prefab's name 75 | // matches that of our entry's existing prefab name 76 | // This ensures that we'll spawn the new prefab in its appropriate 77 | // container & that it gets assigned to the correct list & so on 78 | // if (Entries[i].Prefab.name != obj.name) { 79 | if (obj.name != Entries[i].Prefab.name) { 80 | continue; 81 | } 82 | 83 | // Deactivate it before anything happens; otherwise, chaos. 84 | obj.SetActive(false); 85 | // obj.transform.parent = ContainerObject[i].transform; 86 | obj.transform.SetParent(ContainerObject[i].transform, false); 87 | 88 | // Add it to our available pooled objects list 89 | AvailablePool.Add (obj); 90 | return; 91 | } 92 | } 93 | 94 | public GameObject GetPooledObject(GameObject pooledObject) { 95 | 96 | if (!pooledObject) { 97 | Debug.Log ("No pooled object"); 98 | } 99 | 100 | // Loop through our pool of available objects 101 | for (int i = 0; i < AvailablePool.Count; i++) { 102 | 103 | // Finds the first prefab with the same name 104 | if (pooledObject.name != AvailablePool [i].name) { 105 | continue; 106 | } 107 | 108 | if (!AvailablePool [i].activeInHierarchy) { 109 | return AvailablePool [i]; 110 | } 111 | } 112 | 113 | // Auto-resize our pool if we need to 114 | if (GrowIfUnavailable) { 115 | // Create a new object and add it to our pool 116 | GameObject newObj = Instantiate (pooledObject) as GameObject; 117 | newObj.name = pooledObject.name; 118 | PoolObject(newObj); 119 | return newObj; 120 | } 121 | 122 | return null; 123 | } 124 | } -------------------------------------------------------------------------------- /Assets/Scripts/ObjectPool.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 306c97227940d414eab971ed4c1ff6dd 3 | timeCreated: 1465651001 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Scripts/ObjectPoolEditor.cs: -------------------------------------------------------------------------------- 1 | #if UNITY_EDITOR 2 | using UnityEngine; 3 | using System.Collections; 4 | using System.Collections.Generic; 5 | using UnityEditor; 6 | using UnityEditorInternal; 7 | 8 | [CustomEditor(typeof(ObjectPool))] 9 | public class ObjectPoolEditor : Editor { 10 | 11 | // Variables 12 | private ReorderableList thePool; 13 | 14 | void OnEnable() { 15 | SerializedProperty objectPool = serializedObject.FindProperty("Entries"); 16 | 17 | thePool = new ReorderableList( 18 | serializedObject, 19 | objectPool, 20 | true, 21 | true, 22 | true, 23 | true 24 | ); 25 | 26 | thePool.drawHeaderCallback = (Rect rect) => { 27 | EditorGUI.LabelField(rect, "Pooled Objects"); 28 | }; 29 | 30 | thePool.drawElementCallback = 31 | (rect, index, active, isFocused) => { 32 | SerializedProperty element = thePool.serializedProperty.GetArrayElementAtIndex(index); 33 | thePool.elementHeight = EditorGUIUtility.singleLineHeight * 1.25f; 34 | 35 | rect.y += 2; 36 | 37 | // Prefab 38 | EditorGUI.LabelField( 39 | new Rect(rect.x, rect.y, 40, EditorGUIUtility.singleLineHeight), "Prefab:"); 40 | EditorGUI.PropertyField( 41 | new Rect(rect.x + 45, rect.y, 130, EditorGUIUtility.singleLineHeight), 42 | element.FindPropertyRelative("Prefab"), GUIContent.none); 43 | 44 | // Amount 45 | EditorGUI.LabelField( 46 | new Rect(rect.x + 185, rect.y, 50, EditorGUIUtility.singleLineHeight), "Count:"); 47 | EditorGUI.PropertyField( 48 | new Rect(rect.x + 230, rect.y, 25, EditorGUIUtility.singleLineHeight), 49 | element.FindPropertyRelative("Amount"), GUIContent.none); 50 | 51 | }; 52 | 53 | thePool.onReorderCallback = (ReorderableList theList) => { 54 | // updated = true; 55 | }; 56 | 57 | thePool.onRemoveCallback = (ReorderableList l) => { 58 | if (EditorUtility.DisplayDialog("Warning!", 59 | "Are you sure you want to delete this?", "Yes", "No")) { 60 | ReorderableList.defaultBehaviours.DoRemoveButton(l); 61 | } 62 | }; 63 | } 64 | 65 | 66 | public override void OnInspectorGUI() { 67 | ObjectPool myTarget = (ObjectPool)target; 68 | 69 | // Regular inspector 70 | myTarget.GrowIfUnavailable = EditorGUILayout.Toggle("Grow If Unavailable:", myTarget.GrowIfUnavailable); 71 | myTarget.containerSuffix = EditorGUILayout.TextField("Object Suffix:", myTarget.containerSuffix); 72 | 73 | // Use this to draw the original inspector layout 74 | // DrawDefaultInspector(); 75 | 76 | // Still not sure what this does... 77 | serializedObject.Update(); 78 | 79 | // This draws the same list as defined by our custom editor parameters 80 | thePool.DoLayoutList(); 81 | 82 | // This allows us to change properties (like adding/removing elements) 83 | serializedObject.ApplyModifiedProperties(); 84 | 85 | } 86 | } 87 | #endif -------------------------------------------------------------------------------- /Assets/Scripts/ObjectPoolEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 013de674a5ca8487fa0bea4b2b1048f1 3 | timeCreated: 1465651001 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Scripts/PixelBoy.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | [ExecuteInEditMode] 5 | //[AddComponentMenu("Image Effects/PixelBoy")] 6 | public class PixelBoy : MonoBehaviour { 7 | 8 | // Variables 9 | public int widthResolution = 720; 10 | public FilterMode filterMode = FilterMode.Point; 11 | 12 | private int heightResolution; 13 | 14 | protected void Start() { 15 | 16 | if (!SystemInfo.supportsImageEffects) { 17 | enabled = false; 18 | return; 19 | } 20 | 21 | } 22 | 23 | void Update() { 24 | 25 | float ratio = ((float)Camera.main.pixelHeight / (float)Camera.main.pixelWidth); 26 | heightResolution = Mathf.RoundToInt(widthResolution * ratio); 27 | 28 | } 29 | 30 | void OnRenderImage(RenderTexture source, RenderTexture destination) { 31 | source.filterMode = filterMode; 32 | RenderTexture buffer = RenderTexture.GetTemporary(widthResolution, heightResolution, -1); 33 | buffer.filterMode = filterMode; 34 | Graphics.Blit(source, buffer); 35 | Graphics.Blit(buffer, destination); 36 | RenderTexture.ReleaseTemporary(buffer); 37 | } 38 | 39 | } -------------------------------------------------------------------------------- /Assets/Scripts/PixelBoy.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 827860420280d423b930491cb1b2e84d 3 | timeCreated: 1465781843 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Scripts/SceneManager.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | public class SceneManager : MonoBehaviour { 5 | 6 | public int explSelect; 7 | public GameObject[] explosions; 8 | VolumetricExplosion volExp; 9 | 10 | // Use this for initialization 11 | void Start () { 12 | 13 | volExp = explosions[explSelect].GetComponent (); 14 | } 15 | 16 | // Update is called once per frame 17 | void Update () { 18 | 19 | // Spacebar trigger 20 | if (Input.GetKeyDown(KeyCode.Space)) { 21 | TriggerExplosion (); 22 | } 23 | 24 | if (Input.GetMouseButtonDown (0)) { 25 | ClickExplosion (); 26 | } 27 | } 28 | 29 | void TriggerExplosion() { 30 | volExp.detonate = true; 31 | } 32 | 33 | void ClickExplosion() { 34 | 35 | RaycastHit hit; 36 | Ray ray = Camera.main.ScreenPointToRay (Input.mousePosition); 37 | 38 | if (Physics.Raycast (ray, out hit, 100.0f)) { 39 | GameObject newExplosion = (GameObject)Instantiate (explosions[explSelect], hit.point, Quaternion.identity); 40 | newExplosion.GetComponent ().detonate = true; 41 | 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /Assets/Scripts/SceneManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0031f55799b1441279ba2e7de2f3f377 3 | timeCreated: 1465586514 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Scripts/SmokeTrail.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | public class SmokeTrail : MonoBehaviour { 5 | 6 | // Variables 7 | [Range (0.1f, 2.0f)] public float duration = 1.0f; 8 | [Range (0.1f, 1.0f)] public float variation = 1.0f; 9 | public AnimationCurve particleScale = AnimationCurve.EaseInOut (0, 1.0f, 1.0f, 0); 10 | public AnimationCurve particleFade = AnimationCurve.Linear (0, 1.0f, 1.0f, 0); 11 | public LayerMask collideWith; 12 | 13 | private float newDuration; 14 | private float newVariation; 15 | private float startTime; 16 | private float timeFromStart; 17 | private float scaleFactor; 18 | private ParticleSystem particles; 19 | private Color _particleColor; 20 | 21 | void OnEnable() { 22 | particles = gameObject.GetComponent (); 23 | Reset (); 24 | } 25 | 26 | // Update is called once per frame 27 | void Update () { 28 | if (timeFromStart < newDuration) { 29 | StartSmoking (); 30 | } else { 31 | gameObject.SetActive (false); 32 | } 33 | 34 | } 35 | 36 | void Reset() { 37 | startTime = Time.time; 38 | 39 | // Randomized variation 40 | newVariation = Random.Range ( 41 | -variation, 42 | variation 43 | ); 44 | 45 | newDuration = duration + (duration * newVariation); 46 | StartSmoking (); 47 | } 48 | 49 | 50 | void StartSmoking() { 51 | timeFromStart = Time.time - startTime; 52 | 53 | // Fade out our particles over time 54 | particles.startColor = new Color ( 55 | particles.startColor.r, 56 | particles.startColor.g, 57 | particles.startColor.b, 58 | particleFade.Evaluate (timeFromStart / newDuration) 59 | ); 60 | } 61 | 62 | } -------------------------------------------------------------------------------- /Assets/Scripts/SmokeTrail.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e208605ad3b95490a9bb1a9fb779f18f 3 | timeCreated: 1466092540 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Scripts/VolumetricExplosion.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | //using System.Collections.Generic; 4 | 5 | public class VolumetricExplosion : MonoBehaviour { 6 | 7 | [Header("Main Explosion")] 8 | [Range(0.1f, 5.0f)] public float duration = 1; 9 | [Range (0.0f, 1.0f)] public float variation = 0.1f; 10 | [Range(0.0f, 1.0f)] public float riseSpeed; 11 | [Range(0.1f, 5.0f)] public float deformSpeed = 1; 12 | public AnimationCurve scale = AnimationCurve.EaseInOut(0, 0.2f, 1, 2); 13 | public AnimationCurve displacement = AnimationCurve.Linear(0, 0, 1, 0.5f); 14 | public AnimationCurve displacementOffsetY = AnimationCurve.Linear(0, 0, 1, 1); 15 | public AnimationCurve maxRange = AnimationCurve.Linear(0, 0.2f, 1, 1); 16 | public AnimationCurve clip = AnimationCurve.Linear(0.5f, 0.7f, 1, 0.5f); 17 | public float killTime; 18 | 19 | [Header("Audio")] 20 | public bool playAudio = false; 21 | 22 | [Header("Explosive Force")] 23 | public bool applyForce = false; 24 | [Range(0.1f, 10.0f)] public float radius = 5.0f; 25 | [Range(1, 10)] public int power = 10; 26 | 27 | [Header("Flares")] 28 | public bool createFlares = false; 29 | public GameObject flaresPrefab; 30 | 31 | [Header("Heat Distortion")] 32 | public bool createHeatDistortion = false; 33 | public GameObject heatDistortionPrefab; 34 | 35 | [Header("Lighting")] 36 | public bool createLighting = false; 37 | public GameObject lightingPrefab; 38 | public AnimationCurve lightIntensity = AnimationCurve.EaseInOut(0, 1.0f, 1, 0); 39 | 40 | [Header("Shockwave")] 41 | public bool createShockwave = false; 42 | public GameObject shockwavePrefab; 43 | 44 | // [Header("Smoke")] 45 | // public bool createSmoke = false; 46 | 47 | [Header("Smoke Trails")] 48 | public bool createSmokeTrails = false; 49 | public GameObject smokeTrailPrefab; 50 | [Range(1, 6)] public int minSmokeTrails; 51 | [Range(1, 6)] public int maxSmokeTrails; 52 | [Range(0, 10)] public int explosionBias; 53 | 54 | [Header("Sparks")] 55 | public bool createSparks = false; 56 | public GameObject sparksPrefab; 57 | 58 | [Header("Sub Explosions")] 59 | public bool createSubExplosinos = false; 60 | public GameObject subExplosionPrefab; 61 | [Range(1, 6)] public int minSubExplosions = 1; 62 | [Range(1, 6)] public int maxSubExplosions = 3; 63 | 64 | [Header("Debugging")] 65 | public bool loop = false; 66 | 67 | [HideInInspector] public bool detonate = true; 68 | private float newVariation; 69 | private float newExplosionDuration; 70 | private Vector3 initScale; 71 | private float startTime; 72 | private float timeFromStart; 73 | private float vertPos; 74 | private float r; 75 | private float g; 76 | private float b; 77 | private float correction; 78 | private float scaleFactor; 79 | private float beginRange; 80 | private float endRange; 81 | private float dispVal; 82 | private float dispOffsetY; 83 | private float clipVal; 84 | private Material thisMat; 85 | 86 | private Light _lighting; 87 | private AudioSource _audioClip; 88 | private ParticleSystem _sparks; 89 | private ParticleSystem _flares; 90 | private GameObject _smokeTrail; 91 | private GameObject[] _smokeTrailsGroup; 92 | private ParticleSystem _shockwave; 93 | private GameObject _subExplosion; 94 | private GameObject[] _subExplosionsGroup; 95 | private ParticleSystem _heatDistortion; 96 | 97 | void Start () { 98 | thisMat = GetComponent ().material; 99 | 100 | // --------------- 101 | // Initiate our FX 102 | // --------------- 103 | 104 | 105 | // Audio 106 | if (playAudio) { 107 | _audioClip = GetComponent (); 108 | } 109 | 110 | if (createLighting && lightingPrefab) { 111 | GameObject _lightingPrefab = (GameObject)Instantiate (lightingPrefab, transform.position, Quaternion.identity); 112 | _lightingPrefab.transform.parent = gameObject.transform; 113 | _lighting = _lightingPrefab.GetComponent (); 114 | } 115 | 116 | 117 | // Flares 118 | if (createFlares && flaresPrefab) { 119 | GameObject _flaresPrefab = (GameObject)Instantiate (flaresPrefab, 120 | new Vector3( 121 | transform.position.x, 122 | transform.position.y + 0.35f, 123 | transform.position.z 124 | ), Quaternion.identity); 125 | _flaresPrefab.transform.parent = gameObject.transform; 126 | _flares = _flaresPrefab.GetComponent (); 127 | } 128 | 129 | // Heat distortion 130 | if (createHeatDistortion && heatDistortionPrefab) { 131 | GameObject _heatDistortionPrefab = (GameObject)Instantiate (heatDistortionPrefab, transform.position, Quaternion.identity); 132 | _heatDistortionPrefab.transform.parent = gameObject.transform; 133 | _heatDistortion = _heatDistortionPrefab.GetComponent (); 134 | } 135 | 136 | // Shockwave 137 | if (createShockwave && shockwavePrefab) { 138 | GameObject _shockwavePrefab = (GameObject)Instantiate (shockwavePrefab, transform.position, Quaternion.identity); 139 | _shockwavePrefab.transform.parent = gameObject.transform; 140 | _shockwave = _shockwavePrefab.GetComponent (); 141 | } 142 | 143 | // Smoke trails 144 | if (createSmokeTrails && smokeTrailPrefab) { 145 | GameObject smokeTrailsGroup = new GameObject ("Smoke Trails"); 146 | smokeTrailsGroup.transform.parent = gameObject.transform; 147 | _smokeTrailsGroup = new GameObject[maxSmokeTrails]; 148 | 149 | for (int i = 0; i < maxSmokeTrails; i++) { 150 | GameObject _smokeTrailPrefab = (GameObject)Instantiate (smokeTrailPrefab, transform.position, Quaternion.identity); 151 | _smokeTrailPrefab.transform.parent = gameObject.transform; 152 | _smokeTrail = _smokeTrailPrefab.gameObject; 153 | _smokeTrail.transform.parent = smokeTrailsGroup.transform; 154 | _smokeTrailsGroup[i] = _smokeTrail; 155 | } 156 | } 157 | 158 | // Sparks 159 | if (createSparks && sparksPrefab) { 160 | GameObject _sparksPrefab = (GameObject)Instantiate (sparksPrefab, transform.position, Quaternion.identity); 161 | _sparksPrefab.transform.parent = gameObject.transform; 162 | _sparks = _sparksPrefab.GetComponent (); 163 | } 164 | 165 | // Sub explosions 166 | if (createSubExplosinos && subExplosionPrefab) { 167 | GameObject subExplosionsGroup = new GameObject ("Sub Explosions"); 168 | subExplosionsGroup.transform.parent = gameObject.transform; 169 | _subExplosionsGroup = new GameObject[maxSubExplosions]; 170 | 171 | for (int i = 0; i < maxSubExplosions; i++) { 172 | GameObject _subExplosionsPrefab = (GameObject)Instantiate (subExplosionPrefab, transform.position, Quaternion.identity); 173 | _subExplosion = _subExplosionsPrefab.gameObject; 174 | _subExplosionsPrefab.transform.parent = subExplosionsGroup.transform; 175 | _subExplosionsGroup [i] = _subExplosion; 176 | } 177 | } 178 | 179 | 180 | // Scaling & positioning 181 | initScale = transform.localScale; 182 | } 183 | 184 | void OnEnable() { 185 | if (killTime > 0) { 186 | StartCoroutine (KillCountdown ()); 187 | } 188 | } 189 | 190 | void Update () { 191 | 192 | if (!detonate && timeFromStart < newExplosionDuration || loop) { 193 | Detonation (); 194 | } 195 | 196 | if (detonate) { 197 | Reset (); 198 | } 199 | } 200 | 201 | public IEnumerator KillCountdown() { 202 | yield return new WaitForSeconds (killTime); 203 | gameObject.SetActive (false); 204 | } 205 | 206 | void Detonation () { 207 | 208 | // Slightly translate explosion vertically, because heat rises dummy 209 | AdjustPosition(); 210 | 211 | // Explosion FX: 212 | 213 | // Per-vertex displacement calculations 214 | // (to be sent to the shader to actually be applied) 215 | AdjustDisplacement(); 216 | 217 | // Offset displacement map for some cool FX 218 | AdjustDisplacementMap(); 219 | 220 | // Adjust the size of our explosion 221 | AdjustScale(); 222 | 223 | // Fade out (clip) the explosion 224 | AdjustClip(); 225 | 226 | // Lighting always sets the mood, man. 227 | if (createLighting && _lighting) { 228 | AdjustLighting (); 229 | } 230 | 231 | } 232 | 233 | void Reset () { 234 | 235 | // ------------- 236 | // Randomize it! 237 | // ------------- 238 | 239 | // Base random variation 240 | newVariation = Random.Range (-variation, variation); 241 | newExplosionDuration = duration + (duration * newVariation); 242 | 243 | // Random rotation 244 | Vector3 euler = transform.eulerAngles; 245 | 246 | // Y-axis Rotation 247 | euler.y = Random.Range (0.0f, 360.0f); 248 | transform.eulerAngles = euler; 249 | 250 | // Don't forget about the audio! 251 | if (playAudio && _audioClip) { 252 | _audioClip.pitch = 1 + (1 * -newVariation); 253 | _audioClip.Play (); 254 | } 255 | 256 | // Flares 257 | if (createFlares && _flares) { 258 | _flares.Play(); 259 | } 260 | 261 | // Heat distortion 262 | if (createHeatDistortion && _heatDistortion) { 263 | _heatDistortion.Play (); 264 | } 265 | 266 | // Shockwave 267 | if (createShockwave && _shockwave) { 268 | _shockwave.Play (); 269 | } 270 | 271 | // Smoke Trails 272 | if (createSmokeTrails && _smokeTrailsGroup.Length > 0) { 273 | LaunchSmokeTrails (); 274 | } 275 | 276 | // Sparks 277 | if (createSparks && _sparks) { 278 | _sparks.Play(); 279 | } 280 | 281 | // Sub explosions 282 | if (createSubExplosinos && _subExplosionsGroup.Length > 0) { 283 | SubExplosionEmitter (); 284 | } 285 | 286 | // Explosive force 287 | if (applyForce) { 288 | ExplosionForce (); 289 | } 290 | 291 | 292 | startTime = Time.time; 293 | timeFromStart = Time.time - startTime; 294 | detonate = false; 295 | 296 | } 297 | 298 | void AdjustPosition() { 299 | transform.position = new Vector3 ( 300 | transform.position.x, 301 | transform.position.y + (riseSpeed * Time.deltaTime), 302 | transform.position.z 303 | ); 304 | } 305 | 306 | void AdjustDisplacement() { 307 | timeFromStart = Time.time - startTime; 308 | vertPos = (newVariation + timeFromStart) / deformSpeed; 309 | r = Mathf.Sin((vertPos) * (2 * Mathf.PI)) * 0.5f + 0.25f; 310 | g = Mathf.Sin((vertPos + 0.33333333f) * 2 * Mathf.PI) * 0.5f + 0.25f; 311 | b = Mathf.Sin((vertPos + 0.66666667f) * 2 * Mathf.PI) * 0.5f + 0.25f; 312 | 313 | // Additionally - do some overall extrusion 314 | dispVal = displacement.Evaluate(timeFromStart / newExplosionDuration); 315 | thisMat.SetFloat("_Displacement", dispVal); 316 | } 317 | 318 | void AdjustDisplacementMap() { 319 | dispOffsetY = displacementOffsetY.Evaluate(timeFromStart / newExplosionDuration); 320 | thisMat.SetTextureOffset("_DispTex", new Vector2(0, dispOffsetY)); 321 | 322 | // Ensure that their sum = 1) 323 | correction = 1 / (r + g + b); 324 | r *= correction; 325 | g *= correction; 326 | b *= correction; 327 | 328 | thisMat.SetVector("_ChannelFactor", new Vector4(r,g,b,0)); 329 | } 330 | 331 | void AdjustScale() { 332 | scaleFactor = scale.Evaluate(timeFromStart / newExplosionDuration); 333 | scaleFactor = scaleFactor + (scaleFactor * newVariation); 334 | transform.localScale = initScale * scaleFactor; 335 | } 336 | 337 | void AdjustClip() { 338 | endRange = maxRange.Evaluate(timeFromStart / newExplosionDuration); 339 | endRange = endRange + (endRange * newVariation); 340 | 341 | if (beginRange >= 1.0f) { 342 | beginRange = 1.0f; 343 | } 344 | 345 | if (endRange >= 1.0f) { 346 | endRange = 1.0f; 347 | } 348 | 349 | thisMat.SetVector("_Range", new Vector4(beginRange, endRange, 0, 0)); 350 | 351 | clipVal = clip.Evaluate(timeFromStart / newExplosionDuration); 352 | thisMat.SetFloat("_ClipRange", clipVal); 353 | } 354 | 355 | void AdjustLighting() { 356 | _lighting.intensity = lightIntensity.Evaluate(timeFromStart / newExplosionDuration); 357 | } 358 | 359 | void ExplosionForce() { 360 | Vector3 explosionPos = transform.position; 361 | 362 | Collider[] colliders = Physics.OverlapSphere(explosionPos, radius); 363 | foreach (Collider hit in colliders) { 364 | 365 | if (hit.transform.IsChildOf (gameObject.transform)) { 366 | continue; 367 | } 368 | 369 | Rigidbody rb = hit.GetComponent(); 370 | 371 | if (rb != null) { 372 | rb.AddExplosionForce (power * 100, explosionPos, radius, 1.5f); 373 | } 374 | 375 | } 376 | } 377 | 378 | void LaunchSmokeTrails() { 379 | Rigidbody smokeTrailRB; 380 | ParticleSystem particles; 381 | Vector3 randomDir; 382 | float mult = 10; 383 | int smokeTrailCount = Random.Range (minSmokeTrails, _smokeTrailsGroup.Length + 1); 384 | 385 | // Iterate through array of smoke trails & apply forces 386 | for (int i = 0; i < smokeTrailCount; i++) { 387 | 388 | // Zero out any existing velocity 389 | smokeTrailRB = _smokeTrailsGroup[i].GetComponent(); 390 | smokeTrailRB.velocity = Vector3.zero; 391 | 392 | randomDir = new Vector3 ( 393 | mult * Random.Range(-explosionBias * 5, explosionBias * 5), 394 | mult * Random.Range(-explosionBias * 5, explosionBias * 10), 395 | mult * Random.Range(-explosionBias * 5, explosionBias * 5) 396 | ); 397 | 398 | _smokeTrailsGroup [i].transform.position = transform.position; 399 | _smokeTrailsGroup [i].SetActive (true); 400 | particles = _smokeTrailsGroup [i].GetComponent (); 401 | particles.Clear (); 402 | smokeTrailRB.AddForce (randomDir); 403 | } 404 | } 405 | 406 | void SubExplosionEmitter() { 407 | Vector3 randomPos; 408 | float posDamp = 0.5f; 409 | float randomDel; 410 | int subExplosionCount = Random.Range (minSubExplosions, _subExplosionsGroup.Length + 1); 411 | 412 | for (int i = 0; i < subExplosionCount; i++) { 413 | randomPos = Random.onUnitSphere; 414 | randomDel = Random.Range (0.2f, 0.35f); 415 | 416 | _subExplosionsGroup [i].transform.position = transform.position + randomPos; 417 | _subExplosionsGroup [i].gameObject.SetActive (true); 418 | StartCoroutine(SubExplosionEmitterDelay(_subExplosionsGroup[i], randomDel)); 419 | } 420 | } 421 | 422 | IEnumerator SubExplosionEmitterDelay(GameObject expl, float delay) { 423 | yield return new WaitForSeconds (delay); 424 | expl.GetComponent ().Reset (); 425 | } 426 | 427 | } -------------------------------------------------------------------------------- /Assets/Scripts/VolumetricExplosion.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d2ce93b5e290a4b3789da515320aea57 3 | timeCreated: 1466024372 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Shaders.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 52d2232606b674f60a25022d2c2c0ef5 3 | folderAsset: yes 4 | timeCreated: 1465338875 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Shaders/Explosion.shader: -------------------------------------------------------------------------------- 1 | Shader "Explosion" { 2 | Properties { 3 | _RampTex ("Ramp", Rect) = "white" 4 | _MainTex ("Noise", 2D) = "grey" 5 | _Heat ("Heat", Float) = 1 6 | _Radius ("Radius", Float) = 1 7 | _Frequency ("Noise Frequency", Float) = 1 8 | _ScrollSpeed ("Noise Scroll Speed", Float) = 1 9 | _Alpha ("Alpha", Float) = 1 10 | } 11 | SubShader { 12 | Tags {"Queue"="Transparent+100" "RenderType"="Transparent" "IgnoreProjector"="True"} 13 | LOD 1000 14 | 15 | //render a smaller object inside, for the purpose of early-out Z testing 16 | Pass { 17 | ColorMask 0 18 | ZWrite On 19 | CGPROGRAM 20 | #pragma target 3.0 21 | #pragma glsl 22 | #pragma vertex vert 23 | #pragma fragment frag 24 | #include "UnityCG.cginc" 25 | 26 | struct v2f{ 27 | float4 vertex : SV_POSITION; 28 | }; 29 | 30 | v2f vert (appdata_base v) { 31 | v2f o; 32 | o.vertex = mul(UNITY_MATRIX_MVP, v.vertex - float4(v.normal * .25, 0)); 33 | return o; 34 | } 35 | 36 | half4 frag (v2f i) : COLOR { 37 | return half4(1, 1, 1, 1); 38 | } 39 | 40 | ENDCG 41 | } 42 | 43 | //Render the actual fireball 44 | Pass { 45 | Blend SrcAlpha OneMinusSrcAlpha 46 | CGPROGRAM 47 | #pragma vertex vert 48 | #pragma fragment frag 49 | #pragma target 3.0 50 | #pragma glsl 51 | #pragma exclude_renderers d3d11_9x 52 | #include "UnityCG.cginc" 53 | 54 | #pragma multi_compile QUALITY_HIGH QUALITY_LOW QUALITY_MED 55 | #pragma multi_compile OCTAVES_4 OCTAVES_1 OCTAVES_2 OCTAVES_3 OCTAVES_5 56 | #pragma multi_compile SCATTERING_ON SCATTERING_OFF 57 | 58 | #if QUALITY_LOW 59 | #define THRESHOLD .15 60 | #define PRIMARY 9 61 | #define SECONDARY 5 62 | #define HEATSTEP .2 63 | #elif QUALITY_MED 64 | #define THRESHOLD .05 65 | #define PRIMARY 15 66 | #define SECONDARY 8 67 | #define HEATSTEP .15 68 | #elif QUALITY_HIGH 69 | #define THRESHOLD .02 70 | #define PRIMARY 25 71 | #define SECONDARY 10 72 | #define HEATSTEP .1 73 | #endif 74 | sampler2D _RampTex; 75 | sampler2D _MainTex; 76 | float _Heat; 77 | float _Radius; 78 | float _Frequency; 79 | float _ScrollSpeed; 80 | float _Alpha; 81 | 82 | struct v2f { 83 | float4 vertex : SV_POSITION; 84 | float3 worldPos : TEXCOORD0; 85 | float3 viewVec : TEXCOORD1; 86 | float4 sphere : TEXCOORD2; 87 | }; 88 | 89 | v2f vert (appdata_base v) { 90 | v2f o; 91 | o.vertex = mul(UNITY_MATRIX_MVP, v.vertex); 92 | o.worldPos = mul(_Object2World, v.vertex).xyz; 93 | o.viewVec = WorldSpaceViewDir(v.vertex); 94 | o.sphere.xyz = mul(_Object2World, float4(0, 0, 0, 1)).xyz; 95 | return o; 96 | } 97 | 98 | float noise(float3 p) { 99 | float f = frac(p.y); 100 | float i = floor(p.y); 101 | float2 rg = tex2Dlod(_MainTex, float4(p.xz+float2(37, 13)*i, 0, 0)/64).yx; 102 | return lerp(rg.x, rg.y, f); 103 | } 104 | 105 | float fbm (float3 p) { 106 | p *= _Frequency; 107 | float v = 0; 108 | float4 offset = _Time * _ScrollSpeed; 109 | v += noise(p + offset.y); 110 | #if OCTAVES_2 | OCTAVES_3 | OCTAVES_4 | OCTAVES_5 111 | p *= 2; 112 | v += noise(p + offset.z)/2; p *= 2; 113 | #endif 114 | #if OCTAVES_3 | OCTAVES_4 | OCTAVES_5 115 | v += noise(p + offset.z)/4; p *= 2; 116 | #endif 117 | #if OCTAVES_4 | OCTAVES_5 118 | v += noise(p + offset.w)/8; p *= 2; 119 | #endif 120 | #if OCTAVES_5 121 | v += noise(p + offset.w)/16; p *= 2; 122 | #endif 123 | return v; 124 | } 125 | 126 | float distf (float4 sphere, float3 p) { 127 | return distance(p, sphere.xyz) - _Radius - fbm(p); 128 | } 129 | 130 | // float3 norm(float3 p) { 131 | // float3 delta; 132 | // #define nabla .08 133 | // float d = distf(p); 134 | // delta.x = d - distf(p + float3(nabla, 0, 0)); 135 | // delta.y = d - distf(p + float3(0, nabla, 0)); 136 | // delta.z = d - distf(p + float3(0, 0, nabla)); 137 | // return normalize(delta); 138 | // } 139 | 140 | float4 march (float4 sphere, float3 p, float3 v) { 141 | float dist; 142 | for (int i = 0; i < PRIMARY; ++i) { 143 | dist = distf(sphere, p); 144 | if (dist < THRESHOLD) return float4(p, 0); 145 | p -= v * (dist + .02); 146 | } 147 | return float4(-100, -100, -100, -100); 148 | } 149 | 150 | float2 heat (float4 sphere, float3 p, float3 d) { 151 | float heat = 0; 152 | float dens = 0; 153 | float fac = .5; 154 | d *= HEATSTEP; 155 | for (int i = 0; i < SECONDARY; ++i) { 156 | float dis = distf(sphere, p); 157 | if (dis <= THRESHOLD) { 158 | heat += pow((_Radius - distance(p, sphere.xyz) + 2.5)*fac*_Heat, 3); 159 | fac *= .25; 160 | dens += HEATSTEP * 2; 161 | p -= d; 162 | } else { 163 | p -= d*3; 164 | } 165 | 166 | } 167 | return float2(heat, dens); 168 | } 169 | 170 | half4 frag (v2f i) : COLOR { 171 | float4 m = march(i.sphere, i.worldPos, normalize(i.viewVec)); 172 | 173 | #if SCATTERING_OFF 174 | float heatfac = smoothstep(_Radius + .5, _Radius + 1.5, distance(m.xyz, i.sphere.xyz)) / _Heat; 175 | half4 col = tex2Dlod(_RampTex, float4(1 - heatfac, 0, 0, 0)); 176 | col.w = saturate(_Alpha); 177 | #elif SCATTERING_ON 178 | float2 hd = heat(i.sphere, m.xyz, normalize(i.viewVec)); 179 | half4 col = tex2Dlod(_RampTex, float4(hd.x, 0, 0, 0)); 180 | col.w = saturate(saturate(hd.y) * _Alpha); 181 | #endif 182 | clip(m.w); 183 | return col; 184 | } 185 | ENDCG 186 | } 187 | } 188 | CustomEditor "CJPyroclasticMaterialEditor" 189 | } 190 | -------------------------------------------------------------------------------- /Assets/Shaders/Explosion.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a616a4ca0eb3c4b1787ce2a177495069 3 | timeCreated: 1466373752 4 | licenseType: Free 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Shaders/HeatDistortion.shader: -------------------------------------------------------------------------------- 1 | Shader "Custom/Heat Distortion" { 2 | 3 | Properties { 4 | _Refraction ("Refraction", Range (0.00, 100.0)) = 1.0 5 | _DistortTex ("Base (RGB)", 2D) = "white" {} 6 | } 7 | 8 | SubShader { 9 | 10 | Tags { "RenderType"="Transparent" "Queue"="Overlay" } 11 | LOD 100 12 | 13 | GrabPass { 14 | 15 | } 16 | 17 | CGPROGRAM 18 | #pragma surface surf NoLighting 19 | #pragma vertex vert 20 | 21 | fixed4 LightingNoLighting(SurfaceOutput s, fixed3 lightDir, fixed atten){ 22 | fixed4 c; 23 | c.rgb = s.Albedo; 24 | c.a = s.Alpha; 25 | return c; 26 | } 27 | 28 | sampler2D _GrabTexture : register(s0); 29 | sampler2D _DistortTex : register(s2); 30 | float _Refraction; 31 | 32 | float4 _GrabTexture_TexelSize; 33 | 34 | struct Input { 35 | float2 uv_DistortTex; 36 | float3 color; 37 | float3 worldRefl; 38 | float4 screenPos; 39 | INTERNAL_DATA 40 | }; 41 | 42 | void vert (inout appdata_full v, out Input o) { 43 | UNITY_INITIALIZE_OUTPUT(Input,o); 44 | o.color = v.color; 45 | } 46 | 47 | void surf (Input IN, inout SurfaceOutput o) { 48 | 49 | float3 distort = tex2D(_DistortTex, IN.uv_DistortTex) * float3(IN.color.r,IN.color.g,IN.color.b ); 50 | float2 offset = distort * _Refraction * _GrabTexture_TexelSize.xy; 51 | IN.screenPos.xy = offset * IN.screenPos.z + IN.screenPos.xy; 52 | 53 | float4 refrColor = tex2Dproj(_GrabTexture, IN.screenPos); 54 | o.Alpha = refrColor.a; 55 | o.Emission = refrColor.rgb; 56 | } 57 | ENDCG 58 | } 59 | } -------------------------------------------------------------------------------- /Assets/Shaders/HeatDistortion.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c8230bcaa683d40659a4ddc0bc3487d8 3 | timeCreated: 1466030233 4 | licenseType: Free 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Shaders/VolumetricExplosion.shader: -------------------------------------------------------------------------------- 1 | Shader "Custom/Volumetric Explosion" 2 | { 3 | Properties 4 | { 5 | _RampTex ("Color Ramp", 2D) = "white" {} 6 | _DispTex ("Displacement Texture", 2D) = "gray" {} 7 | _Displacement ("Displacement", Range(0, 1.0)) = 0.1 8 | _ChannelFactor ("ChannelFactor (r,g,b)", Vector) = (1.0, 0, 0) 9 | _Range ("Color Range", Vector) = (0, 0.5, 0) 10 | _ClipRange ("Clip Value", Range(0, 1)) = 0.8 11 | _Alpha ("Alpha", Range(0, 1)) = 0.8 12 | } 13 | 14 | SubShader 15 | { 16 | Tags { "RenderType" = "Transparent" } 17 | Cull Off 18 | LOD 300 19 | 20 | CGPROGRAM 21 | #pragma vertex vert 22 | #pragma surface surf Lambert 23 | // #pragma nolightmap 24 | #pragma target 3.0 25 | #pragma glsl 26 | 27 | sampler2D _DispTex; 28 | float _Displacement; 29 | float3 _ChannelFactor; 30 | float2 _Range; 31 | float _ClipRange; 32 | float _Alpha; 33 | 34 | struct Input 35 | { 36 | float2 uv_DispTex; 37 | }; 38 | 39 | void vert (inout appdata_full v) 40 | { 41 | float3 dcolor = tex2Dlod (_DispTex, float4(v.texcoord.xy,0,0)); 42 | float d = (dcolor.r * _ChannelFactor.r + dcolor.g * _ChannelFactor.g + dcolor.b * _ChannelFactor.b); 43 | v.vertex.xyz += v.normal * d * _Displacement; 44 | } 45 | 46 | sampler2D _RampTex; 47 | 48 | void surf (Input IN, inout SurfaceOutput o) 49 | { 50 | float3 dcolor = tex2D (_DispTex, IN.uv_DispTex); 51 | float d = (dcolor.r * _ChannelFactor.r + dcolor.g * _ChannelFactor.g + dcolor.b * _ChannelFactor.b) * (_Range.y-_Range.x) + _Range.x; 52 | clip (d - _ClipRange); 53 | half4 c = tex2D (_RampTex, float2(d, 0.5)); 54 | o.Albedo = c.rgb; 55 | o.Alpha = _Alpha; 56 | o.Emission = c.rgb * c.a; 57 | } 58 | ENDCG 59 | } 60 | FallBack "Diffuse" 61 | } 62 | -------------------------------------------------------------------------------- /Assets/Shaders/VolumetricExplosion.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1f00728f916824770be9a09bd8cd672a 3 | timeCreated: 1466024771 4 | licenseType: Free 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Textures.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 50c6bb46d7e994f6691571d1a399fed0 3 | folderAsset: yes 4 | timeCreated: 1465338862 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Textures/02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stuffmattdoes/Unity-Volumetric-Explosions/9b03338b1216f6bb1d13afa53f5f09aa1d46b582/Assets/Textures/02.png -------------------------------------------------------------------------------- /Assets/Textures/02.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0dd90fb3531524f63811ce8ac792e214 3 | timeCreated: 1465535677 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -3 30 | maxTextureSize: 1024 31 | textureSettings: 32 | filterMode: -1 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | allowsAlphaSplitting: 0 41 | spriteMode: 0 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 47 | spritePixelsToUnits: 100 48 | alphaIsTransparency: 0 49 | textureType: -1 50 | buildTargetSettings: [] 51 | spriteSheet: 52 | sprites: [] 53 | outline: [] 54 | spritePackingTag: 55 | userData: 56 | assetBundleName: 57 | assetBundleVariant: 58 | -------------------------------------------------------------------------------- /Assets/Textures/03.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stuffmattdoes/Unity-Volumetric-Explosions/9b03338b1216f6bb1d13afa53f5f09aa1d46b582/Assets/Textures/03.psd -------------------------------------------------------------------------------- /Assets/Textures/03.psd.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d5b6575b0daba4e548f96f3d0929662a 3 | timeCreated: 1465583858 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -3 30 | maxTextureSize: 512 31 | textureSettings: 32 | filterMode: -1 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | allowsAlphaSplitting: 0 41 | spriteMode: 0 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 47 | spritePixelsToUnits: 100 48 | alphaIsTransparency: 0 49 | textureType: -1 50 | buildTargetSettings: [] 51 | spriteSheet: 52 | sprites: [] 53 | outline: [] 54 | spritePackingTag: 55 | userData: 56 | assetBundleName: 57 | assetBundleVariant: 58 | -------------------------------------------------------------------------------- /Assets/Textures/Shockwave 1.psd.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d81abbf9c04d541f180cfe0b8e7b6547 3 | timeCreated: 1466030655 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | linearTexture: 1 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 1 19 | externalNormalMap: 1 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -1 30 | maxTextureSize: 2048 31 | textureSettings: 32 | filterMode: -1 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | allowsAlphaSplitting: 0 41 | spriteMode: 0 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 47 | spritePixelsToUnits: 100 48 | alphaIsTransparency: 0 49 | textureType: 1 50 | buildTargetSettings: 51 | - buildTarget: Standalone 52 | maxTextureSize: 128 53 | textureFormat: -3 54 | compressionQuality: 50 55 | allowsAlphaSplitting: 0 56 | spriteSheet: 57 | sprites: [] 58 | outline: [] 59 | spritePackingTag: 60 | userData: 61 | assetBundleName: 62 | assetBundleVariant: 63 | -------------------------------------------------------------------------------- /Assets/Textures/Shockwave.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stuffmattdoes/Unity-Volumetric-Explosions/9b03338b1216f6bb1d13afa53f5f09aa1d46b582/Assets/Textures/Shockwave.psd -------------------------------------------------------------------------------- /Assets/Textures/Shockwave.psd.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7d5f3007b21314a7d9dc7a7e3dcdd1df 3 | timeCreated: 1465700691 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -1 30 | maxTextureSize: 2048 31 | textureSettings: 32 | filterMode: -1 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | allowsAlphaSplitting: 0 41 | spriteMode: 0 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 47 | spritePixelsToUnits: 100 48 | alphaIsTransparency: 0 49 | textureType: -1 50 | buildTargetSettings: 51 | - buildTarget: Standalone 52 | maxTextureSize: 128 53 | textureFormat: -3 54 | compressionQuality: 50 55 | allowsAlphaSplitting: 0 56 | spriteSheet: 57 | sprites: [] 58 | outline: [] 59 | spritePackingTag: 60 | userData: 61 | assetBundleName: 62 | assetBundleVariant: 63 | -------------------------------------------------------------------------------- /Assets/Textures/burn-mark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stuffmattdoes/Unity-Volumetric-Explosions/9b03338b1216f6bb1d13afa53f5f09aa1d46b582/Assets/Textures/burn-mark.png -------------------------------------------------------------------------------- /Assets/Textures/burn-mark.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 854a2e6dc5ee44710aef89c77942eed9 3 | timeCreated: 1476206334 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -3 30 | maxTextureSize: 512 31 | textureSettings: 32 | filterMode: -1 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | allowsAlphaSplitting: 0 41 | spriteMode: 0 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 47 | spritePixelsToUnits: 100 48 | alphaIsTransparency: 1 49 | textureType: -1 50 | buildTargetSettings: [] 51 | spriteSheet: 52 | serializedVersion: 2 53 | sprites: [] 54 | outline: [] 55 | spritePackingTag: 56 | userData: 57 | assetBundleName: 58 | assetBundleVariant: 59 | -------------------------------------------------------------------------------- /Assets/Textures/cr_cold.psd.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fce48f19b01b24d9588c1cb90bcb140c 3 | timeCreated: 1465784906 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -3 30 | maxTextureSize: 256 31 | textureSettings: 32 | filterMode: -1 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | allowsAlphaSplitting: 0 41 | spriteMode: 0 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 47 | spritePixelsToUnits: 100 48 | alphaIsTransparency: 0 49 | textureType: -1 50 | buildTargetSettings: [] 51 | spriteSheet: 52 | sprites: [] 53 | outline: [] 54 | spritePackingTag: 55 | userData: 56 | assetBundleName: 57 | assetBundleVariant: 58 | -------------------------------------------------------------------------------- /Assets/Textures/cr_explosion.psd.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6425f1e180f044be695599581cd90778 3 | timeCreated: 1465597808 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -3 30 | maxTextureSize: 256 31 | textureSettings: 32 | filterMode: -1 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | allowsAlphaSplitting: 0 41 | spriteMode: 0 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 47 | spritePixelsToUnits: 100 48 | alphaIsTransparency: 0 49 | textureType: -1 50 | buildTargetSettings: [] 51 | spriteSheet: 52 | sprites: [] 53 | outline: [] 54 | spritePackingTag: 55 | userData: 56 | assetBundleName: 57 | assetBundleVariant: 58 | -------------------------------------------------------------------------------- /Assets/Textures/cr_smoke.psd.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 76efb4f996f2641b994f41190eb45f6a 3 | timeCreated: 1465660208 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -3 30 | maxTextureSize: 256 31 | textureSettings: 32 | filterMode: -1 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | allowsAlphaSplitting: 0 41 | spriteMode: 0 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 47 | spritePixelsToUnits: 100 48 | alphaIsTransparency: 0 49 | textureType: -1 50 | buildTargetSettings: [] 51 | spriteSheet: 52 | sprites: [] 53 | outline: [] 54 | spritePackingTag: 55 | userData: 56 | assetBundleName: 57 | assetBundleVariant: 58 | -------------------------------------------------------------------------------- /Assets/Textures/cr_toon.psd.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 24d35a3ebb5274ee5b68c4252dabb4d9 3 | timeCreated: 1465700164 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -3 30 | maxTextureSize: 256 31 | textureSettings: 32 | filterMode: -1 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | allowsAlphaSplitting: 0 41 | spriteMode: 0 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 47 | spritePixelsToUnits: 100 48 | alphaIsTransparency: 0 49 | textureType: -1 50 | buildTargetSettings: [] 51 | spriteSheet: 52 | sprites: [] 53 | outline: [] 54 | spritePackingTag: 55 | userData: 56 | assetBundleName: 57 | assetBundleVariant: 58 | -------------------------------------------------------------------------------- /Assets/Textures/particle-blur.psd.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0266af66aa8a34116984b35c99205bfa 3 | timeCreated: 1465875089 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -3 30 | maxTextureSize: 256 31 | textureSettings: 32 | filterMode: -1 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | allowsAlphaSplitting: 0 41 | spriteMode: 0 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 47 | spritePixelsToUnits: 100 48 | alphaIsTransparency: 0 49 | textureType: -1 50 | buildTargetSettings: [] 51 | spriteSheet: 52 | sprites: [] 53 | outline: [] 54 | spritePackingTag: 55 | userData: 56 | assetBundleName: 57 | assetBundleVariant: 58 | -------------------------------------------------------------------------------- /Assets/Textures/particle-glow.psd.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 13082fa443a0242af87bbd56853b8547 3 | timeCreated: 1465867163 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -3 30 | maxTextureSize: 256 31 | textureSettings: 32 | filterMode: -1 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | allowsAlphaSplitting: 0 41 | spriteMode: 0 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 47 | spritePixelsToUnits: 100 48 | alphaIsTransparency: 0 49 | textureType: -1 50 | buildTargetSettings: [] 51 | spriteSheet: 52 | sprites: [] 53 | outline: [] 54 | spritePackingTag: 55 | userData: 56 | assetBundleName: 57 | assetBundleVariant: 58 | -------------------------------------------------------------------------------- /Assets/Textures/particle-hard-edge.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stuffmattdoes/Unity-Volumetric-Explosions/9b03338b1216f6bb1d13afa53f5f09aa1d46b582/Assets/Textures/particle-hard-edge.psd -------------------------------------------------------------------------------- /Assets/Textures/particle-hard-edge.psd.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 98b89a6a058ca4e41b0b4c572b7c3fa3 3 | timeCreated: 1465609301 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -3 30 | maxTextureSize: 256 31 | textureSettings: 32 | filterMode: -1 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | allowsAlphaSplitting: 0 41 | spriteMode: 0 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 47 | spritePixelsToUnits: 100 48 | alphaIsTransparency: 0 49 | textureType: -1 50 | buildTargetSettings: [] 51 | spriteSheet: 52 | sprites: [] 53 | outline: [] 54 | spritePackingTag: 55 | userData: 56 | assetBundleName: 57 | assetBundleVariant: 58 | -------------------------------------------------------------------------------- /Assets/Textures/worley-noise-2-rgb.psd.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1f24b9d942f7943569a3f6e3c0940de9 3 | timeCreated: 1465860116 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -3 30 | maxTextureSize: 512 31 | textureSettings: 32 | filterMode: -1 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | allowsAlphaSplitting: 0 41 | spriteMode: 0 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 47 | spritePixelsToUnits: 100 48 | alphaIsTransparency: 0 49 | textureType: -1 50 | buildTargetSettings: [] 51 | spriteSheet: 52 | sprites: [] 53 | outline: [] 54 | spritePackingTag: 55 | userData: 56 | assetBundleName: 57 | assetBundleVariant: 58 | -------------------------------------------------------------------------------- /Assets/Textures/worley-noise-2.psd.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c9f7b35524ea243daa57f1da8beb8674 3 | timeCreated: 1465855826 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -1 30 | maxTextureSize: 2048 31 | textureSettings: 32 | filterMode: -1 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | allowsAlphaSplitting: 0 41 | spriteMode: 0 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 47 | spritePixelsToUnits: 100 48 | alphaIsTransparency: 0 49 | textureType: -1 50 | buildTargetSettings: [] 51 | spriteSheet: 52 | sprites: [] 53 | outline: [] 54 | spritePackingTag: 55 | userData: 56 | assetBundleName: 57 | assetBundleVariant: 58 | -------------------------------------------------------------------------------- /Assets/Textures/worley-noise.psd.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c3093cfb6b93f44579992427444999a4 3 | timeCreated: 1465866473 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -3 30 | maxTextureSize: 512 31 | textureSettings: 32 | filterMode: -1 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | allowsAlphaSplitting: 0 41 | spriteMode: 0 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 47 | spritePixelsToUnits: 100 48 | alphaIsTransparency: 0 49 | textureType: -1 50 | buildTargetSettings: [] 51 | spriteSheet: 52 | sprites: [] 53 | outline: [] 54 | spritePackingTag: 55 | userData: 56 | assetBundleName: 57 | assetBundleVariant: 58 | -------------------------------------------------------------------------------- /Assets/Textures/worley-repeating-rgb.psd.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3b1aa722acd864922953d0d1383e6e20 3 | timeCreated: 1465957305 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -3 30 | maxTextureSize: 512 31 | textureSettings: 32 | filterMode: -1 33 | aniso: 1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | allowsAlphaSplitting: 0 41 | spriteMode: 0 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 47 | spritePixelsToUnits: 100 48 | alphaIsTransparency: 0 49 | textureType: -1 50 | buildTargetSettings: 51 | - buildTarget: Standalone 52 | maxTextureSize: 512 53 | textureFormat: -3 54 | compressionQuality: 50 55 | allowsAlphaSplitting: 0 56 | spriteSheet: 57 | sprites: [] 58 | outline: [] 59 | spritePackingTag: 60 | userData: 61 | assetBundleName: 62 | assetBundleVariant: 63 | -------------------------------------------------------------------------------- /Assets/Textures/worley-repeating.psd.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c3caddf022c3f4ce799e8809475020c9 3 | timeCreated: 1465957183 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -3 30 | maxTextureSize: 512 31 | textureSettings: 32 | filterMode: -1 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | allowsAlphaSplitting: 0 41 | spriteMode: 0 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 47 | spritePixelsToUnits: 100 48 | alphaIsTransparency: 0 49 | textureType: -1 50 | buildTargetSettings: [] 51 | spriteSheet: 52 | sprites: [] 53 | outline: [] 54 | spritePackingTag: 55 | userData: 56 | assetBundleName: 57 | assetBundleVariant: 58 | -------------------------------------------------------------------------------- /Dec-09-2016 15-10-47.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stuffmattdoes/Unity-Volumetric-Explosions/9b03338b1216f6bb1d13afa53f5f09aa1d46b582/Dec-09-2016 15-10-47.gif -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stuffmattdoes/Unity-Volumetric-Explosions/9b03338b1216f6bb1d13afa53f5f09aa1d46b582/ProjectSettings/AudioManager.asset -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stuffmattdoes/Unity-Volumetric-Explosions/9b03338b1216f6bb1d13afa53f5f09aa1d46b582/ProjectSettings/ClusterInputManager.asset -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stuffmattdoes/Unity-Volumetric-Explosions/9b03338b1216f6bb1d13afa53f5f09aa1d46b582/ProjectSettings/DynamicsManager.asset -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stuffmattdoes/Unity-Volumetric-Explosions/9b03338b1216f6bb1d13afa53f5f09aa1d46b582/ProjectSettings/EditorBuildSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stuffmattdoes/Unity-Volumetric-Explosions/9b03338b1216f6bb1d13afa53f5f09aa1d46b582/ProjectSettings/EditorSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stuffmattdoes/Unity-Volumetric-Explosions/9b03338b1216f6bb1d13afa53f5f09aa1d46b582/ProjectSettings/GraphicsSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stuffmattdoes/Unity-Volumetric-Explosions/9b03338b1216f6bb1d13afa53f5f09aa1d46b582/ProjectSettings/InputManager.asset -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stuffmattdoes/Unity-Volumetric-Explosions/9b03338b1216f6bb1d13afa53f5f09aa1d46b582/ProjectSettings/NavMeshAreas.asset -------------------------------------------------------------------------------- /ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stuffmattdoes/Unity-Volumetric-Explosions/9b03338b1216f6bb1d13afa53f5f09aa1d46b582/ProjectSettings/NetworkManager.asset -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stuffmattdoes/Unity-Volumetric-Explosions/9b03338b1216f6bb1d13afa53f5f09aa1d46b582/ProjectSettings/Physics2DSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stuffmattdoes/Unity-Volumetric-Explosions/9b03338b1216f6bb1d13afa53f5f09aa1d46b582/ProjectSettings/ProjectSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 5.3.6f1 2 | m_StandardAssetsVersion: 0 3 | -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stuffmattdoes/Unity-Volumetric-Explosions/9b03338b1216f6bb1d13afa53f5f09aa1d46b582/ProjectSettings/QualitySettings.asset -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stuffmattdoes/Unity-Volumetric-Explosions/9b03338b1216f6bb1d13afa53f5f09aa1d46b582/ProjectSettings/TagManager.asset -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stuffmattdoes/Unity-Volumetric-Explosions/9b03338b1216f6bb1d13afa53f5f09aa1d46b582/ProjectSettings/TimeManager.asset -------------------------------------------------------------------------------- /ProjectSettings/UnityAdsSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stuffmattdoes/Unity-Volumetric-Explosions/9b03338b1216f6bb1d13afa53f5f09aa1d46b582/ProjectSettings/UnityAdsSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stuffmattdoes/Unity-Volumetric-Explosions/9b03338b1216f6bb1d13afa53f5f09aa1d46b582/ProjectSettings/UnityConnectSettings.asset -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Unity Volumetric Explosion Shader 2 | 3 | ![alt tag](https://github.com/stuffmattdoes/Unity-Volumetric-Explosions/blob/master/Dec-09-2016%2015-10-47.gif) 4 | 5 | I've always thought explosion effects were a weak point in action videogames. They're typically either a sprite animation thrown on some billboarded quads, or an underwhelming particle effect. So I figured I'd set out for something a bit different. 6 | 7 | This effect is fairly simple. It consists of a main fireball and multiple smaller effects. The main fireball is achieved through morphing the shape and color of a standard sphere geometry over time. Here's the technical breakdown: 8 | 9 | + Vertex displacement (morphing the shape of the sphere) is achieved through a texture lookup on an RGB Worley Noise texture. THe different RGB values on the texture translate directly to the sphere surface displacement. A worley noise texture is ideal, as it results in a nice bubbly-looking shape. That's what we want our explosion to look like. 10 | + The results of the texture lookup is combined with a random value that changes over the lifetime of the explosion. Now the explosion has some animation and life to it, and is no longer static and boring. 11 | + Color modulation is achieved through multiple texture lookups, combining the results of the Noise texture and the gradient texture. This results in the bubbly-looking shape being uniformly colored with the points of furthest displacement one end of the gradient texture, and the points of least displacement on the other end of the gradient texture. 12 | + Other various effects are achieved through public variables exposed in the accompanying script - such as the change in explosion size over its lifetime, the degree of variation/bumpiness it has, whether it spawns sub-explosions, and so forth. 13 | 14 | ## ToDo ## 15 | + Burn marks on neighboring geometry 16 | + Residual smoke 17 | + Fireball glow 18 | --------------------------------------------------------------------------------