├── LICENSE ├── ParticleData.JPG ├── ProfaneParticleTutorial.zip ├── README.md ├── Tutorial.gif └── Tutorial720x720.mp4 /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Alberto Mellado Cruz 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /ParticleData.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertomelladoc/DissolveParticleShader/f5ec66991f8ccf64d27ce30fcee24e2bf7e0e9e0/ParticleData.JPG -------------------------------------------------------------------------------- /ProfaneParticleTutorial.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertomelladoc/DissolveParticleShader/f5ec66991f8ccf64d27ce30fcee24e2bf7e0e9e0/ProfaneParticleTutorial.zip -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DissolveParticleShader 2 | Dissolved particles shaders. 3 | 4 | Author: Alberto Mellado Cruz 5 | Date: 01/09/2018 6 | 7 | This is a shader that enables dissolving particles with the alpha from the particle system editor. 8 | It also uses the Unity's custom particle data to add an offset to it. 9 | 10 | 11 | ![Alt Text](https://github.com/albertomelladoc/DissolveParticleShader/blob/master/Tutorial.gif) 12 | 13 | STEPS: 14 | 15 | 1. Set Up: 16 | Create a particle system that emits sphere meshes and a Unlit Shader 17 | 18 | 2. Particle Texture: 19 | Add a particle texture if you want. 20 | 21 | 3. Rendering: 22 | Add a Soft Additive blend, disable the Zwrite and Cull the back. 23 | 24 | 4. Get Particle Color: 25 | Add to appdata and v2f "float4 color: COLOR"; 26 | In vetex: o.color = v.color; 27 | In fragment: "col*= i.color;" or "col.rgb*= i.color.rgb" (One is also with alpha the other without) 28 | 29 | 5. Noise 30 | Add a noise texture and use discard when the color.a <= noise.r 31 | 32 | 6. Offset (Optional) 33 | Using particles custom data pass a random value to the noise uvs. 34 | 35 | ![Alt Text](https://github.com/albertomelladoc/DissolveParticleShader/blob/master/ParticleData.JPG) 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /Tutorial.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertomelladoc/DissolveParticleShader/f5ec66991f8ccf64d27ce30fcee24e2bf7e0e9e0/Tutorial.gif -------------------------------------------------------------------------------- /Tutorial720x720.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertomelladoc/DissolveParticleShader/f5ec66991f8ccf64d27ce30fcee24e2bf7e0e9e0/Tutorial720x720.mp4 --------------------------------------------------------------------------------