├── Assets ├── CS_Particle.meta └── CS_Particle │ ├── Material.meta │ ├── Material │ ├── particle.mat │ └── particle.mat.meta │ ├── Script.meta │ ├── Script │ ├── GpuParticle.cs │ └── GpuParticle.cs.meta │ ├── Shader.meta │ ├── Shader │ ├── SimplexNoise3D.cginc │ ├── SimplexNoise3D.cginc.meta │ ├── particle.shader │ ├── particle.shader.meta │ ├── particleCS.compute │ └── particleCS.compute.meta │ ├── Texture.meta │ ├── Texture │ ├── 520zero.png │ ├── 520zero.png.meta │ ├── zero.png │ └── zero.png.meta │ ├── particles.gif │ ├── scene.meta │ └── scene │ ├── Main.unity │ └── Main.unity.meta ├── README.md └── particles.gif /Assets/CS_Particle.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d384657bcee1dd142bcea9bfbf8f026d 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/CS_Particle/Material.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 521d567b689859a428fb27a906b24e3f 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/CS_Particle/Material/particle.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: particle 11 | m_Shader: {fileID: 4800000, guid: 488e4be355e2243ce8cace5a22f33a80, type: 3} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 1 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _EmissionMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _MainTex: 43 | m_Texture: {fileID: 2800000, guid: 4353a0c21af854f48afaf521ebfed145, type: 3} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MainTex2: 47 | m_Texture: {fileID: 2800000, guid: 954cd64542c521844b9f7bd8aacf3c3a, type: 3} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _MetallicGlossMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _OcclusionMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | - _OtherTex: 59 | m_Texture: {fileID: 2800000, guid: 954cd64542c521844b9f7bd8aacf3c3a, type: 3} 60 | m_Scale: {x: 1, y: 1} 61 | m_Offset: {x: 0, y: 0} 62 | - _ParallaxMap: 63 | m_Texture: {fileID: 0} 64 | m_Scale: {x: 1, y: 1} 65 | m_Offset: {x: 0, y: 0} 66 | m_Floats: 67 | - _Amount: 0 68 | - _BumpScale: 1 69 | - _Cutoff: 0.5 70 | - _DetailNormalMapScale: 1 71 | - _DstBlend: 0 72 | - _GlossMapScale: 1 73 | - _Glossiness: 0 74 | - _GlossyReflections: 1 75 | - _Metallic: 0.44 76 | - _Mode: 0 77 | - _OcclusionStrength: 1 78 | - _Parallax: 0.02 79 | - _Ratio: 1 80 | - _Size: 0.002 81 | - _SmoothnessTextureChannel: 0 82 | - _SpecularHighlights: 1 83 | - _Speed: 1.5 84 | - _SrcBlend: 1 85 | - _UVSec: 0 86 | - _ZWrite: 1 87 | m_Colors: 88 | - _Color: {r: 0.9716981, g: 0.9716981, b: 0.9716981, a: 1} 89 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 90 | - _Num: {r: 512, g: 512, b: 0, a: 0} 91 | -------------------------------------------------------------------------------- /Assets/CS_Particle/Material/particle.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c2c03a58be283481d91903581a5a29bd 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/CS_Particle/Script.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9e80e705febb01b41bebbd2229b47ff7 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/CS_Particle/Script/GpuParticle.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using UnityEngine; 3 | using UnityEngine.Rendering; 4 | 5 | public class GpuParticle : MonoBehaviour{ 6 | struct Particle 7 | { 8 | public Vector3 position; 9 | public Vector3 CustomPos; 10 | public Vector2 uv; 11 | } 12 | int ThreadBlockSize = 256; 13 | int blockPerGrid; 14 | ComputeBuffer ParticleBuffer,argsBuffer; 15 | private uint[] _args; 16 | private float time; 17 | 18 | public Texture2D initTexture; 19 | public int N; 20 | private int width, height; 21 | [Range(0, 1)] 22 | public float lerpt; 23 | [Range(0.001f, 0.008f)] 24 | public float size=0.01f; 25 | [SerializeField] 26 | private Mesh Particle_Mesh; 27 | [SerializeField] 28 | ComputeShader _computeShader; 29 | [SerializeField] 30 | private Material _material; 31 | void Start(){ 32 | if(initTexture!=null) 33 | { 34 | width = initTexture.width; 35 | height = initTexture.height; 36 | N = width * height; 37 | } 38 | Particle[] particles= new Particle[N]; 39 | blockPerGrid = (N + ThreadBlockSize - 1) / ThreadBlockSize; 40 | time = 4f; 41 | ParticleBuffer = new ComputeBuffer(N, 32); 42 | _args = new uint[5] { 0, 0, 0, 0, 0 }; 43 | argsBuffer = new ComputeBuffer(1, _args.Length * sizeof(uint), ComputeBufferType.IndirectArguments); 44 | for (int i = 0; i < width; ++i) 45 | { 46 | for (int j = 0; j < height; ++j) 47 | { 48 | int id = i * height + j; 49 | float x = (float)i/(width-1); 50 | float y = (float)j/(height-1); 51 | particles[id].position = new Vector3((x-0.5f),(y-0.5f),0); 52 | particles[id].CustomPos = new Vector3((x-0.5f),(y-0.5f) ,0); 53 | particles[id].uv = new Vector2(x,y); 54 | } 55 | } 56 | ParticleBuffer.SetData(particles); 57 | } 58 | void Update(){ 59 | time -= Time.deltaTime; 60 | transform.Rotate(new Vector3(0f, Time.deltaTime * 10f, 0f)); 61 | if (time < 0) 62 | lerpt = Mathf.Lerp(lerpt, 1, 0.008f); 63 | updatebuffer(); 64 | argsBuffer.SetData(_args); 65 | Graphics.DrawMeshInstancedIndirect(Particle_Mesh,0, _material, new Bounds(Vector3.zero, new Vector3(100f, 100f, 100f)), argsBuffer); 66 | } 67 | void updatebuffer() 68 | { 69 | int kernelId = _computeShader.FindKernel("MainCS"); 70 | _computeShader.SetFloat("_Time", time); 71 | _computeShader.SetBuffer(kernelId, "_ParticleBuffer", ParticleBuffer); 72 | _computeShader.Dispatch(kernelId, blockPerGrid, 1, 1); 73 | _args[0] = (uint)Particle_Mesh.GetIndexCount(0); 74 | _args[1] = (uint)N; 75 | _args[2] = (uint)Particle_Mesh.GetIndexStart(0); 76 | _args[3] = (uint)Particle_Mesh.GetBaseVertex(0); 77 | 78 | _material.SetBuffer("_ParticleBuffer", ParticleBuffer); 79 | _material.SetMatrix("_GameobjectMatrix", transform.localToWorldMatrix); 80 | _material.SetFloat("_Size", size); 81 | _material.SetFloat("_lerp", lerpt); 82 | } 83 | } -------------------------------------------------------------------------------- /Assets/CS_Particle/Script/GpuParticle.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2d676b60b16a63440bdfdad4e3e3f8ae 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/CS_Particle/Shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 78257ca6a4f6d0d44b48f1c0fa44f37b 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/CS_Particle/Shader/SimplexNoise3D.cginc: -------------------------------------------------------------------------------- 1 | // 2 | // Noise Shader Library for Unity - https://github.com/keijiro/NoiseShader 3 | // 4 | // Original work (webgl-noise) Copyright (C) 2011 Ashima Arts. 5 | // Translation and modification was made by Keijiro Takahashi. 6 | // 7 | // This shader is based on the webgl-noise GLSL shader. For further details 8 | // of the original shader, please see the following description from the 9 | // original source code. 10 | // 11 | 12 | // 13 | // Description : Array and textureless GLSL 2D/3D/4D simplex 14 | // noise functions. 15 | // Author : Ian McEwan, Ashima Arts. 16 | // Maintainer : ijm 17 | // Lastmod : 20110822 (ijm) 18 | // License : Copyright (C) 2011 Ashima Arts. All rights reserved. 19 | // Distributed under the MIT License. See LICENSE file. 20 | // https://github.com/ashima/webgl-noise 21 | // 22 | 23 | float3 mod289(float3 x) 24 | { 25 | return x - floor(x / 289.0) * 289.0; 26 | } 27 | 28 | float4 mod289(float4 x) 29 | { 30 | return x - floor(x / 289.0) * 289.0; 31 | } 32 | 33 | float4 permute(float4 x) 34 | { 35 | return mod289((x * 34.0 + 1.0) * x); 36 | } 37 | 38 | float4 taylorInvSqrt(float4 r) 39 | { 40 | return 1.79284291400159 - r * 0.85373472095314; 41 | } 42 | 43 | float snoise(float3 v) 44 | { 45 | const float2 C = float2(1.0 / 6.0, 1.0 / 3.0); 46 | 47 | // First corner 48 | float3 i = floor(v + dot(v, C.yyy)); 49 | float3 x0 = v - i + dot(i, C.xxx); 50 | 51 | // Other corners 52 | float3 g = step(x0.yzx, x0.xyz); 53 | float3 l = 1.0 - g; 54 | float3 i1 = min(g.xyz, l.zxy); 55 | float3 i2 = max(g.xyz, l.zxy); 56 | 57 | // x1 = x0 - i1 + 1.0 * C.xxx; 58 | // x2 = x0 - i2 + 2.0 * C.xxx; 59 | // x3 = x0 - 1.0 + 3.0 * C.xxx; 60 | float3 x1 = x0 - i1 + C.xxx; 61 | float3 x2 = x0 - i2 + C.yyy; 62 | float3 x3 = x0 - 0.5; 63 | 64 | // Permutations 65 | i = mod289(i); // Avoid truncation effects in permutation 66 | float4 p = 67 | permute(permute(permute(i.z + float4(0.0, i1.z, i2.z, 1.0)) 68 | + i.y + float4(0.0, i1.y, i2.y, 1.0)) 69 | + i.x + float4(0.0, i1.x, i2.x, 1.0)); 70 | 71 | // Gradients: 7x7 points over a square, mapped onto an octahedron. 72 | // The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294) 73 | float4 j = p - 49.0 * floor(p / 49.0); // mod(p,7*7) 74 | 75 | float4 x_ = floor(j / 7.0); 76 | float4 y_ = floor(j - 7.0 * x_); // mod(j,N) 77 | 78 | float4 x = (x_ * 2.0 + 0.5) / 7.0 - 1.0; 79 | float4 y = (y_ * 2.0 + 0.5) / 7.0 - 1.0; 80 | 81 | float4 h = 1.0 - abs(x) - abs(y); 82 | 83 | float4 b0 = float4(x.xy, y.xy); 84 | float4 b1 = float4(x.zw, y.zw); 85 | 86 | //float4 s0 = float4(lessThan(b0, 0.0)) * 2.0 - 1.0; 87 | //float4 s1 = float4(lessThan(b1, 0.0)) * 2.0 - 1.0; 88 | float4 s0 = floor(b0) * 2.0 + 1.0; 89 | float4 s1 = floor(b1) * 2.0 + 1.0; 90 | float4 sh = -step(h, 0.0); 91 | 92 | float4 a0 = b0.xzyw + s0.xzyw * sh.xxyy; 93 | float4 a1 = b1.xzyw + s1.xzyw * sh.zzww; 94 | 95 | float3 g0 = float3(a0.xy, h.x); 96 | float3 g1 = float3(a0.zw, h.y); 97 | float3 g2 = float3(a1.xy, h.z); 98 | float3 g3 = float3(a1.zw, h.w); 99 | 100 | // Normalise gradients 101 | float4 norm = taylorInvSqrt(float4(dot(g0, g0), dot(g1, g1), dot(g2, g2), dot(g3, g3))); 102 | g0 *= norm.x; 103 | g1 *= norm.y; 104 | g2 *= norm.z; 105 | g3 *= norm.w; 106 | 107 | // Mix final noise value 108 | float4 m = max(0.6 - float4(dot(x0, x0), dot(x1, x1), dot(x2, x2), dot(x3, x3)), 0.0); 109 | m = m * m; 110 | m = m * m; 111 | 112 | float4 px = float4(dot(x0, g0), dot(x1, g1), dot(x2, g2), dot(x3, g3)); 113 | return 42.0 * dot(m, px); 114 | } 115 | 116 | float3 snoise_grad(float3 v) 117 | { 118 | const float2 C = float2(1.0 / 6.0, 1.0 / 3.0); 119 | 120 | // First corner 121 | float3 i = floor(v + dot(v, C.yyy)); 122 | float3 x0 = v - i + dot(i, C.xxx); 123 | 124 | // Other corners 125 | float3 g = step(x0.yzx, x0.xyz); 126 | float3 l = 1.0 - g; 127 | float3 i1 = min(g.xyz, l.zxy); 128 | float3 i2 = max(g.xyz, l.zxy); 129 | 130 | // x1 = x0 - i1 + 1.0 * C.xxx; 131 | // x2 = x0 - i2 + 2.0 * C.xxx; 132 | // x3 = x0 - 1.0 + 3.0 * C.xxx; 133 | float3 x1 = x0 - i1 + C.xxx; 134 | float3 x2 = x0 - i2 + C.yyy; 135 | float3 x3 = x0 - 0.5; 136 | 137 | // Permutations 138 | i = mod289(i); // Avoid truncation effects in permutation 139 | float4 p = 140 | permute(permute(permute(i.z + float4(0.0, i1.z, i2.z, 1.0)) 141 | + i.y + float4(0.0, i1.y, i2.y, 1.0)) 142 | + i.x + float4(0.0, i1.x, i2.x, 1.0)); 143 | 144 | // Gradients: 7x7 points over a square, mapped onto an octahedron. 145 | // The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294) 146 | float4 j = p - 49.0 * floor(p / 49.0); // mod(p,7*7) 147 | 148 | float4 x_ = floor(j / 7.0); 149 | float4 y_ = floor(j - 7.0 * x_); // mod(j,N) 150 | 151 | float4 x = (x_ * 2.0 + 0.5) / 7.0 - 1.0; 152 | float4 y = (y_ * 2.0 + 0.5) / 7.0 - 1.0; 153 | 154 | float4 h = 1.0 - abs(x) - abs(y); 155 | 156 | float4 b0 = float4(x.xy, y.xy); 157 | float4 b1 = float4(x.zw, y.zw); 158 | 159 | //float4 s0 = float4(lessThan(b0, 0.0)) * 2.0 - 1.0; 160 | //float4 s1 = float4(lessThan(b1, 0.0)) * 2.0 - 1.0; 161 | float4 s0 = floor(b0) * 2.0 + 1.0; 162 | float4 s1 = floor(b1) * 2.0 + 1.0; 163 | float4 sh = -step(h, 0.0); 164 | 165 | float4 a0 = b0.xzyw + s0.xzyw * sh.xxyy; 166 | float4 a1 = b1.xzyw + s1.xzyw * sh.zzww; 167 | 168 | float3 g0 = float3(a0.xy, h.x); 169 | float3 g1 = float3(a0.zw, h.y); 170 | float3 g2 = float3(a1.xy, h.z); 171 | float3 g3 = float3(a1.zw, h.w); 172 | 173 | // Normalise gradients 174 | float4 norm = taylorInvSqrt(float4(dot(g0, g0), dot(g1, g1), dot(g2, g2), dot(g3, g3))); 175 | g0 *= norm.x; 176 | g1 *= norm.y; 177 | g2 *= norm.z; 178 | g3 *= norm.w; 179 | 180 | // Compute gradient of noise function at P 181 | float4 m = max(0.6 - float4(dot(x0, x0), dot(x1, x1), dot(x2, x2), dot(x3, x3)), 0.0); 182 | float4 m2 = m * m; 183 | float4 m3 = m2 * m; 184 | float4 m4 = m2 * m2; 185 | float3 grad = 186 | -6.0 * m3.x * x0 * dot(x0, g0) + m4.x * g0 + 187 | -6.0 * m3.y * x1 * dot(x1, g1) + m4.y * g1 + 188 | -6.0 * m3.z * x2 * dot(x2, g2) + m4.z * g2 + 189 | -6.0 * m3.w * x3 * dot(x3, g3) + m4.w * g3; 190 | return 42.0 * grad; 191 | } -------------------------------------------------------------------------------- /Assets/CS_Particle/Shader/SimplexNoise3D.cginc.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dfd20fd8623da4c40bb97b653923f4fd 3 | timeCreated: 1486020469 4 | licenseType: Pro 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/CS_Particle/Shader/particle.shader: -------------------------------------------------------------------------------- 1 | Shader "shader test/particle" 2 | { 3 | Properties 4 | { 5 | _Color("Color",color)=(1,1,1,1) 6 | _MainTex ("_MainTex", 2D) = "white" {} 7 | _MainTex2("_MainTex2",2D)="white"{} 8 | } 9 | SubShader 10 | { 11 | Tags { "RenderType"="Opaque" } 12 | LOD 200 13 | Pass 14 | { 15 | CGPROGRAM 16 | #pragma target 4.5 17 | #pragma vertex vert 18 | #pragma fragment frag 19 | #include "UnityCG.cginc" 20 | struct Particle 21 | { 22 | float3 position; 23 | float3 CustomPos; 24 | float2 uv; 25 | }; 26 | StructuredBuffer _ParticleBuffer; 27 | sampler2D _MainTex,_MainTex2; 28 | fixed4 _Color; 29 | float _lerp,_Size; 30 | float4x4 _GameobjectMatrix; 31 | struct appdata{ 32 | float4 vertex:POSITION; 33 | }; 34 | struct v2f{ 35 | float4 pos:SV_POSITION; 36 | float2 uv:TEXCOORD0; 37 | }; 38 | float4x4 GetModelToWorldMatrix(float3 pos) 39 | { 40 | float4x4 transformMatrix=float4x4( 41 | _Size,0,0,pos.x, 42 | 0,_Size,0,pos.y, 43 | 0,0,_Size,pos.z, 44 | 0,0,0,1 45 | ); 46 | return transformMatrix; 47 | } 48 | v2f vert(appdata v,uint instanceID :SV_INSTANCEID) 49 | { 50 | v2f o; 51 | Particle particle = _ParticleBuffer[instanceID]; 52 | float4x4 WorldMatrix=GetModelToWorldMatrix(particle.position.xyz); 53 | WorldMatrix=mul(_GameobjectMatrix,WorldMatrix); 54 | v.vertex = mul(WorldMatrix, v.vertex); 55 | o.pos=mul(UNITY_MATRIX_VP,v.vertex); 56 | o.uv = _ParticleBuffer[instanceID].uv; 57 | return o; 58 | } 59 | fixed4 frag(v2f i):SV_Target 60 | { 61 | fixed4 col=tex2D(_MainTex,i.uv); 62 | fixed4 col2=tex2D(_MainTex2,i.uv); 63 | col=lerp(col,col2,_lerp)*_Color; 64 | return col; 65 | } 66 | ENDCG 67 | } 68 | 69 | } 70 | FallBack Off 71 | } -------------------------------------------------------------------------------- /Assets/CS_Particle/Shader/particle.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 488e4be355e2243ce8cace5a22f33a80 3 | timeCreated: 1538178100 4 | licenseType: Pro 5 | ShaderImporter: 6 | externalObjects: {} 7 | defaultTextures: [] 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/CS_Particle/Shader/particleCS.compute: -------------------------------------------------------------------------------- 1 | #pragma kernel MainCS 2 | #include "SimplexNoise3D.cginc" 3 | struct Particle 4 | { 5 | float3 position; 6 | float3 CustomPos; 7 | float2 uv; 8 | }; 9 | RWStructuredBuffer _ParticleBuffer; 10 | float _Time; 11 | float nrand(float2 uv) 12 | { 13 | return frac(sin(dot(uv, float2(12.9898, 78.233))) * 43758.5453); 14 | } 15 | uint rng_state; 16 | uint rand_xorshift() 17 | { 18 | // Xorshift algorithm from George Marsaglia's paper 19 | rng_state ^= (rng_state << 13); 20 | rng_state ^= (rng_state >> 17); 21 | rng_state ^= (rng_state << 5); 22 | return rng_state; 23 | } 24 | 25 | // https://github.com/cabbibo/glsl-curl-noise/blob/master/curl.glsl 26 | float3 snoiseVec3(float3 x) { 27 | 28 | float s = snoise(x); 29 | float s1 = snoise(float3(x.y - 19.1, x.z + 33.4, x.x + 47.2)); 30 | float s2 = snoise(float3(x.z + 74.2, x.x - 124.5, x.y + 99.4)); 31 | float3 c = float3(s, s1, s2); 32 | return c; 33 | } 34 | float3 curlNoise(float3 p) { 35 | 36 | const float e = .01; 37 | float3 dx = float3(e, 0.0, 0.0); 38 | float3 dy = float3(0.0, e, 0.0); 39 | float3 dz = float3(0.0, 0.0, e); 40 | 41 | float3 p_x0 = snoiseVec3(p - dx); 42 | float3 p_x1 = snoiseVec3(p + dx); 43 | float3 p_y0 = snoiseVec3(p - dy); 44 | float3 p_y1 = snoiseVec3(p + dy); 45 | float3 p_z0 = snoiseVec3(p - dz); 46 | float3 p_z1 = snoiseVec3(p + dz); 47 | 48 | float x = p_y1.z - p_y0.z - p_z1.y + p_z0.y; 49 | float y = p_z1.x - p_z0.x - p_x1.z + p_x0.z; 50 | float z = p_x1.y - p_x0.y - p_y1.x + p_y0.x; 51 | 52 | const float divisor = 1.0 / (2.0 * e); 53 | return normalize(float3(x, y, z) * divisor); 54 | 55 | } 56 | [numthreads(256, 1, 1)] 57 | void MainCS(uint3 id : SV_DispatchThreadID) 58 | { 59 | float3 pos = _ParticleBuffer[id.x].position; 60 | float3 morph=float3(0,0,0); 61 | if(_Time<0) 62 | { 63 | morph=(_ParticleBuffer[id.x].CustomPos-pos)*0.02; 64 | _ParticleBuffer[id.x].position+=morph; 65 | } 66 | else if(_Time<3) _ParticleBuffer[id.x].position += curlNoise(pos)*0.05; 67 | 68 | } -------------------------------------------------------------------------------- /Assets/CS_Particle/Shader/particleCS.compute.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1fd264c8809a94ce294c0ffb2d7a9672 3 | timeCreated: 1538178099 4 | licenseType: Pro 5 | ComputeShaderImporter: 6 | externalObjects: {} 7 | currentAPIMask: 196608 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/CS_Particle/Texture.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6acc9435d3cf619439869be95072c50a 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/CS_Particle/Texture/520zero.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SjMxr233/Unity-Morph-Image-based-on-Gpu-particle/4aef0914126c844598b2a32040e5d0cb7d43ff69/Assets/CS_Particle/Texture/520zero.png -------------------------------------------------------------------------------- /Assets/CS_Particle/Texture/520zero.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 954cd64542c521844b9f7bd8aacf3c3a 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | externalObjects: {} 6 | serializedVersion: 9 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 0 53 | spriteTessellationDetail: -1 54 | textureType: 0 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | spriteSheet: 73 | serializedVersion: 2 74 | sprites: [] 75 | outline: [] 76 | physicsShape: [] 77 | bones: [] 78 | spriteID: 79 | vertices: [] 80 | indices: 81 | edges: [] 82 | weights: [] 83 | spritePackingTag: 84 | pSDRemoveMatte: 0 85 | pSDShowRemoveMatteOption: 0 86 | userData: 87 | assetBundleName: 88 | assetBundleVariant: 89 | -------------------------------------------------------------------------------- /Assets/CS_Particle/Texture/zero.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SjMxr233/Unity-Morph-Image-based-on-Gpu-particle/4aef0914126c844598b2a32040e5d0cb7d43ff69/Assets/CS_Particle/Texture/zero.png -------------------------------------------------------------------------------- /Assets/CS_Particle/Texture/zero.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4353a0c21af854f48afaf521ebfed145 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | externalObjects: {} 6 | serializedVersion: 9 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 0 53 | spriteTessellationDetail: -1 54 | textureType: 0 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | platformSettings: 61 | - serializedVersion: 2 62 | buildTarget: DefaultTexturePlatform 63 | maxTextureSize: 2048 64 | resizeAlgorithm: 0 65 | textureFormat: -1 66 | textureCompression: 1 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | androidETC2FallbackOverride: 0 72 | - serializedVersion: 2 73 | buildTarget: Standalone 74 | maxTextureSize: 2048 75 | resizeAlgorithm: 0 76 | textureFormat: -1 77 | textureCompression: 1 78 | compressionQuality: 50 79 | crunchedCompression: 0 80 | allowsAlphaSplitting: 0 81 | overridden: 0 82 | androidETC2FallbackOverride: 0 83 | spriteSheet: 84 | serializedVersion: 2 85 | sprites: [] 86 | outline: [] 87 | physicsShape: [] 88 | bones: [] 89 | spriteID: 90 | vertices: [] 91 | indices: 92 | edges: [] 93 | weights: [] 94 | spritePackingTag: 95 | pSDRemoveMatte: 0 96 | pSDShowRemoveMatteOption: 0 97 | userData: 98 | assetBundleName: 99 | assetBundleVariant: 100 | -------------------------------------------------------------------------------- /Assets/CS_Particle/particles.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SjMxr233/Unity-Morph-Image-based-on-Gpu-particle/4aef0914126c844598b2a32040e5d0cb7d43ff69/Assets/CS_Particle/particles.gif -------------------------------------------------------------------------------- /Assets/CS_Particle/scene.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 730e8aba1f2454cb8a18b5190f7537a5 3 | folderAsset: yes 4 | timeCreated: 1538177430 5 | licenseType: Pro 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/CS_Particle/scene/Main.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | OcclusionCullingSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_OcclusionBakeSettings: 8 | smallestOccluder: 5 9 | smallestHole: 0.25 10 | backfaceThreshold: 100 11 | m_SceneGUID: 00000000000000000000000000000000 12 | m_OcclusionCullingData: {fileID: 0} 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 9 17 | m_Fog: 0 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 0 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 0} 41 | m_IndirectSpecularColor: {r: 0.44657844, g: 0.49641222, b: 0.57481694, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 11 47 | m_GIWorkflowMode: 0 48 | m_GISettings: 49 | serializedVersion: 2 50 | m_BounceScale: 1 51 | m_IndirectOutputScale: 1 52 | m_AlbedoBoost: 1 53 | m_EnvironmentLightingMode: 0 54 | m_EnableBakedLightmaps: 1 55 | m_EnableRealtimeLightmaps: 1 56 | m_LightmapEditorSettings: 57 | serializedVersion: 10 58 | m_Resolution: 2 59 | m_BakeResolution: 40 60 | m_AtlasSize: 1024 61 | m_AO: 0 62 | m_AOMaxDistance: 1 63 | m_CompAOExponent: 1 64 | m_CompAOExponentDirect: 0 65 | m_Padding: 2 66 | m_LightmapParameters: {fileID: 0} 67 | m_LightmapsBakeMode: 1 68 | m_TextureCompression: 1 69 | m_FinalGather: 0 70 | m_FinalGatherFiltering: 1 71 | m_FinalGatherRayCount: 256 72 | m_ReflectionCompression: 2 73 | m_MixedBakeMode: 2 74 | m_BakeBackend: 0 75 | m_PVRSampling: 1 76 | m_PVRDirectSampleCount: 32 77 | m_PVRSampleCount: 500 78 | m_PVRBounces: 2 79 | m_PVRFilterTypeDirect: 0 80 | m_PVRFilterTypeIndirect: 0 81 | m_PVRFilterTypeAO: 0 82 | m_PVRFilteringMode: 1 83 | m_PVRCulling: 1 84 | m_PVRFilteringGaussRadiusDirect: 1 85 | m_PVRFilteringGaussRadiusIndirect: 5 86 | m_PVRFilteringGaussRadiusAO: 2 87 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 88 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 89 | m_PVRFilteringAtrousPositionSigmaAO: 1 90 | m_ShowResolutionOverlay: 1 91 | m_LightingDataAsset: {fileID: 0} 92 | m_UseShadowmask: 1 93 | --- !u!196 &4 94 | NavMeshSettings: 95 | serializedVersion: 2 96 | m_ObjectHideFlags: 0 97 | m_BuildSettings: 98 | serializedVersion: 2 99 | agentTypeID: 0 100 | agentRadius: 0.5 101 | agentHeight: 2 102 | agentSlope: 45 103 | agentClimb: 0.4 104 | ledgeDropHeight: 0 105 | maxJumpAcrossDistance: 0 106 | minRegionArea: 2 107 | manualCellSize: 0 108 | cellSize: 0.16666667 109 | manualTileSize: 0 110 | tileSize: 256 111 | accuratePlacement: 0 112 | debug: 113 | m_Flags: 0 114 | m_NavMeshData: {fileID: 0} 115 | --- !u!1 &1089145666 116 | GameObject: 117 | m_ObjectHideFlags: 0 118 | m_CorrespondingSourceObject: {fileID: 0} 119 | m_PrefabInstance: {fileID: 0} 120 | m_PrefabAsset: {fileID: 0} 121 | serializedVersion: 6 122 | m_Component: 123 | - component: {fileID: 1089145667} 124 | - component: {fileID: 1089145668} 125 | m_Layer: 0 126 | m_Name: ParticleCreator 127 | m_TagString: Untagged 128 | m_Icon: {fileID: 0} 129 | m_NavMeshLayer: 0 130 | m_StaticEditorFlags: 0 131 | m_IsActive: 1 132 | --- !u!4 &1089145667 133 | Transform: 134 | m_ObjectHideFlags: 0 135 | m_CorrespondingSourceObject: {fileID: 0} 136 | m_PrefabInstance: {fileID: 0} 137 | m_PrefabAsset: {fileID: 0} 138 | m_GameObject: {fileID: 1089145666} 139 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 140 | m_LocalPosition: {x: 0, y: 0, z: 1} 141 | m_LocalScale: {x: 1, y: 1, z: 1} 142 | m_Children: [] 143 | m_Father: {fileID: 0} 144 | m_RootOrder: 2 145 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 146 | --- !u!114 &1089145668 147 | MonoBehaviour: 148 | m_ObjectHideFlags: 0 149 | m_CorrespondingSourceObject: {fileID: 0} 150 | m_PrefabInstance: {fileID: 0} 151 | m_PrefabAsset: {fileID: 0} 152 | m_GameObject: {fileID: 1089145666} 153 | m_Enabled: 1 154 | m_EditorHideFlags: 0 155 | m_Script: {fileID: 11500000, guid: 2d676b60b16a63440bdfdad4e3e3f8ae, type: 3} 156 | m_Name: 157 | m_EditorClassIdentifier: 158 | initTexture: {fileID: 2800000, guid: 4353a0c21af854f48afaf521ebfed145, type: 3} 159 | N: 0 160 | lerpt: 0 161 | size: 0.002 162 | Particle_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} 163 | _computeShader: {fileID: 7200000, guid: 1fd264c8809a94ce294c0ffb2d7a9672, type: 3} 164 | _material: {fileID: 2100000, guid: c2c03a58be283481d91903581a5a29bd, type: 2} 165 | --- !u!1 &1659552346 166 | GameObject: 167 | m_ObjectHideFlags: 0 168 | m_CorrespondingSourceObject: {fileID: 0} 169 | m_PrefabInstance: {fileID: 0} 170 | m_PrefabAsset: {fileID: 0} 171 | serializedVersion: 6 172 | m_Component: 173 | - component: {fileID: 1659552348} 174 | - component: {fileID: 1659552347} 175 | m_Layer: 0 176 | m_Name: Directional Light 177 | m_TagString: Untagged 178 | m_Icon: {fileID: 0} 179 | m_NavMeshLayer: 0 180 | m_StaticEditorFlags: 0 181 | m_IsActive: 1 182 | --- !u!108 &1659552347 183 | Light: 184 | m_ObjectHideFlags: 0 185 | m_CorrespondingSourceObject: {fileID: 0} 186 | m_PrefabInstance: {fileID: 0} 187 | m_PrefabAsset: {fileID: 0} 188 | m_GameObject: {fileID: 1659552346} 189 | m_Enabled: 1 190 | serializedVersion: 8 191 | m_Type: 1 192 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} 193 | m_Intensity: 1 194 | m_Range: 10 195 | m_SpotAngle: 30 196 | m_CookieSize: 10 197 | m_Shadows: 198 | m_Type: 2 199 | m_Resolution: -1 200 | m_CustomResolution: -1 201 | m_Strength: 1 202 | m_Bias: 0.05 203 | m_NormalBias: 0.4 204 | m_NearPlane: 0.2 205 | m_Cookie: {fileID: 0} 206 | m_DrawHalo: 0 207 | m_Flare: {fileID: 0} 208 | m_RenderMode: 0 209 | m_CullingMask: 210 | serializedVersion: 2 211 | m_Bits: 4294967295 212 | m_Lightmapping: 4 213 | m_LightShadowCasterMode: 0 214 | m_AreaSize: {x: 1, y: 1} 215 | m_BounceIntensity: 1 216 | m_ColorTemperature: 6570 217 | m_UseColorTemperature: 0 218 | m_ShadowRadius: 0 219 | m_ShadowAngle: 0 220 | --- !u!4 &1659552348 221 | Transform: 222 | m_ObjectHideFlags: 0 223 | m_CorrespondingSourceObject: {fileID: 0} 224 | m_PrefabInstance: {fileID: 0} 225 | m_PrefabAsset: {fileID: 0} 226 | m_GameObject: {fileID: 1659552346} 227 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} 228 | m_LocalPosition: {x: 0, y: 3, z: 0} 229 | m_LocalScale: {x: 1, y: 1, z: 1} 230 | m_Children: [] 231 | m_Father: {fileID: 0} 232 | m_RootOrder: 1 233 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} 234 | --- !u!1 &2012778627 235 | GameObject: 236 | m_ObjectHideFlags: 0 237 | m_CorrespondingSourceObject: {fileID: 0} 238 | m_PrefabInstance: {fileID: 0} 239 | m_PrefabAsset: {fileID: 0} 240 | serializedVersion: 6 241 | m_Component: 242 | - component: {fileID: 2012778631} 243 | - component: {fileID: 2012778630} 244 | - component: {fileID: 2012778629} 245 | - component: {fileID: 2012778628} 246 | m_Layer: 0 247 | m_Name: Main Camera 248 | m_TagString: MainCamera 249 | m_Icon: {fileID: 0} 250 | m_NavMeshLayer: 0 251 | m_StaticEditorFlags: 0 252 | m_IsActive: 1 253 | --- !u!81 &2012778628 254 | AudioListener: 255 | m_ObjectHideFlags: 0 256 | m_CorrespondingSourceObject: {fileID: 0} 257 | m_PrefabInstance: {fileID: 0} 258 | m_PrefabAsset: {fileID: 0} 259 | m_GameObject: {fileID: 2012778627} 260 | m_Enabled: 1 261 | --- !u!124 &2012778629 262 | Behaviour: 263 | m_ObjectHideFlags: 0 264 | m_CorrespondingSourceObject: {fileID: 0} 265 | m_PrefabInstance: {fileID: 0} 266 | m_PrefabAsset: {fileID: 0} 267 | m_GameObject: {fileID: 2012778627} 268 | m_Enabled: 1 269 | --- !u!20 &2012778630 270 | Camera: 271 | m_ObjectHideFlags: 0 272 | m_CorrespondingSourceObject: {fileID: 0} 273 | m_PrefabInstance: {fileID: 0} 274 | m_PrefabAsset: {fileID: 0} 275 | m_GameObject: {fileID: 2012778627} 276 | m_Enabled: 1 277 | serializedVersion: 2 278 | m_ClearFlags: 2 279 | m_BackGroundColor: {r: 0.34999108, g: 0.47119093, b: 0.5188679, a: 0} 280 | m_projectionMatrixMode: 1 281 | m_SensorSize: {x: 36, y: 24} 282 | m_LensShift: {x: 0, y: 0} 283 | m_GateFitMode: 2 284 | m_FocalLength: 50 285 | m_NormalizedViewPortRect: 286 | serializedVersion: 2 287 | x: 0 288 | y: 0 289 | width: 1 290 | height: 1 291 | near clip plane: 0.3 292 | far clip plane: 1000 293 | field of view: 60 294 | orthographic: 0 295 | orthographic size: 5 296 | m_Depth: -1 297 | m_CullingMask: 298 | serializedVersion: 2 299 | m_Bits: 4294967295 300 | m_RenderingPath: -1 301 | m_TargetTexture: {fileID: 0} 302 | m_TargetDisplay: 0 303 | m_TargetEye: 3 304 | m_HDR: 1 305 | m_AllowMSAA: 1 306 | m_AllowDynamicResolution: 0 307 | m_ForceIntoRT: 0 308 | m_OcclusionCulling: 1 309 | m_StereoConvergence: 10 310 | m_StereoSeparation: 0.022 311 | --- !u!4 &2012778631 312 | Transform: 313 | m_ObjectHideFlags: 0 314 | m_CorrespondingSourceObject: {fileID: 0} 315 | m_PrefabInstance: {fileID: 0} 316 | m_PrefabAsset: {fileID: 0} 317 | m_GameObject: {fileID: 2012778627} 318 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 319 | m_LocalPosition: {x: 0, y: 0, z: -3.65} 320 | m_LocalScale: {x: 1, y: 1, z: 1} 321 | m_Children: [] 322 | m_Father: {fileID: 0} 323 | m_RootOrder: 0 324 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 325 | -------------------------------------------------------------------------------- /Assets/CS_Particle/scene/Main.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e9a9c95b4c7eb41daa9b622b6170c4cf 3 | timeCreated: 1538177708 4 | licenseType: Pro 5 | DefaultImporter: 6 | externalObjects: {} 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Unity-Morph-Image-based-on-Gpu-particle 2 | Unity Morph Image based on Gpu particle 3 | 4 | ![gif](https://github.com/mxrhyx233/Unity-Morph-Image-based-on-Gpu-particle/blob/master/particles.gif) 5 | -------------------------------------------------------------------------------- /particles.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SjMxr233/Unity-Morph-Image-based-on-Gpu-particle/4aef0914126c844598b2a32040e5d0cb7d43ff69/particles.gif --------------------------------------------------------------------------------