diff --git a/Assets/Keijiro_Takahashi_VFX/Particles.vfx b/Assets/Keijiro_Takahashi_VFX/Particles.vfx index 8ecbac6..fd580b9 100644 --- a/Assets/Keijiro_Takahashi_VFX/Particles.vfx +++ b/Assets/Keijiro_Takahashi_VFX/Particles.vfx @@ -29,6 +29,10 @@ MonoBehaviour: - link: - context: {fileID: 114946465509916290} slotIndex: 0 + loopDuration: 0 + loopCount: 0 + delayBeforeLoop: 0 + delayAfterLoop: 0 --- !u!114 &114131763552434164 MonoBehaviour: m_ObjectHideFlags: 1 @@ -86,9 +90,16 @@ MonoBehaviour: m_Property: name: bounds m_serializedType: - m_SerializableType: UnityEditor.VFX.AABox, Unity.VisualEffectGraph.Editor, Version=0.0.0.0, - Culture=neutral, PublicKeyToken=null - attributes: [] + m_SerializableType: UnityEditor.VFX.AABox, Unity.VisualEffectGraph.Editor, + Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + attributes: + - m_Type: 3 + m_Min: -Infinity + m_Max: Infinity + m_Tooltip: The culling bounds of this system. The Visual Effect is only visible + if the bounding box specified here is visible to the camera. + m_Regex: + m_RegexMaxLength: 0 m_Direction: 0 m_LinkedSlots: [] --- !u!114 &114340500867371532 @@ -220,22 +231,25 @@ MonoBehaviour: into this beautiful VFX of Keijiro Takahashi: - 1. Added "Particle Position Texture" Texture2D to the Blackboard Panel (must - be named exactly like this!) + 1. Added "Particle Position + Texture" Texture2D to the Blackboard Panel (must be named exactly like this!) - 2. Added "Particle Color Texture" Texture2D to the Blackboard Panel (must be - named exactly like this!) + 2. + Added "Particle Color Texture" Texture2D to the Blackboard Panel (must be named + exactly like this!) 3. Changed Spawn Rate to 307200 (=640x480) - 4. Changed Capacity in the Initialize context to 307200 + 4. + Changed Capacity in the Initialize context to 307200 - 5. Connected "Particle Position Texture" and "Particle Color Texture" to the - Sample Texture2D blocks in "Attribute Map Samples"' + 5. Connected "Particle + Position Texture" and "Particle Color Texture" to the Sample Texture2D blocks + in "Attribute Map Samples"' theme: Classic textSize: Small systemInfos: [] @@ -244,8 +258,8 @@ MonoBehaviour: serializedVersion: 2 x: -1763 y: -1103 - width: 2771 - height: 2618 + width: 2819 + height: 2639 --- !u!114 &114350483966674976 MonoBehaviour: m_ObjectHideFlags: 1 @@ -307,7 +321,7 @@ MonoBehaviour: m_SerializableType: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 m_SerializableObject: 1 - min: 0 + min: 7.83 max: 1 descendantCount: 0 - name: Particle Position Texture @@ -349,7 +363,7 @@ MonoBehaviour: min: -Infinity max: Infinity descendantCount: 0 - m_GraphVersion: 2 + m_GraphVersion: 4 m_saved: 1 m_SubgraphDependencies: [] m_CategoryPath: @@ -408,7 +422,10 @@ MonoBehaviour: - {fileID: 114946465509916290} - {fileID: 114780028408030698} - {fileID: 8926484042661614622} - m_Capacity: 307200 + dataType: 0 + capacity: 307200 + stripCapacity: 16 + particlePerStripCount: 16 m_Space: 0 --- !u!114 &114512514798047786 MonoBehaviour: @@ -517,7 +534,7 @@ MonoBehaviour: - m_Type: 3 m_Min: -Infinity m_Max: Infinity - m_Tooltip: Spawn Rate (in number per seconds) + m_Tooltip: Sets the number of particles to be spawned per second. m_Regex: m_RegexMaxLength: 0 m_Direction: 0 @@ -749,7 +766,7 @@ MonoBehaviour: - m_Type: 3 m_Min: -Infinity m_Max: Infinity - m_Tooltip: The size of the box along each axis. + m_Tooltip: Sets the size of the box along each axis. m_Regex: m_RegexMaxLength: 0 m_Direction: 0 @@ -791,7 +808,7 @@ MonoBehaviour: - m_Type: 3 m_Min: -Infinity m_Max: Infinity - m_Tooltip: The centre of the box. + m_Tooltip: Sets the center of the box. m_Regex: m_RegexMaxLength: 0 m_Direction: 0 @@ -806,350 +823,742 @@ VisualEffectResource: m_Graph: {fileID: 114350483966674976} m_ShaderSources: - compute: 1 - name: '[System 1]Initialize' - source: "#pragma kernel CSMain\n#define NB_THREADS_PER_GROUP 64\n#define VFX_USE_LIFETIME_CURRENT - 1\n#define VFX_USE_POSITION_CURRENT 1\n#define VFX_USE_COLOR_CURRENT 1\n#define - VFX_USE_PARTICLEID_CURRENT 1\n#define VFX_USE_VELOCITY_CURRENT 1\n#define VFX_USE_ALIVE_CURRENT - 1\n#define VFX_USE_AGE_CURRENT 1\n#define VFX_LOCAL_SPACE 1\n#include \"Packages/com.unity.visualeffectgraph/Shaders/RenderPipeline/HDRP/VFXDefines.hlsl\"\n\n\nCBUFFER_START(parameters)\n - \ float uniform_b;\n float uniform_c;\n float uniform_d;\n uint PADDING_0;\nCBUFFER_END\nTexture2D - texture_b;\nSamplerState samplertexture_b;\nTexture2D texture_c;\nSamplerState - samplertexture_c;\n\n\n#include \"Packages/com.unity.visualeffectgraph/Shaders/Common/VFXCommonCompute.cginc\"\n#include - \"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.cginc\"\n\n\n\nRWByteAddressBuffer - attributeBuffer;\nByteAddressBuffer sourceAttributeBuffer;\n\nCBUFFER_START(initParams)\n#if - !VFX_USE_SPAWNER_FROM_GPU\n uint nbSpawned;\t\t\t\t\t// Numbers of particle - spawned\n uint spawnIndex;\t\t\t\t// Index of the first particle spawned\n - \ uint dispatchWidth;\n#else\n uint offsetInAdditionalOutput;\n\tuint nbMax;\n#endif\n\tuint - systemSeed;\nCBUFFER_END\n\n#if VFX_USE_ALIVE_CURRENT\nRWStructuredBuffer - deadListIn;\nByteAddressBuffer deadListCount; // This is bad to use a SRV to - fetch deadList count but Unity API currently prevent from copying to CB\n#endif\n\n#if - VFX_USE_SPAWNER_FROM_GPU\nStructuredBuffer eventList;\nByteAddressBuffer - inputAdditional;\n#endif\n\nvoid SetAttribute_F0142CB9(inout float lifetime, - float Lifetime) /*attribute:lifetime Composition:Overwrite Source:Slot Random:Off - channels:XYZ */\n{\n lifetime = Lifetime;\n}\nvoid SetAttribute_CAC29747(inout - float3 position, float3 Position) /*attribute:position Composition:Overwrite - Source:Slot Random:Off channels:XYZ */\n{\n position = Position;\n}\nvoid - SetAttribute_E89EAA93(inout float lifetime, float Lifetime) /*attribute:lifetime - Composition:Multiply Source:Slot Random:Off channels:XYZ */\n{\n lifetime - *= Lifetime;\n}\nvoid SetAttribute_FDD06EC7(inout float3 color, float3 Color) - /*attribute:color Composition:Overwrite Source:Slot Random:Off channels:XYZ - */\n{\n color = Color;\n}\n\n\n\n[numthreads(NB_THREADS_PER_GROUP,1,1)]\nvoid - CSMain(uint3 groupId : SV_GroupID,\n uint3 groupThreadId - \ : SV_GroupThreadID)\n{\n uint id = groupThreadId.x + groupId.x * NB_THREADS_PER_GROUP;\n#if - !VFX_USE_SPAWNER_FROM_GPU\n id += groupId.y * dispatchWidth * NB_THREADS_PER_GROUP;\n#endif\n\n#if - VFX_USE_SPAWNER_FROM_GPU\n uint maxThreadId = inputAdditional.Load((offsetInAdditionalOutput - * 2 + 0) << 2);\n uint currentSpawnIndex = inputAdditional.Load((offsetInAdditionalOutput - * 2 + 1) << 2) - maxThreadId;\n#else\n uint maxThreadId = nbSpawned;\n uint - currentSpawnIndex = spawnIndex;\n#endif\n\n#if VFX_USE_ALIVE_CURRENT\n maxThreadId - = min(maxThreadId, deadListCount.Load(0x0));\n#elif VFX_USE_SPAWNER_FROM_GPU\n - \ maxThreadId = min(maxThreadId, nbMax); //otherwise, nbSpawned already clamped - on CPU\n#endif\n\n if (id < maxThreadId)\n {\n#if VFX_USE_SPAWNER_FROM_GPU\n - \ int sourceIndex = eventList[id];\n#endif\n uint particleIndex - = id + currentSpawnIndex;\n\t\t\n#if !VFX_USE_SPAWNER_FROM_GPU\n int + name: '[System 1]Initialize Particle' + source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES + 1\n#define VFX_PASSDEPTH_ACTUAL (0)\n#define VFX_PASSDEPTH_MOTION_VECTOR (1)\n#define + VFX_PASSDEPTH_SELECTION (2)\n#define VFX_USE_LIFETIME_CURRENT 1\n#define VFX_USE_POSITION_CURRENT + 1\n#define VFX_USE_COLOR_CURRENT 1\n#define VFX_USE_PARTICLEID_CURRENT 1\n#define + VFX_USE_VELOCITY_CURRENT 1\n#define VFX_USE_ALIVE_CURRENT 1\n#define VFX_USE_AGE_CURRENT + 1\n#define VFX_LOCAL_SPACE 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\r\nCBUFFER_START(parameters)\n + float uniform_a;\n float uniform_c;\n float uniform_d;\n uint PADDING_0;\nCBUFFER_END\n\nstruct + Attributes\n{\n float lifetime;\n float3 position;\n float3 color;\n + uint particleId;\n float3 velocity;\n bool alive;\n float age;\n};\n\nstruct + SourceAttributes\n{\n};\n\nTexture2D texture_b;\nSamplerState samplertexture_b;\nfloat4 + texture_b_TexelSize;\n\nTexture2D texture_e;\nSamplerState samplertexture_e;\nfloat4 + texture_e_TexelSize;\n\n\n\r\n\r\n#define USE_DEAD_LIST (VFX_USE_ALIVE_CURRENT + && !HAS_STRIPS)\r\n\r\nRWByteAddressBuffer attributeBuffer;\r\nByteAddressBuffer + sourceAttributeBuffer;\r\n\r\nCBUFFER_START(initParams)\r\n#if !VFX_USE_SPAWNER_FROM_GPU\r\n + uint nbSpawned;\t\t\t\t\t// Numbers of particle spawned\r\n uint spawnIndex;\t\t\t\t// + Index of the first particle spawned\r\n uint dispatchWidth;\r\n#else\r\n + uint offsetInAdditionalOutput;\r\n\tuint nbMax;\r\n#endif\r\n\tuint systemSeed;\r\nCBUFFER_END\r\n\r\n#if + USE_DEAD_LIST\r\nRWStructuredBuffer deadListIn;\r\nByteAddressBuffer + deadListCount; // This is bad to use a SRV to fetch deadList count but Unity + API currently prevent from copying to CB\r\n#endif\r\n\r\n#if VFX_USE_SPAWNER_FROM_GPU\r\nStructuredBuffer + eventList;\r\nByteAddressBuffer inputAdditional;\r\n#endif\r\n\r\n#if HAS_STRIPS\r\nRWBuffer + stripDataBuffer;\r\n#endif\r\n\r\n#include \"Packages/com.unity.visualeffectgraph/Shaders/Common/VFXCommonCompute.hlsl\"\n#include + \"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\r\n\r\nvoid + SetAttribute_F0142CB9(inout float lifetime, float Lifetime) /*attribute:lifetime + Composition:Overwrite Source:Slot Random:Off channels:XYZ */\n{\n lifetime + = Lifetime;\n}\nvoid SetAttribute_CAC29747(inout float3 position, float3 Position) + /*attribute:position Composition:Overwrite Source:Slot Random:Off channels:XYZ + */\n{\n position = Position;\n}\nvoid SetAttribute_E89EAA93(inout float + lifetime, float Lifetime) /*attribute:lifetime Composition:Multiply Source:Slot + Random:Off channels:XYZ */\n{\n lifetime *= Lifetime;\n}\nvoid SetAttribute_FDD06EC7(inout + float3 color, float3 Color) /*attribute:color Composition:Overwrite Source:Slot + Random:Off channels:XYZ */\n{\n color = Color;\n}\n\n\r\n\r\n#if HAS_STRIPS\r\nbool + GetParticleIndex(inout uint particleIndex, uint stripIndex)\r\n{\r\n\tuint + relativeIndex;\r\n\tInterlockedAdd(STRIP_DATA(STRIP_NEXT_INDEX, stripIndex), + 1, relativeIndex);\r\n\tif (relativeIndex >= PARTICLE_PER_STRIP_COUNT) // strip + is full\r\n\t{\r\n\t\tInterlockedAdd(STRIP_DATA(STRIP_NEXT_INDEX, stripIndex), + -1); // Remove previous increment\r\n\t\treturn false;\r\n\t}\r\n\r\n\tparticleIndex + = stripIndex * PARTICLE_PER_STRIP_COUNT + ((STRIP_DATA(STRIP_FIRST_INDEX, stripIndex) + + relativeIndex) % PARTICLE_PER_STRIP_COUNT);\r\n return true;\r\n}\r\n#endif\r\n\r\n[numthreads(NB_THREADS_PER_GROUP,1,1)]\r\nvoid + CSMain(uint3 groupId : SV_GroupID,\r\n uint3 groupThreadId + : SV_GroupThreadID)\r\n{\r\n uint id = groupThreadId.x + groupId.x * NB_THREADS_PER_GROUP;\r\n#if + !VFX_USE_SPAWNER_FROM_GPU\r\n id += groupId.y * dispatchWidth * NB_THREADS_PER_GROUP;\r\n#endif\r\n\r\n#if + VFX_USE_SPAWNER_FROM_GPU\r\n uint maxThreadId = inputAdditional.Load((offsetInAdditionalOutput + * 2 + 0) << 2);\r\n uint currentSpawnIndex = inputAdditional.Load((offsetInAdditionalOutput + * 2 + 1) << 2) - maxThreadId;\r\n#else\r\n uint maxThreadId = nbSpawned;\r\n + uint currentSpawnIndex = spawnIndex;\r\n#endif\r\n\r\n#if USE_DEAD_LIST\r\n + maxThreadId = min(maxThreadId, deadListCount.Load(0x0));\r\n#elif VFX_USE_SPAWNER_FROM_GPU\r\n + maxThreadId = min(maxThreadId, nbMax); //otherwise, nbSpawned already clamped + on CPU\r\n#endif\r\n\r\n if (id < maxThreadId)\r\n {\r\n#if VFX_USE_SPAWNER_FROM_GPU\r\n + int sourceIndex = eventList[id];\r\n#endif\r\n\t\tuint particleIndex = id + + currentSpawnIndex;\r\n\t\t\r\n#if !VFX_USE_SPAWNER_FROM_GPU\r\n int sourceIndex = 0;\n /*//Loop with 1 iteration generate a wrong IL Assembly - (and actually, useless code)\n uint currentSumSpawnCount = 0u;\n for - (sourceIndex=0; sourceIndex<1; sourceIndex++)\n {\n currentSumSpawnCount - += uint(asfloat(sourceAttributeBuffer.Load((sourceIndex * 0x1 + 0x0) << 2)));\n - \ if (id < currentSumSpawnCount)\n {\n break;\n - \ }\n }\n */\n \n\n#endif\n float lifetime - = (float)1;\n float3 position = float3(0,0,0);\n float3 color - = float3(1,1,1);\n uint particleId = (uint)0;\n float3 velocity - = float3(0,0,0);\n bool alive = (bool)true;\n float age = (float)0;\n - \ \n\n#if VFX_USE_PARTICLEID_CURRENT\n particleId = particleIndex;\n#endif\n#if - VFX_USE_SEED_CURRENT\n seed = WangHash(particleIndex ^ systemSeed);\n#endif\n - \ \n {\n uint tmp_bc = particleId ^ asuint(uniform_b);\n - \ float tmp_bd = FixedRand(tmp_bc);\n float tmp_bf = tmp_bd - * (float)0.1;\n float tmp_bh = tmp_bf * (float)0.9;\n float - tmp_bi = (float)0.5 + tmp_bh;\n float tmp_bk = tmp_bf - (float)0.96;\n - \ float tmp_bl = ceil(tmp_bk);\n float tmp_bm = saturate(tmp_bl);\n - \ float tmp_bo = tmp_bm * (float)3;\n float tmp_bp = tmp_bi - + tmp_bo;\n SetAttribute_F0142CB9( /*inout */lifetime, tmp_bp);\n - \ }\n {\n uint tmp_bb = particleId ^ asuint(uniform_c);\n - \ float tmp_bc = FixedRand(tmp_bb);\n uint tmp_bd = particleId - ^ asuint(uniform_d);\n float tmp_be = FixedRand(tmp_bd);\n float2 - tmp_bf = float2(tmp_bc, tmp_be);\n float4 tmp_bh = SampleTexture(VFX_SAMPLER(texture_b),tmp_bf,(float)0);\n - \ float tmp_bi = tmp_bh[0];\n float tmp_bj = tmp_bh[1];\n - \ float tmp_bk = tmp_bh[2];\n float3 tmp_bl = float3(tmp_bi, - tmp_bj, tmp_bk);\n SetAttribute_CAC29747( /*inout */position, tmp_bl);\n - \ }\n {\n SetAttribute_E89EAA93( /*inout */lifetime, - (float)1);\n }\n {\n uint tmp_bb = particleId ^ asuint(uniform_c);\n - \ float tmp_bc = FixedRand(tmp_bb);\n uint tmp_bd = particleId - ^ asuint(uniform_d);\n float tmp_be = FixedRand(tmp_bd);\n float2 - tmp_bf = float2(tmp_bc, tmp_be);\n float4 tmp_bh = SampleTexture(VFX_SAMPLER(texture_c),tmp_bf,(float)0);\n - \ float tmp_bi = tmp_bh[0];\n float tmp_bj = tmp_bh[1];\n - \ float tmp_bk = tmp_bh[2];\n float3 tmp_bl = float3(tmp_bi, - tmp_bj, tmp_bk);\n SetAttribute_FDD06EC7( /*inout */color, tmp_bl);\n - \ }\n \n\n\n#if VFX_USE_ALIVE_CURRENT\n if (alive)\n {\n\t\t\tuint - deadIndex = deadListIn.DecrementCounter();\n uint index = deadListIn[deadIndex];\n - \ attributeBuffer.Store((index * 0x1 + 0x0) << 2,asuint(lifetime));\n - \ attributeBuffer.Store3((index * 0x8 + 0x4B000) << 2,asuint(position));\n - \ attributeBuffer.Store3((index * 0x4 + 0x2A3000) << 2,asuint(color));\n - \ attributeBuffer.Store3((index * 0x8 + 0x4B004) << 2,asuint(velocity));\n - \ attributeBuffer.Store((index * 0x8 + 0x4B003) << 2,uint(alive));\n - \ attributeBuffer.Store((index * 0x8 + 0x4B007) << 2,asuint(age));\n - \ \n\n }\n#else\n uint index = particleIndex;\n attributeBuffer.Store((index - * 0x1 + 0x0) << 2,asuint(lifetime));\n attributeBuffer.Store3((index - * 0x8 + 0x4B000) << 2,asuint(position));\n attributeBuffer.Store3((index - * 0x4 + 0x2A3000) << 2,asuint(color));\n attributeBuffer.Store3((index - * 0x8 + 0x4B004) << 2,asuint(velocity));\n attributeBuffer.Store((index - * 0x8 + 0x4B003) << 2,uint(alive));\n attributeBuffer.Store((index * - 0x8 + 0x4B007) << 2,asuint(age));\n \n\n#endif\n }\n}\n" + (and actually, useless code)\n uint currentSumSpawnCount = 0u;\n + for (sourceIndex=0; sourceIndex<1; sourceIndex++)\n {\n currentSumSpawnCount + += uint(asfloat(sourceAttributeBuffer.Load((sourceIndex * 0x1 + 0x0) << 2)));\n + if (id < currentSumSpawnCount)\n {\n break;\n + }\n }\n */\n \n\r\n#endif\r\n\r\n\t\tAttributes attributes + = (Attributes)0;\r\n\t\tSourceAttributes sourceAttributes = (SourceAttributes)0;\r\n\t\t\r\n + attributes.lifetime = (float)1;\n attributes.position = float3(0, 0, + 0);\n attributes.color = float3(1, 1, 1);\n attributes.particleId + = (uint)0;\n attributes.velocity = float3(0, 0, 0);\n attributes.alive + = (bool)true;\n attributes.age = (float)0;\n \n\r\n#if VFX_USE_PARTICLEID_CURRENT\r\n + attributes.particleId = particleIndex;\r\n#endif\r\n#if VFX_USE_SEED_CURRENT\r\n + attributes.seed = WangHash(particleIndex ^ systemSeed);\r\n#endif\r\n#if VFX_USE_SPAWNINDEX_CURRENT\r\n + attributes.spawnIndex = id;\r\n#endif\r\n#if HAS_STRIPS\r\n#if !VFX_USE_SPAWNER_FROM_GPU\r\n\t\t\r\n#else\r\n + uint stripIndex = sourceIndex;\r\n#endif\r\n\t\tstripIndex = min(stripIndex, + STRIP_COUNT);\r\n\r\n if (!GetParticleIndex(particleIndex, stripIndex))\r\n + return;\r\n\r\n const StripData stripData = GetStripDataFromStripIndex(stripIndex, + PARTICLE_PER_STRIP_COUNT);\r\n\t\tInitStripAttributes(particleIndex, attributes, + stripData);\r\n\t\t// TODO Change seed to be sure we're deterministic on random + with strip\r\n#endif\r\n \r\n {\n uint tmp_bc = attributes.particleId + ^ asuint(uniform_a);\n float tmp_bd = FixedRand(tmp_bc);\n + float tmp_bf = tmp_bd * (float)0.100000001;\n float tmp_bh = tmp_bf + * (float)0.899999976;\n float tmp_bi = (float)0.5 + tmp_bh;\n + float tmp_bk = tmp_bf - (float)0.959999979;\n float tmp_bl = ceil(tmp_bk);\n + float tmp_bm = saturate(tmp_bl);\n float tmp_bo = tmp_bm * (float)3;\n + float tmp_bp = tmp_bi + tmp_bo;\n SetAttribute_F0142CB9( /*inout + */attributes.lifetime, tmp_bp);\n }\n {\n uint tmp_bb + = attributes.particleId ^ asuint(uniform_c);\n float tmp_bc = FixedRand(tmp_bb);\n + uint tmp_bd = attributes.particleId ^ asuint(uniform_d);\n float + tmp_be = FixedRand(tmp_bd);\n float2 tmp_bf = float2(tmp_bc, tmp_be);\n + float4 tmp_bh = SampleTexture(VFX_SAMPLER(texture_b),tmp_bf,(float)0);\n + float tmp_bi = tmp_bh[0];\n float tmp_bj = tmp_bh[1];\n + float tmp_bk = tmp_bh[2];\n float3 tmp_bl = float3(tmp_bi, tmp_bj, + tmp_bk);\n SetAttribute_CAC29747( /*inout */attributes.position, + tmp_bl);\n }\n {\n SetAttribute_E89EAA93( /*inout + */attributes.lifetime, (float)1);\n }\n {\n uint tmp_bb + = attributes.particleId ^ asuint(uniform_c);\n float tmp_bc = FixedRand(tmp_bb);\n + uint tmp_bd = attributes.particleId ^ asuint(uniform_d);\n float + tmp_be = FixedRand(tmp_bd);\n float2 tmp_bf = float2(tmp_bc, tmp_be);\n + float4 tmp_bh = SampleTexture(VFX_SAMPLER(texture_e),tmp_bf,(float)0);\n + float tmp_bi = tmp_bh[0];\n float tmp_bj = tmp_bh[1];\n + float tmp_bk = tmp_bh[2];\n float3 tmp_bl = float3(tmp_bi, tmp_bj, + tmp_bk);\n SetAttribute_FDD06EC7( /*inout */attributes.color, tmp_bl);\n + }\n \n\r\n\t\t\r\n#if VFX_USE_ALIVE_CURRENT\r\n if (attributes.alive)\r\n#endif + \r\n {\r\n#if USE_DEAD_LIST\r\n\t uint deadIndex = deadListIn.DecrementCounter();\r\n + uint index = deadListIn[deadIndex];\r\n#else\r\n uint index = particleIndex;\r\n#endif\r\n + attributeBuffer.Store((index * 0x1 + 0x0) << 2,asuint(attributes.lifetime));\n + attributeBuffer.Store3((index * 0x8 + 0x4B000) << 2,asuint(attributes.position));\n + attributeBuffer.Store3((index * 0x4 + 0x2A3000) << 2,asuint(attributes.color));\n + attributeBuffer.Store3((index * 0x8 + 0x4B004) << 2,asuint(attributes.velocity));\n + attributeBuffer.Store((index * 0x8 + 0x4B003) << 2,uint(attributes.alive));\n + attributeBuffer.Store((index * 0x8 + 0x4B007) << 2,asuint(attributes.age));\n + \n\r\n }\r\n }\r\n}\r\n" - compute: 1 - name: '[System 1]Update' - source: "#pragma kernel CSMain\n#define NB_THREADS_PER_GROUP 64\n#define VFX_USE_LIFETIME_CURRENT - 1\n#define VFX_USE_POSITION_CURRENT 1\n#define VFX_USE_VELOCITY_CURRENT 1\n#define - VFX_USE_MASS_CURRENT 1\n#define VFX_USE_ALIVE_CURRENT 1\n#define VFX_USE_AGE_CURRENT - 1\n#define VFX_LOCAL_SPACE 1\n#include \"Packages/com.unity.visualeffectgraph/Shaders/RenderPipeline/HDRP/VFXDefines.hlsl\"\n\n\nCBUFFER_START(parameters)\n - \ float3 uniform_b;\n float deltaTime_a;\nCBUFFER_END\n\n\n#include \"Packages/com.unity.visualeffectgraph/Shaders/Common/VFXCommonCompute.cginc\"\n#include - \"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.cginc\"\n\n\n\nRWByteAddressBuffer - attributeBuffer;\n\n#if VFX_USE_ALIVE_CURRENT\nRWStructuredBuffer deadListOut;\n#endif\n\n#if - VFX_HAS_INDIRECT_DRAW\nRWStructuredBuffer indirectBuffer;\n#endif\n\nCBUFFER_START(updateParams)\n - \ uint nbMax;\n\tuint dispatchWidth;\n\tuint systemSeed;\nCBUFFER_END\n\nvoid + name: '[System 1]Update Particle' + source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES + 1\n#define VFX_PASSDEPTH_ACTUAL (0)\n#define VFX_PASSDEPTH_MOTION_VECTOR (1)\n#define + VFX_PASSDEPTH_SELECTION (2)\n#define VFX_USE_LIFETIME_CURRENT 1\n#define VFX_USE_POSITION_CURRENT + 1\n#define VFX_USE_VELOCITY_CURRENT 1\n#define VFX_USE_MASS_CURRENT 1\n#define + VFX_USE_ALIVE_CURRENT 1\n#define VFX_USE_AGE_CURRENT 1\n#define VFX_LOCAL_SPACE + 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\r\nCBUFFER_START(parameters)\n + float3 uniform_a;\n float deltaTime_a;\nCBUFFER_END\n\nstruct Attributes\n{\n + float lifetime;\n float3 position;\n float3 velocity;\n float mass;\n + bool alive;\n float age;\n};\n\nstruct SourceAttributes\n{\n};\n\n\n\r\n\r\n#define + USE_DEAD_LIST (VFX_USE_ALIVE_CURRENT && !HAS_STRIPS)\r\n\r\nRWByteAddressBuffer + attributeBuffer;\r\n\r\n#if USE_DEAD_LIST\r\nRWStructuredBuffer deadListOut;\r\n#endif\r\n\r\n#if + VFX_HAS_INDIRECT_DRAW\r\nRWStructuredBuffer indirectBuffer;\r\n#endif\r\n\r\n#if + HAS_STRIPS\r\nRWBuffer stripDataBuffer;\r\n#endif\r\n\r\n#if VFX_USE_STRIPALIVE_CURRENT\r\nBuffer + attachedStripDataBuffer;\r\n#endif\r\n\r\nCBUFFER_START(updateParams)\r\n + uint nbMax;\r\n\tuint dispatchWidth;\r\n\tuint systemSeed;\r\nCBUFFER_END\r\n\r\n#include + \"Packages/com.unity.visualeffectgraph/Shaders/Common/VFXCommonCompute.hlsl\"\n#include + \"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\r\n\r\nvoid Force_0(inout float3 velocity, float mass, float3 Force, float deltaTime) /*Mode:Absolute */\n{\n velocity += (Force / mass) * deltaTime;\n}\nvoid Drag_0(inout float3 velocity, float mass, float dragCoefficient, float deltaTime) /*UseParticleSize:False */\n{\n velocity *= max(0.0,(1.0 - (dragCoefficient * deltaTime) / mass));\n}\nvoid - EulerIntegration(inout float3 position, float3 velocity, float deltaTime)\n{\n - \ position += velocity * deltaTime;\n}\nvoid Age(inout float age, float deltaTime)\n{\n - \ age += deltaTime;\n}\nvoid Reap(float age, float lifetime, inout bool alive)\n{\n - \ if(age > lifetime) { alive = false; }\n}\n\n\n\n[numthreads(NB_THREADS_PER_GROUP,1,1)]\nvoid - CSMain(uint3 groupId : SV_GroupID,\n uint3 groupThreadId - \ : SV_GroupThreadID)\n{\n\tuint id = groupThreadId.x + groupId.x * NB_THREADS_PER_GROUP - + groupId.y * dispatchWidth * NB_THREADS_PER_GROUP;\n\tuint index = id;\n\tif - (id < nbMax)\n\t{\n#if VFX_USE_ALIVE_CURRENT\n\t\tbool alive = (attributeBuffer.Load((index - * 0x8 + 0x4B003) << 2));\n\t\t\n\n\t\tif (alive)\n\t\t{\n\t\t\tfloat lifetime - = asfloat(attributeBuffer.Load((index * 0x1 + 0x0) << 2));\n\t\t\tfloat3 position - = asfloat(attributeBuffer.Load3((index * 0x8 + 0x4B000) << 2));\n\t\t\tfloat3 - velocity = asfloat(attributeBuffer.Load3((index * 0x8 + 0x4B004) << 2));\n\t\t\tfloat - mass = (float)1;\n\t\t\tfloat age = asfloat(attributeBuffer.Load((index * 0x8 - + 0x4B007) << 2));\n\t\t\t\n\n\t\t\t\n#if VFX_USE_OLDPOSITION_CURRENT\n\t\t\toldPosition - = position;\n#endif\n\t\t\t\n\t\t\t{\n\t\t\t float3 tmp_z = position + uniform_b;\n\t\t\t - \ float3 tmp_bb = tmp_z * float3(7,7,7);\n\t\t\t float4 tmp_be = GeneratePerlinNoise(tmp_bb, - float3(1,0.5,2).x, (int)1, float3(1,0.5,2).y, float3(1,0.5,2).z);\n\t\t\t float - tmp_bf = tmp_be[2];\n\t\t\t float tmp_bh = tmp_bf * (float)2;\n\t\t\t float3 - tmp_bj = tmp_bb + float3(49.2845,49.2845,49.2845);\n\t\t\t float4 tmp_bk - = GeneratePerlinNoise(tmp_bj, float3(1,0.5,2).x, (int)1, float3(1,0.5,2).y, - float3(1,0.5,2).z);\n\t\t\t float tmp_bl = tmp_bk[3];\n\t\t\t float tmp_bm - = tmp_bl * (float)2;\n\t\t\t float tmp_bn = tmp_bh * tmp_bm;\n\t\t\t float - tmp_bo = tmp_be[3];\n\t\t\t float tmp_bp = tmp_bo * (float)2;\n\t\t\t float - tmp_bq = tmp_bk[2];\n\t\t\t float tmp_br = tmp_bq * (float)2;\n\t\t\t float - tmp_bs = tmp_bp * tmp_br;\n\t\t\t float tmp_bt = tmp_bn - tmp_bs;\n\t\t\t - \ float tmp_bu = tmp_bk[1];\n\t\t\t float tmp_bv = tmp_bu * (float)2;\n\t\t\t - \ float tmp_bw = tmp_bp * tmp_bv;\n\t\t\t float tmp_bx = tmp_be[1];\n\t\t\t - \ float tmp_by = tmp_bx * (float)2;\n\t\t\t float tmp_bz = tmp_by * tmp_bm;\n\t\t\t - \ float tmp_ca = tmp_bw - tmp_bz;\n\t\t\t float tmp_cb = tmp_by * tmp_br;\n\t\t\t - \ float tmp_cc = tmp_bh * tmp_bv;\n\t\t\t float tmp_cd = tmp_cb - tmp_cc;\n\t\t\t - \ float3 tmp_ce = float3(tmp_bt, tmp_ca, tmp_cd);\n\t\t\t float3 tmp_cf - = float3(0.25,0.25,0.25) * tmp_ce;\n\t\t\t Force_0( /*inout */velocity, mass, - tmp_cf, deltaTime_a);\n\t\t\t}\n\t\t\t{\n\t\t\t Drag_0( /*inout */velocity, - mass, (float)1, deltaTime_a);\n\t\t\t}\n\t\t\tEulerIntegration( /*inout */position, - velocity, deltaTime_a);\n\t\t\tAge( /*inout */age, deltaTime_a);\n\t\t\tReap(age, - lifetime, /*inout */alive);\n\t\t\t\n\n\t\t\tif (alive)\n\t\t\t{\n\t\t\t\tattributeBuffer.Store3((index - * 0x8 + 0x4B000) << 2,asuint(position));\n\t\t\t\tattributeBuffer.Store3((index - * 0x8 + 0x4B004) << 2,asuint(velocity));\n\t\t\t\tattributeBuffer.Store((index - * 0x8 + 0x4B007) << 2,asuint(age));\n\t\t\t\t\n\n#if VFX_HAS_INDIRECT_DRAW\n - \ uint indirectIndex = indirectBuffer.IncrementCounter();\n\t\t\t\tindirectBuffer[indirectIndex] - = index;\n#endif\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tattributeBuffer.Store((index - * 0x8 + 0x4B003) << 2,uint(alive));\n\t\t\t\t\n\n\t\t\t\tuint deadIndex = deadListOut.IncrementCounter();\n\t\t\t\tdeadListOut[deadIndex] - = index;\n\t\t\t}\n\t\t}\n#else\n\t\tfloat lifetime = asfloat(attributeBuffer.Load((index - * 0x1 + 0x0) << 2));\n\t\tfloat3 position = asfloat(attributeBuffer.Load3((index - * 0x8 + 0x4B000) << 2));\n\t\tfloat3 velocity = asfloat(attributeBuffer.Load3((index - * 0x8 + 0x4B004) << 2));\n\t\tfloat mass = (float)1;\n\t\tbool alive = (attributeBuffer.Load((index - * 0x8 + 0x4B003) << 2));\n\t\tfloat age = asfloat(attributeBuffer.Load((index - * 0x8 + 0x4B007) << 2));\n\t\t\n\n\t\t\n#if VFX_USE_OLDPOSITION_CURRENT\n\t\toldPosition - = position;\n#endif\n\t\t\n\t\t{\n\t\t float3 tmp_z = position + uniform_b;\n\t\t - \ float3 tmp_bb = tmp_z * float3(7,7,7);\n\t\t float4 tmp_be = GeneratePerlinNoise(tmp_bb, - float3(1,0.5,2).x, (int)1, float3(1,0.5,2).y, float3(1,0.5,2).z);\n\t\t float + EulerIntegration(inout float3 position, float3 velocity, float deltaTime)\n{\n + position += velocity * deltaTime;\n}\nvoid Age(inout float age, float deltaTime)\n{\n + age += deltaTime;\n}\nvoid Reap(float age, float lifetime, inout bool alive)\n{\n + if(age > lifetime) { alive = false; }\n}\n\n\r\n\r\n[numthreads(NB_THREADS_PER_GROUP,1,1)]\r\nvoid + CSMain(uint3 groupId : SV_GroupID,\r\n uint3 groupThreadId + : SV_GroupThreadID)\r\n{\r\n\tuint id = groupThreadId.x + groupId.x * NB_THREADS_PER_GROUP + + groupId.y * dispatchWidth * NB_THREADS_PER_GROUP;\r\n\tuint index = id;\r\n\tif + (id < nbMax)\r\n\t{\r\n Attributes attributes = (Attributes)0;\r\n\t\tSourceAttributes + sourceAttributes = (SourceAttributes)0;\r\n\r\n#if VFX_USE_ALIVE_CURRENT\r\n\t\tattributes.alive + = (attributeBuffer.Load((index * 0x8 + 0x4B003) << 2));\n\t\t\n\r\n\t\tif (attributes.alive)\r\n\t\t{\r\n\t\t\tattributes.lifetime + = asfloat(attributeBuffer.Load((index * 0x1 + 0x0) << 2));\n\t\t\tattributes.position + = asfloat(attributeBuffer.Load3((index * 0x8 + 0x4B000) << 2));\n\t\t\tattributes.velocity + = asfloat(attributeBuffer.Load3((index * 0x8 + 0x4B004) << 2));\n\t\t\tattributes.mass + = (float)1;\n\t\t\tattributes.age = asfloat(attributeBuffer.Load((index * 0x8 + + 0x4B007) << 2));\n\t\t\t\n\r\n\r\n// Initialize built-in needed attributes\r\n#if + VFX_USE_OLDPOSITION_CURRENT\r\n\t\t\tattributes.oldPosition = attributes.position;\r\n#endif\r\n#if + HAS_STRIPS\r\n const StripData stripData = GetStripDataFromParticleIndex(index, + PARTICLE_PER_STRIP_COUNT);\r\n InitStripAttributes(index, attributes, + stripData);\r\n#endif\r\n\t\t\t\r\n\t\t\t{\n\t\t\t float3 tmp_z = attributes.position + + uniform_a;\n\t\t\t float3 tmp_bb = tmp_z * float3(7, 7, 7);\n\t\t\t + float4 tmp_be = GeneratePerlinNoise(tmp_bb, float3(1, 0.5, 2).x, (int)1, float3(1, + 0.5, 2).y, float3(1, 0.5, 2).z);\n\t\t\t float tmp_bf = tmp_be[2];\n\t\t\t + float tmp_bh = tmp_bf * (float)2;\n\t\t\t float3 tmp_bj = tmp_bb + float3(49.2845001, + 49.2845001, 49.2845001);\n\t\t\t float4 tmp_bk = GeneratePerlinNoise(tmp_bj, + float3(1, 0.5, 2).x, (int)1, float3(1, 0.5, 2).y, float3(1, 0.5, 2).z);\n\t\t\t + float tmp_bl = tmp_bk[3];\n\t\t\t float tmp_bm = tmp_bl * (float)2;\n\t\t\t + float tmp_bn = tmp_bh * tmp_bm;\n\t\t\t float tmp_bo = tmp_be[3];\n\t\t\t + float tmp_bp = tmp_bo * (float)2;\n\t\t\t float tmp_bq = tmp_bk[2];\n\t\t\t + float tmp_br = tmp_bq * (float)2;\n\t\t\t float tmp_bs = tmp_bp * tmp_br;\n\t\t\t + float tmp_bt = tmp_bn - tmp_bs;\n\t\t\t float tmp_bu = tmp_bk[1];\n\t\t\t + float tmp_bv = tmp_bu * (float)2;\n\t\t\t float tmp_bw = tmp_bp * tmp_bv;\n\t\t\t + float tmp_bx = tmp_be[1];\n\t\t\t float tmp_by = tmp_bx * (float)2;\n\t\t\t + float tmp_bz = tmp_by * tmp_bm;\n\t\t\t float tmp_ca = tmp_bw - tmp_bz;\n\t\t\t + float tmp_cb = tmp_by * tmp_br;\n\t\t\t float tmp_cc = tmp_bh * tmp_bv;\n\t\t\t + float tmp_cd = tmp_cb - tmp_cc;\n\t\t\t float3 tmp_ce = float3(tmp_bt, tmp_ca, + tmp_cd);\n\t\t\t float3 tmp_cf = float3(0.25, 0.25, 0.25) * tmp_ce;\n\t\t\t + Force_0( /*inout */attributes.velocity, attributes.mass, tmp_cf, deltaTime_a);\n\t\t\t}\n\t\t\t{\n\t\t\t + Drag_0( /*inout */attributes.velocity, attributes.mass, (float)1, deltaTime_a);\n\t\t\t}\n\t\t\tEulerIntegration( + /*inout */attributes.position, attributes.velocity, deltaTime_a);\n\t\t\tAge( + /*inout */attributes.age, deltaTime_a);\n\t\t\tReap(attributes.age, attributes.lifetime, + /*inout */attributes.alive);\n\t\t\t\n\r\n\r\n\t\t\tif (attributes.alive)\r\n\t\t\t{\r\n\t\t\t\tattributeBuffer.Store3((index + * 0x8 + 0x4B000) << 2,asuint(attributes.position));\n\t\t\t\tattributeBuffer.Store3((index + * 0x8 + 0x4B004) << 2,asuint(attributes.velocity));\n\t\t\t\tattributeBuffer.Store((index + * 0x8 + 0x4B007) << 2,asuint(attributes.age));\n\t\t\t\t\n\r\n#if VFX_HAS_INDIRECT_DRAW\r\n + uint indirectIndex = indirectBuffer.IncrementCounter();\r\n\t\t\t\tindirectBuffer[indirectIndex] + = index;\r\n#endif\r\n\r\n#if HAS_STRIPS\t\t\t\r\n\t\t\t\tuint relativeIndexInStrip + = GetRelativeIndex(index, stripData);\r\n\t\t\t\tInterlockedMin(STRIP_DATA(STRIP_MIN_ALIVE, + stripData.stripIndex), relativeIndexInStrip);\r\n\t\t\t\tInterlockedMax(STRIP_DATA(STRIP_MAX_ALIVE, + stripData.stripIndex), relativeIndexInStrip);\r\n#endif\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tattributeBuffer.Store((index + * 0x8 + 0x4B003) << 2,uint(attributes.alive));\n\t\t\t\t\n\r\n#if USE_DEAD_LIST + && !VFX_USE_STRIPALIVE_CURRENT\r\n\t\t\t\tuint deadIndex = deadListOut.IncrementCounter();\r\n\t\t\t\tdeadListOut[deadIndex] + = index;\r\n#endif\r\n\t\t\t}\r\n\t\t}\r\n#if USE_DEAD_LIST && VFX_USE_STRIPALIVE_CURRENT\r\n + else if (attributes.stripAlive)\r\n {\r\n if (STRIP_DATA_X(attachedStripDataBuffer, + STRIP_MIN_ALIVE, index) == ~1) // Attached strip is no longer alive, recycle + the particle \r\n {\r\n uint deadIndex = deadListOut.IncrementCounter();\r\n\t\t\t\tdeadListOut[deadIndex] + = index;\r\n attributes.stripAlive = false;\r\n + \r\n } \r\n }\r\n#endif\r\n#else\r\n\t\tattributes.lifetime + = asfloat(attributeBuffer.Load((index * 0x1 + 0x0) << 2));\n\t\tattributes.position + = asfloat(attributeBuffer.Load3((index * 0x8 + 0x4B000) << 2));\n\t\tattributes.velocity + = asfloat(attributeBuffer.Load3((index * 0x8 + 0x4B004) << 2));\n\t\tattributes.mass + = (float)1;\n\t\tattributes.alive = (attributeBuffer.Load((index * 0x8 + 0x4B003) + << 2));\n\t\tattributes.age = asfloat(attributeBuffer.Load((index * 0x8 + 0x4B007) + << 2));\n\t\t\n\r\n\t\t\r\n#if VFX_USE_OLDPOSITION_CURRENT\r\n\t\tattributes.oldPosition + = attributes.position;\r\n#endif\r\n#if HAS_STRIPS\r\n const StripData + stripData = GetStripDataFromParticleIndex(index, PARTICLE_PER_STRIP_COUNT);\r\n + InitStripAttributes(index, attributes, stripData);\r\n#endif\r\n\t\t\r\n\t\t{\n\t\t + float3 tmp_z = attributes.position + uniform_a;\n\t\t float3 tmp_bb = tmp_z + * float3(7, 7, 7);\n\t\t float4 tmp_be = GeneratePerlinNoise(tmp_bb, float3(1, + 0.5, 2).x, (int)1, float3(1, 0.5, 2).y, float3(1, 0.5, 2).z);\n\t\t float tmp_bf = tmp_be[2];\n\t\t float tmp_bh = tmp_bf * (float)2;\n\t\t float3 - tmp_bj = tmp_bb + float3(49.2845,49.2845,49.2845);\n\t\t float4 tmp_bk = - GeneratePerlinNoise(tmp_bj, float3(1,0.5,2).x, (int)1, float3(1,0.5,2).y, float3(1,0.5,2).z);\n\t\t - \ float tmp_bl = tmp_bk[3];\n\t\t float tmp_bm = tmp_bl * (float)2;\n\t\t - \ float tmp_bn = tmp_bh * tmp_bm;\n\t\t float tmp_bo = tmp_be[3];\n\t\t - \ float tmp_bp = tmp_bo * (float)2;\n\t\t float tmp_bq = tmp_bk[2];\n\t\t - \ float tmp_br = tmp_bq * (float)2;\n\t\t float tmp_bs = tmp_bp * tmp_br;\n\t\t - \ float tmp_bt = tmp_bn - tmp_bs;\n\t\t float tmp_bu = tmp_bk[1];\n\t\t - \ float tmp_bv = tmp_bu * (float)2;\n\t\t float tmp_bw = tmp_bp * tmp_bv;\n\t\t - \ float tmp_bx = tmp_be[1];\n\t\t float tmp_by = tmp_bx * (float)2;\n\t\t - \ float tmp_bz = tmp_by * tmp_bm;\n\t\t float tmp_ca = tmp_bw - tmp_bz;\n\t\t - \ float tmp_cb = tmp_by * tmp_br;\n\t\t float tmp_cc = tmp_bh * tmp_bv;\n\t\t - \ float tmp_cd = tmp_cb - tmp_cc;\n\t\t float3 tmp_ce = float3(tmp_bt, - tmp_ca, tmp_cd);\n\t\t float3 tmp_cf = float3(0.25,0.25,0.25) * tmp_ce;\n\t\t - \ Force_0( /*inout */velocity, mass, tmp_cf, deltaTime_a);\n\t\t}\n\t\t{\n\t\t - \ Drag_0( /*inout */velocity, mass, (float)1, deltaTime_a);\n\t\t}\n\t\tEulerIntegration( - /*inout */position, velocity, deltaTime_a);\n\t\tAge( /*inout */age, deltaTime_a);\n\t\tReap(age, - lifetime, /*inout */alive);\n\t\t\n\n\t\tattributeBuffer.Store3((index * 0x8 - + 0x4B000) << 2,asuint(position));\n\t\tattributeBuffer.Store3((index * 0x8 - + 0x4B004) << 2,asuint(velocity));\n\t\tattributeBuffer.Store((index * 0x8 + - 0x4B003) << 2,uint(alive));\n\t\tattributeBuffer.Store((index * 0x8 + 0x4B007) - << 2,asuint(age));\n\t\t\n\n#if VFX_HAS_INDIRECT_DRAW\n uint indirectIndex - = indirectBuffer.IncrementCounter();\n\t\tindirectBuffer[indirectIndex] = index;\n#endif\n#endif\n\t}\n}\n" + tmp_bj = tmp_bb + float3(49.2845001, 49.2845001, 49.2845001);\n\t\t float4 + tmp_bk = GeneratePerlinNoise(tmp_bj, float3(1, 0.5, 2).x, (int)1, float3(1, + 0.5, 2).y, float3(1, 0.5, 2).z);\n\t\t float tmp_bl = tmp_bk[3];\n\t\t + float tmp_bm = tmp_bl * (float)2;\n\t\t float tmp_bn = tmp_bh * tmp_bm;\n\t\t + float tmp_bo = tmp_be[3];\n\t\t float tmp_bp = tmp_bo * (float)2;\n\t\t + float tmp_bq = tmp_bk[2];\n\t\t float tmp_br = tmp_bq * (float)2;\n\t\t + float tmp_bs = tmp_bp * tmp_br;\n\t\t float tmp_bt = tmp_bn - tmp_bs;\n\t\t + float tmp_bu = tmp_bk[1];\n\t\t float tmp_bv = tmp_bu * (float)2;\n\t\t + float tmp_bw = tmp_bp * tmp_bv;\n\t\t float tmp_bx = tmp_be[1];\n\t\t + float tmp_by = tmp_bx * (float)2;\n\t\t float tmp_bz = tmp_by * tmp_bm;\n\t\t + float tmp_ca = tmp_bw - tmp_bz;\n\t\t float tmp_cb = tmp_by * tmp_br;\n\t\t + float tmp_cc = tmp_bh * tmp_bv;\n\t\t float tmp_cd = tmp_cb - tmp_cc;\n\t\t + float3 tmp_ce = float3(tmp_bt, tmp_ca, tmp_cd);\n\t\t float3 tmp_cf = float3(0.25, + 0.25, 0.25) * tmp_ce;\n\t\t Force_0( /*inout */attributes.velocity, attributes.mass, + tmp_cf, deltaTime_a);\n\t\t}\n\t\t{\n\t\t Drag_0( /*inout */attributes.velocity, + attributes.mass, (float)1, deltaTime_a);\n\t\t}\n\t\tEulerIntegration( /*inout + */attributes.position, attributes.velocity, deltaTime_a);\n\t\tAge( /*inout + */attributes.age, deltaTime_a);\n\t\tReap(attributes.age, attributes.lifetime, + /*inout */attributes.alive);\n\t\t\n\r\n\t\tattributeBuffer.Store3((index * + 0x8 + 0x4B000) << 2,asuint(attributes.position));\n\t\tattributeBuffer.Store3((index + * 0x8 + 0x4B004) << 2,asuint(attributes.velocity));\n\t\tattributeBuffer.Store((index + * 0x8 + 0x4B003) << 2,uint(attributes.alive));\n\t\tattributeBuffer.Store((index + * 0x8 + 0x4B007) << 2,asuint(attributes.age));\n\t\t\n\r\n#if VFX_HAS_INDIRECT_DRAW\r\n + uint indirectIndex = indirectBuffer.IncrementCounter();\r\n\t\tindirectBuffer[indirectIndex] + = index;\r\n#endif\r\n#endif\r\n\t}\r\n}\r\n" - compute: 0 - name: '[System 1]Quad Output' - source: "Shader \"Hidden/VFX/System 1/Quad Output\"\n{\n\tSubShader\n\t{\t\n\t\tCull - Off\n\t\t\n\t\tTags { \"Queue\"=\"Transparent+0\" \"IgnoreProjector\"=\"True\" - \"RenderType\"=\"Transparent\" }\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tBlend - SrcAlpha One \n\t\tZTest LEqual\n\t\tZWrite Off\n\t\tCull Off\n\t\t\n\t\n\t\t\t\n\t\tHLSLINCLUDE\n\t\t#if - !defined(VFX_WORLD_SPACE) && !defined(VFX_LOCAL_SPACE)\n\t\t#define VFX_LOCAL_SPACE - 1\n\t\t#endif\n\t\t\n\t\t#define NB_THREADS_PER_GROUP 64\n\t\t#define VFX_USE_LIFETIME_CURRENT - 1\n\t\t#define VFX_USE_POSITION_CURRENT 1\n\t\t#define VFX_USE_COLOR_CURRENT - 1\n\t\t#define VFX_USE_VELOCITY_CURRENT 1\n\t\t#define VFX_USE_ALPHA_CURRENT - 1\n\t\t#define VFX_USE_ALIVE_CURRENT 1\n\t\t#define VFX_USE_AXISX_CURRENT 1\n\t\t#define - VFX_USE_AXISY_CURRENT 1\n\t\t#define VFX_USE_AXISZ_CURRENT 1\n\t\t#define VFX_USE_ANGLEX_CURRENT - 1\n\t\t#define VFX_USE_ANGLEY_CURRENT 1\n\t\t#define VFX_USE_ANGLEZ_CURRENT - 1\n\t\t#define VFX_USE_PIVOTX_CURRENT 1\n\t\t#define VFX_USE_PIVOTY_CURRENT - 1\n\t\t#define VFX_USE_PIVOTZ_CURRENT 1\n\t\t#define VFX_USE_SIZE_CURRENT 1\n\t\t#define - VFX_USE_SCALEX_CURRENT 1\n\t\t#define VFX_USE_SCALEY_CURRENT 1\n\t\t#define - VFX_USE_SCALEZ_CURRENT 1\n\t\t#define VFX_USE_AGE_CURRENT 1\n\t\t#define VFX_COLORMAPPING_DEFAULT - 1\n\t\t#define IS_TRANSPARENT_PARTICLE 1\n\t\t#define VFX_BLENDMODE_ADD 1\n\t\t#define - VFX_PRIMITIVE_QUAD 1\n\t\t\n\t\t\n\t\t\n\t\t#define VFX_LOCAL_SPACE 1\n\t\t#include - \"Packages/com.unity.visualeffectgraph/Shaders/RenderPipeline/HDRP/VFXDefines.hlsl\"\n\t\t\n\n\t\tCBUFFER_START(parameters)\n\t\t - \ float gradient_a;\n\t\t uint3 PADDING_0;\n\t\tCBUFFER_END\n\t\tTexture2D - mainTexture;\n\t\tSamplerState samplermainTexture;\n\t\t\n\n\t\t\n\t\t#define - VFX_NEEDS_COLOR_INTERPOLATOR (VFX_USE_COLOR_CURRENT || VFX_USE_ALPHA_CURRENT)\n\t\t\n\t\tByteAddressBuffer - attributeBuffer;\t\n\t\t\n\t\t#if VFX_HAS_INDIRECT_DRAW\n\t\tStructuredBuffer - indirectBuffer;\t\n\t\t#endif\t\n\t\t\n\t\t#if USE_DEAD_LIST_COUNT\n\t\tByteAddressBuffer - deadListCount;\n\t\t#endif\n\t\t\n\t\tCBUFFER_START(outputParams)\n\t\t\tfloat - nbMax;\n\t\t\tfloat systemSeed;\n\t\tCBUFFER_END\n\t\t\n\t\tENDHLSL\n\t\t\n\n\t\t\n\t\t// - Forward pass\n\t\tPass\n\t\t{\t\t\n\t\t\tTags { \"LightMode\"=\"ForwardOnly\" - }\n\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#pragma target 4.5\n\t\t\t\n\t\t\n\t\t\tstruct - ps_input\n\t\t\t{\n\t\t\t\tfloat4 pos : SV_POSITION;\n\t\t\t\t#if USE_FLIPBOOK_INTERPOLATION\n\t\t\t\tfloat4 - uv : TEXCOORD0;\n\t\t\t\t#else\n\t\t\t\tfloat2 uv : TEXCOORD0;\t\n\t\t\t\t#endif\n\t\t\t\t#if - VFX_NEEDS_COLOR_INTERPOLATOR\n\t\t\t\tnointerpolation float4 color : COLOR0;\n\t\t\t\t#endif\n\t\t\t\t#if - USE_SOFT_PARTICLE || USE_ALPHA_TEST || USE_FLIPBOOK_INTERPOLATION || USE_EXPOSURE_WEIGHT\n\t\t\t\t// - x: inverse soft particles fade distance\n\t\t\t\t// y: alpha threshold\n\t\t\t\t// - z: frame blending factor\n\t\t\t\t// w: exposure weight\n\t\t\t\tnointerpolation - float4 builtInInterpolants : TEXCOORD1;\n\t\t\t\t#endif\n\t\t\t\t#if USE_FLIPBOOK_MOTIONVECTORS\n\t\t\t\t// - x: motion vectors scale X\n\t\t\t\t// y: motion vectors scale Y\n\t\t\t\tnointerpolation - float2 builtInInterpolants2 : TEXCOORD2;\n\t\t\t\t#endif\n\t\t\t\t#if VFX_NEEDS_POSWS_INTERPOLATOR\n\t\t\t\tfloat3 - posWS : TEXCOORD3;\n\t\t\t\t#endif\n\t\t\t};\n\t\t\t\n\t\t\tstruct ps_output\n\t\t\t{\n\t\t\t\tfloat4 - color : SV_Target0;\n\t\t\t};\n\t\t\n\t\t#define VFX_VARYING_PS_INPUTS ps_input\n\t\t#define - VFX_VARYING_POSCS pos\n\t\t#define VFX_VARYING_COLOR color.rgb\n\t\t#define - VFX_VARYING_ALPHA color.a\n\t\t#define VFX_VARYING_INVSOFTPARTICLEFADEDISTANCE - builtInInterpolants.x\n\t\t#define VFX_VARYING_ALPHATHRESHOLD builtInInterpolants.y\n\t\t#define - VFX_VARYING_FRAMEBLEND builtInInterpolants.z\n\t\t#define VFX_VARYING_MOTIONVECTORSCALE - builtInInterpolants2.xy\n\t\t#define VFX_VARYING_UV uv\n\t\t#if VFX_NEEDS_POSWS_INTERPOLATOR\n\t\t#define - VFX_VARYING_POSWS posWS\n\t\t#endif\n\t\t#if USE_EXPOSURE_WEIGHT\n\t\t#define - VFX_VARYING_EXPOSUREWEIGHT builtInInterpolants.w\n\t\t#endif\n\t\t\t\t\n\t\t\t#if - !(defined(VFX_VARYING_PS_INPUTS) && defined(VFX_VARYING_POSCS))\n\t\t\t#error - VFX_VARYING_PS_INPUTS, VFX_VARYING_POSCS and VFX_VARYING_UV must be defined.\n\t\t\t#endif\n\t\t\t\n\t\t\t#include - \"Packages/com.unity.visualeffectgraph/Shaders/RenderPipeline/HDRP/VFXCommon.cginc\"\n\t\t\t#include - \"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.cginc\"\n\t\t\t\n\n\t\t\tvoid + name: '[System 1]Output Particle Quad' + source: "Shader \"Hidden/VFX/Particles/System 1/Output Particle Quad\"\n{\r\n\tSubShader\r\n\t{\t\r\n\t\tCull + Off\r\n\t\t\r\n\t\tTags { \"Queue\"=\"Transparent+0\" \"IgnoreProjector\"=\"True\" + \"RenderType\"=\"Transparent\" }\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\n\t\t\r\n\t\tBlend + SrcAlpha One \n\t\tZTest LEqual\n\t\tZWrite Off\n\t\tCull Off\n\t\t\n\t\r\n\t\t\t\r\n\t\tHLSLINCLUDE\r\n\t\t\r\n\t\t#define + NB_THREADS_PER_GROUP 64\n\t\t#define HAS_ATTRIBUTES 1\n\t\t#define VFX_PASSDEPTH_ACTUAL + (0)\n\t\t#define VFX_PASSDEPTH_MOTION_VECTOR (1)\n\t\t#define VFX_PASSDEPTH_SELECTION + (2)\n\t\t#define VFX_USE_LIFETIME_CURRENT 1\n\t\t#define VFX_USE_POSITION_CURRENT + 1\n\t\t#define VFX_USE_COLOR_CURRENT 1\n\t\t#define VFX_USE_VELOCITY_CURRENT + 1\n\t\t#define VFX_USE_ALPHA_CURRENT 1\n\t\t#define VFX_USE_ALIVE_CURRENT 1\n\t\t#define + VFX_USE_AXISX_CURRENT 1\n\t\t#define VFX_USE_AXISY_CURRENT 1\n\t\t#define VFX_USE_AXISZ_CURRENT + 1\n\t\t#define VFX_USE_ANGLEX_CURRENT 1\n\t\t#define VFX_USE_ANGLEY_CURRENT + 1\n\t\t#define VFX_USE_ANGLEZ_CURRENT 1\n\t\t#define VFX_USE_PIVOTX_CURRENT + 1\n\t\t#define VFX_USE_PIVOTY_CURRENT 1\n\t\t#define VFX_USE_PIVOTZ_CURRENT + 1\n\t\t#define VFX_USE_SIZE_CURRENT 1\n\t\t#define VFX_USE_SCALEX_CURRENT 1\n\t\t#define + VFX_USE_SCALEY_CURRENT 1\n\t\t#define VFX_USE_SCALEZ_CURRENT 1\n\t\t#define + VFX_USE_AGE_CURRENT 1\n\t\t#define VFX_COLORMAPPING_DEFAULT 1\n\t\t#define + IS_TRANSPARENT_PARTICLE 1\n\t\t#define VFX_BLENDMODE_ADD 1\n\t\t#define VFX_BYPASS_EXPOSURE + 1\n\t\t#define VFX_PRIMITIVE_QUAD 1\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t#define + VFX_LOCAL_SPACE 1\n\t\t#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\t\t\n\r\n\t\tCBUFFER_START(parameters)\n\t\t + float gradient_a;\n\t\t uint3 PADDING_0;\n\t\tCBUFFER_END\n\t\t\n\t\tstruct + Attributes\n\t\t{\n\t\t float lifetime;\n\t\t float3 position;\n\t\t + float3 color;\n\t\t float3 velocity;\n\t\t float alpha;\n\t\t bool + alive;\n\t\t float3 axisX;\n\t\t float3 axisY;\n\t\t float3 axisZ;\n\t\t + float angleX;\n\t\t float angleY;\n\t\t float angleZ;\n\t\t float + pivotX;\n\t\t float pivotY;\n\t\t float pivotZ;\n\t\t float size;\n\t\t + float scaleX;\n\t\t float scaleY;\n\t\t float scaleZ;\n\t\t float + age;\n\t\t};\n\t\t\n\t\tstruct SourceAttributes\n\t\t{\n\t\t};\n\t\t\n\t\tTexture2D + mainTexture;\n\t\tSamplerState samplermainTexture;\n\t\tfloat4 mainTexture_TexelSize;\n\t\t\n\t\t\n\r\n\t\t\r\n\t\t#define + VFX_NEEDS_COLOR_INTERPOLATOR (VFX_USE_COLOR_CURRENT || VFX_USE_ALPHA_CURRENT)\r\n\t\t#if + HAS_STRIPS\r\n\t\t#define VFX_OPTIONAL_INTERPOLATION \r\n\t\t#else\r\n\t\t#define + VFX_OPTIONAL_INTERPOLATION nointerpolation\r\n\t\t#endif\r\n\t\t\r\n\t\tByteAddressBuffer + attributeBuffer;\t\r\n\t\t\r\n\t\t#if VFX_HAS_INDIRECT_DRAW\r\n\t\tStructuredBuffer + indirectBuffer;\t\r\n\t\t#endif\t\r\n\t\t\r\n\t\t#if USE_DEAD_LIST_COUNT\r\n\t\tByteAddressBuffer + deadListCount;\r\n\t\t#endif\r\n\t\t\r\n\t\t#if HAS_STRIPS\r\n\t\tBuffer + stripDataBuffer;\r\n\t\t#endif\r\n\t\t\r\n\t\t#if WRITE_MOTION_VECTOR_IN_FORWARD + || USE_MOTION_VECTORS_PASS\r\n\t\tByteAddressBuffer elementToVFXBufferPrevious;\r\n\t\t#endif\r\n\t\t\r\n\t\tCBUFFER_START(outputParams)\r\n\t\t\tfloat + nbMax;\r\n\t\t\tfloat systemSeed;\r\n\t\tCBUFFER_END\r\n\t\t\r\n\t\t// Helper + macros to always use a valid instanceID\r\n\t\t#if defined(UNITY_STEREO_INSTANCING_ENABLED)\r\n\t\t\t#define + VFX_DECLARE_INSTANCE_ID UNITY_VERTEX_INPUT_INSTANCE_ID\r\n\t\t\t#define + VFX_GET_INSTANCE_ID(i) unity_InstanceID\r\n\t\t#else\r\n\t\t\t#define + VFX_DECLARE_INSTANCE_ID uint instanceID : SV_InstanceID;\r\n\t\t\t#define + VFX_GET_INSTANCE_ID(i) i.instanceID\r\n\t\t#endif\r\n\t\t\r\n\t\tENDHLSL\r\n\t\t\n\r\n\t\tPass\r\n\t\t{\t\t\r\n\t\t\tTags + { \"LightMode\"=\"SceneSelectionPass\" }\r\n\t\t\r\n\t\t\tZWrite On\r\n\t\t\tBlend + Off\r\n\t\t\t\r\n\t\t\tHLSLPROGRAM\r\n\t\t\t#define VFX_PASSDEPTH VFX_PASSDEPTH_SELECTION\r\n\t\t\t#pragma + target 4.5\r\n\t\t\t\r\n\t\t\tstruct ps_input\r\n\t\t\t{\r\n\t\t\t\tfloat4 + pos : SV_POSITION;\r\n\t\t\t\t#if USE_FLIPBOOK_INTERPOLATION\r\n\t\t\t\tfloat4 + uv : TEXCOORD0;\r\n\t\t\t\t#else\r\n\t\t\t\tfloat2 uv : TEXCOORD0;\t\r\n\t\t\t\t#endif\r\n\t\t\t\t#if + USE_ALPHA_TEST || USE_FLIPBOOK_INTERPOLATION || VFX_USE_ALPHA_CURRENT\r\n\t\t\t\t// + x: alpha threshold\r\n\t\t\t\t// y: frame blending factor\r\n\t\t\t\t// z: + alpha\r\n\t\t\t\tVFX_OPTIONAL_INTERPOLATION float3 builtInInterpolants : TEXCOORD1;\r\n\t\t\t\t#endif\r\n\t\t\t\t\r\n\t\t\t\t#if + USE_FLIPBOOK_MOTIONVECTORS\r\n\t\t\t\t// x: motion vectors scale X\r\n\t\t\t\t// + y: motion vectors scale Y\r\n\t\t\t\tVFX_OPTIONAL_INTERPOLATION float2 builtInInterpolants2 + : TEXCOORD2;\r\n\t\t\t\t#endif\r\n\t\t\t\t\r\n\t\t\t\t#if VFX_PASSDEPTH == + VFX_PASSDEPTH_MOTION_VECTOR\r\n\t\t\t\tfloat4 cPosPrevious : TEXCOORD3;\r\n\t\t\t\tfloat4 + cPosNonJiterred : TEXCOORD4;\r\n\t\t\t\t#endif\r\n\t\t\t \r\n\t\t\t #if + VFX_NEEDS_POSWS_INTERPOLATOR\r\n\t\t\t float3 posWS : TEXCOORD5;\r\n\t\t\t + #endif\r\n\t\t\t \r\n\t\t\t\t\r\n\t\t\t\tUNITY_VERTEX_OUTPUT_STEREO\r\n\t\t\t};\r\n\t\t\t\r\n\t\t\t#define + VFX_VARYING_PS_INPUTS ps_input\r\n\t\t\t#define VFX_VARYING_POSCS pos\r\n\t\t\t#define + VFX_VARYING_ALPHA builtInInterpolants.z\r\n\t\t\t#define VFX_VARYING_ALPHATHRESHOLD + builtInInterpolants.x\r\n\t\t\t#define VFX_VARYING_FRAMEBLEND builtInInterpolants.y\r\n\t\t\t#define + VFX_VARYING_MOTIONVECTORSCALE builtInInterpolants2.xy\r\n\t\t\t#define VFX_VARYING_UV + uv\r\n\t\t\t\r\n\t\t\t#if VFX_NEEDS_POSWS_INTERPOLATOR\r\n\t\t\t#define VFX_VARYING_POSWS + posWS\r\n\t\t\t#endif\r\n\t\t\t\r\n\t\t\t#if VFX_PASSDEPTH == VFX_PASSDEPTH_MOTION_VECTOR\r\n\t\t\t#define + VFX_VARYING_VELOCITY_CPOS cPosNonJiterred\r\n\t\t\t#define VFX_VARYING_VELOCITY_CPOS_PREVIOUS + cPosPrevious\r\n\t\t\t#endif\r\n\t\t\t\r\n\t\t\t#if VFX_PASSDEPTH == VFX_PASSDEPTH_MOTION_VECTOR\r\n\t\t\t#define + SHADERPASS SHADERPASS_MOTION_VECTORS\r\n\t\t\t#else\r\n\t\t\t#define SHADERPASS + SHADERPASS_DEPTH_ONLY\r\n\t\t\t#endif\r\n\t\t\t#if !(defined(VFX_VARYING_PS_INPUTS) + && defined(VFX_VARYING_POSCS))\r\n\t\t\t#error VFX_VARYING_PS_INPUTS, VFX_VARYING_POSCS + and VFX_VARYING_UV must be defined.\r\n\t\t\t#endif\r\n\t\t\t\r\n\t\t\t#include + \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXCommon.hlsl\"\n\t\t\t#include + \"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\t\t\t\n\r\n\t\t\tvoid + ColorOverLife_26AC1(float age, float lifetime, inout float3 color, float gradient) + /*mode:Color ColorComposition:Multiply AlphaComposition:Multiply */\n\t\t\t{\n\t\t\t + \r\n\t\t\t float4 sampledColor = SampleGradient(gradient, age/lifetime);\r\n\t\t\t + color *= sampledColor.rgb;\n\t\t\t \n\t\t\t}\n\t\t\tvoid Orient_94A(inout + float3 axisX, inout float3 axisY, inout float3 axisZ, float3 position, float3 + velocity) /*mode:AlongVelocity axes:ZY */\n\t\t\t{\n\t\t\t \r\n\t\t\t + axisY = normalize(velocity);\r\n\t\t\t axisZ = position - GetViewVFXPosition();\r\n\t\t\t + axisX = normalize(cross(axisY,axisZ));\r\n\t\t\t axisZ = cross(axisX,axisY);\r\n\t\t\t + \n\t\t\t}\n\t\t\tvoid SetAttribute_D5151647(inout float scaleX, inout float + scaleY, float2 Scale) /*attribute:scale Composition:Overwrite Source:Slot Random:Off + channels:XY */\n\t\t\t{\n\t\t\t scaleX = Scale.x;\n\t\t\t scaleY = Scale.y;\n\t\t\t}\n\t\t\tvoid + SubpixelAA(float3 position, inout float alpha, float size, inout float scaleX, + inout float scaleY)\n\t\t\t{\n\t\t\t \r\n\t\t\t float2 localSize = size + * float2(scaleX, scaleY);\r\n\t\t\t float clipPosW = TransformPositionVFXToClip(position).w;\r\n\t\t\t + float minSize = clipPosW / (0.5f * min(UNITY_MATRIX_P[0][0] * _ScreenParams.x,-UNITY_MATRIX_P[1][1] + * _ScreenParams.y)); // max size in one pixel\r\n\t\t\t float2 clampedSize + = max(localSize,minSize);\r\n\t\t\t float fade = (localSize.x * localSize.y) + / (clampedSize.x * clampedSize.y);\r\n\t\t\t alpha *= fade;\r\n\t\t\t + localSize = clampedSize;\r\n\t\t\t scaleX = localSize.x / size;\r\n\t\t\t + scaleY = localSize.y / size;\n\t\t\t}\n\t\t\t\n\r\n\t\t\t\r\n\t\t\t#if defined(HAS_STRIPS) + && !defined(VFX_PRIMITIVE_QUAD)\r\n\t\t\t#error VFX_PRIMITIVE_QUAD must be + defined when HAS_STRIPS is.\r\n\t\t\t#endif\r\n\t\t\t\r\n\t\t\tstruct vs_input\r\n\t\t\t{\r\n\t\t\t\tVFX_DECLARE_INSTANCE_ID\r\n\t\t\t};\r\n\t\t\t\r\n\t\t\t#if + HAS_STRIPS\r\n\t\t\t#define PARTICLE_IN_EDGE (id & 1)\r\n\t\t\t\r\n\t\t\tfloat3 + GetParticlePosition(uint index)\r\n\t\t\t{\r\n\t\t\t\tstruct Attributes attributes + = (Attributes)0;\r\n\t\t\t\tattributes.position = asfloat(attributeBuffer.Load3((index + * 0x8 + 0x4B000) << 2));\n\t\t\t\t\n\r\n\t\t\t\treturn attributes.position;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tfloat3 + GetStripTangent(float3 currentPos, uint relativeIndex, const StripData stripData)\r\n\t\t\t{\r\n\t\t\t\tfloat3 + prevTangent = (float3)0.0f;\r\n\t\t\t\tif (relativeIndex > 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tuint + prevIndex = GetParticleIndex(relativeIndex - 1,stripData);\r\n\t\t\t\t\tprevTangent + = normalize(currentPos - GetParticlePosition(prevIndex));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tfloat3 + nextTangent = (float3)0.0f;\r\n\t\t\t\tif (relativeIndex < stripData.nextIndex + - 1)\r\n\t\t\t\t{\r\n\t\t\t\t\tuint nextIndex = GetParticleIndex(relativeIndex + + 1,stripData);\r\n\t\t\t\t\tnextTangent = normalize(GetParticlePosition(nextIndex) + - currentPos);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn normalize(prevTangent + + nextTangent);\r\n\t\t\t}\r\n\t\t\t#endif\r\n\t\t\t\r\n\t\t\t#pragma vertex + vert\r\n\t\t\tVFX_VARYING_PS_INPUTS vert(uint id : SV_VertexID, vs_input i)\r\n\t\t\t{\r\n\t\t\t\tVFX_VARYING_PS_INPUTS + o = (VFX_VARYING_PS_INPUTS)0;\r\n\t\t\t\r\n\t\t\t\tUNITY_SETUP_INSTANCE_ID(i);\r\n\t\t\t\tUNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);\r\n\t\t\t\r\n\t\t\t#if + VFX_PRIMITIVE_TRIANGLE\r\n\t\t\t\tuint index = id / 3;\r\n\t\t\t#elif VFX_PRIMITIVE_QUAD\r\n\t\t\t#if + HAS_STRIPS\r\n\t\t\t\tid += VFX_GET_INSTANCE_ID(i) * 8192;\r\n\t\t\t\tconst + uint vertexPerStripCount = (PARTICLE_PER_STRIP_COUNT - 1) << 2;\r\n\t\t\t\tconst + StripData stripData = GetStripDataFromStripIndex(id / vertexPerStripCount, + PARTICLE_PER_STRIP_COUNT);\r\n\t\t\t\tuint currentIndex = ((id % vertexPerStripCount) + >> 2) + (id & 1); // relative index of particle\r\n\t\t\t\t\r\n\t\t\t\tuint + maxEdgeIndex = currentIndex - PARTICLE_IN_EDGE + 1;\r\n\t\t\t\tif (maxEdgeIndex + >= stripData.nextIndex)\r\n\t\t\t\t\treturn o;\r\n\t\t\t\t\r\n\t\t\t\tuint + index = GetParticleIndex(currentIndex, stripData);\r\n\t\t\t#else\r\n\t\t\t\tuint + index = (id >> 2) + VFX_GET_INSTANCE_ID(i) * 2048;\r\n\t\t\t#endif\r\n\t\t\t#elif + VFX_PRIMITIVE_OCTAGON\r\n\t\t\t\tuint index = (id >> 3) + VFX_GET_INSTANCE_ID(i) + * 1024;\r\n\t\t\t#endif\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\tuint deadCount + = 0;\r\n\t\t\t\t\t\t#if USE_DEAD_LIST_COUNT\r\n\t\t\t\t\t\tdeadCount = deadListCount.Load(0);\r\n\t\t\t\t\t\t#endif\t\r\n\t\t\t\t\t\tif + (index >= asuint(nbMax) - deadCount)\r\n\t\t\t\t\t\t#if USE_GEOMETRY_SHADER\r\n\t\t\t\t\t\t\treturn; + // cull\r\n\t\t\t\t\t\t#else\r\n\t\t\t\t\t\t\treturn o; // cull\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tAttributes + attributes = (Attributes)0;\r\n\t\t\t\t\t\tSourceAttributes sourceAttributes + = (SourceAttributes)0;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t#if VFX_HAS_INDIRECT_DRAW\r\n\t\t\t\t\t\tindex + = indirectBuffer[index];\r\n\t\t\t\t\t\tattributes.lifetime = asfloat(attributeBuffer.Load((index + * 0x1 + 0x0) << 2));\n\t\t\t\t\t\tattributes.position = asfloat(attributeBuffer.Load3((index + * 0x8 + 0x4B000) << 2));\n\t\t\t\t\t\tattributes.color = asfloat(attributeBuffer.Load3((index + * 0x4 + 0x2A3000) << 2));\n\t\t\t\t\t\tattributes.velocity = asfloat(attributeBuffer.Load3((index + * 0x8 + 0x4B004) << 2));\n\t\t\t\t\t\tattributes.alpha = (float)1;\n\t\t\t\t\t\tattributes.alive + = (attributeBuffer.Load((index * 0x8 + 0x4B003) << 2));\n\t\t\t\t\t\tattributes.axisX + = float3(1, 0, 0);\n\t\t\t\t\t\tattributes.axisY = float3(0, 1, 0);\n\t\t\t\t\t\tattributes.axisZ + = float3(0, 0, 1);\n\t\t\t\t\t\tattributes.angleX = (float)0;\n\t\t\t\t\t\tattributes.angleY + = (float)0;\n\t\t\t\t\t\tattributes.angleZ = (float)0;\n\t\t\t\t\t\tattributes.pivotX + = (float)0;\n\t\t\t\t\t\tattributes.pivotY = (float)0;\n\t\t\t\t\t\tattributes.pivotZ + = (float)0;\n\t\t\t\t\t\tattributes.size = (float)0.100000001;\n\t\t\t\t\t\tattributes.scaleX + = (float)1;\n\t\t\t\t\t\tattributes.scaleY = (float)1;\n\t\t\t\t\t\tattributes.scaleZ + = (float)1;\n\t\t\t\t\t\tattributes.age = asfloat(attributeBuffer.Load((index + * 0x8 + 0x4B007) << 2));\n\t\t\t\t\t\t\n\t\t\t\t\r\n\t\t\t\t\t\t#else\r\n\t\t\t\t\t\tattributes.alive + = (attributeBuffer.Load((index * 0x8 + 0x4B003) << 2));\n\t\t\t\t\t\t\n\t\t\t\t\r\n\t\t\t\t\t\t#if + !HAS_STRIPS\r\n\t\t\t\t\t\tif (!attributes.alive)\r\n\t\t\t\t\t\t\treturn o;\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tattributes.lifetime + = asfloat(attributeBuffer.Load((index * 0x1 + 0x0) << 2));\n\t\t\t\t\t\tattributes.position + = asfloat(attributeBuffer.Load3((index * 0x8 + 0x4B000) << 2));\n\t\t\t\t\t\tattributes.color + = asfloat(attributeBuffer.Load3((index * 0x4 + 0x2A3000) << 2));\n\t\t\t\t\t\tattributes.velocity + = asfloat(attributeBuffer.Load3((index * 0x8 + 0x4B004) << 2));\n\t\t\t\t\t\tattributes.alpha + = (float)1;\n\t\t\t\t\t\tattributes.axisX = float3(1, 0, 0);\n\t\t\t\t\t\tattributes.axisY + = float3(0, 1, 0);\n\t\t\t\t\t\tattributes.axisZ = float3(0, 0, 1);\n\t\t\t\t\t\tattributes.angleX + = (float)0;\n\t\t\t\t\t\tattributes.angleY = (float)0;\n\t\t\t\t\t\tattributes.angleZ + = (float)0;\n\t\t\t\t\t\tattributes.pivotX = (float)0;\n\t\t\t\t\t\tattributes.pivotY + = (float)0;\n\t\t\t\t\t\tattributes.pivotZ = (float)0;\n\t\t\t\t\t\tattributes.size + = (float)0.100000001;\n\t\t\t\t\t\tattributes.scaleX = (float)1;\n\t\t\t\t\t\tattributes.scaleY + = (float)1;\n\t\t\t\t\t\tattributes.scaleZ = (float)1;\n\t\t\t\t\t\tattributes.age + = asfloat(attributeBuffer.Load((index * 0x8 + 0x4B007) << 2));\n\t\t\t\t\t\t\n\t\t\t\t\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// + Initialize built-in needed attributes\r\n\t\t\t\t\t\t#if HAS_STRIPS\r\n\t\t\t\t\t\tInitStripAttributes(index, + attributes, stripData);\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\t\r\n\t\t\t\tColorOverLife_26AC1(attributes.age, + attributes.lifetime, /*inout */attributes.color, gradient_a);\n\t\t\t\tOrient_94A( + /*inout */attributes.axisX, /*inout */attributes.axisY, /*inout */attributes.axisZ, + attributes.position, attributes.velocity);\n\t\t\t\t{\n\t\t\t\t float3 tmp_ba + = attributes.velocity * attributes.velocity;\n\t\t\t\t float tmp_bb = tmp_ba[2];\n\t\t\t\t + float tmp_bc = tmp_ba[1];\n\t\t\t\t float tmp_bd = tmp_bb + tmp_bc;\n\t\t\t\t + float tmp_be = tmp_ba[0];\n\t\t\t\t float tmp_bf = tmp_bd + tmp_be;\n\t\t\t\t + float tmp_bh = pow(tmp_bf, (float)0.5);\n\t\t\t\t float tmp_bj = tmp_bh + * (float)0.790000021;\n\t\t\t\t float tmp_bk = (float)0.00999999978 + tmp_bj;\n\t\t\t\t + float2 tmp_bl = float2((float)0.0120000001, tmp_bk);\n\t\t\t\t SetAttribute_D5151647( + /*inout */attributes.scaleX, /*inout */attributes.scaleY, tmp_bl);\n\t\t\t\t}\n\t\t\t\tSubpixelAA(attributes.position, + /*inout */attributes.alpha, attributes.size, /*inout */attributes.scaleX, + /*inout */attributes.scaleY);\n\t\t\t\t\n\r\n\t\t\t\t\r\n\t\t\t#if !HAS_STRIPS\r\n\t\t\t\tif + (!attributes.alive)\r\n\t\t\t\t\treturn o;\r\n\t\t\t#endif\r\n\t\t\t\t\r\n\t\t\t#if + VFX_PRIMITIVE_QUAD\r\n\t\t\t\r\n\t\t\t#if HAS_STRIPS\r\n\t\t\t#if VFX_STRIPS_UV_STRECHED\r\n\t\t\t\to.VFX_VARYING_UV.x + = (float)(currentIndex) / (stripData.nextIndex - 1);\r\n\t\t\t#elif VFX_STRIPS_UV_PER_SEGMENT\r\n\t\t\t\to.VFX_VARYING_UV.x + = PARTICLE_IN_EDGE;\r\n\t\t\t#else\r\n\t\t\t\t\r\n\t\t\t o.VFX_VARYING_UV.x + = texCoord;\r\n\t\t\t#endif\r\n\t\t\t\r\n\t\t\t\to.VFX_VARYING_UV.y = float((id + & 2) >> 1);\r\n\t\t\t\tconst float2 vOffsets = float2(0.0f,o.VFX_VARYING_UV.y + - 0.5f);\r\n\t\t\t\t\r\n\t\t\t#if VFX_STRIPS_SWAP_UV\r\n\t\t\t\to.VFX_VARYING_UV.xy + = float2(1.0f - o.VFX_VARYING_UV.y, o.VFX_VARYING_UV.x);\r\n\t\t\t#endif\r\n\t\t\t\t\r\n\t\t\t\t// + Orient strips along their tangents\r\n\t\t\t\tattributes.axisX = GetStripTangent(attributes.position, + currentIndex, stripData);\r\n\t\t\t#if !VFX_STRIPS_ORIENT_CUSTOM\r\n\t\t\t\tattributes.axisZ + = attributes.position - GetViewVFXPosition();\r\n\t\t\t#endif\r\n\t\t\t\tattributes.axisY + = normalize(cross(attributes.axisZ, attributes.axisX));\r\n\t\t\t\tattributes.axisZ + = normalize(cross(attributes.axisX, attributes.axisY));\r\n\t\t\t\t\r\n\t\t\t#else\r\n\t\t\t\to.VFX_VARYING_UV.x + = float(id & 1);\r\n\t\t\t\to.VFX_VARYING_UV.y = float((id & 2) >> 1);\r\n\t\t\t\tconst + float2 vOffsets = o.VFX_VARYING_UV.xy - 0.5f;\r\n\t\t\t#endif\r\n\t\t\t\t\r\n\t\t\t#elif + VFX_PRIMITIVE_TRIANGLE\r\n\t\t\t\r\n\t\t\t\tconst float2 kOffsets[] = {\r\n\t\t\t\t\tfloat2(-0.5f, + \t-0.288675129413604736328125f),\r\n\t\t\t\t\tfloat2(0.0f, \t0.57735025882720947265625f),\r\n\t\t\t\t\tfloat2(0.5f,\t-0.288675129413604736328125f),\r\n\t\t\t\t};\r\n\t\t\t\t\r\n\t\t\t\tconst + float kUVScale = 0.866025388240814208984375f;\r\n\t\t\t\t\r\n\t\t\t\tconst + float2 vOffsets = kOffsets[id % 3];\r\n\t\t\t\to.VFX_VARYING_UV.xy = (vOffsets + * kUVScale) + 0.5f;\r\n\t\t\t\t\r\n\t\t\t#elif VFX_PRIMITIVE_OCTAGON\t\r\n\t\t\t\t\r\n\t\t\t\tconst + float2 kUvs[8] = \r\n\t\t\t\t{\r\n\t\t\t\t\tfloat2(-0.5f,\t0.0f),\r\n\t\t\t\t\tfloat2(-0.5f,\t0.5f),\r\n\t\t\t\t\tfloat2(0.0f,\t0.5f),\r\n\t\t\t\t\tfloat2(0.5f,\t0.5f),\r\n\t\t\t\t\tfloat2(0.5f,\t0.0f),\r\n\t\t\t\t\tfloat2(0.5f,\t-0.5f),\r\n\t\t\t\t\tfloat2(0.0f,\t-0.5f),\r\n\t\t\t\t\tfloat2(-0.5f,\t-0.5f),\r\n\t\t\t\t};\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tcropFactor + = id & 1 ? 1.0f - cropFactor : 1.0f;\r\n\t\t\t\tconst float2 vOffsets = kUvs[id + & 7] * cropFactor;\r\n\t\t\t\to.VFX_VARYING_UV.xy = vOffsets + 0.5f;\r\n\t\t\t\t\r\n\t\t\t#endif\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\tfloat3 + size3 = float3(attributes.size,attributes.size,attributes.size);\r\n\t\t\t\t\t\t#if + VFX_USE_SCALEX_CURRENT\r\n\t\t\t\t\t\tsize3.x *= attributes.scaleX;\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t#if + VFX_USE_SCALEY_CURRENT\r\n\t\t\t\t\t\tsize3.y *= attributes.scaleY;\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t#if + VFX_USE_SCALEZ_CURRENT\r\n\t\t\t\t\t\tsize3.z *= attributes.scaleZ;\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\r\n\t\t\t#if + HAS_STRIPS\r\n\t\t\t\tsize3 += size3 < 0.0f ? -VFX_EPSILON : VFX_EPSILON; // + Add an epsilon so that size is never 0 for strips\r\n\t\t\t#endif\r\n\t\t\t\t\r\n\t\t\t\tconst + float4x4 elementToVFX = GetElementToVFXMatrix(\r\n\t\t\t\t\tattributes.axisX,\r\n\t\t\t\t\tattributes.axisY,\r\n\t\t\t\t\tattributes.axisZ,\r\n\t\t\t\t\tfloat3(attributes.angleX,attributes.angleY,attributes.angleZ),\r\n\t\t\t\t\tfloat3(attributes.pivotX,attributes.pivotY,attributes.pivotZ),\r\n\t\t\t\t\tsize3,\r\n\t\t\t\t\tattributes.position);\r\n\t\t\t\t\t\r\n\t\t\t\tfloat3 + inputVertexPosition = float3(vOffsets, 0.0f);\r\n\t\t\t\tfloat3 vPos = mul(elementToVFX,float4(inputVertexPosition, + 1.0f)).xyz;\r\n\t\t\t\r\n\t\t\t\to.VFX_VARYING_POSCS = TransformPositionVFXToClip(vPos);\r\n\t\t\t + \r\n\t\t\t float3 vPosWS = TransformPositionVFXToWorld(vPos);\r\n\t\t\t\t\r\n\t\t\t + #ifdef VFX_VARYING_POSWS\r\n\t\t\t o.VFX_VARYING_POSWS = vPosWS;\r\n\t\t\t + #endif\r\n\t\t\t\r\n\t\t\t\tfloat3 normalWS = normalize(TransformDirectionVFXToWorld(normalize(-transpose(elementToVFX)[2].xyz)));\r\n\t\t\t\t#ifdef + VFX_VARYING_NORMAL\r\n\t\t\t\tfloat normalFlip = (size3.x * size3.y * size3.z) + < 0 ? -1 : 1;\r\n\t\t\t\to.VFX_VARYING_NORMAL = normalFlip * normalWS;\r\n\t\t\t\t#endif\r\n\t\t\t\t#ifdef + VFX_VARYING_TANGENT\r\n\t\t\t\to.VFX_VARYING_TANGENT = normalize(TransformDirectionVFXToWorld(normalize(transpose(elementToVFX)[0].xyz)));\r\n\t\t\t\t#endif\r\n\t\t\t\t#ifdef + VFX_VARYING_BENTFACTORS\r\n\t\t\t\t\r\n\t\t\t\t#if HAS_STRIPS\r\n\t\t\t\t#define + BENT_FACTOR_MULTIPLIER 2.0f\r\n\t\t\t\t#else\r\n\t\t\t\t#define BENT_FACTOR_MULTIPLIER + 1.41421353816986083984375f\r\n\t\t\t\t#endif\r\n\t\t\t\to.VFX_VARYING_BENTFACTORS + = vOffsets * normalBendingFactor * BENT_FACTOR_MULTIPLIER;\r\n\t\t\t\t#endif\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\t#if + defined(VFX_VARYING_VELOCITY_CPOS) && defined(VFX_VARYING_VELOCITY_CPOS_PREVIOUS)\r\n\t\t\t\t\t\tfloat4x4 + previousElementToVFX = (float4x4)0;\r\n\t\t\t\t\t\tpreviousElementToVFX[3] + = float4(0,0,0,1);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tUNITY_UNROLL\r\n\t\t\t\t\t\tfor + (int itIndexMatrixRow = 0; itIndexMatrixRow < 3; ++itIndexMatrixRow)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tUNITY_UNROLL\r\n\t\t\t\t\t\t\tfor + (int itIndexMatrixCol = 0; itIndexMatrixCol < 4; ++itIndexMatrixCol)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tuint + itIndexMatrix = itIndexMatrixCol * 4 + itIndexMatrixRow;\r\n\t\t\t\t\t\t\t\tuint + read = elementToVFXBufferPrevious.Load((index * 16 + itIndexMatrix) << 2);\r\n\t\t\t\t\t\t\t\tpreviousElementToVFX[itIndexMatrixRow][itIndexMatrixCol] + = asfloat(read);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tuint + previousFrameIndex = elementToVFXBufferPrevious.Load((index * 16 + 15) << 2);\r\n\t\t\t\t\t\to.VFX_VARYING_VELOCITY_CPOS + = o.VFX_VARYING_VELOCITY_CPOS_PREVIOUS = float4(0.0f, 0.0f, 0.0f, 1.0f);\r\n\t\t\t\t\t\tif + (asuint(currentFrameIndex) - previousFrameIndex == 1u)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tfloat3 + oldvPos = mul(previousElementToVFX,float4(inputVertexPosition, 1.0f)).xyz;\r\n\t\t\t\t\t\t\to.VFX_VARYING_VELOCITY_CPOS_PREVIOUS + = TransformPositionVFXToPreviousClip(oldvPos);\r\n\t\t\t\t\t\t\to.VFX_VARYING_VELOCITY_CPOS + = TransformPositionVFXToNonJitteredClip(vPos);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\t#if + VFX_USE_COLOR_CURRENT && defined(VFX_VARYING_COLOR)\r\n\t\t\t\t\t\to.VFX_VARYING_COLOR + = attributes.color;\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t#if VFX_USE_ALPHA_CURRENT + && defined(VFX_VARYING_ALPHA) \r\n\t\t\t\t\t\to.VFX_VARYING_ALPHA = attributes.alpha;\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t#ifdef + VFX_VARYING_EXPOSUREWEIGHT\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\to.VFX_VARYING_EXPOSUREWEIGHT + = exposureWeight;\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t#if + USE_SOFT_PARTICLE && defined(VFX_VARYING_INVSOFTPARTICLEFADEDISTANCE)\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\to.VFX_VARYING_INVSOFTPARTICLEFADEDISTANCE + = invSoftParticlesFadeDistance;\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t#if + (USE_ALPHA_TEST || WRITE_MOTION_VECTOR_IN_FORWARD) && (!VFX_SHADERGRAPH || + !HAS_SHADERGRAPH_PARAM_ALPHATHRESHOLD) && defined(VFX_VARYING_ALPHATHRESHOLD)\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\to.VFX_VARYING_ALPHATHRESHOLD + = alphaThreshold;\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t#if + USE_UV_SCALE_BIAS\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t#if defined + (VFX_VARYING_UV)\r\n\t\t\t\t\t\to.VFX_VARYING_UV.xy = o.VFX_VARYING_UV.xy * + uvScale + uvBias;\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t#if + defined(VFX_VARYING_POSWS)\r\n\t\t\t\t\t\to.VFX_VARYING_POSWS = TransformPositionVFXToWorld(vPos);\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\t#if + USE_FLIPBOOK && defined(VFX_VARYING_UV)\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tVFXUVData + uvData = GetUVData(flipBookSize, invFlipBookSize, o.VFX_VARYING_UV.xy, attributes.texIndex);\r\n\t\t\t\t\t\to.VFX_VARYING_UV.xy + = uvData.uvs.xy;\r\n\t\t\t\t\t\t#if USE_FLIPBOOK_INTERPOLATION && defined(VFX_VARYING_UV) + && defined (VFX_VARYING_FRAMEBLEND)\r\n\t\t\t\t\t\to.VFX_VARYING_UV.zw = uvData.uvs.zw;\r\n\t\t\t\t\t\to.VFX_VARYING_FRAMEBLEND + = uvData.blend;\r\n\t\t\t\t\t\t#if USE_FLIPBOOK_MOTIONVECTORS && defined(VFX_VARYING_MOTIONVECTORSCALE)\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\to.VFX_VARYING_MOTIONVECTORSCALE + = motionVectorScale * invFlipBookSize;\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t + \r\n\t\t\t \r\n\t\t\t\r\n\t\t\t\treturn o;\r\n\t\t\t}\r\n\t\t\t\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t#include + \"Packages/com.unity.visualeffectgraph/Shaders/VFXCommonOutput.hlsl\"\r\n\t\t\t\r\n\t\t\t\n\t\t\t\r\n\t\t\t\r\n\t\t\t#if + VFX_PASSDEPTH == VFX_PASSDEPTH_SELECTION\r\n\t\t\tint _ObjectId;\r\n\t\t\tint + _PassValue;\r\n\t\t\t#endif\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t#pragma + fragment frag\r\n\t\t\tfloat4 frag(ps_input i) : SV_TARGET\r\n\t\t\t{\r\n\t\t\t\tUNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i);\r\n\t\t\t\tVFXTransformPSInputs(i);\r\n\t\t\t + #ifdef VFX_SHADERGRAPH\r\n\t\t\t \r\n\t\t\t \r\n\t\t\t + \r\n\t\t\t \r\n\t\t\t float alpha = OUTSG.;\r\n\t\t\t #else\r\n\t\t\t + float alpha = VFXGetFragmentColor(i).a;\r\n\t\t\t alpha *= VFXGetTextureColor(VFX_SAMPLER(mainTexture),i).a;\r\n\t\t\t + #endif\r\n\t\t\t\tVFXClipFragmentColor(alpha,i);\r\n\t\t\t\t\r\n\t\t\t\t#if + VFX_PASSDEPTH == VFX_PASSDEPTH_MOTION_VECTOR\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\tfloat2 + velocity = (i.VFX_VARYING_VELOCITY_CPOS.xy/i.VFX_VARYING_VELOCITY_CPOS.w) - + (i.VFX_VARYING_VELOCITY_CPOS_PREVIOUS.xy/i.VFX_VARYING_VELOCITY_CPOS_PREVIOUS.w);\r\n\t\t\t\t\t\t\t#if + UNITY_UV_STARTS_AT_TOP\r\n\t\t\t\t\t\t\t\tvelocity.y = -velocity.y;\r\n\t\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\tfloat4 + encodedMotionVector = 0.0f;\r\n\t\t\t\t\t\t\tVFXEncodeMotionVector(velocity + * 0.5f, encodedMotionVector);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\treturn encodedMotionVector;\r\n\t\t\t\t#elif + VFX_PASSDEPTH == VFX_PASSDEPTH_SELECTION\r\n\t\t\t\t\treturn float4(_ObjectId, + _PassValue, 1.0, 1.0);\r\n\t\t\t\t#elif VFX_PASSDEPTH == VFX_PASSDEPTH_ACTUAL\r\n\t\t\t\t\treturn + (float4)0;\r\n\t\t\t\t#else\r\n\t\t\t\t\t#error VFX_PASSDEPTH undefined \r\n\t\t\t\t#endif\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\n\t\t\r\n\t\t\tENDHLSL\r\n\t\t}\r\n\t\t\n\r\n\t\t\r\n\t\t\r\n\t\t// + Forward pass\r\n\t\tPass\r\n\t\t{\t\t\r\n\t\t\tTags { \"LightMode\"=\"ForwardOnly\" + }\r\n\t\t\t\r\n\t\t\tHLSLPROGRAM\r\n\t\t\t#pragma target 4.5\r\n\t\t\t#pragma + multi_compile _ DEBUG_DISPLAY\r\n\t\t\r\n\t\t\tstruct ps_input\r\n\t\t\t{\r\n\t\t\t\tfloat4 + pos : SV_POSITION;\r\n\t\t\t\t#if USE_FLIPBOOK_INTERPOLATION\r\n\t\t\t\tfloat4 + uv : TEXCOORD0;\r\n\t\t\t\t#else\r\n\t\t\t\tfloat2 uv : TEXCOORD0;\t\r\n\t\t\t\t#endif\r\n\t\t\t\t#if + VFX_NEEDS_COLOR_INTERPOLATOR\r\n\t\t\t\tVFX_OPTIONAL_INTERPOLATION float4 color + : COLOR0;\r\n\t\t\t\t#endif\r\n\t\t\t\t#if USE_SOFT_PARTICLE || USE_ALPHA_TEST + || USE_FLIPBOOK_INTERPOLATION || USE_EXPOSURE_WEIGHT || WRITE_MOTION_VECTOR_IN_FORWARD\r\n\t\t\t\t// + x: inverse soft particles fade distance\r\n\t\t\t\t// y: alpha threshold\r\n\t\t\t\t// + z: frame blending factor\r\n\t\t\t\t// w: exposure weight\r\n\t\t\t\tVFX_OPTIONAL_INTERPOLATION + float4 builtInInterpolants : TEXCOORD1;\r\n\t\t\t\t#endif\r\n\t\t\t\t#if USE_FLIPBOOK_MOTIONVECTORS\r\n\t\t\t\t// + x: motion vectors scale X\r\n\t\t\t\t// y: motion vectors scale Y\r\n\t\t\t\tVFX_OPTIONAL_INTERPOLATION + float2 builtInInterpolants2 : TEXCOORD2;\r\n\t\t\t\t#endif\r\n\t\t\t\t#if VFX_NEEDS_POSWS_INTERPOLATOR\r\n\t\t\t\tfloat3 + posWS : TEXCOORD3;\r\n\t\t\t\t#endif\r\n\t\t\t\t\r\n\t\t\t\t#if WRITE_MOTION_VECTOR_IN_FORWARD\r\n\t\t\t\tfloat4 + cPosPrevious : TEXCOORD4;\r\n\t\t\t\tfloat4 cPosNonJiterred : TEXCOORD5;\r\n\t\t\t\t#endif\r\n\t\t\t\t\r\n\t\t\t\t#if + SHADERGRAPH_NEEDS_NORMAL_FORWARD\r\n\t\t\t\tfloat3 normal : TEXCOORD6;\r\n\t\t\t\t#endif\r\n\t\t\t\t#if + SHADERGRAPH_NEEDS_TANGENT_FORWARD\r\n\t\t\t\tfloat3 tangent : TEXCOORD7;\r\n\t\t\t\t#endif\r\n\t\t\t\t\r\n\t\t + \r\n\t\t\t\t\r\n\t\t\t\tUNITY_VERTEX_OUTPUT_STEREO\r\n\t\t\t};\r\n\t\t\t\r\n\t\t\tstruct + ps_output\r\n\t\t\t{\r\n\t\t\t\tfloat4 color : SV_Target0;\r\n\t\t#if WRITE_MOTION_VECTOR_IN_FORWARD\r\n\t\t\t\tfloat4 + outMotionVector : SV_Target1;\r\n\t\t#endif\r\n\t\t\t};\r\n\t\t\r\n\t\t#define + VFX_VARYING_PS_INPUTS ps_input\r\n\t\t#define VFX_VARYING_POSCS pos\r\n\t\t#define + VFX_VARYING_COLOR color.rgb\r\n\t\t#define VFX_VARYING_ALPHA color.a\r\n\t\t#define + VFX_VARYING_INVSOFTPARTICLEFADEDISTANCE builtInInterpolants.x\r\n\t\t#define + VFX_VARYING_ALPHATHRESHOLD builtInInterpolants.y\r\n\t\t#define VFX_VARYING_FRAMEBLEND + builtInInterpolants.z\r\n\t\t#define VFX_VARYING_MOTIONVECTORSCALE builtInInterpolants2.xy\r\n\t\t#define + VFX_VARYING_UV uv\r\n\t\t#if VFX_NEEDS_POSWS_INTERPOLATOR\r\n\t\t#define VFX_VARYING_POSWS + posWS\r\n\t\t#endif\r\n\t\t#if USE_EXPOSURE_WEIGHT\r\n\t\t#define VFX_VARYING_EXPOSUREWEIGHT + builtInInterpolants.w\r\n\t\t#endif\r\n\t\t#if WRITE_MOTION_VECTOR_IN_FORWARD\r\n\t\t#define + VFX_VARYING_VELOCITY_CPOS cPosNonJiterred\r\n\t\t#define VFX_VARYING_VELOCITY_CPOS_PREVIOUS + cPosPrevious\r\n\t\t#endif\r\n\t\t\r\n\t\t#define SHADERPASS SHADERPASS_FORWARD_UNLIT\r\n\t\t\t\r\n\t\t#if + SHADERGRAPH_NEEDS_NORMAL_FORWARD\r\n\t\t#define VFX_VARYING_NORMAL normal\r\n\t\t#endif\r\n\t\t#if + SHADERGRAPH_NEEDS_TANGENT_FORWARD\r\n\t\t#define VFX_VARYING_TANGENT tangent\r\n\t\t#endif\r\n\t\t\t\t\r\n\t\t\t#if + !(defined(VFX_VARYING_PS_INPUTS) && defined(VFX_VARYING_POSCS))\r\n\t\t\t#error + VFX_VARYING_PS_INPUTS, VFX_VARYING_POSCS and VFX_VARYING_UV must be defined.\r\n\t\t\t#endif\r\n\t\t\t\r\n\t\t\t#include + \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXCommon.hlsl\"\n\t\t\t#include + \"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\t\t\t\n\r\n\t\t\tvoid ColorOverLife_26AC1(float age, float lifetime, inout float3 color, float gradient) - /*mode:Color ColorComposition:Multiply AlphaComposition:Multiply */\n\t\t\t{\n\t\t\t - \ \n\t\t\t float4 sampledColor = SampleGradient(gradient, age/lifetime);\n\t\t\t - \ color *= sampledColor.rgb;\n\t\t\t \n\t\t\t}\n\t\t\tvoid Orient_6(inout + /*mode:Color ColorComposition:Multiply AlphaComposition:Multiply */\n\t\t\t{\n\t\t\t + \r\n\t\t\t float4 sampledColor = SampleGradient(gradient, age/lifetime);\r\n\t\t\t + color *= sampledColor.rgb;\n\t\t\t \n\t\t\t}\n\t\t\tvoid Orient_94A(inout float3 axisX, inout float3 axisY, inout float3 axisZ, float3 position, float3 - velocity) /*mode:AlongVelocity */\n\t\t\t{\n\t\t\t \n\t\t\t axisY = normalize(velocity);\n\t\t\t - \ axisZ = position - GetViewVFXPosition();\n\t\t\t axisX = normalize(cross(axisY,axisZ));\n\t\t\t - \ axisZ = cross(axisX,axisY);\n\t\t\t \n\t\t\t}\n\t\t\tvoid SetAttribute_D5151647(inout - float scaleX, inout float scaleY, float2 Scale) /*attribute:scale Composition:Overwrite - Source:Slot Random:Off channels:XY */\n\t\t\t{\n\t\t\t scaleX = Scale.x;\n\t\t\t - \ scaleY = Scale.y;\n\t\t\t}\n\t\t\tvoid SubpixelAA(float3 position, inout - float alpha, float size, inout float scaleX, inout float scaleY)\n\t\t\t{\n\t\t\t - \ \n\t\t\t float2 localSize = size * float2(scaleX, scaleY);\n\t\t\t float - clipPosW = TransformPositionVFXToClip(position).w;\n\t\t\t float minSize - = clipPosW / (0.5f * min(UNITY_MATRIX_P[0][0] * _ScreenParams.x,-UNITY_MATRIX_P[1][1] - * _ScreenParams.y)); // max size in one pixel\n\t\t\t float2 clampedSize - = max(localSize,minSize);\n\t\t\t float fade = (localSize.x * localSize.y) - / (clampedSize.x * clampedSize.y);\n\t\t\t alpha *= fade;\n\t\t\t localSize - = clampedSize;\n\t\t\t scaleX = localSize.x / size;\n\t\t\t scaleY = localSize.y - / size;\n\t\t\t}\n\t\t\t\n\n\t\t\t\n\t\t\t#pragma vertex vert\n\t\t\tVFX_VARYING_PS_INPUTS - vert(uint id : SV_VertexID, uint instanceID : SV_InstanceID)\n\t\t\t{\n\t\t\t#if - VFX_PRIMITIVE_TRIANGLE\n\t\t\t\tuint index = id / 3;\n\t\t\t#elif VFX_PRIMITIVE_QUAD\n\t\t\t\tuint - index = (id >> 2) + instanceID * 2048;\n\t\t\t#elif VFX_PRIMITIVE_OCTAGON\n\t\t\t\tuint - index = (id >> 3) + instanceID * 1024;\n\t\t\t#endif\n\t\t\t\n\t\t\t\tVFX_VARYING_PS_INPUTS - o = (VFX_VARYING_PS_INPUTS)0;\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\tuint deadCount - = 0;\n\t\t\t\t\t\t#if USE_DEAD_LIST_COUNT\n\t\t\t\t\t\tdeadCount = deadListCount.Load(0);\n\t\t\t\t\t\t#endif\t\n\t\t\t\t\t\tif - (index >= asuint(nbMax) - deadCount)\n\t\t\t\t\t\t#if USE_GEOMETRY_SHADER\n\t\t\t\t\t\t\treturn; - // cull\n\t\t\t\t\t\t#else\n\t\t\t\t\t\t\treturn o; // cull\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\t\t#if - VFX_HAS_INDIRECT_DRAW\n\t\t\t\t\t\tindex = indirectBuffer[index];\n\t\t\t\t\t\tfloat - lifetime = asfloat(attributeBuffer.Load((index * 0x1 + 0x0) << 2));\n\t\t\t\t\t\tfloat3 - position = asfloat(attributeBuffer.Load3((index * 0x8 + 0x4B000) << 2));\n\t\t\t\t\t\tfloat3 - color = asfloat(attributeBuffer.Load3((index * 0x4 + 0x2A3000) << 2));\n\t\t\t\t\t\tfloat3 - velocity = asfloat(attributeBuffer.Load3((index * 0x8 + 0x4B004) << 2));\n\t\t\t\t\t\tfloat - alpha = (float)1;\n\t\t\t\t\t\tbool alive = (attributeBuffer.Load((index * 0x8 - + 0x4B003) << 2));\n\t\t\t\t\t\tfloat3 axisX = float3(1,0,0);\n\t\t\t\t\t\tfloat3 - axisY = float3(0,1,0);\n\t\t\t\t\t\tfloat3 axisZ = float3(0,0,1);\n\t\t\t\t\t\tfloat - angleX = (float)0;\n\t\t\t\t\t\tfloat angleY = (float)0;\n\t\t\t\t\t\tfloat - angleZ = (float)0;\n\t\t\t\t\t\tfloat pivotX = (float)0;\n\t\t\t\t\t\tfloat - pivotY = (float)0;\n\t\t\t\t\t\tfloat pivotZ = (float)0;\n\t\t\t\t\t\tfloat - size = (float)0.1;\n\t\t\t\t\t\tfloat scaleX = (float)1;\n\t\t\t\t\t\tfloat - scaleY = (float)1;\n\t\t\t\t\t\tfloat scaleZ = (float)1;\n\t\t\t\t\t\tfloat - age = asfloat(attributeBuffer.Load((index * 0x8 + 0x4B007) << 2));\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t#else\n\t\t\t\t\t\tbool - alive = (attributeBuffer.Load((index * 0x8 + 0x4B003) << 2));\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\tif - (!alive)\n\t\t\t\t\t\t\treturn o;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tfloat lifetime - = asfloat(attributeBuffer.Load((index * 0x1 + 0x0) << 2));\n\t\t\t\t\t\tfloat3 - position = asfloat(attributeBuffer.Load3((index * 0x8 + 0x4B000) << 2));\n\t\t\t\t\t\tfloat3 - color = asfloat(attributeBuffer.Load3((index * 0x4 + 0x2A3000) << 2));\n\t\t\t\t\t\tfloat3 - velocity = asfloat(attributeBuffer.Load3((index * 0x8 + 0x4B004) << 2));\n\t\t\t\t\t\tfloat - alpha = (float)1;\n\t\t\t\t\t\tfloat3 axisX = float3(1,0,0);\n\t\t\t\t\t\tfloat3 - axisY = float3(0,1,0);\n\t\t\t\t\t\tfloat3 axisZ = float3(0,0,1);\n\t\t\t\t\t\tfloat - angleX = (float)0;\n\t\t\t\t\t\tfloat angleY = (float)0;\n\t\t\t\t\t\tfloat - angleZ = (float)0;\n\t\t\t\t\t\tfloat pivotX = (float)0;\n\t\t\t\t\t\tfloat - pivotY = (float)0;\n\t\t\t\t\t\tfloat pivotZ = (float)0;\n\t\t\t\t\t\tfloat - size = (float)0.1;\n\t\t\t\t\t\tfloat scaleX = (float)1;\n\t\t\t\t\t\tfloat - scaleY = (float)1;\n\t\t\t\t\t\tfloat scaleZ = (float)1;\n\t\t\t\t\t\tfloat - age = asfloat(attributeBuffer.Load((index * 0x8 + 0x4B007) << 2));\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\tColorOverLife_26AC1(age, - lifetime, /*inout */color, gradient_a);\n\t\t\t\tOrient_6( /*inout */axisX, - \ /*inout */axisY, /*inout */axisZ, position, velocity);\n\t\t\t\t{\n\t\t\t\t - \ float3 tmp_ba = velocity * velocity;\n\t\t\t\t float tmp_bb = tmp_ba[2];\n\t\t\t\t - \ float tmp_bc = tmp_ba[1];\n\t\t\t\t float tmp_bd = tmp_bb + tmp_bc;\n\t\t\t\t - \ float tmp_be = tmp_ba[0];\n\t\t\t\t float tmp_bf = tmp_bd + tmp_be;\n\t\t\t\t - \ float tmp_bh = pow(tmp_bf, (float)0.5);\n\t\t\t\t float tmp_bj = tmp_bh - * (float)0.79;\n\t\t\t\t float tmp_bk = (float)0.01 + tmp_bj;\n\t\t\t\t float2 - tmp_bl = float2((float)0.012, tmp_bk);\n\t\t\t\t SetAttribute_D5151647( /*inout - */scaleX, /*inout */scaleY, tmp_bl);\n\t\t\t\t}\n\t\t\t\tSubpixelAA(position, - \ /*inout */alpha, size, /*inout */scaleX, /*inout */scaleY);\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\tif - (!alive)\n\t\t\t\t\treturn o;\n\t\t\t\t\n\t\t\t#if VFX_PRIMITIVE_QUAD\n\t\t\t\n\t\t\t\to.VFX_VARYING_UV.x - = float(id & 1);\n\t\t\t\to.VFX_VARYING_UV.y = float((id & 2) >> 1);\n\t\t\t\tconst - float2 vOffsets = o.VFX_VARYING_UV.xy - 0.5f;\n\t\t\t\t\n\t\t\t#elif VFX_PRIMITIVE_TRIANGLE\n\t\t\t\n\t\t\t\tconst - float2 kOffsets[] = {\n\t\t\t\t\tfloat2(-0.5f, \t-0.288675129413604736328125f),\n\t\t\t\t\tfloat2(0.0f, - \t0.57735025882720947265625f),\n\t\t\t\t\tfloat2(0.5f,\t-0.288675129413604736328125f),\n\t\t\t\t};\n\t\t\t\t\n\t\t\t\tconst - float kUVScale = 0.866025388240814208984375f;\n\t\t\t\t\n\t\t\t\tconst float2 - vOffsets = kOffsets[id % 3];\n\t\t\t\to.VFX_VARYING_UV.xy = (vOffsets * kUVScale) - + 0.5f;\n\t\t\t\t\n\t\t\t#elif VFX_PRIMITIVE_OCTAGON\t\n\t\t\t\t\n\t\t\t\tconst - float2 kUvs[8] = \n\t\t\t\t{\n\t\t\t\t\tfloat2(-0.5f,\t0.0f),\n\t\t\t\t\tfloat2(-0.5f,\t0.5f),\n\t\t\t\t\tfloat2(0.0f,\t0.5f),\n\t\t\t\t\tfloat2(0.5f,\t0.5f),\n\t\t\t\t\tfloat2(0.5f,\t0.0f),\n\t\t\t\t\tfloat2(0.5f,\t-0.5f),\n\t\t\t\t\tfloat2(0.0f,\t-0.5f),\n\t\t\t\t\tfloat2(-0.5f,\t-0.5f),\n\t\t\t\t};\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tcropFactor - = id & 1 ? 1.0f - cropFactor : 1.0f;\n\t\t\t\tconst float2 vOffsets = kUvs[id - & 7] * cropFactor;\n\t\t\t\to.VFX_VARYING_UV.xy = vOffsets + 0.5f;\n\t\t\t\t\n\t\t\t#endif\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\tfloat3 - size3 = float3(size,size,size);\n\t\t\t\t\t\t#if VFX_USE_SCALEX_CURRENT\n\t\t\t\t\t\tsize3.x - *= scaleX;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t#if VFX_USE_SCALEY_CURRENT\n\t\t\t\t\t\tsize3.y - *= scaleY;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t#if VFX_USE_SCALEZ_CURRENT\n\t\t\t\t\t\tsize3.z - *= scaleZ;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\tconst float4x4 - elementToVFX = GetElementToVFXMatrix(axisX,axisY,axisZ,float3(angleX,angleY,angleZ),float3(pivotX,pivotY,pivotZ),size3,position);\n\t\t\t\tfloat3 - vPos = mul(elementToVFX,float4(vOffsets,0.0f,1.0f)).xyz;\n\t\t\t\n\t\t\t\to.VFX_VARYING_POSCS - = TransformPositionVFXToClip(vPos);\n\t\t\t\n\t\t\t\tfloat3 normalWS = normalize(TransformDirectionVFXToWorld(normalize(-transpose(elementToVFX)[2].xyz)));\n\t\t\t\t#ifdef - VFX_VARYING_NORMAL\n\t\t\t\tfloat normalFlip = (size3.x * size3.y * size3.z) - < 0 ? -1 : 1;\n\t\t\t\to.VFX_VARYING_NORMAL = normalFlip * normalWS;\n\t\t\t\t#endif\n\t\t\t\t#ifdef - VFX_VARYING_TANGENT\n\t\t\t\to.VFX_VARYING_TANGENT = normalize(TransformDirectionVFXToWorld(normalize(transpose(elementToVFX)[0].xyz)));\n\t\t\t\t#endif\n\t\t\t\t#ifdef - VFX_VARYING_BENTFACTORS\n\t\t\t\t\n\t\t\t\to.VFX_VARYING_BENTFACTORS = vOffsets - * bentNormalFactor;\n\t\t\t\t#endif\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t#if VFX_USE_COLOR_CURRENT - && defined(VFX_VARYING_COLOR)\n\t\t\t\t\t\to.VFX_VARYING_COLOR = color;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t#if - VFX_USE_ALPHA_CURRENT && defined(VFX_VARYING_ALPHA) \n\t\t\t\t\t\to.VFX_VARYING_ALPHA - = alpha;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\t\t#ifdef VFX_VARYING_EXPOSUREWEIGHT\n\t\t\t\t\t\t\n\t\t\t\t\t\to.VFX_VARYING_EXPOSUREWEIGHT - = exposureWeight;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\t\t#if USE_SOFT_PARTICLE - && defined(VFX_VARYING_INVSOFTPARTICLEFADEDISTANCE)\n\t\t\t\t\t\t\n\t\t\t\t\t\to.VFX_VARYING_INVSOFTPARTICLEFADEDISTANCE - = invSoftParticlesFadeDistance;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\t\t#if - USE_ALPHA_TEST && defined(VFX_VARYING_ALPHATHRESHOLD)\n\t\t\t\t\t\t\n\t\t\t\t\t\to.VFX_VARYING_ALPHATHRESHOLD - = alphaThreshold;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\t\t#if USE_UV_SCALE_BIAS\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\to.VFX_VARYING_UV.xy - = o.VFX_VARYING_UV.xy * uvScale + uvBias;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\t\t#if - defined(VFX_VARYING_POSWS)\n\t\t\t\t\t\to.VFX_VARYING_POSWS = TransformPositionVFXToWorld(vPos);\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t#if - USE_FLIPBOOK\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tVFXUVData uvData = GetUVData(flipBookSize, - invFlipBookSize, o.VFX_VARYING_UV.xy, texIndex);\n\t\t\t\t\t\to.VFX_VARYING_UV.xy - = uvData.uvs.xy;\n\t\t\t\t\t\t#if USE_FLIPBOOK_INTERPOLATION\n\t\t\t\t\t\to.VFX_VARYING_UV.zw - = uvData.uvs.zw;\n\t\t\t\t\t\to.VFX_VARYING_FRAMEBLEND = uvData.blend;\n\t\t\t\t\t\t#if - USE_FLIPBOOK_MOTIONVECTORS\n\t\t\t\t\t\t\n\t\t\t\t\t\to.VFX_VARYING_MOTIONVECTORSCALE - = motionVectorScale * invFlipBookSize;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\treturn - o;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t#include - \"Packages/com.unity.visualeffectgraph/Shaders/VFXCommonOutput.cginc\"\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t#pragma - fragment frag\n\t\t\tps_output frag(ps_input i)\n\t\t\t{\n\t\t\t\tps_output - o = (ps_output)0;\n\t\t\t\tVFXTransformPSInputs(i);\n\t\t\t\n\t\t\t\t#define - VFX_TEXTURE_COLOR VFXGetTextureColor(VFX_SAMPLER(mainTexture),i)\n\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tfloat4 - color = VFXGetFragmentColor(i);\n\t\t\t\t\t\t\n\t\t\t\t\t\t#ifndef VFX_TEXTURE_COLOR\n\t\t\t\t\t\t\t#define - VFX_TEXTURE_COLOR float4(1.0,1.0,1.0,1.0)\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\t\t#if - VFX_COLORMAPPING_DEFAULT\n\t\t\t\t\t\t\to.color = color * VFX_TEXTURE_COLOR;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\t\t#if - VFX_COLORMAPPING_GRADIENTMAPPED\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\to.color = SampleGradient(gradient, - VFX_TEXTURE_COLOR.a * color.a) * float4(color.rgb,1.0);\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\n\t\t\t\to.color - = VFXApplyPreExposure(o.color, i);\n\t\t\t\to.color = VFXApplyFog(o.color,i);\n\t\t\t\tVFXClipFragmentColor(o.color.a,i);\n\t\t\t\to.color.a - = saturate(o.color.a);\n\t\t\t\treturn o;\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\t\n\t}\n}\n" + velocity) /*mode:AlongVelocity axes:ZY */\n\t\t\t{\n\t\t\t \r\n\t\t\t + axisY = normalize(velocity);\r\n\t\t\t axisZ = position - GetViewVFXPosition();\r\n\t\t\t + axisX = normalize(cross(axisY,axisZ));\r\n\t\t\t axisZ = cross(axisX,axisY);\r\n\t\t\t + \n\t\t\t}\n\t\t\tvoid SetAttribute_D5151647(inout float scaleX, inout float + scaleY, float2 Scale) /*attribute:scale Composition:Overwrite Source:Slot Random:Off + channels:XY */\n\t\t\t{\n\t\t\t scaleX = Scale.x;\n\t\t\t scaleY = Scale.y;\n\t\t\t}\n\t\t\tvoid + SubpixelAA(float3 position, inout float alpha, float size, inout float scaleX, + inout float scaleY)\n\t\t\t{\n\t\t\t \r\n\t\t\t float2 localSize = size + * float2(scaleX, scaleY);\r\n\t\t\t float clipPosW = TransformPositionVFXToClip(position).w;\r\n\t\t\t + float minSize = clipPosW / (0.5f * min(UNITY_MATRIX_P[0][0] * _ScreenParams.x,-UNITY_MATRIX_P[1][1] + * _ScreenParams.y)); // max size in one pixel\r\n\t\t\t float2 clampedSize + = max(localSize,minSize);\r\n\t\t\t float fade = (localSize.x * localSize.y) + / (clampedSize.x * clampedSize.y);\r\n\t\t\t alpha *= fade;\r\n\t\t\t + localSize = clampedSize;\r\n\t\t\t scaleX = localSize.x / size;\r\n\t\t\t + scaleY = localSize.y / size;\n\t\t\t}\n\t\t\t\n\r\n\t\t\t\r\n\t\t\t#if defined(HAS_STRIPS) + && !defined(VFX_PRIMITIVE_QUAD)\r\n\t\t\t#error VFX_PRIMITIVE_QUAD must be + defined when HAS_STRIPS is.\r\n\t\t\t#endif\r\n\t\t\t\r\n\t\t\tstruct vs_input\r\n\t\t\t{\r\n\t\t\t\tVFX_DECLARE_INSTANCE_ID\r\n\t\t\t};\r\n\t\t\t\r\n\t\t\t#if + HAS_STRIPS\r\n\t\t\t#define PARTICLE_IN_EDGE (id & 1)\r\n\t\t\t\r\n\t\t\tfloat3 + GetParticlePosition(uint index)\r\n\t\t\t{\r\n\t\t\t\tstruct Attributes attributes + = (Attributes)0;\r\n\t\t\t\tattributes.position = asfloat(attributeBuffer.Load3((index + * 0x8 + 0x4B000) << 2));\n\t\t\t\t\n\r\n\t\t\t\treturn attributes.position;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tfloat3 + GetStripTangent(float3 currentPos, uint relativeIndex, const StripData stripData)\r\n\t\t\t{\r\n\t\t\t\tfloat3 + prevTangent = (float3)0.0f;\r\n\t\t\t\tif (relativeIndex > 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tuint + prevIndex = GetParticleIndex(relativeIndex - 1,stripData);\r\n\t\t\t\t\tprevTangent + = normalize(currentPos - GetParticlePosition(prevIndex));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tfloat3 + nextTangent = (float3)0.0f;\r\n\t\t\t\tif (relativeIndex < stripData.nextIndex + - 1)\r\n\t\t\t\t{\r\n\t\t\t\t\tuint nextIndex = GetParticleIndex(relativeIndex + + 1,stripData);\r\n\t\t\t\t\tnextTangent = normalize(GetParticlePosition(nextIndex) + - currentPos);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn normalize(prevTangent + + nextTangent);\r\n\t\t\t}\r\n\t\t\t#endif\r\n\t\t\t\r\n\t\t\t#pragma vertex + vert\r\n\t\t\tVFX_VARYING_PS_INPUTS vert(uint id : SV_VertexID, vs_input i)\r\n\t\t\t{\r\n\t\t\t\tVFX_VARYING_PS_INPUTS + o = (VFX_VARYING_PS_INPUTS)0;\r\n\t\t\t\r\n\t\t\t\tUNITY_SETUP_INSTANCE_ID(i);\r\n\t\t\t\tUNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);\r\n\t\t\t\r\n\t\t\t#if + VFX_PRIMITIVE_TRIANGLE\r\n\t\t\t\tuint index = id / 3;\r\n\t\t\t#elif VFX_PRIMITIVE_QUAD\r\n\t\t\t#if + HAS_STRIPS\r\n\t\t\t\tid += VFX_GET_INSTANCE_ID(i) * 8192;\r\n\t\t\t\tconst + uint vertexPerStripCount = (PARTICLE_PER_STRIP_COUNT - 1) << 2;\r\n\t\t\t\tconst + StripData stripData = GetStripDataFromStripIndex(id / vertexPerStripCount, + PARTICLE_PER_STRIP_COUNT);\r\n\t\t\t\tuint currentIndex = ((id % vertexPerStripCount) + >> 2) + (id & 1); // relative index of particle\r\n\t\t\t\t\r\n\t\t\t\tuint + maxEdgeIndex = currentIndex - PARTICLE_IN_EDGE + 1;\r\n\t\t\t\tif (maxEdgeIndex + >= stripData.nextIndex)\r\n\t\t\t\t\treturn o;\r\n\t\t\t\t\r\n\t\t\t\tuint + index = GetParticleIndex(currentIndex, stripData);\r\n\t\t\t#else\r\n\t\t\t\tuint + index = (id >> 2) + VFX_GET_INSTANCE_ID(i) * 2048;\r\n\t\t\t#endif\r\n\t\t\t#elif + VFX_PRIMITIVE_OCTAGON\r\n\t\t\t\tuint index = (id >> 3) + VFX_GET_INSTANCE_ID(i) + * 1024;\r\n\t\t\t#endif\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\tuint deadCount + = 0;\r\n\t\t\t\t\t\t#if USE_DEAD_LIST_COUNT\r\n\t\t\t\t\t\tdeadCount = deadListCount.Load(0);\r\n\t\t\t\t\t\t#endif\t\r\n\t\t\t\t\t\tif + (index >= asuint(nbMax) - deadCount)\r\n\t\t\t\t\t\t#if USE_GEOMETRY_SHADER\r\n\t\t\t\t\t\t\treturn; + // cull\r\n\t\t\t\t\t\t#else\r\n\t\t\t\t\t\t\treturn o; // cull\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tAttributes + attributes = (Attributes)0;\r\n\t\t\t\t\t\tSourceAttributes sourceAttributes + = (SourceAttributes)0;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t#if VFX_HAS_INDIRECT_DRAW\r\n\t\t\t\t\t\tindex + = indirectBuffer[index];\r\n\t\t\t\t\t\tattributes.lifetime = asfloat(attributeBuffer.Load((index + * 0x1 + 0x0) << 2));\n\t\t\t\t\t\tattributes.position = asfloat(attributeBuffer.Load3((index + * 0x8 + 0x4B000) << 2));\n\t\t\t\t\t\tattributes.color = asfloat(attributeBuffer.Load3((index + * 0x4 + 0x2A3000) << 2));\n\t\t\t\t\t\tattributes.velocity = asfloat(attributeBuffer.Load3((index + * 0x8 + 0x4B004) << 2));\n\t\t\t\t\t\tattributes.alpha = (float)1;\n\t\t\t\t\t\tattributes.alive + = (attributeBuffer.Load((index * 0x8 + 0x4B003) << 2));\n\t\t\t\t\t\tattributes.axisX + = float3(1, 0, 0);\n\t\t\t\t\t\tattributes.axisY = float3(0, 1, 0);\n\t\t\t\t\t\tattributes.axisZ + = float3(0, 0, 1);\n\t\t\t\t\t\tattributes.angleX = (float)0;\n\t\t\t\t\t\tattributes.angleY + = (float)0;\n\t\t\t\t\t\tattributes.angleZ = (float)0;\n\t\t\t\t\t\tattributes.pivotX + = (float)0;\n\t\t\t\t\t\tattributes.pivotY = (float)0;\n\t\t\t\t\t\tattributes.pivotZ + = (float)0;\n\t\t\t\t\t\tattributes.size = (float)0.100000001;\n\t\t\t\t\t\tattributes.scaleX + = (float)1;\n\t\t\t\t\t\tattributes.scaleY = (float)1;\n\t\t\t\t\t\tattributes.scaleZ + = (float)1;\n\t\t\t\t\t\tattributes.age = asfloat(attributeBuffer.Load((index + * 0x8 + 0x4B007) << 2));\n\t\t\t\t\t\t\n\t\t\t\t\r\n\t\t\t\t\t\t#else\r\n\t\t\t\t\t\tattributes.alive + = (attributeBuffer.Load((index * 0x8 + 0x4B003) << 2));\n\t\t\t\t\t\t\n\t\t\t\t\r\n\t\t\t\t\t\t#if + !HAS_STRIPS\r\n\t\t\t\t\t\tif (!attributes.alive)\r\n\t\t\t\t\t\t\treturn o;\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tattributes.lifetime + = asfloat(attributeBuffer.Load((index * 0x1 + 0x0) << 2));\n\t\t\t\t\t\tattributes.position + = asfloat(attributeBuffer.Load3((index * 0x8 + 0x4B000) << 2));\n\t\t\t\t\t\tattributes.color + = asfloat(attributeBuffer.Load3((index * 0x4 + 0x2A3000) << 2));\n\t\t\t\t\t\tattributes.velocity + = asfloat(attributeBuffer.Load3((index * 0x8 + 0x4B004) << 2));\n\t\t\t\t\t\tattributes.alpha + = (float)1;\n\t\t\t\t\t\tattributes.axisX = float3(1, 0, 0);\n\t\t\t\t\t\tattributes.axisY + = float3(0, 1, 0);\n\t\t\t\t\t\tattributes.axisZ = float3(0, 0, 1);\n\t\t\t\t\t\tattributes.angleX + = (float)0;\n\t\t\t\t\t\tattributes.angleY = (float)0;\n\t\t\t\t\t\tattributes.angleZ + = (float)0;\n\t\t\t\t\t\tattributes.pivotX = (float)0;\n\t\t\t\t\t\tattributes.pivotY + = (float)0;\n\t\t\t\t\t\tattributes.pivotZ = (float)0;\n\t\t\t\t\t\tattributes.size + = (float)0.100000001;\n\t\t\t\t\t\tattributes.scaleX = (float)1;\n\t\t\t\t\t\tattributes.scaleY + = (float)1;\n\t\t\t\t\t\tattributes.scaleZ = (float)1;\n\t\t\t\t\t\tattributes.age + = asfloat(attributeBuffer.Load((index * 0x8 + 0x4B007) << 2));\n\t\t\t\t\t\t\n\t\t\t\t\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// + Initialize built-in needed attributes\r\n\t\t\t\t\t\t#if HAS_STRIPS\r\n\t\t\t\t\t\tInitStripAttributes(index, + attributes, stripData);\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\t\r\n\t\t\t\tColorOverLife_26AC1(attributes.age, + attributes.lifetime, /*inout */attributes.color, gradient_a);\n\t\t\t\tOrient_94A( + /*inout */attributes.axisX, /*inout */attributes.axisY, /*inout */attributes.axisZ, + attributes.position, attributes.velocity);\n\t\t\t\t{\n\t\t\t\t float3 tmp_ba + = attributes.velocity * attributes.velocity;\n\t\t\t\t float tmp_bb = tmp_ba[2];\n\t\t\t\t + float tmp_bc = tmp_ba[1];\n\t\t\t\t float tmp_bd = tmp_bb + tmp_bc;\n\t\t\t\t + float tmp_be = tmp_ba[0];\n\t\t\t\t float tmp_bf = tmp_bd + tmp_be;\n\t\t\t\t + float tmp_bh = pow(tmp_bf, (float)0.5);\n\t\t\t\t float tmp_bj = tmp_bh + * (float)0.790000021;\n\t\t\t\t float tmp_bk = (float)0.00999999978 + tmp_bj;\n\t\t\t\t + float2 tmp_bl = float2((float)0.0120000001, tmp_bk);\n\t\t\t\t SetAttribute_D5151647( + /*inout */attributes.scaleX, /*inout */attributes.scaleY, tmp_bl);\n\t\t\t\t}\n\t\t\t\tSubpixelAA(attributes.position, + /*inout */attributes.alpha, attributes.size, /*inout */attributes.scaleX, + /*inout */attributes.scaleY);\n\t\t\t\t\n\r\n\t\t\t\t\r\n\t\t\t#if !HAS_STRIPS\r\n\t\t\t\tif + (!attributes.alive)\r\n\t\t\t\t\treturn o;\r\n\t\t\t#endif\r\n\t\t\t\t\r\n\t\t\t#if + VFX_PRIMITIVE_QUAD\r\n\t\t\t\r\n\t\t\t#if HAS_STRIPS\r\n\t\t\t#if VFX_STRIPS_UV_STRECHED\r\n\t\t\t\to.VFX_VARYING_UV.x + = (float)(currentIndex) / (stripData.nextIndex - 1);\r\n\t\t\t#elif VFX_STRIPS_UV_PER_SEGMENT\r\n\t\t\t\to.VFX_VARYING_UV.x + = PARTICLE_IN_EDGE;\r\n\t\t\t#else\r\n\t\t\t\t\r\n\t\t\t o.VFX_VARYING_UV.x + = texCoord;\r\n\t\t\t#endif\r\n\t\t\t\r\n\t\t\t\to.VFX_VARYING_UV.y = float((id + & 2) >> 1);\r\n\t\t\t\tconst float2 vOffsets = float2(0.0f,o.VFX_VARYING_UV.y + - 0.5f);\r\n\t\t\t\t\r\n\t\t\t#if VFX_STRIPS_SWAP_UV\r\n\t\t\t\to.VFX_VARYING_UV.xy + = float2(1.0f - o.VFX_VARYING_UV.y, o.VFX_VARYING_UV.x);\r\n\t\t\t#endif\r\n\t\t\t\t\r\n\t\t\t\t// + Orient strips along their tangents\r\n\t\t\t\tattributes.axisX = GetStripTangent(attributes.position, + currentIndex, stripData);\r\n\t\t\t#if !VFX_STRIPS_ORIENT_CUSTOM\r\n\t\t\t\tattributes.axisZ + = attributes.position - GetViewVFXPosition();\r\n\t\t\t#endif\r\n\t\t\t\tattributes.axisY + = normalize(cross(attributes.axisZ, attributes.axisX));\r\n\t\t\t\tattributes.axisZ + = normalize(cross(attributes.axisX, attributes.axisY));\r\n\t\t\t\t\r\n\t\t\t#else\r\n\t\t\t\to.VFX_VARYING_UV.x + = float(id & 1);\r\n\t\t\t\to.VFX_VARYING_UV.y = float((id & 2) >> 1);\r\n\t\t\t\tconst + float2 vOffsets = o.VFX_VARYING_UV.xy - 0.5f;\r\n\t\t\t#endif\r\n\t\t\t\t\r\n\t\t\t#elif + VFX_PRIMITIVE_TRIANGLE\r\n\t\t\t\r\n\t\t\t\tconst float2 kOffsets[] = {\r\n\t\t\t\t\tfloat2(-0.5f, + \t-0.288675129413604736328125f),\r\n\t\t\t\t\tfloat2(0.0f, \t0.57735025882720947265625f),\r\n\t\t\t\t\tfloat2(0.5f,\t-0.288675129413604736328125f),\r\n\t\t\t\t};\r\n\t\t\t\t\r\n\t\t\t\tconst + float kUVScale = 0.866025388240814208984375f;\r\n\t\t\t\t\r\n\t\t\t\tconst + float2 vOffsets = kOffsets[id % 3];\r\n\t\t\t\to.VFX_VARYING_UV.xy = (vOffsets + * kUVScale) + 0.5f;\r\n\t\t\t\t\r\n\t\t\t#elif VFX_PRIMITIVE_OCTAGON\t\r\n\t\t\t\t\r\n\t\t\t\tconst + float2 kUvs[8] = \r\n\t\t\t\t{\r\n\t\t\t\t\tfloat2(-0.5f,\t0.0f),\r\n\t\t\t\t\tfloat2(-0.5f,\t0.5f),\r\n\t\t\t\t\tfloat2(0.0f,\t0.5f),\r\n\t\t\t\t\tfloat2(0.5f,\t0.5f),\r\n\t\t\t\t\tfloat2(0.5f,\t0.0f),\r\n\t\t\t\t\tfloat2(0.5f,\t-0.5f),\r\n\t\t\t\t\tfloat2(0.0f,\t-0.5f),\r\n\t\t\t\t\tfloat2(-0.5f,\t-0.5f),\r\n\t\t\t\t};\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tcropFactor + = id & 1 ? 1.0f - cropFactor : 1.0f;\r\n\t\t\t\tconst float2 vOffsets = kUvs[id + & 7] * cropFactor;\r\n\t\t\t\to.VFX_VARYING_UV.xy = vOffsets + 0.5f;\r\n\t\t\t\t\r\n\t\t\t#endif\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\tfloat3 + size3 = float3(attributes.size,attributes.size,attributes.size);\r\n\t\t\t\t\t\t#if + VFX_USE_SCALEX_CURRENT\r\n\t\t\t\t\t\tsize3.x *= attributes.scaleX;\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t#if + VFX_USE_SCALEY_CURRENT\r\n\t\t\t\t\t\tsize3.y *= attributes.scaleY;\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t#if + VFX_USE_SCALEZ_CURRENT\r\n\t\t\t\t\t\tsize3.z *= attributes.scaleZ;\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\r\n\t\t\t#if + HAS_STRIPS\r\n\t\t\t\tsize3 += size3 < 0.0f ? -VFX_EPSILON : VFX_EPSILON; // + Add an epsilon so that size is never 0 for strips\r\n\t\t\t#endif\r\n\t\t\t\t\r\n\t\t\t\tconst + float4x4 elementToVFX = GetElementToVFXMatrix(\r\n\t\t\t\t\tattributes.axisX,\r\n\t\t\t\t\tattributes.axisY,\r\n\t\t\t\t\tattributes.axisZ,\r\n\t\t\t\t\tfloat3(attributes.angleX,attributes.angleY,attributes.angleZ),\r\n\t\t\t\t\tfloat3(attributes.pivotX,attributes.pivotY,attributes.pivotZ),\r\n\t\t\t\t\tsize3,\r\n\t\t\t\t\tattributes.position);\r\n\t\t\t\t\t\r\n\t\t\t\tfloat3 + inputVertexPosition = float3(vOffsets, 0.0f);\r\n\t\t\t\tfloat3 vPos = mul(elementToVFX,float4(inputVertexPosition, + 1.0f)).xyz;\r\n\t\t\t\r\n\t\t\t\to.VFX_VARYING_POSCS = TransformPositionVFXToClip(vPos);\r\n\t\t\t + \r\n\t\t\t float3 vPosWS = TransformPositionVFXToWorld(vPos);\r\n\t\t\t\t\r\n\t\t\t + #ifdef VFX_VARYING_POSWS\r\n\t\t\t o.VFX_VARYING_POSWS = vPosWS;\r\n\t\t\t + #endif\r\n\t\t\t\r\n\t\t\t\tfloat3 normalWS = normalize(TransformDirectionVFXToWorld(normalize(-transpose(elementToVFX)[2].xyz)));\r\n\t\t\t\t#ifdef + VFX_VARYING_NORMAL\r\n\t\t\t\tfloat normalFlip = (size3.x * size3.y * size3.z) + < 0 ? -1 : 1;\r\n\t\t\t\to.VFX_VARYING_NORMAL = normalFlip * normalWS;\r\n\t\t\t\t#endif\r\n\t\t\t\t#ifdef + VFX_VARYING_TANGENT\r\n\t\t\t\to.VFX_VARYING_TANGENT = normalize(TransformDirectionVFXToWorld(normalize(transpose(elementToVFX)[0].xyz)));\r\n\t\t\t\t#endif\r\n\t\t\t\t#ifdef + VFX_VARYING_BENTFACTORS\r\n\t\t\t\t\r\n\t\t\t\t#if HAS_STRIPS\r\n\t\t\t\t#define + BENT_FACTOR_MULTIPLIER 2.0f\r\n\t\t\t\t#else\r\n\t\t\t\t#define BENT_FACTOR_MULTIPLIER + 1.41421353816986083984375f\r\n\t\t\t\t#endif\r\n\t\t\t\to.VFX_VARYING_BENTFACTORS + = vOffsets * normalBendingFactor * BENT_FACTOR_MULTIPLIER;\r\n\t\t\t\t#endif\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\t#if + defined(VFX_VARYING_VELOCITY_CPOS) && defined(VFX_VARYING_VELOCITY_CPOS_PREVIOUS)\r\n\t\t\t\t\t\tfloat4x4 + previousElementToVFX = (float4x4)0;\r\n\t\t\t\t\t\tpreviousElementToVFX[3] + = float4(0,0,0,1);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tUNITY_UNROLL\r\n\t\t\t\t\t\tfor + (int itIndexMatrixRow = 0; itIndexMatrixRow < 3; ++itIndexMatrixRow)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tUNITY_UNROLL\r\n\t\t\t\t\t\t\tfor + (int itIndexMatrixCol = 0; itIndexMatrixCol < 4; ++itIndexMatrixCol)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tuint + itIndexMatrix = itIndexMatrixCol * 4 + itIndexMatrixRow;\r\n\t\t\t\t\t\t\t\tuint + read = elementToVFXBufferPrevious.Load((index * 16 + itIndexMatrix) << 2);\r\n\t\t\t\t\t\t\t\tpreviousElementToVFX[itIndexMatrixRow][itIndexMatrixCol] + = asfloat(read);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tuint + previousFrameIndex = elementToVFXBufferPrevious.Load((index * 16 + 15) << 2);\r\n\t\t\t\t\t\to.VFX_VARYING_VELOCITY_CPOS + = o.VFX_VARYING_VELOCITY_CPOS_PREVIOUS = float4(0.0f, 0.0f, 0.0f, 1.0f);\r\n\t\t\t\t\t\tif + (asuint(currentFrameIndex) - previousFrameIndex == 1u)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tfloat3 + oldvPos = mul(previousElementToVFX,float4(inputVertexPosition, 1.0f)).xyz;\r\n\t\t\t\t\t\t\to.VFX_VARYING_VELOCITY_CPOS_PREVIOUS + = TransformPositionVFXToPreviousClip(oldvPos);\r\n\t\t\t\t\t\t\to.VFX_VARYING_VELOCITY_CPOS + = TransformPositionVFXToNonJitteredClip(vPos);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\t#if + VFX_USE_COLOR_CURRENT && defined(VFX_VARYING_COLOR)\r\n\t\t\t\t\t\to.VFX_VARYING_COLOR + = attributes.color;\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t#if VFX_USE_ALPHA_CURRENT + && defined(VFX_VARYING_ALPHA) \r\n\t\t\t\t\t\to.VFX_VARYING_ALPHA = attributes.alpha;\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t#ifdef + VFX_VARYING_EXPOSUREWEIGHT\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\to.VFX_VARYING_EXPOSUREWEIGHT + = exposureWeight;\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t#if + USE_SOFT_PARTICLE && defined(VFX_VARYING_INVSOFTPARTICLEFADEDISTANCE)\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\to.VFX_VARYING_INVSOFTPARTICLEFADEDISTANCE + = invSoftParticlesFadeDistance;\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t#if + (USE_ALPHA_TEST || WRITE_MOTION_VECTOR_IN_FORWARD) && (!VFX_SHADERGRAPH || + !HAS_SHADERGRAPH_PARAM_ALPHATHRESHOLD) && defined(VFX_VARYING_ALPHATHRESHOLD)\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\to.VFX_VARYING_ALPHATHRESHOLD + = alphaThreshold;\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t#if + USE_UV_SCALE_BIAS\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t#if defined + (VFX_VARYING_UV)\r\n\t\t\t\t\t\to.VFX_VARYING_UV.xy = o.VFX_VARYING_UV.xy * + uvScale + uvBias;\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t#if + defined(VFX_VARYING_POSWS)\r\n\t\t\t\t\t\to.VFX_VARYING_POSWS = TransformPositionVFXToWorld(vPos);\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\t#if + USE_FLIPBOOK && defined(VFX_VARYING_UV)\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tVFXUVData + uvData = GetUVData(flipBookSize, invFlipBookSize, o.VFX_VARYING_UV.xy, attributes.texIndex);\r\n\t\t\t\t\t\to.VFX_VARYING_UV.xy + = uvData.uvs.xy;\r\n\t\t\t\t\t\t#if USE_FLIPBOOK_INTERPOLATION && defined(VFX_VARYING_UV) + && defined (VFX_VARYING_FRAMEBLEND)\r\n\t\t\t\t\t\to.VFX_VARYING_UV.zw = uvData.uvs.zw;\r\n\t\t\t\t\t\to.VFX_VARYING_FRAMEBLEND + = uvData.blend;\r\n\t\t\t\t\t\t#if USE_FLIPBOOK_MOTIONVECTORS && defined(VFX_VARYING_MOTIONVECTORSCALE)\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\to.VFX_VARYING_MOTIONVECTORSCALE + = motionVectorScale * invFlipBookSize;\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t + \r\n\t\t\t \r\n\t\t\t\r\n\t\t\t\treturn o;\r\n\t\t\t}\r\n\t\t\t\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t#include + \"Packages/com.unity.visualeffectgraph/Shaders/VFXCommonOutput.hlsl\"\r\n\t\t\t\r\n\t\t\t\n\t\t\t\r\n\t\t#if + VFX_SHADERGRAPH\r\n\t\t\t\r\n\t\t#endif\r\n\t\t\t\t\r\n\t\t\t#pragma fragment + frag\r\n\t\t\tps_output frag(ps_input i)\r\n\t\t\t{\r\n\t\t\t\tUNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i);\r\n\t\t\t\tps_output + o = (ps_output)0;\r\n\t\t\t\tVFXTransformPSInputs(i);\r\n\t\t\t\t\r\n\t\t\t\t\t\t\t#ifdef + VFX_VARYING_NORMAL\r\n\t\t\t\t\t\t\t#if USE_DOUBLE_SIDED\r\n\t\t\t\t\t\t\tconst + float faceMul = frontFace ? 1.0f : -1.0f;\r\n\t\t\t\t\t\t\t#else\r\n\t\t\t\t\t\t\tconst + float faceMul = 1.0f;\r\n\t\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tfloat3 + normalWS = i.VFX_VARYING_NORMAL * faceMul;\r\n\t\t\t\t\t\t\tconst VFXUVData + uvData = GetUVData(i);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t#ifdef VFX_VARYING_TANGENT\r\n\t\t\t\t\t\t\tfloat3 + tangentWS = i.VFX_VARYING_TANGENT;\r\n\t\t\t\t\t\t\tfloat3 bitangentWS = cross(i.VFX_VARYING_TANGENT,i.VFX_VARYING_NORMAL);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t#if + defined(VFX_VARYING_BENTFACTORS) && USE_NORMAL_BENDING\t\r\n\t\t\t\t\t\t\tfloat3 + bentFactors = float3(i.VFX_VARYING_BENTFACTORS.xy,sqrt(1.0f - dot(i.VFX_VARYING_BENTFACTORS,i.VFX_VARYING_BENTFACTORS)));\r\n\t\t\t\t\t\t\tnormalWS + = tangentWS * bentFactors.x + bitangentWS * bentFactors.y + normalWS * bentFactors.z;\r\n\t\t\t\t\t\t\ttangentWS + = normalize(cross(normalWS,bitangentWS));\r\n\t\t\t\t\t\t\tbitangentWS = cross(tangentWS,normalWS);\r\n\t\t\t\t\t\t\ttangentWS + *= faceMul;\r\n\t\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tfloat3x3 + tbn = float3x3(tangentWS,bitangentWS,normalWS);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t#if + USE_NORMAL_MAP\r\n\t\t\t\t\t\t\tfloat3 n = SampleNormalMap(VFX_SAMPLER(normalMap),uvData);\r\n\t\t\t\t\t\t\tfloat + normalScale = 1.0f;\r\n\t\t\t\t\t\t\t#ifdef VFX_VARYING_NORMALSCALE\r\n\t\t\t\t\t\t\tnormalScale + = i.VFX_VARYING_NORMALSCALE;\r\n\t\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\tnormalWS + = normalize(lerp(normalWS,mul(n,tbn),normalScale));\r\n\t\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t#if + VFX_SHADERGRAPH\r\n\t\t \r\n\t\t \r\n\t\t \r\n\t\t + \r\n\t\t #if HAS_SHADERGRAPH_PARAM_COLOR\r\n\t\t o.color.rgb + = OUTSG..rgb;\r\n\t\t #endif\r\n\t\t \r\n\t\t #if HAS_SHADERGRAPH_PARAM_ALPHA + \r\n\t\t o.color.a = OUTSG.;\r\n\t\t #endif\r\n\t\t#else\r\n\t\t\t\r\n\t\t\t\t#define + VFX_TEXTURE_COLOR VFXGetTextureColor(VFX_SAMPLER(mainTexture),i)\r\n\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tfloat4 + color = VFXGetFragmentColor(i);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t#ifndef VFX_TEXTURE_COLOR\r\n\t\t\t\t\t\t\t#define + VFX_TEXTURE_COLOR float4(1.0,1.0,1.0,1.0)\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t#if + VFX_COLORMAPPING_DEFAULT\r\n\t\t\t\t\t\t\to.color = color * VFX_TEXTURE_COLOR;\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t#if + VFX_COLORMAPPING_GRADIENTMAPPED\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\to.color + = SampleGradient(gradient, VFX_TEXTURE_COLOR.a * color.a) * float4(color.rgb,1.0);\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\to.color + = VFXApplyPreExposure(o.color, i);\r\n\t\t#endif\r\n\t\t\r\n\t\t\t\to.color + = VFXApplyFog(o.color,i);\r\n\t\t\t\tVFXClipFragmentColor(o.color.a,i);\r\n\t\t\t\to.color.a + = saturate(o.color.a);\r\n\t\t\t\to.color = VFXTransformFinalColor(o.color);\r\n\t\t\t\t\r\n\t\t#if + WRITE_MOTION_VECTOR_IN_FORWARD\r\n\t\t\t\t\r\n\t\t\t\t\t\tfloat2 velocity = + (i.VFX_VARYING_VELOCITY_CPOS.xy/i.VFX_VARYING_VELOCITY_CPOS.w) - (i.VFX_VARYING_VELOCITY_CPOS_PREVIOUS.xy/i.VFX_VARYING_VELOCITY_CPOS_PREVIOUS.w);\r\n\t\t\t\t\t\t#if + UNITY_UV_STARTS_AT_TOP\r\n\t\t\t\t\t\t\tvelocity.y = -velocity.y;\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\tfloat4 + encodedMotionVector = 0.0f;\r\n\t\t\t\t\t\tVFXEncodeMotionVector(velocity * + 0.5f, encodedMotionVector);\r\n\t\t\t\t\t\t\r\n\t\t\t\to.outMotionVector = + encodedMotionVector;\r\n\t\t o.outMotionVector.a = o.color.a < i.VFX_VARYING_ALPHATHRESHOLD + ? 0.0f : 1.0f; //Independant clipping for motion vector pass\r\n\t\t#endif\r\n\t\t\t\treturn + o;\r\n\t\t\t}\r\n\t\t\tENDHLSL\r\n\t\t}\r\n\t\t\n\r\n\t\t\r\n\t}\r\n}\r\n" m_Infos: m_Expressions: m_Expressions: @@ -1505,47 +1914,6 @@ VisualEffectResource: - nameId: Spawn Rate index: 26 m_Buffers: - - type: 1 - size: 3993600 - layout: - - name: lifetime - type: 1 - offset: - bucket: 0 - structure: 1 - element: 0 - - name: position - type: 3 - offset: - bucket: 307200 - structure: 8 - element: 0 - - name: alive - type: 17 - offset: - bucket: 307200 - structure: 8 - element: 3 - - name: velocity - type: 3 - offset: - bucket: 307200 - structure: 8 - element: 4 - - name: age - type: 1 - offset: - bucket: 307200 - structure: 8 - element: 7 - - name: color - type: 3 - offset: - bucket: 2764800 - structure: 4 - element: 0 - capacity: 307200 - stride: 4 - type: 1 size: 3993600 layout: @@ -1650,6 +2018,7 @@ VisualEffectResource: m_UpdateMode: 0 m_PreWarmDeltaTime: 0.05 m_PreWarmStepCount: 0 + m_InitialEventName: OnPlay m_Systems: - type: 0 flags: 0 @@ -1677,11 +2046,11 @@ VisualEffectResource: - nameId: attributeBuffer index: 0 - nameId: sourceAttributeBuffer - index: 2 + index: 1 - nameId: deadList - index: 3 + index: 2 - nameId: deadListCount - index: 4 + index: 3 - nameId: spawner_input index: 1 values: @@ -1695,14 +2064,14 @@ VisualEffectResource: - nameId: attributeBuffer index: 0 - nameId: deadListIn - index: 3 + index: 2 - nameId: deadListCount - index: 4 + index: 3 - nameId: sourceAttributeBuffer - index: 2 + index: 1 temporaryBuffers: [] values: - - nameId: uniform_b + - nameId: uniform_a index: 8 - nameId: uniform_c index: 15 @@ -1710,7 +2079,7 @@ VisualEffectResource: index: 14 - nameId: texture_b index: 22 - - nameId: texture_c + - nameId: texture_e index: 21 params: - nameId: bounds_center @@ -1724,10 +2093,10 @@ VisualEffectResource: - nameId: attributeBuffer index: 0 - nameId: deadListOut - index: 3 + index: 2 temporaryBuffers: [] values: - - nameId: uniform_b + - nameId: uniform_a index: 4 - nameId: deltaTime_a index: 37 @@ -1782,12 +2151,14 @@ MonoBehaviour: m_OutputFlowSlot: - link: [] blendMode: 0 + useAlphaClipping: 0 + generateMotionVector: 0 m_SubOutputs: - {fileID: 8926484042661614941} cullMode: 0 zWriteMode: 0 zTestMode: 0 - colorMappingMode: 0 + colorMapping: 0 uvMode: 0 useSoftParticle: 0 sortPriority: 0 @@ -1795,6 +2166,8 @@ MonoBehaviour: indirectDraw: 0 castShadows: 0 useExposureWeight: 0 + shaderGraph: {fileID: 0} + shadergraphGUID: primitiveType: 1 useGeometryShader: 0 --- !u!114 &8926484042661614624 @@ -1892,7 +2265,13 @@ MonoBehaviour: m_serializedType: m_SerializableType: UnityEngine.Texture2D, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - attributes: [] + attributes: + - m_Type: 3 + m_Min: -Infinity + m_Max: Infinity + m_Tooltip: Specifies the base color (RGB) and opacity (A) of the particle. + m_Regex: + m_RegexMaxLength: 0 m_Direction: 0 m_LinkedSlots: [] --- !u!114 &8926484042661614629 @@ -1936,6 +2315,7 @@ MonoBehaviour: m_OutputSlots: [] m_Disabled: 0 mode: 6 + axes: 4 --- !u!114 &8926484042661614636 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2122,7 +2502,13 @@ MonoBehaviour: m_serializedType: m_SerializableType: UnityEngine.Vector3, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - attributes: [] + attributes: + - m_Type: 3 + m_Min: -Infinity + m_Max: Infinity + m_Tooltip: The velocity of the particle. + m_Regex: + m_RegexMaxLength: 0 m_Direction: 1 m_LinkedSlots: - {fileID: 8926484042661614726} @@ -2297,7 +2683,7 @@ MonoBehaviour: - m_Type: 3 m_Min: -Infinity m_Max: Infinity - m_Tooltip: The start of the old range. + m_Tooltip: Sets the start of the old input range. m_Regex: m_RegexMaxLength: 0 m_Direction: 0 @@ -2337,7 +2723,7 @@ MonoBehaviour: - m_Type: 3 m_Min: -Infinity m_Max: Infinity - m_Tooltip: The end of the old range. + m_Tooltip: Sets the end of the old input range. m_Regex: m_RegexMaxLength: 0 m_Direction: 0 @@ -2377,7 +2763,7 @@ MonoBehaviour: - m_Type: 3 m_Min: -Infinity m_Max: Infinity - m_Tooltip: The start of the new range. + m_Tooltip: Sets the start of the new remapped range. m_Regex: m_RegexMaxLength: 0 m_Direction: 0 @@ -2417,7 +2803,7 @@ MonoBehaviour: - m_Type: 3 m_Min: -Infinity m_Max: Infinity - m_Tooltip: The end of the new range. + m_Tooltip: Sets the end of the new remapped range. m_Regex: m_RegexMaxLength: 0 m_Direction: 0 @@ -2665,7 +3051,7 @@ MonoBehaviour: - m_Type: 3 m_Min: -Infinity m_Max: Infinity - m_Tooltip: The value to be remapped into the new range. + m_Tooltip: Sets the value to be remapped into the new range. m_Regex: m_RegexMaxLength: 0 m_Direction: 0 @@ -2764,7 +3150,8 @@ MonoBehaviour: - m_Type: 3 m_Min: -Infinity m_Max: Infinity - m_Tooltip: Force vector applied to particles (in units per squared second) + m_Tooltip: Sets the force vector applied to particles (in units per squared + second). m_Regex: m_RegexMaxLength: 0 m_Direction: 0 @@ -2978,7 +3365,7 @@ MonoBehaviour: - m_Type: 3 m_Min: -Infinity m_Max: Infinity - m_Tooltip: The coordinate in the noise field to take the sample from. + m_Tooltip: Sets the coordinate in the noise field to take the sample from. m_Regex: m_RegexMaxLength: 0 m_Direction: 0 @@ -3118,7 +3505,8 @@ MonoBehaviour: - m_Type: 3 m_Min: -Infinity m_Max: Infinity - m_Tooltip: The frequency of the noise. + m_Tooltip: Sets the period in which the noise is sampled. Higher frequencies + result in more frequent noise change. m_Regex: m_RegexMaxLength: 0 m_Direction: 0 @@ -3155,10 +3543,17 @@ MonoBehaviour: m_SerializableType: System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 attributes: + - m_Type: 0 + m_Min: 1 + m_Max: 8 + m_Tooltip: + m_Regex: + m_RegexMaxLength: 0 - m_Type: 3 m_Min: -Infinity m_Max: Infinity - m_Tooltip: The number of layers of noise. + m_Tooltip: Sets the number of layers of noise. More octaves create a more varied + look, but are also more expensive to calculate. m_Regex: m_RegexMaxLength: 0 m_Direction: 0 @@ -3204,7 +3599,7 @@ MonoBehaviour: - m_Type: 3 m_Min: -Infinity m_Max: Infinity - m_Tooltip: The scaling factor applied to each octave. Also known as persistence. + m_Tooltip: 'Sets the scaling factor applied to each octave (also known as persistence.) ' m_Regex: m_RegexMaxLength: 0 m_Direction: 0 @@ -3250,7 +3645,9 @@ MonoBehaviour: - m_Type: 3 m_Min: -Infinity m_Max: Infinity - m_Tooltip: The rate of change of the frequency for each successive octave. + m_Tooltip: Sets the rate of change of the frequency for each successive octave. + A lacunarity value of 1 results in each octave having the same frequency. + Higher values result in more details, and values below 1 produce less details. m_Regex: m_RegexMaxLength: 0 m_Direction: 0 @@ -3292,7 +3689,7 @@ MonoBehaviour: - m_Type: 3 m_Min: -Infinity m_Max: Infinity - m_Tooltip: The noise will be calculated within the specified range. + m_Tooltip: Sets the range within which the noise is calculated. m_Regex: m_RegexMaxLength: 0 m_Direction: 0 @@ -3398,7 +3795,7 @@ MonoBehaviour: - m_Type: 3 m_Min: -Infinity m_Max: Infinity - m_Tooltip: The calculated noise. + m_Tooltip: Outputs the calculated noise value. m_Regex: m_RegexMaxLength: 0 m_Direction: 1 @@ -3441,7 +3838,7 @@ MonoBehaviour: - m_Type: 3 m_Min: -Infinity m_Max: Infinity - m_Tooltip: The rate of change of the noise. + m_Tooltip: Outputs the rate of change of the noise. m_Regex: m_RegexMaxLength: 0 m_Direction: 1 @@ -3603,7 +4000,13 @@ MonoBehaviour: m_serializedType: m_SerializableType: UnityEngine.Vector3, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - attributes: [] + attributes: + - m_Type: 3 + m_Min: -Infinity + m_Max: Infinity + m_Tooltip: The current position of the particle. + m_Regex: + m_RegexMaxLength: 0 m_Direction: 1 m_LinkedSlots: - {fileID: 8926484042661614833} @@ -4112,7 +4515,7 @@ MonoBehaviour: - m_Type: 3 m_Min: -Infinity m_Max: Infinity - m_Tooltip: The coordinate in the noise field to take the sample from. + m_Tooltip: Sets the coordinate in the noise field to take the sample from. m_Regex: m_RegexMaxLength: 0 m_Direction: 0 @@ -4252,7 +4655,8 @@ MonoBehaviour: - m_Type: 3 m_Min: -Infinity m_Max: Infinity - m_Tooltip: The frequency of the noise. + m_Tooltip: Sets the period in which the noise is sampled. Higher frequencies + result in more frequent noise change. m_Regex: m_RegexMaxLength: 0 m_Direction: 0 @@ -4289,10 +4693,17 @@ MonoBehaviour: m_SerializableType: System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 attributes: + - m_Type: 0 + m_Min: 1 + m_Max: 8 + m_Tooltip: + m_Regex: + m_RegexMaxLength: 0 - m_Type: 3 m_Min: -Infinity m_Max: Infinity - m_Tooltip: The number of layers of noise. + m_Tooltip: Sets the number of layers of noise. More octaves create a more varied + look, but are also more expensive to calculate. m_Regex: m_RegexMaxLength: 0 m_Direction: 0 @@ -4338,7 +4749,7 @@ MonoBehaviour: - m_Type: 3 m_Min: -Infinity m_Max: Infinity - m_Tooltip: The scaling factor applied to each octave. Also known as persistence. + m_Tooltip: 'Sets the scaling factor applied to each octave (also known as persistence.) ' m_Regex: m_RegexMaxLength: 0 m_Direction: 0 @@ -4384,7 +4795,9 @@ MonoBehaviour: - m_Type: 3 m_Min: -Infinity m_Max: Infinity - m_Tooltip: The rate of change of the frequency for each successive octave. + m_Tooltip: Sets the rate of change of the frequency for each successive octave. + A lacunarity value of 1 results in each octave having the same frequency. + Higher values result in more details, and values below 1 produce less details. m_Regex: m_RegexMaxLength: 0 m_Direction: 0 @@ -4426,7 +4839,7 @@ MonoBehaviour: - m_Type: 3 m_Min: -Infinity m_Max: Infinity - m_Tooltip: The noise will be calculated within the specified range. + m_Tooltip: Sets the range within which the noise is calculated. m_Regex: m_RegexMaxLength: 0 m_Direction: 0 @@ -4532,7 +4945,7 @@ MonoBehaviour: - m_Type: 3 m_Min: -Infinity m_Max: Infinity - m_Tooltip: The calculated noise. + m_Tooltip: Outputs the calculated noise value. m_Regex: m_RegexMaxLength: 0 m_Direction: 1 @@ -4575,7 +4988,7 @@ MonoBehaviour: - m_Type: 3 m_Min: -Infinity m_Max: Infinity - m_Tooltip: The rate of change of the noise. + m_Tooltip: Outputs the rate of change of the noise. m_Regex: m_RegexMaxLength: 0 m_Direction: 1 @@ -5864,7 +6277,8 @@ MonoBehaviour: - m_Type: 3 m_Min: -Infinity m_Max: Infinity - m_Tooltip: Drag coefficient of the particle + m_Tooltip: Sets the drag coefficient. Higher drag forces particles to slow + down more. m_Regex: m_RegexMaxLength: 0 m_Direction: 0 @@ -6562,7 +6976,7 @@ MonoBehaviour: - m_Type: 3 m_Min: -Infinity m_Max: Infinity - m_Tooltip: The minimum value to be generated. + m_Tooltip: Sets the minimum range of the random value. m_Regex: m_RegexMaxLength: 0 m_Direction: 0 @@ -6602,7 +7016,7 @@ MonoBehaviour: - m_Type: 3 m_Min: -Infinity m_Max: Infinity - m_Tooltip: The maximum value to be generated. + m_Tooltip: Sets the maximum range of the random value. m_Regex: m_RegexMaxLength: 0 m_Direction: 0 @@ -6642,7 +7056,8 @@ MonoBehaviour: - m_Type: 3 m_Min: -Infinity m_Max: Infinity - m_Tooltip: Seed to compute the constant random + m_Tooltip: Sets the value used when determining the random number. Using the + same seed results in the same random number every time. m_Regex: m_RegexMaxLength: 0 m_Direction: 0 @@ -6682,7 +7097,7 @@ MonoBehaviour: - m_Type: 3 m_Min: -Infinity m_Max: Infinity - m_Tooltip: A random number between 0 and 1. + m_Tooltip: Outputs a random number between the min and max range. m_Regex: m_RegexMaxLength: 0 m_Direction: 1 @@ -7134,7 +7549,14 @@ MonoBehaviour: m_serializedType: m_SerializableType: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - attributes: [] + attributes: + - m_Type: 3 + m_Min: -Infinity + m_Max: Infinity + m_Tooltip: "Indicates how long the particle can stay alive. If the particle\u2019s + age exceeds its lifetime, the particle is destroyed." + m_Regex: + m_RegexMaxLength: 0 m_Direction: 0 m_LinkedSlots: - {fileID: 8926484042661614863} @@ -7210,7 +7632,7 @@ MonoBehaviour: - m_Type: 3 m_Min: -Infinity m_Max: Infinity - m_Tooltip: The value to be remapped into the new range. + m_Tooltip: Sets the value to be remapped into the new range. m_Regex: m_RegexMaxLength: 0 m_Direction: 0 @@ -7251,7 +7673,7 @@ MonoBehaviour: - m_Type: 3 m_Min: -Infinity m_Max: Infinity - m_Tooltip: The start of the old range. + m_Tooltip: Sets the start of the old input range. m_Regex: m_RegexMaxLength: 0 m_Direction: 0 @@ -7291,7 +7713,7 @@ MonoBehaviour: - m_Type: 3 m_Min: -Infinity m_Max: Infinity - m_Tooltip: The end of the old range. + m_Tooltip: Sets the end of the old input range. m_Regex: m_RegexMaxLength: 0 m_Direction: 0 @@ -7331,7 +7753,7 @@ MonoBehaviour: - m_Type: 3 m_Min: -Infinity m_Max: Infinity - m_Tooltip: The start of the new range. + m_Tooltip: Sets the start of the new remapped range. m_Regex: m_RegexMaxLength: 0 m_Direction: 0 @@ -7371,7 +7793,7 @@ MonoBehaviour: - m_Type: 3 m_Min: -Infinity m_Max: Infinity - m_Tooltip: The end of the new range. + m_Tooltip: Sets the end of the new remapped range. m_Regex: m_RegexMaxLength: 0 m_Direction: 0 @@ -7439,7 +7861,7 @@ MonoBehaviour: m_Type: m_SerializableType: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - m_SerializableObject: + m_SerializableObject: 7.83 m_Max: m_Type: m_SerializableType: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, @@ -7651,7 +8073,7 @@ MonoBehaviour: - m_Type: 3 m_Min: -Infinity m_Max: Infinity - m_Tooltip: The minimum value to be generated. + m_Tooltip: Sets the minimum range of the random value. m_Regex: m_RegexMaxLength: 0 m_Direction: 0 @@ -7691,7 +8113,7 @@ MonoBehaviour: - m_Type: 3 m_Min: -Infinity m_Max: Infinity - m_Tooltip: The maximum value to be generated. + m_Tooltip: Sets the maximum range of the random value. m_Regex: m_RegexMaxLength: 0 m_Direction: 0 @@ -7731,7 +8153,8 @@ MonoBehaviour: - m_Type: 3 m_Min: -Infinity m_Max: Infinity - m_Tooltip: Seed to compute the constant random + m_Tooltip: Sets the value used when determining the random number. Using the + same seed results in the same random number every time. m_Regex: m_RegexMaxLength: 0 m_Direction: 0 @@ -7771,7 +8194,7 @@ MonoBehaviour: - m_Type: 3 m_Min: -Infinity m_Max: Infinity - m_Tooltip: A random number between 0 and 1. + m_Tooltip: Outputs a random number between the min and max range. m_Regex: m_RegexMaxLength: 0 m_Direction: 1 @@ -7837,7 +8260,7 @@ MonoBehaviour: - m_Type: 3 m_Min: -Infinity m_Max: Infinity - m_Tooltip: The minimum value to be generated. + m_Tooltip: Sets the minimum range of the random value. m_Regex: m_RegexMaxLength: 0 m_Direction: 0 @@ -7877,7 +8300,7 @@ MonoBehaviour: - m_Type: 3 m_Min: -Infinity m_Max: Infinity - m_Tooltip: The maximum value to be generated. + m_Tooltip: Sets the maximum range of the random value. m_Regex: m_RegexMaxLength: 0 m_Direction: 0 @@ -7917,7 +8340,8 @@ MonoBehaviour: - m_Type: 3 m_Min: -Infinity m_Max: Infinity - m_Tooltip: Seed to compute the constant random + m_Tooltip: Sets the value used when determining the random number. Using the + same seed results in the same random number every time. m_Regex: m_RegexMaxLength: 0 m_Direction: 0 @@ -7957,7 +8381,7 @@ MonoBehaviour: - m_Type: 3 m_Min: -Infinity m_Max: Infinity - m_Tooltip: A random number between 0 and 1. + m_Tooltip: Outputs a random number between the min and max range. m_Regex: m_RegexMaxLength: 0 m_Direction: 1 @@ -8127,8 +8551,8 @@ MonoBehaviour: attributes: [] m_Direction: 1 m_LinkedSlots: - - {fileID: 8926484042661614904} - - {fileID: 8926484042661614915} + - {fileID: 8926484042661614949} + - {fileID: 8926484042661614952} --- !u!114 &8926484042661614900 MonoBehaviour: m_ObjectHideFlags: 0 @@ -8214,7 +8638,7 @@ MonoBehaviour: m_UISuperCollapsed: 0 m_InputSlots: - {fileID: 8926484042661614903} - - {fileID: 8926484042661614904} + - {fileID: 8926484042661614949} - {fileID: 8926484042661614907} m_OutputSlots: - {fileID: 8926484042661614908} @@ -8253,121 +8677,12 @@ MonoBehaviour: - m_Type: 3 m_Min: -Infinity m_Max: Infinity - m_Tooltip: The texture to sample from. + m_Tooltip: Sets the texture to sample from. m_Regex: m_RegexMaxLength: 0 m_Direction: 0 m_LinkedSlots: - {fileID: 8926484042661614943} ---- !u!114 &8926484042661614904 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 1b2b751071c7fc14f9fa503163991826, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Parent: {fileID: 0} - m_Children: - - {fileID: 8926484042661614905} - - {fileID: 8926484042661614906} - m_UIPosition: {x: 0, y: 0} - m_UICollapsed: 1 - m_UISuperCollapsed: 0 - m_MasterSlot: {fileID: 8926484042661614904} - m_MasterData: - m_Owner: {fileID: 8926484042661614902} - m_Value: - m_Type: - m_SerializableType: UnityEngine.Vector2, UnityEngine.CoreModule, Version=0.0.0.0, - Culture=neutral, PublicKeyToken=null - m_SerializableObject: '{"x":0.0,"y":0.0}' - m_Space: 2147483647 - m_Property: - name: uv - m_serializedType: - m_SerializableType: UnityEngine.Vector2, UnityEngine.CoreModule, Version=0.0.0.0, - Culture=neutral, PublicKeyToken=null - attributes: - - m_Type: 3 - m_Min: -Infinity - m_Max: Infinity - m_Tooltip: The texture coordinate used for the sampling. - m_Regex: - m_RegexMaxLength: 0 - m_Direction: 0 - m_LinkedSlots: - - {fileID: 8926484042661614899} ---- !u!114 &8926484042661614905 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: f780aa281814f9842a7c076d436932e7, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Parent: {fileID: 8926484042661614904} - m_Children: [] - m_UIPosition: {x: 0, y: 0} - m_UICollapsed: 1 - m_UISuperCollapsed: 0 - m_MasterSlot: {fileID: 8926484042661614904} - m_MasterData: - m_Owner: {fileID: 0} - m_Value: - m_Type: - m_SerializableType: - m_SerializableObject: - m_Space: 2147483647 - m_Property: - name: x - m_serializedType: - m_SerializableType: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, - PublicKeyToken=b77a5c561934e089 - attributes: [] - m_Direction: 0 - m_LinkedSlots: [] ---- !u!114 &8926484042661614906 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: f780aa281814f9842a7c076d436932e7, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Parent: {fileID: 8926484042661614904} - m_Children: [] - m_UIPosition: {x: 0, y: 0} - m_UICollapsed: 1 - m_UISuperCollapsed: 0 - m_MasterSlot: {fileID: 8926484042661614904} - m_MasterData: - m_Owner: {fileID: 0} - m_Value: - m_Type: - m_SerializableType: - m_SerializableObject: - m_Space: 2147483647 - m_Property: - name: y - m_serializedType: - m_SerializableType: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, - PublicKeyToken=b77a5c561934e089 - attributes: [] - m_Direction: 0 - m_LinkedSlots: [] --- !u!114 &8926484042661614907 MonoBehaviour: m_ObjectHideFlags: 0 @@ -8409,7 +8724,7 @@ MonoBehaviour: - m_Type: 3 m_Min: -Infinity m_Max: Infinity - m_Tooltip: The mip level to sample from. + m_Tooltip: Sets the mip level to sample from. m_Regex: m_RegexMaxLength: 0 m_Direction: 0 @@ -8449,7 +8764,13 @@ MonoBehaviour: m_serializedType: m_SerializableType: UnityEngine.Vector4, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - attributes: [] + attributes: + - m_Type: 3 + m_Min: -Infinity + m_Max: Infinity + m_Tooltip: Outputs the sampled value from the texture at the specified UV coordinate. + m_Regex: + m_RegexMaxLength: 0 m_Direction: 1 m_LinkedSlots: - {fileID: 8926484042661614936} @@ -8604,7 +8925,7 @@ MonoBehaviour: m_UISuperCollapsed: 0 m_InputSlots: - {fileID: 8926484042661614914} - - {fileID: 8926484042661614915} + - {fileID: 8926484042661614952} - {fileID: 8926484042661614918} m_OutputSlots: - {fileID: 8926484042661614919} @@ -8643,13 +8964,13 @@ MonoBehaviour: - m_Type: 3 m_Min: -Infinity m_Max: Infinity - m_Tooltip: The texture to sample from. + m_Tooltip: Sets the texture to sample from. m_Regex: m_RegexMaxLength: 0 m_Direction: 0 m_LinkedSlots: - {fileID: 8926484042661614945} ---- !u!114 &8926484042661614915 +--- !u!114 &8926484042661614918 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -8658,41 +8979,44 @@ MonoBehaviour: m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 1b2b751071c7fc14f9fa503163991826, type: 3} + m_Script: {fileID: 11500000, guid: f780aa281814f9842a7c076d436932e7, type: 3} m_Name: m_EditorClassIdentifier: m_Parent: {fileID: 0} - m_Children: - - {fileID: 8926484042661614916} - - {fileID: 8926484042661614917} + m_Children: [] m_UIPosition: {x: 0, y: 0} m_UICollapsed: 1 m_UISuperCollapsed: 0 - m_MasterSlot: {fileID: 8926484042661614915} + m_MasterSlot: {fileID: 8926484042661614918} m_MasterData: m_Owner: {fileID: 8926484042661614913} m_Value: m_Type: - m_SerializableType: UnityEngine.Vector2, UnityEngine.CoreModule, Version=0.0.0.0, - Culture=neutral, PublicKeyToken=null - m_SerializableObject: '{"x":0.0,"y":0.0}' + m_SerializableType: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, + PublicKeyToken=b77a5c561934e089 + m_SerializableObject: 0 m_Space: 2147483647 m_Property: - name: uv + name: mipLevel m_serializedType: - m_SerializableType: UnityEngine.Vector2, UnityEngine.CoreModule, Version=0.0.0.0, - Culture=neutral, PublicKeyToken=null + m_SerializableType: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, + PublicKeyToken=b77a5c561934e089 attributes: + - m_Type: 1 + m_Min: 0 + m_Max: Infinity + m_Tooltip: + m_Regex: + m_RegexMaxLength: 0 - m_Type: 3 m_Min: -Infinity m_Max: Infinity - m_Tooltip: The texture coordinate used for the sampling. + m_Tooltip: Sets the mip level to sample from. m_Regex: m_RegexMaxLength: 0 m_Direction: 0 - m_LinkedSlots: - - {fileID: 8926484042661614899} ---- !u!114 &8926484042661614916 + m_LinkedSlots: [] +--- !u!114 &8926484042661614919 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -8701,145 +9025,39 @@ MonoBehaviour: m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: f780aa281814f9842a7c076d436932e7, type: 3} + m_Script: {fileID: 11500000, guid: c499060cea9bbb24b8d723eafa343303, type: 3} m_Name: m_EditorClassIdentifier: - m_Parent: {fileID: 8926484042661614915} - m_Children: [] + m_Parent: {fileID: 0} + m_Children: + - {fileID: 8926484042661614920} + - {fileID: 8926484042661614921} + - {fileID: 8926484042661614922} + - {fileID: 8926484042661614923} m_UIPosition: {x: 0, y: 0} m_UICollapsed: 1 m_UISuperCollapsed: 0 - m_MasterSlot: {fileID: 8926484042661614915} + m_MasterSlot: {fileID: 8926484042661614919} m_MasterData: - m_Owner: {fileID: 0} + m_Owner: {fileID: 8926484042661614913} m_Value: m_Type: - m_SerializableType: - m_SerializableObject: + m_SerializableType: UnityEngine.Vector4, UnityEngine.CoreModule, Version=0.0.0.0, + Culture=neutral, PublicKeyToken=null + m_SerializableObject: '{"x":0.0,"y":0.0,"z":0.0,"w":0.0}' m_Space: 2147483647 m_Property: - name: x + name: s m_serializedType: - m_SerializableType: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, - PublicKeyToken=b77a5c561934e089 - attributes: [] - m_Direction: 0 - m_LinkedSlots: [] ---- !u!114 &8926484042661614917 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: f780aa281814f9842a7c076d436932e7, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Parent: {fileID: 8926484042661614915} - m_Children: [] - m_UIPosition: {x: 0, y: 0} - m_UICollapsed: 1 - m_UISuperCollapsed: 0 - m_MasterSlot: {fileID: 8926484042661614915} - m_MasterData: - m_Owner: {fileID: 0} - m_Value: - m_Type: - m_SerializableType: - m_SerializableObject: - m_Space: 2147483647 - m_Property: - name: y - m_serializedType: - m_SerializableType: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, - PublicKeyToken=b77a5c561934e089 - attributes: [] - m_Direction: 0 - m_LinkedSlots: [] ---- !u!114 &8926484042661614918 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: f780aa281814f9842a7c076d436932e7, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Parent: {fileID: 0} - m_Children: [] - m_UIPosition: {x: 0, y: 0} - m_UICollapsed: 1 - m_UISuperCollapsed: 0 - m_MasterSlot: {fileID: 8926484042661614918} - m_MasterData: - m_Owner: {fileID: 8926484042661614913} - m_Value: - m_Type: - m_SerializableType: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, - PublicKeyToken=b77a5c561934e089 - m_SerializableObject: 0 - m_Space: 2147483647 - m_Property: - name: mipLevel - m_serializedType: - m_SerializableType: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, - PublicKeyToken=b77a5c561934e089 + m_SerializableType: UnityEngine.Vector4, UnityEngine.CoreModule, Version=0.0.0.0, + Culture=neutral, PublicKeyToken=null attributes: - - m_Type: 1 - m_Min: 0 - m_Max: Infinity - m_Tooltip: - m_Regex: - m_RegexMaxLength: 0 - m_Type: 3 m_Min: -Infinity m_Max: Infinity - m_Tooltip: The mip level to sample from. + m_Tooltip: Outputs the sampled value from the texture at the specified UV coordinate. m_Regex: m_RegexMaxLength: 0 - m_Direction: 0 - m_LinkedSlots: [] ---- !u!114 &8926484042661614919 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c499060cea9bbb24b8d723eafa343303, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Parent: {fileID: 0} - m_Children: - - {fileID: 8926484042661614920} - - {fileID: 8926484042661614921} - - {fileID: 8926484042661614922} - - {fileID: 8926484042661614923} - m_UIPosition: {x: 0, y: 0} - m_UICollapsed: 1 - m_UISuperCollapsed: 0 - m_MasterSlot: {fileID: 8926484042661614919} - m_MasterData: - m_Owner: {fileID: 8926484042661614913} - m_Value: - m_Type: - m_SerializableType: UnityEngine.Vector4, UnityEngine.CoreModule, Version=0.0.0.0, - Culture=neutral, PublicKeyToken=null - m_SerializableObject: '{"x":0.0,"y":0.0,"z":0.0,"w":0.0}' - m_Space: 2147483647 - m_Property: - name: s - m_serializedType: - m_SerializableType: UnityEngine.Vector4, UnityEngine.CoreModule, Version=0.0.0.0, - Culture=neutral, PublicKeyToken=null - attributes: [] m_Direction: 1 m_LinkedSlots: - {fileID: 8926484042661614930} @@ -9068,6 +9286,12 @@ MonoBehaviour: m_Tooltip: m_Regex: m_RegexMaxLength: 0 + - m_Type: 3 + m_Min: -Infinity + m_Max: Infinity + m_Tooltip: The color of the particle. + m_Regex: + m_RegexMaxLength: 0 m_Direction: 0 m_LinkedSlots: - {fileID: 8926484042661614919} @@ -9227,7 +9451,14 @@ MonoBehaviour: m_serializedType: m_SerializableType: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - attributes: [] + attributes: + - m_Type: 3 + m_Min: -Infinity + m_Max: Infinity + m_Tooltip: "Indicates how long the particle can stay alive. If the particle\u2019s + age exceeds its lifetime, the particle is destroyed." + m_Regex: + m_RegexMaxLength: 0 m_Direction: 0 m_LinkedSlots: [] --- !u!114 &8926484042661614936 @@ -9262,7 +9493,13 @@ MonoBehaviour: m_serializedType: m_SerializableType: UnityEditor.VFX.Position, Unity.VisualEffectGraph.Editor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - attributes: [] + attributes: + - m_Type: 3 + m_Min: -Infinity + m_Max: Infinity + m_Tooltip: The current position of the particle. + m_Regex: + m_RegexMaxLength: 0 m_Direction: 0 m_LinkedSlots: - {fileID: 8926484042661614908} @@ -9692,3 +9929,221 @@ MonoBehaviour: m_Direction: 0 m_LinkedSlots: - {fileID: 8926484042661614947} +--- !u!114 &8926484042661614949 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1b2b751071c7fc14f9fa503163991826, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Parent: {fileID: 0} + m_Children: + - {fileID: 8926484042661614950} + - {fileID: 8926484042661614951} + m_UIPosition: {x: 0, y: 0} + m_UICollapsed: 1 + m_UISuperCollapsed: 0 + m_MasterSlot: {fileID: 8926484042661614949} + m_MasterData: + m_Owner: {fileID: 8926484042661614902} + m_Value: + m_Type: + m_SerializableType: UnityEngine.Vector2, UnityEngine.CoreModule, Version=0.0.0.0, + Culture=neutral, PublicKeyToken=null + m_SerializableObject: '{"x":0.0,"y":0.0}' + m_Space: 2147483647 + m_Property: + name: UV + m_serializedType: + m_SerializableType: UnityEngine.Vector2, UnityEngine.CoreModule, Version=0.0.0.0, + Culture=neutral, PublicKeyToken=null + attributes: + - m_Type: 3 + m_Min: -Infinity + m_Max: Infinity + m_Tooltip: Sets the texture coordinate used for the sampling. + m_Regex: + m_RegexMaxLength: 0 + m_Direction: 0 + m_LinkedSlots: + - {fileID: 8926484042661614899} +--- !u!114 &8926484042661614950 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f780aa281814f9842a7c076d436932e7, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Parent: {fileID: 8926484042661614949} + m_Children: [] + m_UIPosition: {x: 0, y: 0} + m_UICollapsed: 1 + m_UISuperCollapsed: 0 + m_MasterSlot: {fileID: 8926484042661614949} + m_MasterData: + m_Owner: {fileID: 0} + m_Value: + m_Type: + m_SerializableType: + m_SerializableObject: + m_Space: 2147483647 + m_Property: + name: x + m_serializedType: + m_SerializableType: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, + PublicKeyToken=b77a5c561934e089 + attributes: [] + m_Direction: 0 + m_LinkedSlots: [] +--- !u!114 &8926484042661614951 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f780aa281814f9842a7c076d436932e7, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Parent: {fileID: 8926484042661614949} + m_Children: [] + m_UIPosition: {x: 0, y: 0} + m_UICollapsed: 1 + m_UISuperCollapsed: 0 + m_MasterSlot: {fileID: 8926484042661614949} + m_MasterData: + m_Owner: {fileID: 0} + m_Value: + m_Type: + m_SerializableType: + m_SerializableObject: + m_Space: 2147483647 + m_Property: + name: y + m_serializedType: + m_SerializableType: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, + PublicKeyToken=b77a5c561934e089 + attributes: [] + m_Direction: 0 + m_LinkedSlots: [] +--- !u!114 &8926484042661614952 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1b2b751071c7fc14f9fa503163991826, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Parent: {fileID: 0} + m_Children: + - {fileID: 8926484042661614953} + - {fileID: 8926484042661614954} + m_UIPosition: {x: 0, y: 0} + m_UICollapsed: 1 + m_UISuperCollapsed: 0 + m_MasterSlot: {fileID: 8926484042661614952} + m_MasterData: + m_Owner: {fileID: 8926484042661614913} + m_Value: + m_Type: + m_SerializableType: UnityEngine.Vector2, UnityEngine.CoreModule, Version=0.0.0.0, + Culture=neutral, PublicKeyToken=null + m_SerializableObject: '{"x":0.0,"y":0.0}' + m_Space: 2147483647 + m_Property: + name: UV + m_serializedType: + m_SerializableType: UnityEngine.Vector2, UnityEngine.CoreModule, Version=0.0.0.0, + Culture=neutral, PublicKeyToken=null + attributes: + - m_Type: 3 + m_Min: -Infinity + m_Max: Infinity + m_Tooltip: Sets the texture coordinate used for the sampling. + m_Regex: + m_RegexMaxLength: 0 + m_Direction: 0 + m_LinkedSlots: + - {fileID: 8926484042661614899} +--- !u!114 &8926484042661614953 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f780aa281814f9842a7c076d436932e7, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Parent: {fileID: 8926484042661614952} + m_Children: [] + m_UIPosition: {x: 0, y: 0} + m_UICollapsed: 1 + m_UISuperCollapsed: 0 + m_MasterSlot: {fileID: 8926484042661614952} + m_MasterData: + m_Owner: {fileID: 0} + m_Value: + m_Type: + m_SerializableType: + m_SerializableObject: + m_Space: 2147483647 + m_Property: + name: x + m_serializedType: + m_SerializableType: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, + PublicKeyToken=b77a5c561934e089 + attributes: [] + m_Direction: 0 + m_LinkedSlots: [] +--- !u!114 &8926484042661614954 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f780aa281814f9842a7c076d436932e7, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Parent: {fileID: 8926484042661614952} + m_Children: [] + m_UIPosition: {x: 0, y: 0} + m_UICollapsed: 1 + m_UISuperCollapsed: 0 + m_MasterSlot: {fileID: 8926484042661614952} + m_MasterData: + m_Owner: {fileID: 0} + m_Value: + m_Type: + m_SerializableType: + m_SerializableObject: + m_Space: 2147483647 + m_Property: + name: y + m_serializedType: + m_SerializableType: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, + PublicKeyToken=b77a5c561934e089 + attributes: [] + m_Direction: 0 + m_LinkedSlots: [] diff --git a/Assets/LiveStreaming.unity b/Assets/LiveStreaming.unity index b3177c5..4276525 100644 --- a/Assets/LiveStreaming.unity +++ b/Assets/LiveStreaming.unity @@ -52,7 +52,7 @@ LightmapSettings: m_AlbedoBoost: 1 m_EnvironmentLightingMode: 0 m_EnableBakedLightmaps: 1 - m_EnableRealtimeLightmaps: 1 + m_EnableRealtimeLightmaps: 0 m_LightmapEditorSettings: serializedVersion: 12 m_Resolution: 2 @@ -96,6 +96,7 @@ LightmapSettings: m_PVRFilteringAtrousPositionSigmaAO: 1 m_ExportTrainingData: 0 m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 m_LightingDataAsset: {fileID: 0} m_UseShadowmask: 1 --- !u!196 &4 @@ -120,7 +121,7 @@ NavMeshSettings: debug: m_Flags: 0 m_NavMeshData: {fileID: 0} ---- !u!1 &419300869 +--- !u!1 &179008362 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -128,131 +129,156 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 419300873} - - component: {fileID: 419300872} - - component: {fileID: 419300871} - - component: {fileID: 419300870} + - component: {fileID: 179008366} + - component: {fileID: 179008365} + - component: {fileID: 179008364} + - component: {fileID: 179008363} m_Layer: 0 - m_Name: Main Camera - m_TagString: MainCamera + m_Name: Record3D_Simple_Streaming + m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!114 &419300870 +--- !u!114 &179008363 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 419300869} + m_GameObject: {fileID: 179008362} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 23c1ce4fb46143f46bc5cb5224c934f6, type: 3} + m_Script: {fileID: 11500000, guid: 62c79e23b2d434c13ae7445473d7b5c4, type: 3} m_Name: m_EditorClassIdentifier: - clearColorMode: 0 - backgroundColorHDR: {r: 0.025, g: 0.07, b: 0.19, a: 0} - clearDepth: 1 - volumeLayerMask: - serializedVersion: 2 - m_Bits: 4294967295 - volumeAnchorOverride: {fileID: 0} - antialiasing: 2 - SMAAQuality: 2 - dithering: 1 - stopNaNs: 0 - physicalParameters: - m_Iso: 200 - m_ShutterSpeed: 0.005 - m_Aperture: 16 - m_BladeCount: 5 - m_Curvature: {x: 2, y: 11} - m_BarrelClipping: 0.25 - m_Anamorphism: 0 - flipYMode: 0 - fullscreenPassthrough: 0 - allowDynamicResolution: 0 - customRenderingSettings: 0 - invertFaceCulling: 0 - probeLayerMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingPathCustomFrameSettings: - bitDatas: - data1: 69284256546589 - data2: 4539628424389459968 - lodBias: 1 - lodBiasMode: 0 - maximumLODLevel: 0 - maximumLODLevelMode: 0 - renderingPathCustomFrameSettingsOverrideMask: - mask: - data1: 0 - data2: 0 - defaultFrameSettings: 0 - m_Version: 5 - m_ObsoleteRenderingPath: 0 - m_ObsoleteFrameSettings: - overrides: 0 - enableShadow: 0 - enableContactShadows: 0 - enableShadowMask: 0 - enableSSR: 0 - enableSSAO: 0 - enableSubsurfaceScattering: 0 - enableTransmission: 0 - enableAtmosphericScattering: 0 - enableVolumetrics: 0 - enableReprojectionForVolumetrics: 0 - enableLightLayers: 0 - enableExposureControl: 1 - diffuseGlobalDimmer: 0 - specularGlobalDimmer: 0 - shaderLitMode: 0 - enableDepthPrepassWithDeferredRendering: 0 - enableTransparentPrepass: 0 - enableMotionVectors: 0 - enableObjectMotionVectors: 0 - enableDecals: 0 - enableRoughRefraction: 0 - enableTransparentPostpass: 0 - enableDistortion: 0 - enablePostprocess: 0 - enableOpaqueObjects: 0 - enableTransparentObjects: 0 - enableRealtimePlanarReflection: 0 - enableMSAA: 0 - enableAsyncCompute: 0 - runLightListAsync: 0 - runSSRAsync: 0 - runSSAOAsync: 0 - runContactShadowsAsync: 0 - runVolumeVoxelizationAsync: 0 - lightLoopSettings: - overrides: 0 - enableDeferredTileAndCluster: 0 - enableComputeLightEvaluation: 0 - enableComputeLightVariants: 0 - enableComputeMaterialVariants: 0 - enableFptlForForwardOpaque: 0 - enableBigTilePrepass: 0 - isFptlEnabled: 0 ---- !u!81 &419300871 + streamEffect: {fileID: 179008365} + deviceIndex: 0 +--- !u!73398921 &179008364 +VFXRenderer: + m_ObjectHideFlags: 2 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 179008362} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_MotionVectors: 0 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 0 + m_RayTracingMode: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!2083052967 &179008365 +VisualEffect: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 179008362} + m_Enabled: 1 + m_Asset: {fileID: 8926484042661614526, guid: 42fada32aad4b460fab7512db63441e4, type: 3} + m_InitialEventName: OnPlay + m_InitialEventNameOverriden: 0 + m_StartSeed: 0 + m_ResetSeedOnPlay: 1 + m_PropertySheet: + m_Float: + m_Array: [] + m_Vector2f: + m_Array: [] + m_Vector3f: + m_Array: [] + m_Vector4f: + m_Array: [] + m_Uint: + m_Array: [] + m_Int: + m_Array: + - m_Value: 1 + m_Name: FPS + m_Overridden: 0 + m_Matrix4x4f: + m_Array: [] + m_AnimationCurve: + m_Array: [] + m_Gradient: + m_Array: [] + m_NamedObject: + m_Array: [] + m_Bool: + m_Array: [] +--- !u!4 &179008366 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 179008362} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 3.067, y: -0.5122871, z: -3.004} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &419503477 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 419503480} + - component: {fileID: 419503479} + - component: {fileID: 419503478} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!81 &419503478 AudioListener: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 419300869} + m_GameObject: {fileID: 419503477} m_Enabled: 1 ---- !u!20 &419300872 +--- !u!20 &419503479 Camera: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 419300869} + m_GameObject: {fileID: 419503477} m_Enabled: 1 serializedVersion: 2 m_ClearFlags: 1 @@ -282,28 +308,28 @@ Camera: m_TargetTexture: {fileID: 0} m_TargetDisplay: 0 m_TargetEye: 3 - m_HDR: 0 - m_AllowMSAA: 0 + m_HDR: 1 + m_AllowMSAA: 1 m_AllowDynamicResolution: 0 m_ForceIntoRT: 0 m_OcclusionCulling: 1 m_StereoConvergence: 10 m_StereoSeparation: 0.022 ---- !u!4 &419300873 +--- !u!4 &419503480 Transform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 419300869} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_GameObject: {fileID: 419503477} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 1, z: -10} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &862174605 +--- !u!1 &1674745031 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -311,166 +337,91 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 862174607} - - component: {fileID: 862174606} + - component: {fileID: 1674745033} + - component: {fileID: 1674745032} m_Layer: 0 - m_Name: Render Settings + m_Name: Directional Light m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!114 &862174606 -MonoBehaviour: +--- !u!108 &1674745032 +Light: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 862174605} + m_GameObject: {fileID: 1674745031} m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 172515602e62fb746b5d573b38a5fe58, type: 3} - m_Name: - m_EditorClassIdentifier: - isGlobal: 1 - priority: -1 - blendDistance: 0 - weight: 1 - sharedProfile: {fileID: 11400000, guid: cf1b32335766f2e40a3d01fb915d6960, type: 2} ---- !u!4 &862174607 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 862174605} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 6.1293297, y: -3.9060338, z: 7.00498} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1851851865 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1851851869} - - component: {fileID: 1851851868} - - component: {fileID: 1851851867} - - component: {fileID: 1851851866} - m_Layer: 0 - m_Name: Record3D_Simple_Streaming - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 0 ---- !u!114 &1851851866 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1851851865} - m_Enabled: 0 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 62c79e23b2d434c13ae7445473d7b5c4, type: 3} - m_Name: - m_EditorClassIdentifier: - streamEffect: {fileID: 1851851868} - deviceIndex: 0 ---- !u!73398921 &1851851867 -VFXRenderer: - m_ObjectHideFlags: 2 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1851851865} - m_Enabled: 0 - m_CastShadows: 0 - m_ReceiveShadows: 0 - m_DynamicOccludee: 1 - m_MotionVectors: 0 - m_LightProbeUsage: 0 - m_ReflectionProbeUsage: 0 + serializedVersion: 10 + m_Type: 1 + m_Shape: 0 + m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_InnerSpotAngle: 21.80208 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_CullingMatrixOverride: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + m_UseCullingMatrixOverride: 0 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 ---- !u!2083052967 &1851851868 -VisualEffect: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1851851865} - m_Enabled: 0 - m_Asset: {fileID: 8926484042661614526, guid: 42fada32aad4b460fab7512db63441e4, type: 3} - m_StartSeed: 0 - m_ResetSeedOnPlay: 1 - m_PropertySheet: - m_Float: - m_Array: [] - m_Vector2f: - m_Array: [] - m_Vector3f: - m_Array: [] - m_Vector4f: - m_Array: [] - m_Uint: - m_Array: [] - m_Int: - m_Array: [] - m_Matrix4x4f: - m_Array: [] - m_AnimationCurve: - m_Array: [] - m_Gradient: - m_Array: [] - m_NamedObject: - m_Array: [] - m_Bool: - m_Array: [] ---- !u!4 &1851851869 + m_Lightmapping: 4 + m_LightShadowCasterMode: 0 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} + m_UseBoundingSphereOverride: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &1674745033 Transform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1851851865} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 3.067, y: -0.5122871, z: -3.004} + m_GameObject: {fileID: 1674745031} + m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} + m_LocalPosition: {x: 0, y: 3, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 3 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1887993413 + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} +--- !u!1 &2032884366 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -478,10 +429,10 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 1887993416} - - component: {fileID: 1887993415} - - component: {fileID: 1887993414} - - component: {fileID: 1887993417} + - component: {fileID: 2032884369} + - component: {fileID: 2032884368} + - component: {fileID: 2032884367} + - component: {fileID: 2032884370} m_Layer: 0 m_Name: Particles m_TagString: Untagged @@ -489,13 +440,13 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!73398921 &1887993414 +--- !u!73398921 &2032884367 VFXRenderer: m_ObjectHideFlags: 2 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1887993413} + m_GameObject: {fileID: 2032884366} m_Enabled: 1 m_CastShadows: 0 m_ReceiveShadows: 0 @@ -503,6 +454,7 @@ VFXRenderer: m_MotionVectors: 0 m_LightProbeUsage: 0 m_ReflectionProbeUsage: 0 + m_RayTracingMode: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -527,15 +479,17 @@ VFXRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 ---- !u!2083052967 &1887993415 +--- !u!2083052967 &2032884368 VisualEffect: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1887993413} + m_GameObject: {fileID: 2032884366} m_Enabled: 1 m_Asset: {fileID: 8926484042661614526, guid: cfe8350bf9aa242a6811006e86bfc4ba, type: 3} + m_InitialEventName: OnPlay + m_InitialEventNameOverriden: 0 m_StartSeed: 0 m_ResetSeedOnPlay: 1 m_PropertySheet: @@ -561,79 +515,31 @@ VisualEffect: m_Array: [] m_Bool: m_Array: [] ---- !u!4 &1887993416 +--- !u!4 &2032884369 Transform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1887993413} + m_GameObject: {fileID: 2032884366} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 1.3705232, y: -0.5122871, z: -2.6827726} + m_LocalPosition: {x: 1.370523, y: -0.5122871, z: -2.682773} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 4 + m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1887993417 +--- !u!114 &2032884370 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1887993413} + m_GameObject: {fileID: 2032884366} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 62c79e23b2d434c13ae7445473d7b5c4, type: 3} m_Name: m_EditorClassIdentifier: - streamEffect: {fileID: 1887993415} + streamEffect: {fileID: 2032884368} deviceIndex: 0 ---- !u!1 &2147131948 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2147131950} - - component: {fileID: 2147131949} - m_Layer: 8 - m_Name: Post Processing Settings - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &2147131949 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2147131948} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 172515602e62fb746b5d573b38a5fe58, type: 3} - m_Name: - m_EditorClassIdentifier: - isGlobal: 1 - priority: -1 - blendDistance: 0 - weight: 1 - sharedProfile: {fileID: 11400000, guid: 0904b06389a0ca142ae72fe1effad808, type: 2} ---- !u!4 &2147131950 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2147131948} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 6.1293297, y: -3.9060338, z: 7.00498} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Assets/LiveStreaming.unity.meta b/Assets/LiveStreaming.unity.meta index e9d82d4..769a050 100644 --- a/Assets/LiveStreaming.unity.meta +++ b/Assets/LiveStreaming.unity.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 4ec4907ceac8746959bf12b50347dfd7 +guid: 4372d355f38874e3382aeacbbbaafdd1 DefaultImporter: externalObjects: {} userData: diff --git a/Assets/Record3D_Simple_Streaming.vfx b/Assets/Record3D_Simple_Streaming.vfx index 82b223e..fd850f8 100644 --- a/Assets/Record3D_Simple_Streaming.vfx +++ b/Assets/Record3D_Simple_Streaming.vfx @@ -29,6 +29,10 @@ MonoBehaviour: - link: - context: {fileID: 114946465509916290} slotIndex: 0 + loopDuration: 0 + loopCount: 0 + delayBeforeLoop: 0 + delayAfterLoop: 0 --- !u!114 &114063133802684794 MonoBehaviour: m_ObjectHideFlags: 1 @@ -60,12 +64,14 @@ MonoBehaviour: m_OutputFlowSlot: - link: [] blendMode: 0 + useAlphaClipping: 0 + generateMotionVector: 0 m_SubOutputs: - {fileID: 8926484042661614540} cullMode: 0 zWriteMode: 0 zTestMode: 0 - colorMappingMode: 0 + colorMapping: 0 uvMode: 0 useSoftParticle: 0 sortPriority: 0 @@ -73,6 +79,8 @@ MonoBehaviour: indirectDraw: 0 castShadows: 0 useExposureWeight: 0 + shaderGraph: {fileID: 0} + shadergraphGUID: primitiveType: 1 useGeometryShader: 0 --- !u!114 &114158099937248418 @@ -106,7 +114,13 @@ MonoBehaviour: m_serializedType: m_SerializableType: UnityEngine.Texture2D, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - attributes: [] + attributes: + - m_Type: 3 + m_Min: -Infinity + m_Max: Infinity + m_Tooltip: Specifies the base color (RGB) and opacity (A) of the particle. + m_Regex: + m_RegexMaxLength: 0 m_Direction: 0 m_LinkedSlots: [] --- !u!114 &114307113894698210 @@ -140,9 +154,16 @@ MonoBehaviour: m_Property: name: bounds m_serializedType: - m_SerializableType: UnityEditor.VFX.AABox, Unity.VisualEffectGraph.Editor, Version=0.0.0.0, - Culture=neutral, PublicKeyToken=null - attributes: [] + m_SerializableType: UnityEditor.VFX.AABox, Unity.VisualEffectGraph.Editor, + Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + attributes: + - m_Type: 3 + m_Min: -Infinity + m_Max: Infinity + m_Tooltip: The culling bounds of this system. The Visual Effect is only visible + if the bounding box specified here is visible to the camera. + m_Regex: + m_RegexMaxLength: 0 m_Direction: 0 m_LinkedSlots: [] --- !u!114 &114340500867371532 @@ -170,7 +191,8 @@ MonoBehaviour: save these settings): - 1. Render Settings -> Procedural Sky -> uncheck Exposure + 1. Render Settings -> Procedural Sky -> uncheck + Exposure 2. Post Processing Settings -> uncheck Exposure' @@ -186,17 +208,17 @@ MonoBehaviour: contents: "You need to have an iPhone or iPad with FaceID to be able to live-stream.\n\n0. Make sure you have installed iTunes (on Linux, you will need to install libusbmuxd-dev package \u2014 should be installed on Ubuntu by default, no action needed).\n\n1. - Download Record3D from the App Store \u2014 visit https://record3d.app for link\n\n2. - Connect your iPhone or iPad into your computer via USB cable (Points are streamed - via USB).\n\nNOTE, PRE-ALPHA VERSION LIMITATION: make sure only one iOS device - is connected to your computer via USB!\n\n3. Open Record3D, go to the Settings - tab and enable \"USB Streaming Mode\" (purchase required)\n\n4. Go to the Record - tab and press the circular red toggle button (you should see \"Started, Waiting - for Connection\" message on your iPhone/iPad)\n\n5. Press the \"Play\" button - in Unity and wait\n\n6. Live stream should appear. You can now press the \"Play\" - button again and the live stream will continue in the Unity Editor\n\n\nYou - can contact me at support@record3d.app if you have any questions or encounter - problems." + Download Record3D from the App Store \u2014 visit https://record3d.app for + link\n\n2. Connect your iPhone or iPad into your computer via USB cable (Points + are streamed via USB).\n\nNOTE, PRE-ALPHA VERSION LIMITATION: make sure only + one iOS device is connected to your computer via USB!\n\n3. Open Record3D, + go to the Settings tab and enable \"USB Streaming Mode\" (purchase required)\n\n4. + Go to the Record tab and press the circular red toggle button (you should see + \"Started, Waiting for Connection\" message on your iPhone/iPad)\n\n5. Press + the \"Play\" button in Unity and wait\n\n6. Live stream should appear. You + can now press the \"Play\" button again and the live stream will continue in + the Unity Editor\n\n\nYou can contact me at support@record3d.app if you have + any questions or encounter problems." theme: Classic textSize: Small systemInfos: [] @@ -206,7 +228,7 @@ MonoBehaviour: x: 264 y: -190 width: 1322 - height: 1416 + height: 1431 --- !u!114 &114350483966674976 MonoBehaviour: m_ObjectHideFlags: 1 @@ -262,8 +284,8 @@ MonoBehaviour: min: -Infinity max: Infinity descendantCount: 0 - - name: Num Particles Per Frame - path: Num Particles Per Frame + - name: Number of Particles + path: Number of Particles tooltip: sheetType: m_Int realType: Int32 @@ -288,7 +310,7 @@ MonoBehaviour: min: -Infinity max: Infinity descendantCount: 0 - m_GraphVersion: 2 + m_GraphVersion: 4 m_saved: 1 m_SubgraphDependencies: [] m_CategoryPath: @@ -347,7 +369,10 @@ MonoBehaviour: - {fileID: 114946465509916290} - {fileID: 8926484042661614579} - {fileID: 114063133802684794} - m_Capacity: 307200 + dataType: 0 + capacity: 307200 + stripCapacity: 16 + particlePerStripCount: 16 m_Space: 0 --- !u!114 &114512514798047786 MonoBehaviour: @@ -456,7 +481,7 @@ MonoBehaviour: - m_Type: 3 m_Min: -Infinity m_Max: Infinity - m_Tooltip: Spawn Rate (in number per seconds) + m_Tooltip: Sets the number of particles to be spawned per second. m_Regex: m_RegexMaxLength: 0 m_Direction: 0 @@ -483,6 +508,7 @@ MonoBehaviour: m_OutputSlots: [] m_Disabled: 0 mode: 0 + axes: 4 --- !u!114 &114739294351936256 MonoBehaviour: m_ObjectHideFlags: 1 @@ -673,7 +699,7 @@ MonoBehaviour: - m_Type: 3 m_Min: -Infinity m_Max: Infinity - m_Tooltip: The size of the box along each axis. + m_Tooltip: Sets the size of the box along each axis. m_Regex: m_RegexMaxLength: 0 m_Direction: 0 @@ -715,7 +741,7 @@ MonoBehaviour: - m_Type: 3 m_Min: -Infinity m_Max: Infinity - m_Tooltip: The centre of the box. + m_Tooltip: Sets the center of the box. m_Regex: m_RegexMaxLength: 0 m_Direction: 0 @@ -730,257 +756,619 @@ VisualEffectResource: m_Graph: {fileID: 114350483966674976} m_ShaderSources: - compute: 1 - name: '[System 1]Initialize' - source: "#pragma kernel CSMain\n#define NB_THREADS_PER_GROUP 64\n#define VFX_USE_POSITION_CURRENT - 1\n#define VFX_USE_PARTICLEID_CURRENT 1\n#define VFX_USE_COLOR_CURRENT 1\n#define - VFX_USE_LIFETIME_CURRENT 1\n#define VFX_USE_ALIVE_CURRENT 1\n#define VFX_USE_AGE_CURRENT - 1\n#define VFX_LOCAL_SPACE 1\n#include \"Packages/com.unity.visualeffectgraph/Shaders/RenderPipeline/HDRP/VFXDefines.hlsl\"\n\n\nCBUFFER_START(parameters)\n - \ float Lifetime_c;\n uint3 PADDING_0;\nCBUFFER_END\nTexture2D attributeMap_a;\nSamplerState - samplerattributeMap_a;\nTexture2D attributeMap_b;\nSamplerState samplerattributeMap_b;\n\n\n#include - \"Packages/com.unity.visualeffectgraph/Shaders/Common/VFXCommonCompute.cginc\"\n#include - \"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.cginc\"\n\n\n\nRWByteAddressBuffer - attributeBuffer;\nByteAddressBuffer sourceAttributeBuffer;\n\nCBUFFER_START(initParams)\n#if - !VFX_USE_SPAWNER_FROM_GPU\n uint nbSpawned;\t\t\t\t\t// Numbers of particle - spawned\n uint spawnIndex;\t\t\t\t// Index of the first particle spawned\n - \ uint dispatchWidth;\n#else\n uint offsetInAdditionalOutput;\n\tuint nbMax;\n#endif\n\tuint - systemSeed;\nCBUFFER_END\n\n#if VFX_USE_ALIVE_CURRENT\nRWStructuredBuffer - deadListIn;\nByteAddressBuffer deadListCount; // This is bad to use a SRV to - fetch deadList count but Unity API currently prevent from copying to CB\n#endif\n\n#if - VFX_USE_SPAWNER_FROM_GPU\nStructuredBuffer eventList;\nByteAddressBuffer - inputAdditional;\n#endif\n\nvoid AttributeFromMap_6F6C36D5(inout float3 position, - uint particleId, VFXSampler2D attributeMap, uint Seed, float3 valueBias, float3 - valueScale) /*attribute:position Composition:Overwrite SampleMode:RandomConstantPerParticle - channels:XYZ */\n{\n \n uint width, height;\n attributeMap.t.GetDimensions(width, - height);\n uint count = width * height;\n uint id = FIXED_RAND(Seed) * - count;\n uint y = id / width;\n uint x = id - y * width;\n float3 value - = (float3)attributeMap.t.Load(int3(x, y, 0));\n value = (value + valueBias) - * valueScale;\n position = value;\n}\nvoid AttributeFromMap_9AACC55(inout + name: '[System 1]Initialize Particle' + source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES + 1\n#define VFX_PASSDEPTH_ACTUAL (0)\n#define VFX_PASSDEPTH_MOTION_VECTOR (1)\n#define + VFX_PASSDEPTH_SELECTION (2)\n#define VFX_USE_POSITION_CURRENT 1\n#define VFX_USE_PARTICLEID_CURRENT + 1\n#define VFX_USE_COLOR_CURRENT 1\n#define VFX_USE_LIFETIME_CURRENT 1\n#define + VFX_USE_ALIVE_CURRENT 1\n#define VFX_USE_AGE_CURRENT 1\n#define VFX_LOCAL_SPACE + 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\r\nCBUFFER_START(parameters)\n + float Lifetime_c;\n uint3 PADDING_0;\nCBUFFER_END\n\nstruct Attributes\n{\n + float3 position;\n uint particleId;\n float3 color;\n float lifetime;\n + bool alive;\n float age;\n};\n\nstruct SourceAttributes\n{\n};\n\nTexture2D + attributeMap_a;\nSamplerState samplerattributeMap_a;\nfloat4 attributeMap_a_TexelSize;\n\nTexture2D + attributeMap_b;\nSamplerState samplerattributeMap_b;\nfloat4 attributeMap_b_TexelSize;\n\n\n\r\n\r\n#define + USE_DEAD_LIST (VFX_USE_ALIVE_CURRENT && !HAS_STRIPS)\r\n\r\nRWByteAddressBuffer + attributeBuffer;\r\nByteAddressBuffer sourceAttributeBuffer;\r\n\r\nCBUFFER_START(initParams)\r\n#if + !VFX_USE_SPAWNER_FROM_GPU\r\n uint nbSpawned;\t\t\t\t\t// Numbers of particle + spawned\r\n uint spawnIndex;\t\t\t\t// Index of the first particle spawned\r\n + uint dispatchWidth;\r\n#else\r\n uint offsetInAdditionalOutput;\r\n\tuint + nbMax;\r\n#endif\r\n\tuint systemSeed;\r\nCBUFFER_END\r\n\r\n#if USE_DEAD_LIST\r\nRWStructuredBuffer + deadListIn;\r\nByteAddressBuffer deadListCount; // This is bad to use a SRV + to fetch deadList count but Unity API currently prevent from copying to CB\r\n#endif\r\n\r\n#if + VFX_USE_SPAWNER_FROM_GPU\r\nStructuredBuffer eventList;\r\nByteAddressBuffer + inputAdditional;\r\n#endif\r\n\r\n#if HAS_STRIPS\r\nRWBuffer stripDataBuffer;\r\n#endif\r\n\r\n#include + \"Packages/com.unity.visualeffectgraph/Shaders/Common/VFXCommonCompute.hlsl\"\n#include + \"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\r\n\r\nvoid + AttributeFromMap_6F6C36D5(inout float3 position, uint particleId, VFXSampler2D + attributeMap, uint Seed, float3 valueBias, float3 valueScale) /*attribute:position + Composition:Overwrite SampleMode:RandomConstantPerParticle channels:XYZ */\n{\n + \r\n uint width, height;\r\n attributeMap.t.GetDimensions(width, height);\r\n + uint count = width * height;\r\n uint id = FIXED_RAND(Seed) * count;\r\n + uint y = id / width;\r\n uint x = id - y * width;\r\n float3 value = + (float3)attributeMap.t.Load(int3(x, y, 0));\r\n value = (value + valueBias) + * valueScale;\r\n position = value;\n}\nvoid AttributeFromMap_9AACC55(inout float3 color, uint particleId, VFXSampler2D attributeMap, uint Seed, float3 valueBias, float3 valueScale) /*attribute:color Composition:Overwrite SampleMode:RandomConstantPerParticle - channels:XYZ */\n{\n \n uint width, height;\n attributeMap.t.GetDimensions(width, - height);\n uint count = width * height;\n uint id = FIXED_RAND(Seed) * - count;\n uint y = id / width;\n uint x = id - y * width;\n float3 value - = (float3)attributeMap.t.Load(int3(x, y, 0));\n value = (value + valueBias) - * valueScale;\n color = value;\n}\nvoid SetAttribute_F0142CB9(inout float - lifetime, float Lifetime) /*attribute:lifetime Composition:Overwrite Source:Slot - Random:Off channels:XYZ */\n{\n lifetime = Lifetime;\n}\n\n\n\n[numthreads(NB_THREADS_PER_GROUP,1,1)]\nvoid - CSMain(uint3 groupId : SV_GroupID,\n uint3 groupThreadId - \ : SV_GroupThreadID)\n{\n uint id = groupThreadId.x + groupId.x * NB_THREADS_PER_GROUP;\n#if - !VFX_USE_SPAWNER_FROM_GPU\n id += groupId.y * dispatchWidth * NB_THREADS_PER_GROUP;\n#endif\n\n#if - VFX_USE_SPAWNER_FROM_GPU\n uint maxThreadId = inputAdditional.Load((offsetInAdditionalOutput - * 2 + 0) << 2);\n uint currentSpawnIndex = inputAdditional.Load((offsetInAdditionalOutput - * 2 + 1) << 2) - maxThreadId;\n#else\n uint maxThreadId = nbSpawned;\n uint - currentSpawnIndex = spawnIndex;\n#endif\n\n#if VFX_USE_ALIVE_CURRENT\n maxThreadId - = min(maxThreadId, deadListCount.Load(0x0));\n#elif VFX_USE_SPAWNER_FROM_GPU\n - \ maxThreadId = min(maxThreadId, nbMax); //otherwise, nbSpawned already clamped - on CPU\n#endif\n\n if (id < maxThreadId)\n {\n#if VFX_USE_SPAWNER_FROM_GPU\n - \ int sourceIndex = eventList[id];\n#endif\n uint particleIndex - = id + currentSpawnIndex;\n\t\t\n#if !VFX_USE_SPAWNER_FROM_GPU\n int + channels:XYZ */\n{\n \r\n uint width, height;\r\n attributeMap.t.GetDimensions(width, + height);\r\n uint count = width * height;\r\n uint id = FIXED_RAND(Seed) + * count;\r\n uint y = id / width;\r\n uint x = id - y * width;\r\n + float3 value = (float3)attributeMap.t.Load(int3(x, y, 0));\r\n value = (value + + valueBias) * valueScale;\r\n color = value;\n}\nvoid SetAttribute_F0142CB9(inout + float lifetime, float Lifetime) /*attribute:lifetime Composition:Overwrite + Source:Slot Random:Off channels:XYZ */\n{\n lifetime = Lifetime;\n}\n\n\r\n\r\n#if + HAS_STRIPS\r\nbool GetParticleIndex(inout uint particleIndex, uint stripIndex)\r\n{\r\n\tuint + relativeIndex;\r\n\tInterlockedAdd(STRIP_DATA(STRIP_NEXT_INDEX, stripIndex), + 1, relativeIndex);\r\n\tif (relativeIndex >= PARTICLE_PER_STRIP_COUNT) // strip + is full\r\n\t{\r\n\t\tInterlockedAdd(STRIP_DATA(STRIP_NEXT_INDEX, stripIndex), + -1); // Remove previous increment\r\n\t\treturn false;\r\n\t}\r\n\r\n\tparticleIndex + = stripIndex * PARTICLE_PER_STRIP_COUNT + ((STRIP_DATA(STRIP_FIRST_INDEX, stripIndex) + + relativeIndex) % PARTICLE_PER_STRIP_COUNT);\r\n return true;\r\n}\r\n#endif\r\n\r\n[numthreads(NB_THREADS_PER_GROUP,1,1)]\r\nvoid + CSMain(uint3 groupId : SV_GroupID,\r\n uint3 groupThreadId + : SV_GroupThreadID)\r\n{\r\n uint id = groupThreadId.x + groupId.x * NB_THREADS_PER_GROUP;\r\n#if + !VFX_USE_SPAWNER_FROM_GPU\r\n id += groupId.y * dispatchWidth * NB_THREADS_PER_GROUP;\r\n#endif\r\n\r\n#if + VFX_USE_SPAWNER_FROM_GPU\r\n uint maxThreadId = inputAdditional.Load((offsetInAdditionalOutput + * 2 + 0) << 2);\r\n uint currentSpawnIndex = inputAdditional.Load((offsetInAdditionalOutput + * 2 + 1) << 2) - maxThreadId;\r\n#else\r\n uint maxThreadId = nbSpawned;\r\n + uint currentSpawnIndex = spawnIndex;\r\n#endif\r\n\r\n#if USE_DEAD_LIST\r\n + maxThreadId = min(maxThreadId, deadListCount.Load(0x0));\r\n#elif VFX_USE_SPAWNER_FROM_GPU\r\n + maxThreadId = min(maxThreadId, nbMax); //otherwise, nbSpawned already clamped + on CPU\r\n#endif\r\n\r\n if (id < maxThreadId)\r\n {\r\n#if VFX_USE_SPAWNER_FROM_GPU\r\n + int sourceIndex = eventList[id];\r\n#endif\r\n\t\tuint particleIndex = id + + currentSpawnIndex;\r\n\t\t\r\n#if !VFX_USE_SPAWNER_FROM_GPU\r\n int sourceIndex = 0;\n /*//Loop with 1 iteration generate a wrong IL Assembly - (and actually, useless code)\n uint currentSumSpawnCount = 0u;\n for - (sourceIndex=0; sourceIndex<1; sourceIndex++)\n {\n currentSumSpawnCount - += uint(asfloat(sourceAttributeBuffer.Load((sourceIndex * 0x1 + 0x0) << 2)));\n - \ if (id < currentSumSpawnCount)\n {\n break;\n - \ }\n }\n */\n \n\n#endif\n float3 position - = float3(0,0,0);\n uint particleId = (uint)0;\n float3 color = - float3(1,1,1);\n float lifetime = (float)1;\n bool alive = (bool)true;\n - \ float age = (float)0;\n \n\n#if VFX_USE_PARTICLEID_CURRENT\n - \ particleId = particleIndex;\n#endif\n#if VFX_USE_SEED_CURRENT\n seed - = WangHash(particleIndex ^ systemSeed);\n#endif\n \n {\n AttributeFromMap_6F6C36D5( - /*inout */position, particleId, GetVFXSampler(attributeMap_a, samplerattributeMap_a), - (uint)0, float3(0,0,0), float3(1,1,1));\n }\n {\n AttributeFromMap_9AACC55( - /*inout */color, particleId, GetVFXSampler(attributeMap_b, samplerattributeMap_b), - (uint)0, float3(0,0,0), float3(1,1,1));\n }\n SetAttribute_F0142CB9( - /*inout */lifetime, Lifetime_c);\n \n\n\n#if VFX_USE_ALIVE_CURRENT\n - \ if (alive)\n {\n\t\t\tuint deadIndex = deadListIn.DecrementCounter();\n - \ uint index = deadListIn[deadIndex];\n attributeBuffer.Store3((index - * 0x8 + 0x0) << 2,asuint(position));\n attributeBuffer.Store3((index - * 0x8 + 0x4) << 2,asuint(color));\n attributeBuffer.Store((index - * 0x1 + 0x258000) << 2,asuint(lifetime));\n attributeBuffer.Store((index - * 0x1 + 0x2A3000) << 2,uint(alive));\n attributeBuffer.Store((index - * 0x1 + 0x2EE000) << 2,asuint(age));\n \n\n }\n#else\n uint - index = particleIndex;\n attributeBuffer.Store3((index * 0x8 + 0x0) << - 2,asuint(position));\n attributeBuffer.Store3((index * 0x8 + 0x4) << - 2,asuint(color));\n attributeBuffer.Store((index * 0x1 + 0x258000) << - 2,asuint(lifetime));\n attributeBuffer.Store((index * 0x1 + 0x2A3000) - << 2,uint(alive));\n attributeBuffer.Store((index * 0x1 + 0x2EE000) << - 2,asuint(age));\n \n\n#endif\n }\n}\n" + (and actually, useless code)\n uint currentSumSpawnCount = 0u;\n + for (sourceIndex=0; sourceIndex<1; sourceIndex++)\n {\n currentSumSpawnCount + += uint(asfloat(sourceAttributeBuffer.Load((sourceIndex * 0x1 + 0x0) << 2)));\n + if (id < currentSumSpawnCount)\n {\n break;\n + }\n }\n */\n \n\r\n#endif\r\n\r\n\t\tAttributes attributes + = (Attributes)0;\r\n\t\tSourceAttributes sourceAttributes = (SourceAttributes)0;\r\n\t\t\r\n + attributes.position = float3(0, 0, 0);\n attributes.particleId = (uint)0;\n + attributes.color = float3(1, 1, 1);\n attributes.lifetime = (float)1;\n + attributes.alive = (bool)true;\n attributes.age = (float)0;\n + \n\r\n#if VFX_USE_PARTICLEID_CURRENT\r\n attributes.particleId = particleIndex;\r\n#endif\r\n#if + VFX_USE_SEED_CURRENT\r\n attributes.seed = WangHash(particleIndex ^ + systemSeed);\r\n#endif\r\n#if VFX_USE_SPAWNINDEX_CURRENT\r\n attributes.spawnIndex + = id;\r\n#endif\r\n#if HAS_STRIPS\r\n#if !VFX_USE_SPAWNER_FROM_GPU\r\n\t\t\r\n#else\r\n + uint stripIndex = sourceIndex;\r\n#endif\r\n\t\tstripIndex = min(stripIndex, + STRIP_COUNT);\r\n\r\n if (!GetParticleIndex(particleIndex, stripIndex))\r\n + return;\r\n\r\n const StripData stripData = GetStripDataFromStripIndex(stripIndex, + PARTICLE_PER_STRIP_COUNT);\r\n\t\tInitStripAttributes(particleIndex, attributes, + stripData);\r\n\t\t// TODO Change seed to be sure we're deterministic on random + with strip\r\n#endif\r\n \r\n {\n AttributeFromMap_6F6C36D5( + /*inout */attributes.position, attributes.particleId, GetVFXSampler(attributeMap_a, + samplerattributeMap_a), (uint)0, float3(0, 0, 0), float3(1, 1, 1));\n + }\n {\n AttributeFromMap_9AACC55( /*inout */attributes.color, + attributes.particleId, GetVFXSampler(attributeMap_b, samplerattributeMap_b), + (uint)0, float3(0, 0, 0), float3(1, 1, 1));\n }\n SetAttribute_F0142CB9( + /*inout */attributes.lifetime, Lifetime_c);\n \n\r\n\t\t\r\n#if VFX_USE_ALIVE_CURRENT\r\n + if (attributes.alive)\r\n#endif \r\n {\r\n#if USE_DEAD_LIST\r\n\t + uint deadIndex = deadListIn.DecrementCounter();\r\n uint index = + deadListIn[deadIndex];\r\n#else\r\n uint index = particleIndex;\r\n#endif\r\n + attributeBuffer.Store3((index * 0x8 + 0x0) << 2,asuint(attributes.position));\n + attributeBuffer.Store3((index * 0x8 + 0x4) << 2,asuint(attributes.color));\n + attributeBuffer.Store((index * 0x1 + 0x258000) << 2,asuint(attributes.lifetime));\n + attributeBuffer.Store((index * 0x1 + 0x2A3000) << 2,uint(attributes.alive));\n + attributeBuffer.Store((index * 0x1 + 0x2EE000) << 2,asuint(attributes.age));\n + \n\r\n }\r\n }\r\n}\r\n" - compute: 1 - name: '[System 1]Update' - source: "#pragma kernel CSMain\n#define NB_THREADS_PER_GROUP 64\n#define VFX_USE_LIFETIME_CURRENT - 1\n#define VFX_USE_ALIVE_CURRENT 1\n#define VFX_USE_AGE_CURRENT 1\n#define VFX_LOCAL_SPACE - 1\n#include \"Packages/com.unity.visualeffectgraph/Shaders/RenderPipeline/HDRP/VFXDefines.hlsl\"\n\n\nCBUFFER_START(parameters)\n - \ float deltaTime_a;\n uint3 PADDING_0;\nCBUFFER_END\n\n\n#include \"Packages/com.unity.visualeffectgraph/Shaders/Common/VFXCommonCompute.cginc\"\n#include - \"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.cginc\"\n\n\n\nRWByteAddressBuffer - attributeBuffer;\n\n#if VFX_USE_ALIVE_CURRENT\nRWStructuredBuffer deadListOut;\n#endif\n\n#if - VFX_HAS_INDIRECT_DRAW\nRWStructuredBuffer indirectBuffer;\n#endif\n\nCBUFFER_START(updateParams)\n - \ uint nbMax;\n\tuint dispatchWidth;\n\tuint systemSeed;\nCBUFFER_END\n\nvoid + name: '[System 1]Update Particle' + source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES + 1\n#define VFX_PASSDEPTH_ACTUAL (0)\n#define VFX_PASSDEPTH_MOTION_VECTOR (1)\n#define + VFX_PASSDEPTH_SELECTION (2)\n#define VFX_USE_LIFETIME_CURRENT 1\n#define VFX_USE_ALIVE_CURRENT + 1\n#define VFX_USE_AGE_CURRENT 1\n#define VFX_LOCAL_SPACE 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\r\nCBUFFER_START(parameters)\n + float deltaTime_a;\n uint3 PADDING_0;\nCBUFFER_END\n\nstruct Attributes\n{\n + float lifetime;\n bool alive;\n float age;\n};\n\nstruct SourceAttributes\n{\n};\n\n\n\r\n\r\n#define + USE_DEAD_LIST (VFX_USE_ALIVE_CURRENT && !HAS_STRIPS)\r\n\r\nRWByteAddressBuffer + attributeBuffer;\r\n\r\n#if USE_DEAD_LIST\r\nRWStructuredBuffer deadListOut;\r\n#endif\r\n\r\n#if + VFX_HAS_INDIRECT_DRAW\r\nRWStructuredBuffer indirectBuffer;\r\n#endif\r\n\r\n#if + HAS_STRIPS\r\nRWBuffer stripDataBuffer;\r\n#endif\r\n\r\n#if VFX_USE_STRIPALIVE_CURRENT\r\nBuffer + attachedStripDataBuffer;\r\n#endif\r\n\r\nCBUFFER_START(updateParams)\r\n + uint nbMax;\r\n\tuint dispatchWidth;\r\n\tuint systemSeed;\r\nCBUFFER_END\r\n\r\n#include + \"Packages/com.unity.visualeffectgraph/Shaders/Common/VFXCommonCompute.hlsl\"\n#include + \"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\r\n\r\nvoid Age(inout float age, float deltaTime)\n{\n age += deltaTime;\n}\nvoid Reap(float age, float lifetime, inout bool alive)\n{\n if(age > lifetime) { alive = - false; }\n}\n\n\n\n[numthreads(NB_THREADS_PER_GROUP,1,1)]\nvoid CSMain(uint3 - groupId : SV_GroupID,\n uint3 groupThreadId : SV_GroupThreadID)\n{\n\tuint + false; }\n}\n\n\r\n\r\n[numthreads(NB_THREADS_PER_GROUP,1,1)]\r\nvoid CSMain(uint3 + groupId : SV_GroupID,\r\n uint3 groupThreadId : SV_GroupThreadID)\r\n{\r\n\tuint id = groupThreadId.x + groupId.x * NB_THREADS_PER_GROUP + groupId.y * dispatchWidth - * NB_THREADS_PER_GROUP;\n\tuint index = id;\n\tif (id < nbMax)\n\t{\n#if VFX_USE_ALIVE_CURRENT\n\t\tbool - alive = (attributeBuffer.Load((index * 0x1 + 0x2A3000) << 2));\n\t\t\n\n\t\tif - (alive)\n\t\t{\n\t\t\tfloat lifetime = asfloat(attributeBuffer.Load((index * - 0x1 + 0x258000) << 2));\n\t\t\tfloat age = asfloat(attributeBuffer.Load((index - * 0x1 + 0x2EE000) << 2));\n\t\t\t\n\n\t\t\t\n#if VFX_USE_OLDPOSITION_CURRENT\n\t\t\toldPosition - = position;\n#endif\n\t\t\t\n\t\t\tAge( /*inout */age, deltaTime_a);\n\t\t\tReap(age, - lifetime, /*inout */alive);\n\t\t\t\n\n\t\t\tif (alive)\n\t\t\t{\n\t\t\t\tattributeBuffer.Store((index - * 0x1 + 0x2EE000) << 2,asuint(age));\n\t\t\t\t\n\n#if VFX_HAS_INDIRECT_DRAW\n - \ uint indirectIndex = indirectBuffer.IncrementCounter();\n\t\t\t\tindirectBuffer[indirectIndex] - = index;\n#endif\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tattributeBuffer.Store((index - * 0x1 + 0x2A3000) << 2,uint(alive));\n\t\t\t\t\n\n\t\t\t\tuint deadIndex = deadListOut.IncrementCounter();\n\t\t\t\tdeadListOut[deadIndex] - = index;\n\t\t\t}\n\t\t}\n#else\n\t\tfloat lifetime = asfloat(attributeBuffer.Load((index - * 0x1 + 0x258000) << 2));\n\t\tbool alive = (attributeBuffer.Load((index * 0x1 - + 0x2A3000) << 2));\n\t\tfloat age = asfloat(attributeBuffer.Load((index * 0x1 - + 0x2EE000) << 2));\n\t\t\n\n\t\t\n#if VFX_USE_OLDPOSITION_CURRENT\n\t\toldPosition - = position;\n#endif\n\t\t\n\t\tAge( /*inout */age, deltaTime_a);\n\t\tReap(age, - lifetime, /*inout */alive);\n\t\t\n\n\t\tattributeBuffer.Store((index * 0x1 - + 0x2A3000) << 2,uint(alive));\n\t\tattributeBuffer.Store((index * 0x1 + 0x2EE000) - << 2,asuint(age));\n\t\t\n\n#if VFX_HAS_INDIRECT_DRAW\n uint indirectIndex - = indirectBuffer.IncrementCounter();\n\t\tindirectBuffer[indirectIndex] = index;\n#endif\n#endif\n\t}\n}\n" + * NB_THREADS_PER_GROUP;\r\n\tuint index = id;\r\n\tif (id < nbMax)\r\n\t{\r\n + Attributes attributes = (Attributes)0;\r\n\t\tSourceAttributes sourceAttributes + = (SourceAttributes)0;\r\n\r\n#if VFX_USE_ALIVE_CURRENT\r\n\t\tattributes.alive + = (attributeBuffer.Load((index * 0x1 + 0x2A3000) << 2));\n\t\t\n\r\n\t\tif + (attributes.alive)\r\n\t\t{\r\n\t\t\tattributes.lifetime = asfloat(attributeBuffer.Load((index + * 0x1 + 0x258000) << 2));\n\t\t\tattributes.age = asfloat(attributeBuffer.Load((index + * 0x1 + 0x2EE000) << 2));\n\t\t\t\n\r\n\r\n// Initialize built-in needed attributes\r\n#if + VFX_USE_OLDPOSITION_CURRENT\r\n\t\t\tattributes.oldPosition = attributes.position;\r\n#endif\r\n#if + HAS_STRIPS\r\n const StripData stripData = GetStripDataFromParticleIndex(index, + PARTICLE_PER_STRIP_COUNT);\r\n InitStripAttributes(index, attributes, + stripData);\r\n#endif\r\n\t\t\t\r\n\t\t\tAge( /*inout */attributes.age, deltaTime_a);\n\t\t\tReap(attributes.age, + attributes.lifetime, /*inout */attributes.alive);\n\t\t\t\n\r\n\r\n\t\t\tif + (attributes.alive)\r\n\t\t\t{\r\n\t\t\t\tattributeBuffer.Store((index * 0x1 + + 0x2EE000) << 2,asuint(attributes.age));\n\t\t\t\t\n\r\n#if VFX_HAS_INDIRECT_DRAW\r\n + uint indirectIndex = indirectBuffer.IncrementCounter();\r\n\t\t\t\tindirectBuffer[indirectIndex] + = index;\r\n#endif\r\n\r\n#if HAS_STRIPS\t\t\t\r\n\t\t\t\tuint relativeIndexInStrip + = GetRelativeIndex(index, stripData);\r\n\t\t\t\tInterlockedMin(STRIP_DATA(STRIP_MIN_ALIVE, + stripData.stripIndex), relativeIndexInStrip);\r\n\t\t\t\tInterlockedMax(STRIP_DATA(STRIP_MAX_ALIVE, + stripData.stripIndex), relativeIndexInStrip);\r\n#endif\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tattributeBuffer.Store((index + * 0x1 + 0x2A3000) << 2,uint(attributes.alive));\n\t\t\t\t\n\r\n#if USE_DEAD_LIST + && !VFX_USE_STRIPALIVE_CURRENT\r\n\t\t\t\tuint deadIndex = deadListOut.IncrementCounter();\r\n\t\t\t\tdeadListOut[deadIndex] + = index;\r\n#endif\r\n\t\t\t}\r\n\t\t}\r\n#if USE_DEAD_LIST && VFX_USE_STRIPALIVE_CURRENT\r\n + else if (attributes.stripAlive)\r\n {\r\n if (STRIP_DATA_X(attachedStripDataBuffer, + STRIP_MIN_ALIVE, index) == ~1) // Attached strip is no longer alive, recycle + the particle \r\n {\r\n uint deadIndex = deadListOut.IncrementCounter();\r\n\t\t\t\tdeadListOut[deadIndex] + = index;\r\n attributes.stripAlive = false;\r\n + \r\n } \r\n }\r\n#endif\r\n#else\r\n\t\tattributes.lifetime + = asfloat(attributeBuffer.Load((index * 0x1 + 0x258000) << 2));\n\t\tattributes.alive + = (attributeBuffer.Load((index * 0x1 + 0x2A3000) << 2));\n\t\tattributes.age + = asfloat(attributeBuffer.Load((index * 0x1 + 0x2EE000) << 2));\n\t\t\n\r\n\t\t\r\n#if + VFX_USE_OLDPOSITION_CURRENT\r\n\t\tattributes.oldPosition = attributes.position;\r\n#endif\r\n#if + HAS_STRIPS\r\n const StripData stripData = GetStripDataFromParticleIndex(index, + PARTICLE_PER_STRIP_COUNT);\r\n InitStripAttributes(index, attributes, + stripData);\r\n#endif\r\n\t\t\r\n\t\tAge( /*inout */attributes.age, deltaTime_a);\n\t\tReap(attributes.age, + attributes.lifetime, /*inout */attributes.alive);\n\t\t\n\r\n\t\tattributeBuffer.Store((index + * 0x1 + 0x2A3000) << 2,uint(attributes.alive));\n\t\tattributeBuffer.Store((index + * 0x1 + 0x2EE000) << 2,asuint(attributes.age));\n\t\t\n\r\n#if VFX_HAS_INDIRECT_DRAW\r\n + uint indirectIndex = indirectBuffer.IncrementCounter();\r\n\t\tindirectBuffer[indirectIndex] + = index;\r\n#endif\r\n#endif\r\n\t}\r\n}\r\n" - compute: 0 - name: '[System 1]Quad Output' - source: "Shader \"Hidden/VFX/System 1/Quad Output\"\n{\n\tSubShader\n\t{\t\n\t\tCull - Off\n\t\t\n\t\tTags { \"Queue\"=\"Transparent+0\" \"IgnoreProjector\"=\"True\" - \"RenderType\"=\"Transparent\" }\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tBlend - SrcAlpha One \n\t\tZTest LEqual\n\t\tZWrite Off\n\t\tCull Off\n\t\t\n\t\n\t\t\t\n\t\tHLSLINCLUDE\n\t\t#if - !defined(VFX_WORLD_SPACE) && !defined(VFX_LOCAL_SPACE)\n\t\t#define VFX_LOCAL_SPACE - 1\n\t\t#endif\n\t\t\n\t\t#define NB_THREADS_PER_GROUP 64\n\t\t#define VFX_USE_POSITION_CURRENT - 1\n\t\t#define VFX_USE_COLOR_CURRENT 1\n\t\t#define VFX_USE_ALPHA_CURRENT 1\n\t\t#define - VFX_USE_ALIVE_CURRENT 1\n\t\t#define VFX_USE_AXISX_CURRENT 1\n\t\t#define VFX_USE_AXISY_CURRENT - 1\n\t\t#define VFX_USE_AXISZ_CURRENT 1\n\t\t#define VFX_USE_ANGLEX_CURRENT 1\n\t\t#define - VFX_USE_ANGLEY_CURRENT 1\n\t\t#define VFX_USE_ANGLEZ_CURRENT 1\n\t\t#define - VFX_USE_PIVOTX_CURRENT 1\n\t\t#define VFX_USE_PIVOTY_CURRENT 1\n\t\t#define - VFX_USE_PIVOTZ_CURRENT 1\n\t\t#define VFX_USE_SIZE_CURRENT 1\n\t\t#define VFX_USE_SCALEX_CURRENT - 1\n\t\t#define VFX_USE_SCALEY_CURRENT 1\n\t\t#define VFX_USE_SCALEZ_CURRENT - 1\n\t\t#define VFX_COLORMAPPING_DEFAULT 1\n\t\t#define IS_TRANSPARENT_PARTICLE - 1\n\t\t#define VFX_BLENDMODE_ADD 1\n\t\t#define VFX_PRIMITIVE_QUAD 1\n\t\t\n\t\t\n\t\t\n\t\t#define - VFX_LOCAL_SPACE 1\n\t\t#include \"Packages/com.unity.visualeffectgraph/Shaders/RenderPipeline/HDRP/VFXDefines.hlsl\"\n\t\t\n\n\t\tTexture2D - mainTexture;\n\t\tSamplerState samplermainTexture;\n\t\t\n\n\t\t\n\t\t#define - VFX_NEEDS_COLOR_INTERPOLATOR (VFX_USE_COLOR_CURRENT || VFX_USE_ALPHA_CURRENT)\n\t\t\n\t\tByteAddressBuffer - attributeBuffer;\t\n\t\t\n\t\t#if VFX_HAS_INDIRECT_DRAW\n\t\tStructuredBuffer - indirectBuffer;\t\n\t\t#endif\t\n\t\t\n\t\t#if USE_DEAD_LIST_COUNT\n\t\tByteAddressBuffer - deadListCount;\n\t\t#endif\n\t\t\n\t\tCBUFFER_START(outputParams)\n\t\t\tfloat - nbMax;\n\t\t\tfloat systemSeed;\n\t\tCBUFFER_END\n\t\t\n\t\tENDHLSL\n\t\t\n\n\t\t\n\t\t// - Forward pass\n\t\tPass\n\t\t{\t\t\n\t\t\tTags { \"LightMode\"=\"ForwardOnly\" - }\n\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#pragma target 4.5\n\t\t\t\n\t\t\n\t\t\tstruct - ps_input\n\t\t\t{\n\t\t\t\tfloat4 pos : SV_POSITION;\n\t\t\t\t#if USE_FLIPBOOK_INTERPOLATION\n\t\t\t\tfloat4 - uv : TEXCOORD0;\n\t\t\t\t#else\n\t\t\t\tfloat2 uv : TEXCOORD0;\t\n\t\t\t\t#endif\n\t\t\t\t#if - VFX_NEEDS_COLOR_INTERPOLATOR\n\t\t\t\tnointerpolation float4 color : COLOR0;\n\t\t\t\t#endif\n\t\t\t\t#if - USE_SOFT_PARTICLE || USE_ALPHA_TEST || USE_FLIPBOOK_INTERPOLATION || USE_EXPOSURE_WEIGHT\n\t\t\t\t// - x: inverse soft particles fade distance\n\t\t\t\t// y: alpha threshold\n\t\t\t\t// - z: frame blending factor\n\t\t\t\t// w: exposure weight\n\t\t\t\tnointerpolation - float4 builtInInterpolants : TEXCOORD1;\n\t\t\t\t#endif\n\t\t\t\t#if USE_FLIPBOOK_MOTIONVECTORS\n\t\t\t\t// - x: motion vectors scale X\n\t\t\t\t// y: motion vectors scale Y\n\t\t\t\tnointerpolation - float2 builtInInterpolants2 : TEXCOORD2;\n\t\t\t\t#endif\n\t\t\t\t#if VFX_NEEDS_POSWS_INTERPOLATOR\n\t\t\t\tfloat3 - posWS : TEXCOORD3;\n\t\t\t\t#endif\n\t\t\t};\n\t\t\t\n\t\t\tstruct ps_output\n\t\t\t{\n\t\t\t\tfloat4 - color : SV_Target0;\n\t\t\t};\n\t\t\n\t\t#define VFX_VARYING_PS_INPUTS ps_input\n\t\t#define - VFX_VARYING_POSCS pos\n\t\t#define VFX_VARYING_COLOR color.rgb\n\t\t#define - VFX_VARYING_ALPHA color.a\n\t\t#define VFX_VARYING_INVSOFTPARTICLEFADEDISTANCE - builtInInterpolants.x\n\t\t#define VFX_VARYING_ALPHATHRESHOLD builtInInterpolants.y\n\t\t#define - VFX_VARYING_FRAMEBLEND builtInInterpolants.z\n\t\t#define VFX_VARYING_MOTIONVECTORSCALE - builtInInterpolants2.xy\n\t\t#define VFX_VARYING_UV uv\n\t\t#if VFX_NEEDS_POSWS_INTERPOLATOR\n\t\t#define - VFX_VARYING_POSWS posWS\n\t\t#endif\n\t\t#if USE_EXPOSURE_WEIGHT\n\t\t#define - VFX_VARYING_EXPOSUREWEIGHT builtInInterpolants.w\n\t\t#endif\n\t\t\t\t\n\t\t\t#if - !(defined(VFX_VARYING_PS_INPUTS) && defined(VFX_VARYING_POSCS))\n\t\t\t#error - VFX_VARYING_PS_INPUTS, VFX_VARYING_POSCS and VFX_VARYING_UV must be defined.\n\t\t\t#endif\n\t\t\t\n\t\t\t#include - \"Packages/com.unity.visualeffectgraph/Shaders/RenderPipeline/HDRP/VFXCommon.cginc\"\n\t\t\t#include - \"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.cginc\"\n\t\t\t\n\n\t\t\tvoid - Orient_0(inout float3 axisX, inout float3 axisY, inout float3 axisZ) /*mode:FaceCameraPlane - */\n\t\t\t{\n\t\t\t \n\t\t\t float3x3 viewRot = GetVFXToViewRotMatrix();\n\t\t\t - \ axisX = viewRot[0].xyz;\n\t\t\t axisY = viewRot[1].xyz;\n\t\t\t #if - VFX_LOCAL_SPACE // Need to remove potential scale in local transform\n\t\t\t - \ axisX = normalize(axisX);\n\t\t\t axisY = normalize(axisY);\n\t\t\t axisZ - = cross(axisX,axisY);\n\t\t\t #else\n\t\t\t axisZ = -viewRot[2].xyz;\n\t\t\t - \ #endif\n\t\t\t \n\t\t\t}\n\t\t\tvoid SetAttribute_3278B22F(inout float + name: '[System 1]Output Particle Quad' + source: "Shader \"Hidden/VFX/Record3D_Simple_Streaming/System 1/Output Particle + Quad\"\n{\r\n\tSubShader\r\n\t{\t\r\n\t\tCull Off\r\n\t\t\r\n\t\tTags { \"Queue\"=\"Transparent+0\" + \"IgnoreProjector\"=\"True\" \"RenderType\"=\"Transparent\" }\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\n\t\t\r\n\t\tBlend + SrcAlpha One \n\t\tZTest LEqual\n\t\tZWrite Off\n\t\tCull Off\n\t\t\n\t\r\n\t\t\t\r\n\t\tHLSLINCLUDE\r\n\t\t\r\n\t\t#define + NB_THREADS_PER_GROUP 64\n\t\t#define HAS_ATTRIBUTES 1\n\t\t#define VFX_PASSDEPTH_ACTUAL + (0)\n\t\t#define VFX_PASSDEPTH_MOTION_VECTOR (1)\n\t\t#define VFX_PASSDEPTH_SELECTION + (2)\n\t\t#define VFX_USE_POSITION_CURRENT 1\n\t\t#define VFX_USE_COLOR_CURRENT + 1\n\t\t#define VFX_USE_ALPHA_CURRENT 1\n\t\t#define VFX_USE_ALIVE_CURRENT 1\n\t\t#define + VFX_USE_AXISX_CURRENT 1\n\t\t#define VFX_USE_AXISY_CURRENT 1\n\t\t#define VFX_USE_AXISZ_CURRENT + 1\n\t\t#define VFX_USE_ANGLEX_CURRENT 1\n\t\t#define VFX_USE_ANGLEY_CURRENT + 1\n\t\t#define VFX_USE_ANGLEZ_CURRENT 1\n\t\t#define VFX_USE_PIVOTX_CURRENT + 1\n\t\t#define VFX_USE_PIVOTY_CURRENT 1\n\t\t#define VFX_USE_PIVOTZ_CURRENT + 1\n\t\t#define VFX_USE_SIZE_CURRENT 1\n\t\t#define VFX_USE_SCALEX_CURRENT 1\n\t\t#define + VFX_USE_SCALEY_CURRENT 1\n\t\t#define VFX_USE_SCALEZ_CURRENT 1\n\t\t#define + VFX_COLORMAPPING_DEFAULT 1\n\t\t#define IS_TRANSPARENT_PARTICLE 1\n\t\t#define + VFX_BLENDMODE_ADD 1\n\t\t#define VFX_BYPASS_EXPOSURE 1\n\t\t#define VFX_PRIMITIVE_QUAD + 1\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t#define + VFX_LOCAL_SPACE 1\n\t\t#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\t\t\n\r\n\t\t\n\t\tstruct + Attributes\n\t\t{\n\t\t float3 position;\n\t\t float3 color;\n\t\t + float alpha;\n\t\t bool alive;\n\t\t float3 axisX;\n\t\t float3 axisY;\n\t\t + float3 axisZ;\n\t\t float angleX;\n\t\t float angleY;\n\t\t float + angleZ;\n\t\t float pivotX;\n\t\t float pivotY;\n\t\t float pivotZ;\n\t\t + float size;\n\t\t float scaleX;\n\t\t float scaleY;\n\t\t float scaleZ;\n\t\t};\n\t\t\n\t\tstruct + SourceAttributes\n\t\t{\n\t\t};\n\t\t\n\t\tTexture2D mainTexture;\n\t\tSamplerState + samplermainTexture;\n\t\tfloat4 mainTexture_TexelSize;\n\t\t\n\t\t\n\r\n\t\t\r\n\t\t#define + VFX_NEEDS_COLOR_INTERPOLATOR (VFX_USE_COLOR_CURRENT || VFX_USE_ALPHA_CURRENT)\r\n\t\t#if + HAS_STRIPS\r\n\t\t#define VFX_OPTIONAL_INTERPOLATION \r\n\t\t#else\r\n\t\t#define + VFX_OPTIONAL_INTERPOLATION nointerpolation\r\n\t\t#endif\r\n\t\t\r\n\t\tByteAddressBuffer + attributeBuffer;\t\r\n\t\t\r\n\t\t#if VFX_HAS_INDIRECT_DRAW\r\n\t\tStructuredBuffer + indirectBuffer;\t\r\n\t\t#endif\t\r\n\t\t\r\n\t\t#if USE_DEAD_LIST_COUNT\r\n\t\tByteAddressBuffer + deadListCount;\r\n\t\t#endif\r\n\t\t\r\n\t\t#if HAS_STRIPS\r\n\t\tBuffer + stripDataBuffer;\r\n\t\t#endif\r\n\t\t\r\n\t\t#if WRITE_MOTION_VECTOR_IN_FORWARD + || USE_MOTION_VECTORS_PASS\r\n\t\tByteAddressBuffer elementToVFXBufferPrevious;\r\n\t\t#endif\r\n\t\t\r\n\t\tCBUFFER_START(outputParams)\r\n\t\t\tfloat + nbMax;\r\n\t\t\tfloat systemSeed;\r\n\t\tCBUFFER_END\r\n\t\t\r\n\t\t// Helper + macros to always use a valid instanceID\r\n\t\t#if defined(UNITY_STEREO_INSTANCING_ENABLED)\r\n\t\t\t#define + VFX_DECLARE_INSTANCE_ID UNITY_VERTEX_INPUT_INSTANCE_ID\r\n\t\t\t#define + VFX_GET_INSTANCE_ID(i) unity_InstanceID\r\n\t\t#else\r\n\t\t\t#define + VFX_DECLARE_INSTANCE_ID uint instanceID : SV_InstanceID;\r\n\t\t\t#define + VFX_GET_INSTANCE_ID(i) i.instanceID\r\n\t\t#endif\r\n\t\t\r\n\t\tENDHLSL\r\n\t\t\n\r\n\t\tPass\r\n\t\t{\t\t\r\n\t\t\tTags + { \"LightMode\"=\"SceneSelectionPass\" }\r\n\t\t\r\n\t\t\tZWrite On\r\n\t\t\tBlend + Off\r\n\t\t\t\r\n\t\t\tHLSLPROGRAM\r\n\t\t\t#define VFX_PASSDEPTH VFX_PASSDEPTH_SELECTION\r\n\t\t\t#pragma + target 4.5\r\n\t\t\t\r\n\t\t\tstruct ps_input\r\n\t\t\t{\r\n\t\t\t\tfloat4 + pos : SV_POSITION;\r\n\t\t\t\t#if USE_FLIPBOOK_INTERPOLATION\r\n\t\t\t\tfloat4 + uv : TEXCOORD0;\r\n\t\t\t\t#else\r\n\t\t\t\tfloat2 uv : TEXCOORD0;\t\r\n\t\t\t\t#endif\r\n\t\t\t\t#if + USE_ALPHA_TEST || USE_FLIPBOOK_INTERPOLATION || VFX_USE_ALPHA_CURRENT\r\n\t\t\t\t// + x: alpha threshold\r\n\t\t\t\t// y: frame blending factor\r\n\t\t\t\t// z: + alpha\r\n\t\t\t\tVFX_OPTIONAL_INTERPOLATION float3 builtInInterpolants : TEXCOORD1;\r\n\t\t\t\t#endif\r\n\t\t\t\t\r\n\t\t\t\t#if + USE_FLIPBOOK_MOTIONVECTORS\r\n\t\t\t\t// x: motion vectors scale X\r\n\t\t\t\t// + y: motion vectors scale Y\r\n\t\t\t\tVFX_OPTIONAL_INTERPOLATION float2 builtInInterpolants2 + : TEXCOORD2;\r\n\t\t\t\t#endif\r\n\t\t\t\t\r\n\t\t\t\t#if VFX_PASSDEPTH == + VFX_PASSDEPTH_MOTION_VECTOR\r\n\t\t\t\tfloat4 cPosPrevious : TEXCOORD3;\r\n\t\t\t\tfloat4 + cPosNonJiterred : TEXCOORD4;\r\n\t\t\t\t#endif\r\n\t\t\t \r\n\t\t\t #if + VFX_NEEDS_POSWS_INTERPOLATOR\r\n\t\t\t float3 posWS : TEXCOORD5;\r\n\t\t\t + #endif\r\n\t\t\t \r\n\t\t\t\t\r\n\t\t\t\tUNITY_VERTEX_OUTPUT_STEREO\r\n\t\t\t};\r\n\t\t\t\r\n\t\t\t#define + VFX_VARYING_PS_INPUTS ps_input\r\n\t\t\t#define VFX_VARYING_POSCS pos\r\n\t\t\t#define + VFX_VARYING_ALPHA builtInInterpolants.z\r\n\t\t\t#define VFX_VARYING_ALPHATHRESHOLD + builtInInterpolants.x\r\n\t\t\t#define VFX_VARYING_FRAMEBLEND builtInInterpolants.y\r\n\t\t\t#define + VFX_VARYING_MOTIONVECTORSCALE builtInInterpolants2.xy\r\n\t\t\t#define VFX_VARYING_UV + uv\r\n\t\t\t\r\n\t\t\t#if VFX_NEEDS_POSWS_INTERPOLATOR\r\n\t\t\t#define VFX_VARYING_POSWS + posWS\r\n\t\t\t#endif\r\n\t\t\t\r\n\t\t\t#if VFX_PASSDEPTH == VFX_PASSDEPTH_MOTION_VECTOR\r\n\t\t\t#define + VFX_VARYING_VELOCITY_CPOS cPosNonJiterred\r\n\t\t\t#define VFX_VARYING_VELOCITY_CPOS_PREVIOUS + cPosPrevious\r\n\t\t\t#endif\r\n\t\t\t\r\n\t\t\t#if VFX_PASSDEPTH == VFX_PASSDEPTH_MOTION_VECTOR\r\n\t\t\t#define + SHADERPASS SHADERPASS_MOTION_VECTORS\r\n\t\t\t#else\r\n\t\t\t#define SHADERPASS + SHADERPASS_DEPTH_ONLY\r\n\t\t\t#endif\r\n\t\t\t#if !(defined(VFX_VARYING_PS_INPUTS) + && defined(VFX_VARYING_POSCS))\r\n\t\t\t#error VFX_VARYING_PS_INPUTS, VFX_VARYING_POSCS + and VFX_VARYING_UV must be defined.\r\n\t\t\t#endif\r\n\t\t\t\r\n\t\t\t#include + \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXCommon.hlsl\"\n\t\t\t#include + \"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\t\t\t\n\r\n\t\t\tvoid + Orient_4(inout float3 axisX, inout float3 axisY, inout float3 axisZ) /*mode:FaceCameraPlane + axes:ZY */\n\t\t\t{\n\t\t\t \r\n\t\t\t float3x3 viewRot = GetVFXToViewRotMatrix();\r\n\t\t\t + axisX = viewRot[0].xyz;\r\n\t\t\t axisY = viewRot[1].xyz;\r\n\t\t\t #if + VFX_LOCAL_SPACE // Need to remove potential scale in local transform\r\n\t\t\t + axisX = normalize(axisX);\r\n\t\t\t axisY = normalize(axisY);\r\n\t\t\t + axisZ = cross(axisX,axisY);\r\n\t\t\t #else\r\n\t\t\t axisZ = -viewRot[2].xyz;\r\n\t\t\t + #endif\r\n\t\t\t \n\t\t\t}\n\t\t\tvoid SetAttribute_3278B22F(inout float size, float Size) /*attribute:size Composition:Overwrite Source:Slot Random:Off - channels:XYZ */\n\t\t\t{\n\t\t\t size = Size;\n\t\t\t}\n\t\t\t\n\n\t\t\t\n\t\t\t#pragma - vertex vert\n\t\t\tVFX_VARYING_PS_INPUTS vert(uint id : SV_VertexID, uint instanceID - : SV_InstanceID)\n\t\t\t{\n\t\t\t#if VFX_PRIMITIVE_TRIANGLE\n\t\t\t\tuint index - = id / 3;\n\t\t\t#elif VFX_PRIMITIVE_QUAD\n\t\t\t\tuint index = (id >> 2) + - instanceID * 2048;\n\t\t\t#elif VFX_PRIMITIVE_OCTAGON\n\t\t\t\tuint index = - (id >> 3) + instanceID * 1024;\n\t\t\t#endif\n\t\t\t\n\t\t\t\tVFX_VARYING_PS_INPUTS - o = (VFX_VARYING_PS_INPUTS)0;\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\tuint deadCount - = 0;\n\t\t\t\t\t\t#if USE_DEAD_LIST_COUNT\n\t\t\t\t\t\tdeadCount = deadListCount.Load(0);\n\t\t\t\t\t\t#endif\t\n\t\t\t\t\t\tif - (index >= asuint(nbMax) - deadCount)\n\t\t\t\t\t\t#if USE_GEOMETRY_SHADER\n\t\t\t\t\t\t\treturn; - // cull\n\t\t\t\t\t\t#else\n\t\t\t\t\t\t\treturn o; // cull\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\t\t#if - VFX_HAS_INDIRECT_DRAW\n\t\t\t\t\t\tindex = indirectBuffer[index];\n\t\t\t\t\t\tfloat3 - position = asfloat(attributeBuffer.Load3((index * 0x8 + 0x0) << 2));\n\t\t\t\t\t\tfloat3 - color = asfloat(attributeBuffer.Load3((index * 0x8 + 0x4) << 2));\n\t\t\t\t\t\tfloat - alpha = (float)1;\n\t\t\t\t\t\tbool alive = (attributeBuffer.Load((index * 0x1 - + 0x2A3000) << 2));\n\t\t\t\t\t\tfloat3 axisX = float3(1,0,0);\n\t\t\t\t\t\tfloat3 - axisY = float3(0,1,0);\n\t\t\t\t\t\tfloat3 axisZ = float3(0,0,1);\n\t\t\t\t\t\tfloat - angleX = (float)0;\n\t\t\t\t\t\tfloat angleY = (float)0;\n\t\t\t\t\t\tfloat - angleZ = (float)0;\n\t\t\t\t\t\tfloat pivotX = (float)0;\n\t\t\t\t\t\tfloat - pivotY = (float)0;\n\t\t\t\t\t\tfloat pivotZ = (float)0;\n\t\t\t\t\t\tfloat - size = (float)0.1;\n\t\t\t\t\t\tfloat scaleX = (float)1;\n\t\t\t\t\t\tfloat - scaleY = (float)1;\n\t\t\t\t\t\tfloat scaleZ = (float)1;\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t#else\n\t\t\t\t\t\tbool - alive = (attributeBuffer.Load((index * 0x1 + 0x2A3000) << 2));\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\tif - (!alive)\n\t\t\t\t\t\t\treturn o;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tfloat3 position - = asfloat(attributeBuffer.Load3((index * 0x8 + 0x0) << 2));\n\t\t\t\t\t\tfloat3 - color = asfloat(attributeBuffer.Load3((index * 0x8 + 0x4) << 2));\n\t\t\t\t\t\tfloat - alpha = (float)1;\n\t\t\t\t\t\tfloat3 axisX = float3(1,0,0);\n\t\t\t\t\t\tfloat3 - axisY = float3(0,1,0);\n\t\t\t\t\t\tfloat3 axisZ = float3(0,0,1);\n\t\t\t\t\t\tfloat - angleX = (float)0;\n\t\t\t\t\t\tfloat angleY = (float)0;\n\t\t\t\t\t\tfloat - angleZ = (float)0;\n\t\t\t\t\t\tfloat pivotX = (float)0;\n\t\t\t\t\t\tfloat - pivotY = (float)0;\n\t\t\t\t\t\tfloat pivotZ = (float)0;\n\t\t\t\t\t\tfloat - size = (float)0.1;\n\t\t\t\t\t\tfloat scaleX = (float)1;\n\t\t\t\t\t\tfloat - scaleY = (float)1;\n\t\t\t\t\t\tfloat scaleZ = (float)1;\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\tOrient_0( - /*inout */axisX, /*inout */axisY, /*inout */axisZ);\n\t\t\t\t{\n\t\t\t\t SetAttribute_3278B22F( - /*inout */size, (float)0.003);\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\tif - (!alive)\n\t\t\t\t\treturn o;\n\t\t\t\t\n\t\t\t#if VFX_PRIMITIVE_QUAD\n\t\t\t\n\t\t\t\to.VFX_VARYING_UV.x - = float(id & 1);\n\t\t\t\to.VFX_VARYING_UV.y = float((id & 2) >> 1);\n\t\t\t\tconst - float2 vOffsets = o.VFX_VARYING_UV.xy - 0.5f;\n\t\t\t\t\n\t\t\t#elif VFX_PRIMITIVE_TRIANGLE\n\t\t\t\n\t\t\t\tconst - float2 kOffsets[] = {\n\t\t\t\t\tfloat2(-0.5f, \t-0.288675129413604736328125f),\n\t\t\t\t\tfloat2(0.0f, - \t0.57735025882720947265625f),\n\t\t\t\t\tfloat2(0.5f,\t-0.288675129413604736328125f),\n\t\t\t\t};\n\t\t\t\t\n\t\t\t\tconst - float kUVScale = 0.866025388240814208984375f;\n\t\t\t\t\n\t\t\t\tconst float2 - vOffsets = kOffsets[id % 3];\n\t\t\t\to.VFX_VARYING_UV.xy = (vOffsets * kUVScale) - + 0.5f;\n\t\t\t\t\n\t\t\t#elif VFX_PRIMITIVE_OCTAGON\t\n\t\t\t\t\n\t\t\t\tconst - float2 kUvs[8] = \n\t\t\t\t{\n\t\t\t\t\tfloat2(-0.5f,\t0.0f),\n\t\t\t\t\tfloat2(-0.5f,\t0.5f),\n\t\t\t\t\tfloat2(0.0f,\t0.5f),\n\t\t\t\t\tfloat2(0.5f,\t0.5f),\n\t\t\t\t\tfloat2(0.5f,\t0.0f),\n\t\t\t\t\tfloat2(0.5f,\t-0.5f),\n\t\t\t\t\tfloat2(0.0f,\t-0.5f),\n\t\t\t\t\tfloat2(-0.5f,\t-0.5f),\n\t\t\t\t};\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tcropFactor - = id & 1 ? 1.0f - cropFactor : 1.0f;\n\t\t\t\tconst float2 vOffsets = kUvs[id - & 7] * cropFactor;\n\t\t\t\to.VFX_VARYING_UV.xy = vOffsets + 0.5f;\n\t\t\t\t\n\t\t\t#endif\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\tfloat3 - size3 = float3(size,size,size);\n\t\t\t\t\t\t#if VFX_USE_SCALEX_CURRENT\n\t\t\t\t\t\tsize3.x - *= scaleX;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t#if VFX_USE_SCALEY_CURRENT\n\t\t\t\t\t\tsize3.y - *= scaleY;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t#if VFX_USE_SCALEZ_CURRENT\n\t\t\t\t\t\tsize3.z - *= scaleZ;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\tconst float4x4 - elementToVFX = GetElementToVFXMatrix(axisX,axisY,axisZ,float3(angleX,angleY,angleZ),float3(pivotX,pivotY,pivotZ),size3,position);\n\t\t\t\tfloat3 - vPos = mul(elementToVFX,float4(vOffsets,0.0f,1.0f)).xyz;\n\t\t\t\n\t\t\t\to.VFX_VARYING_POSCS - = TransformPositionVFXToClip(vPos);\n\t\t\t\n\t\t\t\tfloat3 normalWS = normalize(TransformDirectionVFXToWorld(normalize(-transpose(elementToVFX)[2].xyz)));\n\t\t\t\t#ifdef - VFX_VARYING_NORMAL\n\t\t\t\tfloat normalFlip = (size3.x * size3.y * size3.z) - < 0 ? -1 : 1;\n\t\t\t\to.VFX_VARYING_NORMAL = normalFlip * normalWS;\n\t\t\t\t#endif\n\t\t\t\t#ifdef - VFX_VARYING_TANGENT\n\t\t\t\to.VFX_VARYING_TANGENT = normalize(TransformDirectionVFXToWorld(normalize(transpose(elementToVFX)[0].xyz)));\n\t\t\t\t#endif\n\t\t\t\t#ifdef - VFX_VARYING_BENTFACTORS\n\t\t\t\t\n\t\t\t\to.VFX_VARYING_BENTFACTORS = vOffsets - * bentNormalFactor;\n\t\t\t\t#endif\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t#if VFX_USE_COLOR_CURRENT - && defined(VFX_VARYING_COLOR)\n\t\t\t\t\t\to.VFX_VARYING_COLOR = color;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t#if - VFX_USE_ALPHA_CURRENT && defined(VFX_VARYING_ALPHA) \n\t\t\t\t\t\to.VFX_VARYING_ALPHA - = alpha;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\t\t#ifdef VFX_VARYING_EXPOSUREWEIGHT\n\t\t\t\t\t\t\n\t\t\t\t\t\to.VFX_VARYING_EXPOSUREWEIGHT - = exposureWeight;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\t\t#if USE_SOFT_PARTICLE - && defined(VFX_VARYING_INVSOFTPARTICLEFADEDISTANCE)\n\t\t\t\t\t\t\n\t\t\t\t\t\to.VFX_VARYING_INVSOFTPARTICLEFADEDISTANCE - = invSoftParticlesFadeDistance;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\t\t#if - USE_ALPHA_TEST && defined(VFX_VARYING_ALPHATHRESHOLD)\n\t\t\t\t\t\t\n\t\t\t\t\t\to.VFX_VARYING_ALPHATHRESHOLD - = alphaThreshold;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\t\t#if USE_UV_SCALE_BIAS\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\to.VFX_VARYING_UV.xy - = o.VFX_VARYING_UV.xy * uvScale + uvBias;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\t\t#if - defined(VFX_VARYING_POSWS)\n\t\t\t\t\t\to.VFX_VARYING_POSWS = TransformPositionVFXToWorld(vPos);\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t#if - USE_FLIPBOOK\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tVFXUVData uvData = GetUVData(flipBookSize, - invFlipBookSize, o.VFX_VARYING_UV.xy, texIndex);\n\t\t\t\t\t\to.VFX_VARYING_UV.xy - = uvData.uvs.xy;\n\t\t\t\t\t\t#if USE_FLIPBOOK_INTERPOLATION\n\t\t\t\t\t\to.VFX_VARYING_UV.zw - = uvData.uvs.zw;\n\t\t\t\t\t\to.VFX_VARYING_FRAMEBLEND = uvData.blend;\n\t\t\t\t\t\t#if - USE_FLIPBOOK_MOTIONVECTORS\n\t\t\t\t\t\t\n\t\t\t\t\t\to.VFX_VARYING_MOTIONVECTORSCALE - = motionVectorScale * invFlipBookSize;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\treturn - o;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t#include - \"Packages/com.unity.visualeffectgraph/Shaders/VFXCommonOutput.cginc\"\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t#pragma - fragment frag\n\t\t\tps_output frag(ps_input i)\n\t\t\t{\n\t\t\t\tps_output - o = (ps_output)0;\n\t\t\t\tVFXTransformPSInputs(i);\n\t\t\t\n\t\t\t\t#define - VFX_TEXTURE_COLOR VFXGetTextureColor(VFX_SAMPLER(mainTexture),i)\n\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tfloat4 - color = VFXGetFragmentColor(i);\n\t\t\t\t\t\t\n\t\t\t\t\t\t#ifndef VFX_TEXTURE_COLOR\n\t\t\t\t\t\t\t#define - VFX_TEXTURE_COLOR float4(1.0,1.0,1.0,1.0)\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\t\t#if - VFX_COLORMAPPING_DEFAULT\n\t\t\t\t\t\t\to.color = color * VFX_TEXTURE_COLOR;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\t\t#if - VFX_COLORMAPPING_GRADIENTMAPPED\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\to.color = SampleGradient(gradient, - VFX_TEXTURE_COLOR.a * color.a) * float4(color.rgb,1.0);\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\n\t\t\t\to.color - = VFXApplyPreExposure(o.color, i);\n\t\t\t\to.color = VFXApplyFog(o.color,i);\n\t\t\t\tVFXClipFragmentColor(o.color.a,i);\n\t\t\t\to.color.a - = saturate(o.color.a);\n\t\t\t\treturn o;\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\t\n\t}\n}\n" + channels:XYZ */\n\t\t\t{\n\t\t\t size = Size;\n\t\t\t}\n\t\t\t\n\r\n\t\t\t\r\n\t\t\t#if + defined(HAS_STRIPS) && !defined(VFX_PRIMITIVE_QUAD)\r\n\t\t\t#error VFX_PRIMITIVE_QUAD + must be defined when HAS_STRIPS is.\r\n\t\t\t#endif\r\n\t\t\t\r\n\t\t\tstruct + vs_input\r\n\t\t\t{\r\n\t\t\t\tVFX_DECLARE_INSTANCE_ID\r\n\t\t\t};\r\n\t\t\t\r\n\t\t\t#if + HAS_STRIPS\r\n\t\t\t#define PARTICLE_IN_EDGE (id & 1)\r\n\t\t\t\r\n\t\t\tfloat3 + GetParticlePosition(uint index)\r\n\t\t\t{\r\n\t\t\t\tstruct Attributes attributes + = (Attributes)0;\r\n\t\t\t\tattributes.position = asfloat(attributeBuffer.Load3((index + * 0x8 + 0x0) << 2));\n\t\t\t\t\n\r\n\t\t\t\treturn attributes.position;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tfloat3 + GetStripTangent(float3 currentPos, uint relativeIndex, const StripData stripData)\r\n\t\t\t{\r\n\t\t\t\tfloat3 + prevTangent = (float3)0.0f;\r\n\t\t\t\tif (relativeIndex > 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tuint + prevIndex = GetParticleIndex(relativeIndex - 1,stripData);\r\n\t\t\t\t\tprevTangent + = normalize(currentPos - GetParticlePosition(prevIndex));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tfloat3 + nextTangent = (float3)0.0f;\r\n\t\t\t\tif (relativeIndex < stripData.nextIndex + - 1)\r\n\t\t\t\t{\r\n\t\t\t\t\tuint nextIndex = GetParticleIndex(relativeIndex + + 1,stripData);\r\n\t\t\t\t\tnextTangent = normalize(GetParticlePosition(nextIndex) + - currentPos);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn normalize(prevTangent + + nextTangent);\r\n\t\t\t}\r\n\t\t\t#endif\r\n\t\t\t\r\n\t\t\t#pragma vertex + vert\r\n\t\t\tVFX_VARYING_PS_INPUTS vert(uint id : SV_VertexID, vs_input i)\r\n\t\t\t{\r\n\t\t\t\tVFX_VARYING_PS_INPUTS + o = (VFX_VARYING_PS_INPUTS)0;\r\n\t\t\t\r\n\t\t\t\tUNITY_SETUP_INSTANCE_ID(i);\r\n\t\t\t\tUNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);\r\n\t\t\t\r\n\t\t\t#if + VFX_PRIMITIVE_TRIANGLE\r\n\t\t\t\tuint index = id / 3;\r\n\t\t\t#elif VFX_PRIMITIVE_QUAD\r\n\t\t\t#if + HAS_STRIPS\r\n\t\t\t\tid += VFX_GET_INSTANCE_ID(i) * 8192;\r\n\t\t\t\tconst + uint vertexPerStripCount = (PARTICLE_PER_STRIP_COUNT - 1) << 2;\r\n\t\t\t\tconst + StripData stripData = GetStripDataFromStripIndex(id / vertexPerStripCount, + PARTICLE_PER_STRIP_COUNT);\r\n\t\t\t\tuint currentIndex = ((id % vertexPerStripCount) + >> 2) + (id & 1); // relative index of particle\r\n\t\t\t\t\r\n\t\t\t\tuint + maxEdgeIndex = currentIndex - PARTICLE_IN_EDGE + 1;\r\n\t\t\t\tif (maxEdgeIndex + >= stripData.nextIndex)\r\n\t\t\t\t\treturn o;\r\n\t\t\t\t\r\n\t\t\t\tuint + index = GetParticleIndex(currentIndex, stripData);\r\n\t\t\t#else\r\n\t\t\t\tuint + index = (id >> 2) + VFX_GET_INSTANCE_ID(i) * 2048;\r\n\t\t\t#endif\r\n\t\t\t#elif + VFX_PRIMITIVE_OCTAGON\r\n\t\t\t\tuint index = (id >> 3) + VFX_GET_INSTANCE_ID(i) + * 1024;\r\n\t\t\t#endif\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\tuint deadCount + = 0;\r\n\t\t\t\t\t\t#if USE_DEAD_LIST_COUNT\r\n\t\t\t\t\t\tdeadCount = deadListCount.Load(0);\r\n\t\t\t\t\t\t#endif\t\r\n\t\t\t\t\t\tif + (index >= asuint(nbMax) - deadCount)\r\n\t\t\t\t\t\t#if USE_GEOMETRY_SHADER\r\n\t\t\t\t\t\t\treturn; + // cull\r\n\t\t\t\t\t\t#else\r\n\t\t\t\t\t\t\treturn o; // cull\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tAttributes + attributes = (Attributes)0;\r\n\t\t\t\t\t\tSourceAttributes sourceAttributes + = (SourceAttributes)0;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t#if VFX_HAS_INDIRECT_DRAW\r\n\t\t\t\t\t\tindex + = indirectBuffer[index];\r\n\t\t\t\t\t\tattributes.position = asfloat(attributeBuffer.Load3((index + * 0x8 + 0x0) << 2));\n\t\t\t\t\t\tattributes.color = asfloat(attributeBuffer.Load3((index + * 0x8 + 0x4) << 2));\n\t\t\t\t\t\tattributes.alpha = (float)1;\n\t\t\t\t\t\tattributes.alive + = (attributeBuffer.Load((index * 0x1 + 0x2A3000) << 2));\n\t\t\t\t\t\tattributes.axisX + = float3(1, 0, 0);\n\t\t\t\t\t\tattributes.axisY = float3(0, 1, 0);\n\t\t\t\t\t\tattributes.axisZ + = float3(0, 0, 1);\n\t\t\t\t\t\tattributes.angleX = (float)0;\n\t\t\t\t\t\tattributes.angleY + = (float)0;\n\t\t\t\t\t\tattributes.angleZ = (float)0;\n\t\t\t\t\t\tattributes.pivotX + = (float)0;\n\t\t\t\t\t\tattributes.pivotY = (float)0;\n\t\t\t\t\t\tattributes.pivotZ + = (float)0;\n\t\t\t\t\t\tattributes.size = (float)0.100000001;\n\t\t\t\t\t\tattributes.scaleX + = (float)1;\n\t\t\t\t\t\tattributes.scaleY = (float)1;\n\t\t\t\t\t\tattributes.scaleZ + = (float)1;\n\t\t\t\t\t\t\n\t\t\t\t\r\n\t\t\t\t\t\t#else\r\n\t\t\t\t\t\tattributes.alive + = (attributeBuffer.Load((index * 0x1 + 0x2A3000) << 2));\n\t\t\t\t\t\t\n\t\t\t\t\r\n\t\t\t\t\t\t#if + !HAS_STRIPS\r\n\t\t\t\t\t\tif (!attributes.alive)\r\n\t\t\t\t\t\t\treturn o;\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tattributes.position + = asfloat(attributeBuffer.Load3((index * 0x8 + 0x0) << 2));\n\t\t\t\t\t\tattributes.color + = asfloat(attributeBuffer.Load3((index * 0x8 + 0x4) << 2));\n\t\t\t\t\t\tattributes.alpha + = (float)1;\n\t\t\t\t\t\tattributes.axisX = float3(1, 0, 0);\n\t\t\t\t\t\tattributes.axisY + = float3(0, 1, 0);\n\t\t\t\t\t\tattributes.axisZ = float3(0, 0, 1);\n\t\t\t\t\t\tattributes.angleX + = (float)0;\n\t\t\t\t\t\tattributes.angleY = (float)0;\n\t\t\t\t\t\tattributes.angleZ + = (float)0;\n\t\t\t\t\t\tattributes.pivotX = (float)0;\n\t\t\t\t\t\tattributes.pivotY + = (float)0;\n\t\t\t\t\t\tattributes.pivotZ = (float)0;\n\t\t\t\t\t\tattributes.size + = (float)0.100000001;\n\t\t\t\t\t\tattributes.scaleX = (float)1;\n\t\t\t\t\t\tattributes.scaleY + = (float)1;\n\t\t\t\t\t\tattributes.scaleZ = (float)1;\n\t\t\t\t\t\t\n\t\t\t\t\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// + Initialize built-in needed attributes\r\n\t\t\t\t\t\t#if HAS_STRIPS\r\n\t\t\t\t\t\tInitStripAttributes(index, + attributes, stripData);\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\t\r\n\t\t\t\tOrient_4( + /*inout */attributes.axisX, /*inout */attributes.axisY, /*inout */attributes.axisZ);\n\t\t\t\t{\n\t\t\t\t + SetAttribute_3278B22F( /*inout */attributes.size, (float)0.00300000003);\n\t\t\t\t}\n\t\t\t\t\n\r\n\t\t\t\t\r\n\t\t\t#if + !HAS_STRIPS\r\n\t\t\t\tif (!attributes.alive)\r\n\t\t\t\t\treturn o;\r\n\t\t\t#endif\r\n\t\t\t\t\r\n\t\t\t#if + VFX_PRIMITIVE_QUAD\r\n\t\t\t\r\n\t\t\t#if HAS_STRIPS\r\n\t\t\t#if VFX_STRIPS_UV_STRECHED\r\n\t\t\t\to.VFX_VARYING_UV.x + = (float)(currentIndex) / (stripData.nextIndex - 1);\r\n\t\t\t#elif VFX_STRIPS_UV_PER_SEGMENT\r\n\t\t\t\to.VFX_VARYING_UV.x + = PARTICLE_IN_EDGE;\r\n\t\t\t#else\r\n\t\t\t\t\r\n\t\t\t o.VFX_VARYING_UV.x + = texCoord;\r\n\t\t\t#endif\r\n\t\t\t\r\n\t\t\t\to.VFX_VARYING_UV.y = float((id + & 2) >> 1);\r\n\t\t\t\tconst float2 vOffsets = float2(0.0f,o.VFX_VARYING_UV.y + - 0.5f);\r\n\t\t\t\t\r\n\t\t\t#if VFX_STRIPS_SWAP_UV\r\n\t\t\t\to.VFX_VARYING_UV.xy + = float2(1.0f - o.VFX_VARYING_UV.y, o.VFX_VARYING_UV.x);\r\n\t\t\t#endif\r\n\t\t\t\t\r\n\t\t\t\t// + Orient strips along their tangents\r\n\t\t\t\tattributes.axisX = GetStripTangent(attributes.position, + currentIndex, stripData);\r\n\t\t\t#if !VFX_STRIPS_ORIENT_CUSTOM\r\n\t\t\t\tattributes.axisZ + = attributes.position - GetViewVFXPosition();\r\n\t\t\t#endif\r\n\t\t\t\tattributes.axisY + = normalize(cross(attributes.axisZ, attributes.axisX));\r\n\t\t\t\tattributes.axisZ + = normalize(cross(attributes.axisX, attributes.axisY));\r\n\t\t\t\t\r\n\t\t\t#else\r\n\t\t\t\to.VFX_VARYING_UV.x + = float(id & 1);\r\n\t\t\t\to.VFX_VARYING_UV.y = float((id & 2) >> 1);\r\n\t\t\t\tconst + float2 vOffsets = o.VFX_VARYING_UV.xy - 0.5f;\r\n\t\t\t#endif\r\n\t\t\t\t\r\n\t\t\t#elif + VFX_PRIMITIVE_TRIANGLE\r\n\t\t\t\r\n\t\t\t\tconst float2 kOffsets[] = {\r\n\t\t\t\t\tfloat2(-0.5f, + \t-0.288675129413604736328125f),\r\n\t\t\t\t\tfloat2(0.0f, \t0.57735025882720947265625f),\r\n\t\t\t\t\tfloat2(0.5f,\t-0.288675129413604736328125f),\r\n\t\t\t\t};\r\n\t\t\t\t\r\n\t\t\t\tconst + float kUVScale = 0.866025388240814208984375f;\r\n\t\t\t\t\r\n\t\t\t\tconst + float2 vOffsets = kOffsets[id % 3];\r\n\t\t\t\to.VFX_VARYING_UV.xy = (vOffsets + * kUVScale) + 0.5f;\r\n\t\t\t\t\r\n\t\t\t#elif VFX_PRIMITIVE_OCTAGON\t\r\n\t\t\t\t\r\n\t\t\t\tconst + float2 kUvs[8] = \r\n\t\t\t\t{\r\n\t\t\t\t\tfloat2(-0.5f,\t0.0f),\r\n\t\t\t\t\tfloat2(-0.5f,\t0.5f),\r\n\t\t\t\t\tfloat2(0.0f,\t0.5f),\r\n\t\t\t\t\tfloat2(0.5f,\t0.5f),\r\n\t\t\t\t\tfloat2(0.5f,\t0.0f),\r\n\t\t\t\t\tfloat2(0.5f,\t-0.5f),\r\n\t\t\t\t\tfloat2(0.0f,\t-0.5f),\r\n\t\t\t\t\tfloat2(-0.5f,\t-0.5f),\r\n\t\t\t\t};\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tcropFactor + = id & 1 ? 1.0f - cropFactor : 1.0f;\r\n\t\t\t\tconst float2 vOffsets = kUvs[id + & 7] * cropFactor;\r\n\t\t\t\to.VFX_VARYING_UV.xy = vOffsets + 0.5f;\r\n\t\t\t\t\r\n\t\t\t#endif\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\tfloat3 + size3 = float3(attributes.size,attributes.size,attributes.size);\r\n\t\t\t\t\t\t#if + VFX_USE_SCALEX_CURRENT\r\n\t\t\t\t\t\tsize3.x *= attributes.scaleX;\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t#if + VFX_USE_SCALEY_CURRENT\r\n\t\t\t\t\t\tsize3.y *= attributes.scaleY;\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t#if + VFX_USE_SCALEZ_CURRENT\r\n\t\t\t\t\t\tsize3.z *= attributes.scaleZ;\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\r\n\t\t\t#if + HAS_STRIPS\r\n\t\t\t\tsize3 += size3 < 0.0f ? -VFX_EPSILON : VFX_EPSILON; // + Add an epsilon so that size is never 0 for strips\r\n\t\t\t#endif\r\n\t\t\t\t\r\n\t\t\t\tconst + float4x4 elementToVFX = GetElementToVFXMatrix(\r\n\t\t\t\t\tattributes.axisX,\r\n\t\t\t\t\tattributes.axisY,\r\n\t\t\t\t\tattributes.axisZ,\r\n\t\t\t\t\tfloat3(attributes.angleX,attributes.angleY,attributes.angleZ),\r\n\t\t\t\t\tfloat3(attributes.pivotX,attributes.pivotY,attributes.pivotZ),\r\n\t\t\t\t\tsize3,\r\n\t\t\t\t\tattributes.position);\r\n\t\t\t\t\t\r\n\t\t\t\tfloat3 + inputVertexPosition = float3(vOffsets, 0.0f);\r\n\t\t\t\tfloat3 vPos = mul(elementToVFX,float4(inputVertexPosition, + 1.0f)).xyz;\r\n\t\t\t\r\n\t\t\t\to.VFX_VARYING_POSCS = TransformPositionVFXToClip(vPos);\r\n\t\t\t + \r\n\t\t\t float3 vPosWS = TransformPositionVFXToWorld(vPos);\r\n\t\t\t\t\r\n\t\t\t + #ifdef VFX_VARYING_POSWS\r\n\t\t\t o.VFX_VARYING_POSWS = vPosWS;\r\n\t\t\t + #endif\r\n\t\t\t\r\n\t\t\t\tfloat3 normalWS = normalize(TransformDirectionVFXToWorld(normalize(-transpose(elementToVFX)[2].xyz)));\r\n\t\t\t\t#ifdef + VFX_VARYING_NORMAL\r\n\t\t\t\tfloat normalFlip = (size3.x * size3.y * size3.z) + < 0 ? -1 : 1;\r\n\t\t\t\to.VFX_VARYING_NORMAL = normalFlip * normalWS;\r\n\t\t\t\t#endif\r\n\t\t\t\t#ifdef + VFX_VARYING_TANGENT\r\n\t\t\t\to.VFX_VARYING_TANGENT = normalize(TransformDirectionVFXToWorld(normalize(transpose(elementToVFX)[0].xyz)));\r\n\t\t\t\t#endif\r\n\t\t\t\t#ifdef + VFX_VARYING_BENTFACTORS\r\n\t\t\t\t\r\n\t\t\t\t#if HAS_STRIPS\r\n\t\t\t\t#define + BENT_FACTOR_MULTIPLIER 2.0f\r\n\t\t\t\t#else\r\n\t\t\t\t#define BENT_FACTOR_MULTIPLIER + 1.41421353816986083984375f\r\n\t\t\t\t#endif\r\n\t\t\t\to.VFX_VARYING_BENTFACTORS + = vOffsets * normalBendingFactor * BENT_FACTOR_MULTIPLIER;\r\n\t\t\t\t#endif\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\t#if + defined(VFX_VARYING_VELOCITY_CPOS) && defined(VFX_VARYING_VELOCITY_CPOS_PREVIOUS)\r\n\t\t\t\t\t\tfloat4x4 + previousElementToVFX = (float4x4)0;\r\n\t\t\t\t\t\tpreviousElementToVFX[3] + = float4(0,0,0,1);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tUNITY_UNROLL\r\n\t\t\t\t\t\tfor + (int itIndexMatrixRow = 0; itIndexMatrixRow < 3; ++itIndexMatrixRow)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tUNITY_UNROLL\r\n\t\t\t\t\t\t\tfor + (int itIndexMatrixCol = 0; itIndexMatrixCol < 4; ++itIndexMatrixCol)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tuint + itIndexMatrix = itIndexMatrixCol * 4 + itIndexMatrixRow;\r\n\t\t\t\t\t\t\t\tuint + read = elementToVFXBufferPrevious.Load((index * 16 + itIndexMatrix) << 2);\r\n\t\t\t\t\t\t\t\tpreviousElementToVFX[itIndexMatrixRow][itIndexMatrixCol] + = asfloat(read);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tuint + previousFrameIndex = elementToVFXBufferPrevious.Load((index * 16 + 15) << 2);\r\n\t\t\t\t\t\to.VFX_VARYING_VELOCITY_CPOS + = o.VFX_VARYING_VELOCITY_CPOS_PREVIOUS = float4(0.0f, 0.0f, 0.0f, 1.0f);\r\n\t\t\t\t\t\tif + (asuint(currentFrameIndex) - previousFrameIndex == 1u)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tfloat3 + oldvPos = mul(previousElementToVFX,float4(inputVertexPosition, 1.0f)).xyz;\r\n\t\t\t\t\t\t\to.VFX_VARYING_VELOCITY_CPOS_PREVIOUS + = TransformPositionVFXToPreviousClip(oldvPos);\r\n\t\t\t\t\t\t\to.VFX_VARYING_VELOCITY_CPOS + = TransformPositionVFXToNonJitteredClip(vPos);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\t#if + VFX_USE_COLOR_CURRENT && defined(VFX_VARYING_COLOR)\r\n\t\t\t\t\t\to.VFX_VARYING_COLOR + = attributes.color;\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t#if VFX_USE_ALPHA_CURRENT + && defined(VFX_VARYING_ALPHA) \r\n\t\t\t\t\t\to.VFX_VARYING_ALPHA = attributes.alpha;\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t#ifdef + VFX_VARYING_EXPOSUREWEIGHT\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\to.VFX_VARYING_EXPOSUREWEIGHT + = exposureWeight;\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t#if + USE_SOFT_PARTICLE && defined(VFX_VARYING_INVSOFTPARTICLEFADEDISTANCE)\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\to.VFX_VARYING_INVSOFTPARTICLEFADEDISTANCE + = invSoftParticlesFadeDistance;\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t#if + (USE_ALPHA_TEST || WRITE_MOTION_VECTOR_IN_FORWARD) && (!VFX_SHADERGRAPH || + !HAS_SHADERGRAPH_PARAM_ALPHATHRESHOLD) && defined(VFX_VARYING_ALPHATHRESHOLD)\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\to.VFX_VARYING_ALPHATHRESHOLD + = alphaThreshold;\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t#if + USE_UV_SCALE_BIAS\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t#if defined + (VFX_VARYING_UV)\r\n\t\t\t\t\t\to.VFX_VARYING_UV.xy = o.VFX_VARYING_UV.xy * + uvScale + uvBias;\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t#if + defined(VFX_VARYING_POSWS)\r\n\t\t\t\t\t\to.VFX_VARYING_POSWS = TransformPositionVFXToWorld(vPos);\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\t#if + USE_FLIPBOOK && defined(VFX_VARYING_UV)\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tVFXUVData + uvData = GetUVData(flipBookSize, invFlipBookSize, o.VFX_VARYING_UV.xy, attributes.texIndex);\r\n\t\t\t\t\t\to.VFX_VARYING_UV.xy + = uvData.uvs.xy;\r\n\t\t\t\t\t\t#if USE_FLIPBOOK_INTERPOLATION && defined(VFX_VARYING_UV) + && defined (VFX_VARYING_FRAMEBLEND)\r\n\t\t\t\t\t\to.VFX_VARYING_UV.zw = uvData.uvs.zw;\r\n\t\t\t\t\t\to.VFX_VARYING_FRAMEBLEND + = uvData.blend;\r\n\t\t\t\t\t\t#if USE_FLIPBOOK_MOTIONVECTORS && defined(VFX_VARYING_MOTIONVECTORSCALE)\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\to.VFX_VARYING_MOTIONVECTORSCALE + = motionVectorScale * invFlipBookSize;\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t + \r\n\t\t\t \r\n\t\t\t\r\n\t\t\t\treturn o;\r\n\t\t\t}\r\n\t\t\t\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t#include + \"Packages/com.unity.visualeffectgraph/Shaders/VFXCommonOutput.hlsl\"\r\n\t\t\t\r\n\t\t\t\n\t\t\t\r\n\t\t\t\r\n\t\t\t#if + VFX_PASSDEPTH == VFX_PASSDEPTH_SELECTION\r\n\t\t\tint _ObjectId;\r\n\t\t\tint + _PassValue;\r\n\t\t\t#endif\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t#pragma + fragment frag\r\n\t\t\tfloat4 frag(ps_input i) : SV_TARGET\r\n\t\t\t{\r\n\t\t\t\tUNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i);\r\n\t\t\t\tVFXTransformPSInputs(i);\r\n\t\t\t + #ifdef VFX_SHADERGRAPH\r\n\t\t\t \r\n\t\t\t \r\n\t\t\t + \r\n\t\t\t \r\n\t\t\t float alpha = OUTSG.;\r\n\t\t\t #else\r\n\t\t\t + float alpha = VFXGetFragmentColor(i).a;\r\n\t\t\t alpha *= VFXGetTextureColor(VFX_SAMPLER(mainTexture),i).a;\r\n\t\t\t + #endif\r\n\t\t\t\tVFXClipFragmentColor(alpha,i);\r\n\t\t\t\t\r\n\t\t\t\t#if + VFX_PASSDEPTH == VFX_PASSDEPTH_MOTION_VECTOR\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\tfloat2 + velocity = (i.VFX_VARYING_VELOCITY_CPOS.xy/i.VFX_VARYING_VELOCITY_CPOS.w) - + (i.VFX_VARYING_VELOCITY_CPOS_PREVIOUS.xy/i.VFX_VARYING_VELOCITY_CPOS_PREVIOUS.w);\r\n\t\t\t\t\t\t\t#if + UNITY_UV_STARTS_AT_TOP\r\n\t\t\t\t\t\t\t\tvelocity.y = -velocity.y;\r\n\t\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\tfloat4 + encodedMotionVector = 0.0f;\r\n\t\t\t\t\t\t\tVFXEncodeMotionVector(velocity + * 0.5f, encodedMotionVector);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\treturn encodedMotionVector;\r\n\t\t\t\t#elif + VFX_PASSDEPTH == VFX_PASSDEPTH_SELECTION\r\n\t\t\t\t\treturn float4(_ObjectId, + _PassValue, 1.0, 1.0);\r\n\t\t\t\t#elif VFX_PASSDEPTH == VFX_PASSDEPTH_ACTUAL\r\n\t\t\t\t\treturn + (float4)0;\r\n\t\t\t\t#else\r\n\t\t\t\t\t#error VFX_PASSDEPTH undefined \r\n\t\t\t\t#endif\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\n\t\t\r\n\t\t\tENDHLSL\r\n\t\t}\r\n\t\t\n\r\n\t\t\r\n\t\t\r\n\t\t// + Forward pass\r\n\t\tPass\r\n\t\t{\t\t\r\n\t\t\tTags { \"LightMode\"=\"ForwardOnly\" + }\r\n\t\t\t\r\n\t\t\tHLSLPROGRAM\r\n\t\t\t#pragma target 4.5\r\n\t\t\t#pragma + multi_compile _ DEBUG_DISPLAY\r\n\t\t\r\n\t\t\tstruct ps_input\r\n\t\t\t{\r\n\t\t\t\tfloat4 + pos : SV_POSITION;\r\n\t\t\t\t#if USE_FLIPBOOK_INTERPOLATION\r\n\t\t\t\tfloat4 + uv : TEXCOORD0;\r\n\t\t\t\t#else\r\n\t\t\t\tfloat2 uv : TEXCOORD0;\t\r\n\t\t\t\t#endif\r\n\t\t\t\t#if + VFX_NEEDS_COLOR_INTERPOLATOR\r\n\t\t\t\tVFX_OPTIONAL_INTERPOLATION float4 color + : COLOR0;\r\n\t\t\t\t#endif\r\n\t\t\t\t#if USE_SOFT_PARTICLE || USE_ALPHA_TEST + || USE_FLIPBOOK_INTERPOLATION || USE_EXPOSURE_WEIGHT || WRITE_MOTION_VECTOR_IN_FORWARD\r\n\t\t\t\t// + x: inverse soft particles fade distance\r\n\t\t\t\t// y: alpha threshold\r\n\t\t\t\t// + z: frame blending factor\r\n\t\t\t\t// w: exposure weight\r\n\t\t\t\tVFX_OPTIONAL_INTERPOLATION + float4 builtInInterpolants : TEXCOORD1;\r\n\t\t\t\t#endif\r\n\t\t\t\t#if USE_FLIPBOOK_MOTIONVECTORS\r\n\t\t\t\t// + x: motion vectors scale X\r\n\t\t\t\t// y: motion vectors scale Y\r\n\t\t\t\tVFX_OPTIONAL_INTERPOLATION + float2 builtInInterpolants2 : TEXCOORD2;\r\n\t\t\t\t#endif\r\n\t\t\t\t#if VFX_NEEDS_POSWS_INTERPOLATOR\r\n\t\t\t\tfloat3 + posWS : TEXCOORD3;\r\n\t\t\t\t#endif\r\n\t\t\t\t\r\n\t\t\t\t#if WRITE_MOTION_VECTOR_IN_FORWARD\r\n\t\t\t\tfloat4 + cPosPrevious : TEXCOORD4;\r\n\t\t\t\tfloat4 cPosNonJiterred : TEXCOORD5;\r\n\t\t\t\t#endif\r\n\t\t\t\t\r\n\t\t\t\t#if + SHADERGRAPH_NEEDS_NORMAL_FORWARD\r\n\t\t\t\tfloat3 normal : TEXCOORD6;\r\n\t\t\t\t#endif\r\n\t\t\t\t#if + SHADERGRAPH_NEEDS_TANGENT_FORWARD\r\n\t\t\t\tfloat3 tangent : TEXCOORD7;\r\n\t\t\t\t#endif\r\n\t\t\t\t\r\n\t\t + \r\n\t\t\t\t\r\n\t\t\t\tUNITY_VERTEX_OUTPUT_STEREO\r\n\t\t\t};\r\n\t\t\t\r\n\t\t\tstruct + ps_output\r\n\t\t\t{\r\n\t\t\t\tfloat4 color : SV_Target0;\r\n\t\t#if WRITE_MOTION_VECTOR_IN_FORWARD\r\n\t\t\t\tfloat4 + outMotionVector : SV_Target1;\r\n\t\t#endif\r\n\t\t\t};\r\n\t\t\r\n\t\t#define + VFX_VARYING_PS_INPUTS ps_input\r\n\t\t#define VFX_VARYING_POSCS pos\r\n\t\t#define + VFX_VARYING_COLOR color.rgb\r\n\t\t#define VFX_VARYING_ALPHA color.a\r\n\t\t#define + VFX_VARYING_INVSOFTPARTICLEFADEDISTANCE builtInInterpolants.x\r\n\t\t#define + VFX_VARYING_ALPHATHRESHOLD builtInInterpolants.y\r\n\t\t#define VFX_VARYING_FRAMEBLEND + builtInInterpolants.z\r\n\t\t#define VFX_VARYING_MOTIONVECTORSCALE builtInInterpolants2.xy\r\n\t\t#define + VFX_VARYING_UV uv\r\n\t\t#if VFX_NEEDS_POSWS_INTERPOLATOR\r\n\t\t#define VFX_VARYING_POSWS + posWS\r\n\t\t#endif\r\n\t\t#if USE_EXPOSURE_WEIGHT\r\n\t\t#define VFX_VARYING_EXPOSUREWEIGHT + builtInInterpolants.w\r\n\t\t#endif\r\n\t\t#if WRITE_MOTION_VECTOR_IN_FORWARD\r\n\t\t#define + VFX_VARYING_VELOCITY_CPOS cPosNonJiterred\r\n\t\t#define VFX_VARYING_VELOCITY_CPOS_PREVIOUS + cPosPrevious\r\n\t\t#endif\r\n\t\t\r\n\t\t#define SHADERPASS SHADERPASS_FORWARD_UNLIT\r\n\t\t\t\r\n\t\t#if + SHADERGRAPH_NEEDS_NORMAL_FORWARD\r\n\t\t#define VFX_VARYING_NORMAL normal\r\n\t\t#endif\r\n\t\t#if + SHADERGRAPH_NEEDS_TANGENT_FORWARD\r\n\t\t#define VFX_VARYING_TANGENT tangent\r\n\t\t#endif\r\n\t\t\t\t\r\n\t\t\t#if + !(defined(VFX_VARYING_PS_INPUTS) && defined(VFX_VARYING_POSCS))\r\n\t\t\t#error + VFX_VARYING_PS_INPUTS, VFX_VARYING_POSCS and VFX_VARYING_UV must be defined.\r\n\t\t\t#endif\r\n\t\t\t\r\n\t\t\t#include + \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXCommon.hlsl\"\n\t\t\t#include + \"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\t\t\t\n\r\n\t\t\tvoid + Orient_4(inout float3 axisX, inout float3 axisY, inout float3 axisZ) /*mode:FaceCameraPlane + axes:ZY */\n\t\t\t{\n\t\t\t \r\n\t\t\t float3x3 viewRot = GetVFXToViewRotMatrix();\r\n\t\t\t + axisX = viewRot[0].xyz;\r\n\t\t\t axisY = viewRot[1].xyz;\r\n\t\t\t #if + VFX_LOCAL_SPACE // Need to remove potential scale in local transform\r\n\t\t\t + axisX = normalize(axisX);\r\n\t\t\t axisY = normalize(axisY);\r\n\t\t\t + axisZ = cross(axisX,axisY);\r\n\t\t\t #else\r\n\t\t\t axisZ = -viewRot[2].xyz;\r\n\t\t\t + #endif\r\n\t\t\t \n\t\t\t}\n\t\t\tvoid SetAttribute_3278B22F(inout float + size, float Size) /*attribute:size Composition:Overwrite Source:Slot Random:Off + channels:XYZ */\n\t\t\t{\n\t\t\t size = Size;\n\t\t\t}\n\t\t\t\n\r\n\t\t\t\r\n\t\t\t#if + defined(HAS_STRIPS) && !defined(VFX_PRIMITIVE_QUAD)\r\n\t\t\t#error VFX_PRIMITIVE_QUAD + must be defined when HAS_STRIPS is.\r\n\t\t\t#endif\r\n\t\t\t\r\n\t\t\tstruct + vs_input\r\n\t\t\t{\r\n\t\t\t\tVFX_DECLARE_INSTANCE_ID\r\n\t\t\t};\r\n\t\t\t\r\n\t\t\t#if + HAS_STRIPS\r\n\t\t\t#define PARTICLE_IN_EDGE (id & 1)\r\n\t\t\t\r\n\t\t\tfloat3 + GetParticlePosition(uint index)\r\n\t\t\t{\r\n\t\t\t\tstruct Attributes attributes + = (Attributes)0;\r\n\t\t\t\tattributes.position = asfloat(attributeBuffer.Load3((index + * 0x8 + 0x0) << 2));\n\t\t\t\t\n\r\n\t\t\t\treturn attributes.position;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tfloat3 + GetStripTangent(float3 currentPos, uint relativeIndex, const StripData stripData)\r\n\t\t\t{\r\n\t\t\t\tfloat3 + prevTangent = (float3)0.0f;\r\n\t\t\t\tif (relativeIndex > 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tuint + prevIndex = GetParticleIndex(relativeIndex - 1,stripData);\r\n\t\t\t\t\tprevTangent + = normalize(currentPos - GetParticlePosition(prevIndex));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tfloat3 + nextTangent = (float3)0.0f;\r\n\t\t\t\tif (relativeIndex < stripData.nextIndex + - 1)\r\n\t\t\t\t{\r\n\t\t\t\t\tuint nextIndex = GetParticleIndex(relativeIndex + + 1,stripData);\r\n\t\t\t\t\tnextTangent = normalize(GetParticlePosition(nextIndex) + - currentPos);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn normalize(prevTangent + + nextTangent);\r\n\t\t\t}\r\n\t\t\t#endif\r\n\t\t\t\r\n\t\t\t#pragma vertex + vert\r\n\t\t\tVFX_VARYING_PS_INPUTS vert(uint id : SV_VertexID, vs_input i)\r\n\t\t\t{\r\n\t\t\t\tVFX_VARYING_PS_INPUTS + o = (VFX_VARYING_PS_INPUTS)0;\r\n\t\t\t\r\n\t\t\t\tUNITY_SETUP_INSTANCE_ID(i);\r\n\t\t\t\tUNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);\r\n\t\t\t\r\n\t\t\t#if + VFX_PRIMITIVE_TRIANGLE\r\n\t\t\t\tuint index = id / 3;\r\n\t\t\t#elif VFX_PRIMITIVE_QUAD\r\n\t\t\t#if + HAS_STRIPS\r\n\t\t\t\tid += VFX_GET_INSTANCE_ID(i) * 8192;\r\n\t\t\t\tconst + uint vertexPerStripCount = (PARTICLE_PER_STRIP_COUNT - 1) << 2;\r\n\t\t\t\tconst + StripData stripData = GetStripDataFromStripIndex(id / vertexPerStripCount, + PARTICLE_PER_STRIP_COUNT);\r\n\t\t\t\tuint currentIndex = ((id % vertexPerStripCount) + >> 2) + (id & 1); // relative index of particle\r\n\t\t\t\t\r\n\t\t\t\tuint + maxEdgeIndex = currentIndex - PARTICLE_IN_EDGE + 1;\r\n\t\t\t\tif (maxEdgeIndex + >= stripData.nextIndex)\r\n\t\t\t\t\treturn o;\r\n\t\t\t\t\r\n\t\t\t\tuint + index = GetParticleIndex(currentIndex, stripData);\r\n\t\t\t#else\r\n\t\t\t\tuint + index = (id >> 2) + VFX_GET_INSTANCE_ID(i) * 2048;\r\n\t\t\t#endif\r\n\t\t\t#elif + VFX_PRIMITIVE_OCTAGON\r\n\t\t\t\tuint index = (id >> 3) + VFX_GET_INSTANCE_ID(i) + * 1024;\r\n\t\t\t#endif\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\tuint deadCount + = 0;\r\n\t\t\t\t\t\t#if USE_DEAD_LIST_COUNT\r\n\t\t\t\t\t\tdeadCount = deadListCount.Load(0);\r\n\t\t\t\t\t\t#endif\t\r\n\t\t\t\t\t\tif + (index >= asuint(nbMax) - deadCount)\r\n\t\t\t\t\t\t#if USE_GEOMETRY_SHADER\r\n\t\t\t\t\t\t\treturn; + // cull\r\n\t\t\t\t\t\t#else\r\n\t\t\t\t\t\t\treturn o; // cull\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tAttributes + attributes = (Attributes)0;\r\n\t\t\t\t\t\tSourceAttributes sourceAttributes + = (SourceAttributes)0;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t#if VFX_HAS_INDIRECT_DRAW\r\n\t\t\t\t\t\tindex + = indirectBuffer[index];\r\n\t\t\t\t\t\tattributes.position = asfloat(attributeBuffer.Load3((index + * 0x8 + 0x0) << 2));\n\t\t\t\t\t\tattributes.color = asfloat(attributeBuffer.Load3((index + * 0x8 + 0x4) << 2));\n\t\t\t\t\t\tattributes.alpha = (float)1;\n\t\t\t\t\t\tattributes.alive + = (attributeBuffer.Load((index * 0x1 + 0x2A3000) << 2));\n\t\t\t\t\t\tattributes.axisX + = float3(1, 0, 0);\n\t\t\t\t\t\tattributes.axisY = float3(0, 1, 0);\n\t\t\t\t\t\tattributes.axisZ + = float3(0, 0, 1);\n\t\t\t\t\t\tattributes.angleX = (float)0;\n\t\t\t\t\t\tattributes.angleY + = (float)0;\n\t\t\t\t\t\tattributes.angleZ = (float)0;\n\t\t\t\t\t\tattributes.pivotX + = (float)0;\n\t\t\t\t\t\tattributes.pivotY = (float)0;\n\t\t\t\t\t\tattributes.pivotZ + = (float)0;\n\t\t\t\t\t\tattributes.size = (float)0.100000001;\n\t\t\t\t\t\tattributes.scaleX + = (float)1;\n\t\t\t\t\t\tattributes.scaleY = (float)1;\n\t\t\t\t\t\tattributes.scaleZ + = (float)1;\n\t\t\t\t\t\t\n\t\t\t\t\r\n\t\t\t\t\t\t#else\r\n\t\t\t\t\t\tattributes.alive + = (attributeBuffer.Load((index * 0x1 + 0x2A3000) << 2));\n\t\t\t\t\t\t\n\t\t\t\t\r\n\t\t\t\t\t\t#if + !HAS_STRIPS\r\n\t\t\t\t\t\tif (!attributes.alive)\r\n\t\t\t\t\t\t\treturn o;\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tattributes.position + = asfloat(attributeBuffer.Load3((index * 0x8 + 0x0) << 2));\n\t\t\t\t\t\tattributes.color + = asfloat(attributeBuffer.Load3((index * 0x8 + 0x4) << 2));\n\t\t\t\t\t\tattributes.alpha + = (float)1;\n\t\t\t\t\t\tattributes.axisX = float3(1, 0, 0);\n\t\t\t\t\t\tattributes.axisY + = float3(0, 1, 0);\n\t\t\t\t\t\tattributes.axisZ = float3(0, 0, 1);\n\t\t\t\t\t\tattributes.angleX + = (float)0;\n\t\t\t\t\t\tattributes.angleY = (float)0;\n\t\t\t\t\t\tattributes.angleZ + = (float)0;\n\t\t\t\t\t\tattributes.pivotX = (float)0;\n\t\t\t\t\t\tattributes.pivotY + = (float)0;\n\t\t\t\t\t\tattributes.pivotZ = (float)0;\n\t\t\t\t\t\tattributes.size + = (float)0.100000001;\n\t\t\t\t\t\tattributes.scaleX = (float)1;\n\t\t\t\t\t\tattributes.scaleY + = (float)1;\n\t\t\t\t\t\tattributes.scaleZ = (float)1;\n\t\t\t\t\t\t\n\t\t\t\t\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// + Initialize built-in needed attributes\r\n\t\t\t\t\t\t#if HAS_STRIPS\r\n\t\t\t\t\t\tInitStripAttributes(index, + attributes, stripData);\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\t\r\n\t\t\t\tOrient_4( + /*inout */attributes.axisX, /*inout */attributes.axisY, /*inout */attributes.axisZ);\n\t\t\t\t{\n\t\t\t\t + SetAttribute_3278B22F( /*inout */attributes.size, (float)0.00300000003);\n\t\t\t\t}\n\t\t\t\t\n\r\n\t\t\t\t\r\n\t\t\t#if + !HAS_STRIPS\r\n\t\t\t\tif (!attributes.alive)\r\n\t\t\t\t\treturn o;\r\n\t\t\t#endif\r\n\t\t\t\t\r\n\t\t\t#if + VFX_PRIMITIVE_QUAD\r\n\t\t\t\r\n\t\t\t#if HAS_STRIPS\r\n\t\t\t#if VFX_STRIPS_UV_STRECHED\r\n\t\t\t\to.VFX_VARYING_UV.x + = (float)(currentIndex) / (stripData.nextIndex - 1);\r\n\t\t\t#elif VFX_STRIPS_UV_PER_SEGMENT\r\n\t\t\t\to.VFX_VARYING_UV.x + = PARTICLE_IN_EDGE;\r\n\t\t\t#else\r\n\t\t\t\t\r\n\t\t\t o.VFX_VARYING_UV.x + = texCoord;\r\n\t\t\t#endif\r\n\t\t\t\r\n\t\t\t\to.VFX_VARYING_UV.y = float((id + & 2) >> 1);\r\n\t\t\t\tconst float2 vOffsets = float2(0.0f,o.VFX_VARYING_UV.y + - 0.5f);\r\n\t\t\t\t\r\n\t\t\t#if VFX_STRIPS_SWAP_UV\r\n\t\t\t\to.VFX_VARYING_UV.xy + = float2(1.0f - o.VFX_VARYING_UV.y, o.VFX_VARYING_UV.x);\r\n\t\t\t#endif\r\n\t\t\t\t\r\n\t\t\t\t// + Orient strips along their tangents\r\n\t\t\t\tattributes.axisX = GetStripTangent(attributes.position, + currentIndex, stripData);\r\n\t\t\t#if !VFX_STRIPS_ORIENT_CUSTOM\r\n\t\t\t\tattributes.axisZ + = attributes.position - GetViewVFXPosition();\r\n\t\t\t#endif\r\n\t\t\t\tattributes.axisY + = normalize(cross(attributes.axisZ, attributes.axisX));\r\n\t\t\t\tattributes.axisZ + = normalize(cross(attributes.axisX, attributes.axisY));\r\n\t\t\t\t\r\n\t\t\t#else\r\n\t\t\t\to.VFX_VARYING_UV.x + = float(id & 1);\r\n\t\t\t\to.VFX_VARYING_UV.y = float((id & 2) >> 1);\r\n\t\t\t\tconst + float2 vOffsets = o.VFX_VARYING_UV.xy - 0.5f;\r\n\t\t\t#endif\r\n\t\t\t\t\r\n\t\t\t#elif + VFX_PRIMITIVE_TRIANGLE\r\n\t\t\t\r\n\t\t\t\tconst float2 kOffsets[] = {\r\n\t\t\t\t\tfloat2(-0.5f, + \t-0.288675129413604736328125f),\r\n\t\t\t\t\tfloat2(0.0f, \t0.57735025882720947265625f),\r\n\t\t\t\t\tfloat2(0.5f,\t-0.288675129413604736328125f),\r\n\t\t\t\t};\r\n\t\t\t\t\r\n\t\t\t\tconst + float kUVScale = 0.866025388240814208984375f;\r\n\t\t\t\t\r\n\t\t\t\tconst + float2 vOffsets = kOffsets[id % 3];\r\n\t\t\t\to.VFX_VARYING_UV.xy = (vOffsets + * kUVScale) + 0.5f;\r\n\t\t\t\t\r\n\t\t\t#elif VFX_PRIMITIVE_OCTAGON\t\r\n\t\t\t\t\r\n\t\t\t\tconst + float2 kUvs[8] = \r\n\t\t\t\t{\r\n\t\t\t\t\tfloat2(-0.5f,\t0.0f),\r\n\t\t\t\t\tfloat2(-0.5f,\t0.5f),\r\n\t\t\t\t\tfloat2(0.0f,\t0.5f),\r\n\t\t\t\t\tfloat2(0.5f,\t0.5f),\r\n\t\t\t\t\tfloat2(0.5f,\t0.0f),\r\n\t\t\t\t\tfloat2(0.5f,\t-0.5f),\r\n\t\t\t\t\tfloat2(0.0f,\t-0.5f),\r\n\t\t\t\t\tfloat2(-0.5f,\t-0.5f),\r\n\t\t\t\t};\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tcropFactor + = id & 1 ? 1.0f - cropFactor : 1.0f;\r\n\t\t\t\tconst float2 vOffsets = kUvs[id + & 7] * cropFactor;\r\n\t\t\t\to.VFX_VARYING_UV.xy = vOffsets + 0.5f;\r\n\t\t\t\t\r\n\t\t\t#endif\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\tfloat3 + size3 = float3(attributes.size,attributes.size,attributes.size);\r\n\t\t\t\t\t\t#if + VFX_USE_SCALEX_CURRENT\r\n\t\t\t\t\t\tsize3.x *= attributes.scaleX;\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t#if + VFX_USE_SCALEY_CURRENT\r\n\t\t\t\t\t\tsize3.y *= attributes.scaleY;\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t#if + VFX_USE_SCALEZ_CURRENT\r\n\t\t\t\t\t\tsize3.z *= attributes.scaleZ;\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\r\n\t\t\t#if + HAS_STRIPS\r\n\t\t\t\tsize3 += size3 < 0.0f ? -VFX_EPSILON : VFX_EPSILON; // + Add an epsilon so that size is never 0 for strips\r\n\t\t\t#endif\r\n\t\t\t\t\r\n\t\t\t\tconst + float4x4 elementToVFX = GetElementToVFXMatrix(\r\n\t\t\t\t\tattributes.axisX,\r\n\t\t\t\t\tattributes.axisY,\r\n\t\t\t\t\tattributes.axisZ,\r\n\t\t\t\t\tfloat3(attributes.angleX,attributes.angleY,attributes.angleZ),\r\n\t\t\t\t\tfloat3(attributes.pivotX,attributes.pivotY,attributes.pivotZ),\r\n\t\t\t\t\tsize3,\r\n\t\t\t\t\tattributes.position);\r\n\t\t\t\t\t\r\n\t\t\t\tfloat3 + inputVertexPosition = float3(vOffsets, 0.0f);\r\n\t\t\t\tfloat3 vPos = mul(elementToVFX,float4(inputVertexPosition, + 1.0f)).xyz;\r\n\t\t\t\r\n\t\t\t\to.VFX_VARYING_POSCS = TransformPositionVFXToClip(vPos);\r\n\t\t\t + \r\n\t\t\t float3 vPosWS = TransformPositionVFXToWorld(vPos);\r\n\t\t\t\t\r\n\t\t\t + #ifdef VFX_VARYING_POSWS\r\n\t\t\t o.VFX_VARYING_POSWS = vPosWS;\r\n\t\t\t + #endif\r\n\t\t\t\r\n\t\t\t\tfloat3 normalWS = normalize(TransformDirectionVFXToWorld(normalize(-transpose(elementToVFX)[2].xyz)));\r\n\t\t\t\t#ifdef + VFX_VARYING_NORMAL\r\n\t\t\t\tfloat normalFlip = (size3.x * size3.y * size3.z) + < 0 ? -1 : 1;\r\n\t\t\t\to.VFX_VARYING_NORMAL = normalFlip * normalWS;\r\n\t\t\t\t#endif\r\n\t\t\t\t#ifdef + VFX_VARYING_TANGENT\r\n\t\t\t\to.VFX_VARYING_TANGENT = normalize(TransformDirectionVFXToWorld(normalize(transpose(elementToVFX)[0].xyz)));\r\n\t\t\t\t#endif\r\n\t\t\t\t#ifdef + VFX_VARYING_BENTFACTORS\r\n\t\t\t\t\r\n\t\t\t\t#if HAS_STRIPS\r\n\t\t\t\t#define + BENT_FACTOR_MULTIPLIER 2.0f\r\n\t\t\t\t#else\r\n\t\t\t\t#define BENT_FACTOR_MULTIPLIER + 1.41421353816986083984375f\r\n\t\t\t\t#endif\r\n\t\t\t\to.VFX_VARYING_BENTFACTORS + = vOffsets * normalBendingFactor * BENT_FACTOR_MULTIPLIER;\r\n\t\t\t\t#endif\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\t#if + defined(VFX_VARYING_VELOCITY_CPOS) && defined(VFX_VARYING_VELOCITY_CPOS_PREVIOUS)\r\n\t\t\t\t\t\tfloat4x4 + previousElementToVFX = (float4x4)0;\r\n\t\t\t\t\t\tpreviousElementToVFX[3] + = float4(0,0,0,1);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tUNITY_UNROLL\r\n\t\t\t\t\t\tfor + (int itIndexMatrixRow = 0; itIndexMatrixRow < 3; ++itIndexMatrixRow)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tUNITY_UNROLL\r\n\t\t\t\t\t\t\tfor + (int itIndexMatrixCol = 0; itIndexMatrixCol < 4; ++itIndexMatrixCol)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tuint + itIndexMatrix = itIndexMatrixCol * 4 + itIndexMatrixRow;\r\n\t\t\t\t\t\t\t\tuint + read = elementToVFXBufferPrevious.Load((index * 16 + itIndexMatrix) << 2);\r\n\t\t\t\t\t\t\t\tpreviousElementToVFX[itIndexMatrixRow][itIndexMatrixCol] + = asfloat(read);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tuint + previousFrameIndex = elementToVFXBufferPrevious.Load((index * 16 + 15) << 2);\r\n\t\t\t\t\t\to.VFX_VARYING_VELOCITY_CPOS + = o.VFX_VARYING_VELOCITY_CPOS_PREVIOUS = float4(0.0f, 0.0f, 0.0f, 1.0f);\r\n\t\t\t\t\t\tif + (asuint(currentFrameIndex) - previousFrameIndex == 1u)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tfloat3 + oldvPos = mul(previousElementToVFX,float4(inputVertexPosition, 1.0f)).xyz;\r\n\t\t\t\t\t\t\to.VFX_VARYING_VELOCITY_CPOS_PREVIOUS + = TransformPositionVFXToPreviousClip(oldvPos);\r\n\t\t\t\t\t\t\to.VFX_VARYING_VELOCITY_CPOS + = TransformPositionVFXToNonJitteredClip(vPos);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\t#if + VFX_USE_COLOR_CURRENT && defined(VFX_VARYING_COLOR)\r\n\t\t\t\t\t\to.VFX_VARYING_COLOR + = attributes.color;\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t#if VFX_USE_ALPHA_CURRENT + && defined(VFX_VARYING_ALPHA) \r\n\t\t\t\t\t\to.VFX_VARYING_ALPHA = attributes.alpha;\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t#ifdef + VFX_VARYING_EXPOSUREWEIGHT\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\to.VFX_VARYING_EXPOSUREWEIGHT + = exposureWeight;\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t#if + USE_SOFT_PARTICLE && defined(VFX_VARYING_INVSOFTPARTICLEFADEDISTANCE)\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\to.VFX_VARYING_INVSOFTPARTICLEFADEDISTANCE + = invSoftParticlesFadeDistance;\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t#if + (USE_ALPHA_TEST || WRITE_MOTION_VECTOR_IN_FORWARD) && (!VFX_SHADERGRAPH || + !HAS_SHADERGRAPH_PARAM_ALPHATHRESHOLD) && defined(VFX_VARYING_ALPHATHRESHOLD)\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\to.VFX_VARYING_ALPHATHRESHOLD + = alphaThreshold;\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t#if + USE_UV_SCALE_BIAS\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t#if defined + (VFX_VARYING_UV)\r\n\t\t\t\t\t\to.VFX_VARYING_UV.xy = o.VFX_VARYING_UV.xy * + uvScale + uvBias;\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t#if + defined(VFX_VARYING_POSWS)\r\n\t\t\t\t\t\to.VFX_VARYING_POSWS = TransformPositionVFXToWorld(vPos);\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\t#if + USE_FLIPBOOK && defined(VFX_VARYING_UV)\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tVFXUVData + uvData = GetUVData(flipBookSize, invFlipBookSize, o.VFX_VARYING_UV.xy, attributes.texIndex);\r\n\t\t\t\t\t\to.VFX_VARYING_UV.xy + = uvData.uvs.xy;\r\n\t\t\t\t\t\t#if USE_FLIPBOOK_INTERPOLATION && defined(VFX_VARYING_UV) + && defined (VFX_VARYING_FRAMEBLEND)\r\n\t\t\t\t\t\to.VFX_VARYING_UV.zw = uvData.uvs.zw;\r\n\t\t\t\t\t\to.VFX_VARYING_FRAMEBLEND + = uvData.blend;\r\n\t\t\t\t\t\t#if USE_FLIPBOOK_MOTIONVECTORS && defined(VFX_VARYING_MOTIONVECTORSCALE)\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\to.VFX_VARYING_MOTIONVECTORSCALE + = motionVectorScale * invFlipBookSize;\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t + \r\n\t\t\t \r\n\t\t\t\r\n\t\t\t\treturn o;\r\n\t\t\t}\r\n\t\t\t\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t#include + \"Packages/com.unity.visualeffectgraph/Shaders/VFXCommonOutput.hlsl\"\r\n\t\t\t\r\n\t\t\t\n\t\t\t\r\n\t\t#if + VFX_SHADERGRAPH\r\n\t\t\t\r\n\t\t#endif\r\n\t\t\t\t\r\n\t\t\t#pragma fragment + frag\r\n\t\t\tps_output frag(ps_input i)\r\n\t\t\t{\r\n\t\t\t\tUNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i);\r\n\t\t\t\tps_output + o = (ps_output)0;\r\n\t\t\t\tVFXTransformPSInputs(i);\r\n\t\t\t\t\r\n\t\t\t\t\t\t\t#ifdef + VFX_VARYING_NORMAL\r\n\t\t\t\t\t\t\t#if USE_DOUBLE_SIDED\r\n\t\t\t\t\t\t\tconst + float faceMul = frontFace ? 1.0f : -1.0f;\r\n\t\t\t\t\t\t\t#else\r\n\t\t\t\t\t\t\tconst + float faceMul = 1.0f;\r\n\t\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tfloat3 + normalWS = i.VFX_VARYING_NORMAL * faceMul;\r\n\t\t\t\t\t\t\tconst VFXUVData + uvData = GetUVData(i);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t#ifdef VFX_VARYING_TANGENT\r\n\t\t\t\t\t\t\tfloat3 + tangentWS = i.VFX_VARYING_TANGENT;\r\n\t\t\t\t\t\t\tfloat3 bitangentWS = cross(i.VFX_VARYING_TANGENT,i.VFX_VARYING_NORMAL);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t#if + defined(VFX_VARYING_BENTFACTORS) && USE_NORMAL_BENDING\t\r\n\t\t\t\t\t\t\tfloat3 + bentFactors = float3(i.VFX_VARYING_BENTFACTORS.xy,sqrt(1.0f - dot(i.VFX_VARYING_BENTFACTORS,i.VFX_VARYING_BENTFACTORS)));\r\n\t\t\t\t\t\t\tnormalWS + = tangentWS * bentFactors.x + bitangentWS * bentFactors.y + normalWS * bentFactors.z;\r\n\t\t\t\t\t\t\ttangentWS + = normalize(cross(normalWS,bitangentWS));\r\n\t\t\t\t\t\t\tbitangentWS = cross(tangentWS,normalWS);\r\n\t\t\t\t\t\t\ttangentWS + *= faceMul;\r\n\t\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tfloat3x3 + tbn = float3x3(tangentWS,bitangentWS,normalWS);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t#if + USE_NORMAL_MAP\r\n\t\t\t\t\t\t\tfloat3 n = SampleNormalMap(VFX_SAMPLER(normalMap),uvData);\r\n\t\t\t\t\t\t\tfloat + normalScale = 1.0f;\r\n\t\t\t\t\t\t\t#ifdef VFX_VARYING_NORMALSCALE\r\n\t\t\t\t\t\t\tnormalScale + = i.VFX_VARYING_NORMALSCALE;\r\n\t\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\tnormalWS + = normalize(lerp(normalWS,mul(n,tbn),normalScale));\r\n\t\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t#if + VFX_SHADERGRAPH\r\n\t\t \r\n\t\t \r\n\t\t \r\n\t\t + \r\n\t\t #if HAS_SHADERGRAPH_PARAM_COLOR\r\n\t\t o.color.rgb + = OUTSG..rgb;\r\n\t\t #endif\r\n\t\t \r\n\t\t #if HAS_SHADERGRAPH_PARAM_ALPHA + \r\n\t\t o.color.a = OUTSG.;\r\n\t\t #endif\r\n\t\t#else\r\n\t\t\t\r\n\t\t\t\t#define + VFX_TEXTURE_COLOR VFXGetTextureColor(VFX_SAMPLER(mainTexture),i)\r\n\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tfloat4 + color = VFXGetFragmentColor(i);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t#ifndef VFX_TEXTURE_COLOR\r\n\t\t\t\t\t\t\t#define + VFX_TEXTURE_COLOR float4(1.0,1.0,1.0,1.0)\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t#if + VFX_COLORMAPPING_DEFAULT\r\n\t\t\t\t\t\t\to.color = color * VFX_TEXTURE_COLOR;\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t#if + VFX_COLORMAPPING_GRADIENTMAPPED\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\to.color + = SampleGradient(gradient, VFX_TEXTURE_COLOR.a * color.a) * float4(color.rgb,1.0);\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\to.color + = VFXApplyPreExposure(o.color, i);\r\n\t\t#endif\r\n\t\t\r\n\t\t\t\to.color + = VFXApplyFog(o.color,i);\r\n\t\t\t\tVFXClipFragmentColor(o.color.a,i);\r\n\t\t\t\to.color.a + = saturate(o.color.a);\r\n\t\t\t\to.color = VFXTransformFinalColor(o.color);\r\n\t\t\t\t\r\n\t\t#if + WRITE_MOTION_VECTOR_IN_FORWARD\r\n\t\t\t\t\r\n\t\t\t\t\t\tfloat2 velocity = + (i.VFX_VARYING_VELOCITY_CPOS.xy/i.VFX_VARYING_VELOCITY_CPOS.w) - (i.VFX_VARYING_VELOCITY_CPOS_PREVIOUS.xy/i.VFX_VARYING_VELOCITY_CPOS_PREVIOUS.w);\r\n\t\t\t\t\t\t#if + UNITY_UV_STARTS_AT_TOP\r\n\t\t\t\t\t\t\tvelocity.y = -velocity.y;\r\n\t\t\t\t\t\t#endif\r\n\t\t\t\t\t\tfloat4 + encodedMotionVector = 0.0f;\r\n\t\t\t\t\t\tVFXEncodeMotionVector(velocity * + 0.5f, encodedMotionVector);\r\n\t\t\t\t\t\t\r\n\t\t\t\to.outMotionVector = + encodedMotionVector;\r\n\t\t o.outMotionVector.a = o.color.a < i.VFX_VARYING_ALPHATHRESHOLD + ? 0.0f : 1.0f; //Independant clipping for motion vector pass\r\n\t\t#endif\r\n\t\t\t\treturn + o;\r\n\t\t\t}\r\n\t\t\tENDHLSL\r\n\t\t}\r\n\t\t\n\r\n\t\t\r\n\t}\r\n}\r\n" m_Infos: m_Expressions: m_Expressions: @@ -1153,48 +1541,13 @@ VisualEffectResource: m_ExposedExpressions: - nameId: FPS index: 1 - - nameId: Num Particles Per Frame + - nameId: Number of Particles index: 0 - nameId: Particle Color Texture index: 11 - nameId: Particle Position Texture index: 14 m_Buffers: - - type: 1 - size: 3379200 - layout: - - name: position - type: 3 - offset: - bucket: 0 - structure: 8 - element: 0 - - name: color - type: 3 - offset: - bucket: 0 - structure: 8 - element: 4 - - name: lifetime - type: 1 - offset: - bucket: 2457600 - structure: 1 - element: 0 - - name: alive - type: 17 - offset: - bucket: 2764800 - structure: 1 - element: 0 - - name: age - type: 1 - offset: - bucket: 3072000 - structure: 1 - element: 0 - capacity: 307200 - stride: 4 - type: 1 size: 3379200 layout: @@ -1293,6 +1646,7 @@ VisualEffectResource: m_UpdateMode: 0 m_PreWarmDeltaTime: 0.05 m_PreWarmStepCount: 0 + m_InitialEventName: OnPlay m_Systems: - type: 0 flags: 0 @@ -1320,11 +1674,11 @@ VisualEffectResource: - nameId: attributeBuffer index: 0 - nameId: sourceAttributeBuffer - index: 2 + index: 1 - nameId: deadList - index: 3 + index: 2 - nameId: deadListCount - index: 4 + index: 3 - nameId: spawner_input index: 1 values: @@ -1338,11 +1692,11 @@ VisualEffectResource: - nameId: attributeBuffer index: 0 - nameId: deadListIn - index: 3 + index: 2 - nameId: deadListCount - index: 4 + index: 3 - nameId: sourceAttributeBuffer - index: 2 + index: 1 temporaryBuffers: [] values: - nameId: Lifetime_c @@ -1363,7 +1717,7 @@ VisualEffectResource: - nameId: attributeBuffer index: 0 - nameId: deadListOut - index: 3 + index: 2 temporaryBuffers: [] values: - nameId: deltaTime_a @@ -1923,7 +2277,13 @@ MonoBehaviour: m_serializedType: m_SerializableType: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - attributes: [] + attributes: + - m_Type: 3 + m_Min: -Infinity + m_Max: Infinity + m_Tooltip: The uniform size of the particle. + m_Regex: + m_RegexMaxLength: 0 m_Direction: 0 m_LinkedSlots: [] --- !u!114 &8926484042661614608 @@ -2413,7 +2773,14 @@ MonoBehaviour: m_serializedType: m_SerializableType: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - attributes: [] + attributes: + - m_Type: 3 + m_Min: -Infinity + m_Max: Infinity + m_Tooltip: "Indicates how long the particle can stay alive. If the particle\u2019s + age exceeds its lifetime, the particle is destroyed." + m_Regex: + m_RegexMaxLength: 0 m_Direction: 0 m_LinkedSlots: - {fileID: 8926484042661614887} @@ -2512,12 +2879,12 @@ MonoBehaviour: m_Parent: {fileID: 114350483966674976} m_Children: [] m_UIPosition: {x: 0, y: 0} - m_UICollapsed: 1 + m_UICollapsed: 0 m_UISuperCollapsed: 0 m_InputSlots: [] m_OutputSlots: - {fileID: 8926484042661614872} - m_ExposedName: Num Particles Per Frame + m_ExposedName: Number of Particles m_Exposed: 1 m_Order: 2 m_Category: diff --git a/Assets/Scripts/Record3DStream.cs b/Assets/Scripts/Record3DStream.cs index 6c60d7e..b42269a 100644 --- a/Assets/Scripts/Record3DStream.cs +++ b/Assets/Scripts/Record3DStream.cs @@ -6,7 +6,7 @@ using System; using System.IO; using Unity.Collections; -// using UnityEngine.VFX; // Fix for newer versions of Unity +using UnityEngine.VFX; // Fix for newer versions of Unity // Warninig: experimental, pre-pre-alpha quality diff --git a/Assets/Settings/HDRenderPipelineAsset.asset b/Assets/Settings/HDRenderPipelineAsset.asset index 990a00d..731626b 100644 --- a/Assets/Settings/HDRenderPipelineAsset.asset +++ b/Assets/Settings/HDRenderPipelineAsset.asset @@ -12,7 +12,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 0cf1dab834d4ec34195b920ea7bbf9ec, type: 3} m_Name: HDRenderPipelineAsset m_EditorClassIdentifier: - m_Version: 5 + m_Version: 14 m_ObsoleteFrameSettings: overrides: 0 enableShadow: 0 @@ -150,30 +150,43 @@ MonoBehaviour: isFptlEnabled: 0 m_RenderPipelineResources: {fileID: 11400000, guid: 3ce144cff5783da45aa5d4fdc2da14b7, type: 2} + m_RenderPipelineRayTracingResources: {fileID: 0} + m_DefaultVolumeProfile: {fileID: 11400000, guid: f940a8037e6cda542891dc1aac1fa4e8, + type: 2} + m_DefaultLookDevProfile: {fileID: 0} m_RenderingPathDefaultCameraFrameSettings: bitDatas: - data1: 69284264410909 - data2: 4539628424389459968 + data1: 70280696823645 + data2: 4539628425463136256 lodBias: 1 lodBiasMode: 0 + lodBiasQualityLevel: 0 maximumLODLevel: 0 maximumLODLevelMode: 0 + maximumLODLevelQualityLevel: 0 + materialQuality: 0 m_RenderingPathDefaultBakedOrCustomReflectionFrameSettings: bitDatas: - data1: 64881914049309 + data1: 64942043591453 data2: 4539628424389459968 lodBias: 1 lodBiasMode: 0 + lodBiasQualityLevel: 0 maximumLODLevel: 0 maximumLODLevelMode: 0 + maximumLODLevelQualityLevel: 0 + materialQuality: 0 m_RenderingPathDefaultRealtimeReflectionFrameSettings: bitDatas: - data1: 69279803252509 + data1: 69692120112925 data2: 4539628424389459968 lodBias: 1 lodBiasMode: 0 + lodBiasQualityLevel: 0 maximumLODLevel: 0 maximumLODLevelMode: 0 + maximumLODLevelQualityLevel: 0 + materialQuality: 0 m_RenderPipelineSettings: supportShadowMask: 1 supportSSR: 0 @@ -183,25 +196,37 @@ MonoBehaviour: supportVolumetrics: 1 increaseResolutionOfVolumetrics: 0 supportLightLayers: 0 + lightLayerName0: Light Layer default + lightLayerName1: Light Layer 1 + lightLayerName2: Light Layer 2 + lightLayerName3: Light Layer 3 + lightLayerName4: Light Layer 4 + lightLayerName5: Light Layer 5 + lightLayerName6: Light Layer 6 + lightLayerName7: Light Layer 7 supportDistortion: 1 supportTransparentBackface: 1 supportTransparentDepthPrepass: 1 supportTransparentDepthPostpass: 1 colorBufferFormat: 74 + supportCustomPass: 1 + customBufferFormat: 12 supportedLitShaderMode: 2 supportDecals: 1 msaaSampleCount: 1 supportMotionVectors: 1 supportRuntimeDebugDisplay: 1 supportDitheringCrossFade: 1 + supportTerrainHole: 0 supportRayTracing: 0 lightLoopSettings: - cookieSize: 128 - cookieTexArraySize: 16 + cookieAtlasSize: 512 + cookieFormat: 74 pointCookieSize: 128 cubeCookieTexArraySize: 16 - planarReflectionProbeCacheSize: 2 - planarReflectionTextureSize: 1024 + cookieAtlasLastValidMip: 0 + cookieTexArraySize: 16 + planarReflectionAtlasSize: 4096 reflectionProbeCacheSize: 64 reflectionCubemapSize: 256 reflectionCacheCompressed: 0 @@ -216,10 +241,11 @@ MonoBehaviour: maxAreaLightsOnScreen: 64 maxEnvLightsOnScreen: 64 maxDecalsOnScreen: 512 + maxPlanarReflectionOnScreen: 16 hdShadowInitParams: maxShadowRequests: 128 directionalShadowsDepthBits: 32 - shadowQuality: 0 + shadowFilteringQuality: 0 punctualLightShadowAtlas: shadowAtlasResolution: 4096 shadowAtlasDepthBits: 32 @@ -228,6 +254,24 @@ MonoBehaviour: shadowAtlasResolution: 4096 shadowAtlasDepthBits: 32 useDynamicViewportRescale: 1 + shadowResolutionDirectional: + m_Values: 00010000000200000004000000080000 + m_SchemaId: + m_Id: With4Levels + shadowResolutionPunctual: + m_Values: 00010000000200000004000000080000 + m_SchemaId: + m_Id: With4Levels + shadowResolutionArea: + m_Values: 00010000000200000004000000080000 + m_SchemaId: + m_Id: With4Levels + maxDirectionalShadowMapResolution: 2048 + maxPunctualShadowMapResolution: 2048 + maxAreaShadowMapResolution: 2048 + supportScreenSpaceShadows: 0 + maxScreenSpaceShadowSlots: 4 + screenSpaceShadowBufferFormat: 48 decalSettings: drawDistance: 1000 atlasWidth: 4096 @@ -236,6 +280,7 @@ MonoBehaviour: postProcessSettings: m_LutSize: 32 lutFormat: 48 + bufferFormat: 74 dynamicResolutionSettings: enabled: 0 maxPercentage: 100 @@ -248,10 +293,59 @@ MonoBehaviour: enabled: 1 checkerboardDepthBuffer: 1 upsampleType: 1 + xrSettings: + singlePass: 1 + occlusionMesh: 1 + postProcessQualitySettings: + NearBlurSampleCount: 030000000500000008000000 + NearBlurMaxRadius: + - 2 + - 4 + - 7 + FarBlurSampleCount: 04000000070000000e000000 + FarBlurMaxRadius: + - 5 + - 8 + - 13 + DoFResolution: 040000000200000001000000 + DoFHighQualityFiltering: 000101 + MotionBlurSampleCount: 04000000080000000c000000 + BloomRes: 040000000200000002000000 + BloomHighQualityFiltering: 000101 + ChromaticAberrationMaxSamples: 03000000060000000c000000 + lightSettings: + useContactShadow: + m_Values: + m_SchemaId: + m_Id: + maximumLODLevel: + m_Values: 000000000000000000000000 + m_SchemaId: + m_Id: With3Levels + lodBias: + m_Values: + - 1 + - 1 + - 1 + m_SchemaId: + m_Id: With3Levels + lightingQualitySettings: + AOStepCount: 040000000600000010000000 + AOFullRes: 000001 + AOMaximumRadiusPixels: 200000002800000050000000 + AOBilateralUpsample: 000101 + AODirectionCount: 010000000200000004000000 + ContactShadowSampleCount: 060000000a00000010000000 + SSRMaxRaySteps: 100000002000000040000000 allowShaderVariantStripping: 1 enableSRPBatcher: 1 shaderVariantLogLevel: 0 + availableMaterialQualityLevels: -1 + m_DefaultMaterialQualityLevel: 4 diffusionProfileSettings: {fileID: 0} diffusionProfileSettingsList: - {fileID: 11400000, guid: 26bdddf49760c61438938733f07fa2a2, type: 2} - {fileID: 11400000, guid: 78322c7f82657514ebe48203160e3f39, type: 2} + beforeTransparentCustomPostProcesses: [] + beforePostProcessCustomPostProcesses: [] + afterPostProcessCustomPostProcesses: [] diff --git a/Packages/manifest.json b/Packages/manifest.json index 3f56403..e602c81 100644 --- a/Packages/manifest.json +++ b/Packages/manifest.json @@ -2,13 +2,12 @@ "dependencies": { "com.unity.collab-proxy": "1.2.16", "com.unity.ext.nunit": "1.0.0", - "com.unity.ide.rider": "1.1.0", - "com.unity.ide.vscode": "1.1.3", - "com.unity.package-manager-ui": "2.2.0", - "com.unity.render-pipelines.high-definition": "6.9.0-preview", - "com.unity.test-framework": "1.0.13", + "com.unity.ide.rider": "1.1.4", + "com.unity.ide.vscode": "1.2.1", + "com.unity.render-pipelines.high-definition": "7.3.1", + "com.unity.test-framework": "1.1.16", "com.unity.textmeshpro": "2.0.1", - "com.unity.timeline": "1.1.0", + "com.unity.timeline": "1.2.6", "com.unity.ugui": "1.0.0", "com.unity.modules.ai": "1.0.0", "com.unity.modules.androidjni": "1.0.0", diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json new file mode 100644 index 0000000..c582dc7 --- /dev/null +++ b/Packages/packages-lock.json @@ -0,0 +1,360 @@ +{ + "dependencies": { + "com.unity.collab-proxy": { + "version": "1.2.16", + "depth": 0, + "source": "registry", + "dependencies": {}, + "url": "https://packages.unity.com" + }, + "com.unity.ext.nunit": { + "version": "1.0.0", + "depth": 0, + "source": "registry", + "dependencies": {}, + "url": "https://packages.unity.com" + }, + "com.unity.ide.rider": { + "version": "1.1.4", + "depth": 0, + "source": "registry", + "dependencies": { + "com.unity.test-framework": "1.1.3" + }, + "url": "https://packages.unity.com" + }, + "com.unity.ide.vscode": { + "version": "1.2.1", + "depth": 0, + "source": "registry", + "dependencies": {}, + "url": "https://packages.unity.com" + }, + "com.unity.render-pipelines.core": { + "version": "7.3.1", + "depth": 1, + "source": "registry", + "dependencies": { + "com.unity.ugui": "1.0.0" + }, + "url": "https://packages.unity.com" + }, + "com.unity.render-pipelines.high-definition": { + "version": "7.3.1", + "depth": 0, + "source": "registry", + "dependencies": { + "com.unity.render-pipelines.core": "7.3.1", + "com.unity.shadergraph": "7.3.1", + "com.unity.visualeffectgraph": "7.3.1", + "com.unity.render-pipelines.high-definition-config": "7.3.1" + }, + "url": "https://packages.unity.com" + }, + "com.unity.render-pipelines.high-definition-config": { + "version": "7.3.1", + "depth": 1, + "source": "registry", + "dependencies": { + "com.unity.render-pipelines.core": "7.3.1" + }, + "url": "https://packages.unity.com" + }, + "com.unity.shadergraph": { + "version": "7.3.1", + "depth": 1, + "source": "registry", + "dependencies": { + "com.unity.render-pipelines.core": "7.3.1" + }, + "url": "https://packages.unity.com" + }, + "com.unity.test-framework": { + "version": "1.1.16", + "depth": 0, + "source": "registry", + "dependencies": { + "com.unity.ext.nunit": "1.0.0", + "com.unity.modules.imgui": "1.0.0", + "com.unity.modules.jsonserialize": "1.0.0" + }, + "url": "https://packages.unity.com" + }, + "com.unity.textmeshpro": { + "version": "2.0.1", + "depth": 0, + "source": "registry", + "dependencies": { + "com.unity.ugui": "1.0.0" + }, + "url": "https://packages.unity.com" + }, + "com.unity.timeline": { + "version": "1.2.6", + "depth": 0, + "source": "registry", + "dependencies": {}, + "url": "https://packages.unity.com" + }, + "com.unity.ugui": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.ui": "1.0.0", + "com.unity.modules.imgui": "1.0.0" + } + }, + "com.unity.visualeffectgraph": { + "version": "7.3.1", + "depth": 1, + "source": "registry", + "dependencies": { + "com.unity.shadergraph": "7.3.1" + }, + "url": "https://packages.unity.com" + }, + "com.unity.modules.ai": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.androidjni": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.animation": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.assetbundle": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.audio": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.cloth": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.physics": "1.0.0" + } + }, + "com.unity.modules.director": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.audio": "1.0.0", + "com.unity.modules.animation": "1.0.0" + } + }, + "com.unity.modules.imageconversion": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.imgui": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.jsonserialize": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.particlesystem": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.physics": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.physics2d": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.screencapture": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.imageconversion": "1.0.0" + } + }, + "com.unity.modules.subsystems": { + "version": "1.0.0", + "depth": 1, + "source": "builtin", + "dependencies": { + "com.unity.modules.jsonserialize": "1.0.0" + } + }, + "com.unity.modules.terrain": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.terrainphysics": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.physics": "1.0.0", + "com.unity.modules.terrain": "1.0.0" + } + }, + "com.unity.modules.tilemap": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.physics2d": "1.0.0" + } + }, + "com.unity.modules.ui": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.uielements": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.imgui": "1.0.0", + "com.unity.modules.jsonserialize": "1.0.0" + } + }, + "com.unity.modules.umbra": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.unityanalytics": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.unitywebrequest": "1.0.0", + "com.unity.modules.jsonserialize": "1.0.0" + } + }, + "com.unity.modules.unitywebrequest": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.unitywebrequestassetbundle": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.assetbundle": "1.0.0", + "com.unity.modules.unitywebrequest": "1.0.0" + } + }, + "com.unity.modules.unitywebrequestaudio": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.unitywebrequest": "1.0.0", + "com.unity.modules.audio": "1.0.0" + } + }, + "com.unity.modules.unitywebrequesttexture": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.unitywebrequest": "1.0.0", + "com.unity.modules.imageconversion": "1.0.0" + } + }, + "com.unity.modules.unitywebrequestwww": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.unitywebrequest": "1.0.0", + "com.unity.modules.unitywebrequestassetbundle": "1.0.0", + "com.unity.modules.unitywebrequestaudio": "1.0.0", + "com.unity.modules.audio": "1.0.0", + "com.unity.modules.assetbundle": "1.0.0", + "com.unity.modules.imageconversion": "1.0.0" + } + }, + "com.unity.modules.vehicles": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.physics": "1.0.0" + } + }, + "com.unity.modules.video": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.audio": "1.0.0", + "com.unity.modules.ui": "1.0.0", + "com.unity.modules.unitywebrequest": "1.0.0" + } + }, + "com.unity.modules.vr": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.jsonserialize": "1.0.0", + "com.unity.modules.physics": "1.0.0", + "com.unity.modules.xr": "1.0.0" + } + }, + "com.unity.modules.wind": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.xr": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.physics": "1.0.0", + "com.unity.modules.jsonserialize": "1.0.0", + "com.unity.modules.subsystems": "1.0.0" + } + } + } +} diff --git a/ProjectSettings/EditorSettings.asset b/ProjectSettings/EditorSettings.asset index 9c4520d..48170f2 100644 --- a/ProjectSettings/EditorSettings.asset +++ b/ProjectSettings/EditorSettings.asset @@ -3,19 +3,33 @@ --- !u!159 &1 EditorSettings: m_ObjectHideFlags: 0 - serializedVersion: 7 + serializedVersion: 9 m_ExternalVersionControlSupport: Visible Meta Files m_SerializationMode: 2 m_LineEndingsForNewScripts: 0 m_DefaultBehaviorMode: 0 + m_PrefabRegularEnvironment: {fileID: 0} + m_PrefabUIEnvironment: {fileID: 0} m_SpritePackerMode: 0 m_SpritePackerPaddingPower: 1 m_EtcTextureCompressorBehavior: 1 m_EtcTextureFastCompressor: 1 m_EtcTextureNormalCompressor: 2 m_EtcTextureBestCompressor: 4 - m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;rsp + m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;rsp;asmref m_ProjectGenerationRootNamespace: - m_UserGeneratedProjectSuffix: m_CollabEditorSettings: inProgressEnabled: 1 + m_EnableTextureStreamingInEditMode: 1 + m_EnableTextureStreamingInPlayMode: 1 + m_AsyncShaderCompilation: 1 + m_EnterPlayModeOptionsEnabled: 0 + m_EnterPlayModeOptions: 3 + m_ShowLightmapResolutionOverlay: 1 + m_UseLegacyProbeSampleCount: 1 + m_AssetPipelineMode: 1 + m_CacheServerMode: 0 + m_CacheServerEndpoint: + m_CacheServerNamespacePrefix: default + m_CacheServerEnableDownload: 1 + m_CacheServerEnableUpload: 1 diff --git a/ProjectSettings/HDRPProjectSettings.asset b/ProjectSettings/HDRPProjectSettings.asset index 609a771..6200062 100644 --- a/ProjectSettings/HDRPProjectSettings.asset +++ b/ProjectSettings/HDRPProjectSettings.asset @@ -9,12 +9,17 @@ MonoBehaviour: m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 - m_GeneratorAsset: {fileID: 0} m_Script: {fileID: 11500000, guid: 63a2978a97e4fc04cb9d905947216f3d, type: 3} m_Name: m_EditorClassIdentifier: version: 1 m_DefaultScenePrefabSaved: {fileID: 3628837357921210760, guid: 7a069bc3ea99ce14a9b310b38300d871, type: 2} + m_DefaultDXRScenePrefabSaved: {fileID: 0} m_ProjectSettingFolderPath: HDRPDefaultResources - m_PopupAtStart: 0 + m_WizardPopupAtStart: 1 + m_WizardPopupAlreadyShownOnce: 0 + m_WizardActiveTab: 0 + m_WizardNeedRestartAfterChangingToDX12: 0 + m_WizardNeedToRunFixAllAgainAfterDomainReload: 0 + m_LastMaterialVersion: 2 diff --git a/ProjectSettings/ProjectVersion.txt b/ProjectSettings/ProjectVersion.txt index b414f08..d53ff41 100644 --- a/ProjectSettings/ProjectVersion.txt +++ b/ProjectSettings/ProjectVersion.txt @@ -1,2 +1,2 @@ -m_EditorVersion: 2019.2.21f1 -m_EditorVersionWithRevision: 2019.2.21f1 (9d528d026557) +m_EditorVersion: 2019.4.11f1 +m_EditorVersionWithRevision: 2019.4.11f1 (2d9804dddde7) diff --git a/ProjectSettings/VFXManager.asset b/ProjectSettings/VFXManager.asset index c873c64..15adcb2 100644 --- a/ProjectSettings/VFXManager.asset +++ b/ProjectSettings/VFXManager.asset @@ -6,6 +6,7 @@ VFXManager: m_IndirectShader: {fileID: 7200000, guid: 84a17cfa13e40ae4082ef42714f0a81c, type: 3} m_CopyBufferShader: {fileID: 7200000, guid: 23c51f21a3503f6428b527b01f8a2f4e, type: 3} m_SortShader: {fileID: 7200000, guid: ea257ca3cfb12a642a5025e612af6b2a, type: 3} + m_StripUpdateShader: {fileID: 7200000, guid: 8fa6c4009fe2a4d4486c62736fc30ad8, type: 3} m_RenderPipeSettingsPath: Packages/com.unity.visualeffectgraph/Shaders/RenderPipeline/HDRP m_FixedTimeStep: 0.016666668 m_MaxDeltaTime: 0.05 diff --git a/README.md b/README.md index c4bba2e..7781a9c 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Unity VFX Graph real-time point cloud streaming via Record3D demo +**2020/09/26 Update**: Optimized the project for Unity 2019.4.11f1 + **2020/09/17 Update**: Introduced LiDAR support This demo shows how to use the [Record3D app](https://record3d.app/) to stream Point Clouds from your iPhone/iPad with the TrueDepth camera into Unity VFX Graph in real-time. @@ -15,37 +17,33 @@ This project contains a modified [Particles VFX](https://github.com/keijiro/Rsvf ### What will you need? - An iPhone or iPad with the TrueDepth Camera (FaceID) - [Record3D iOS app](https://record3d.app) (**live streaming requires purchase**) -- Unity 2019.2 or newer +- Unity 2019.4.11 or newer - Make sure you have installed iTunes (on Linux, you will need to install `libusbmuxd-dev` package — should be installed on Ubuntu by default, no action needed) ### Before opening the Unity project - This demo depends on the C++ library [`record3d_unity_streaming`](https://github.com/marek-simonik/record3d_unity_streaming) which you will either need to build yourself or download pre-built (available only for Windows and macOS, you will need to build it yourslef if you are running on Linux). ##### Pre-built library for Windows -Only one `dll` file is needed: [`record3d_unity_streaming.dll`](https://github.com/marek-simonik/record3d_unity_streaming/releases/download/v1.0.0/record3d_unity_streaming.dll). Make sure it is in `PATH` — the easiest way is to copy the file into `C:\Windows\System32` and/or `C:\Windows\SysWOW64`. +Only one `dll` file is needed: [`record3d_unity_streaming.dll`](https://github.com/marek-simonik/record3d_unity_streaming/releases/download/v1.2.0/record3d_unity_streaming.dll). Make sure it is in `PATH` — the easiest way is to copy the file into `C:\Windows\System32` and/or into `C:\Windows\SysWOW64`. ##### Pre-built library for macOS -Similar to Windows, only one `dylib` file is needed: [`librecord3d_unity_streaming.dylib`](https://github.com/marek-simonik/record3d_unity_streaming/releases/download/v1.0.0/librecord3d_unity_streaming.dylib). Make sure it is in `PATH` — the easiest way is to copy the file into `/usr/lib/`. +Similar to Windows, only one `dylib` file is needed: [`librecord3d_unity_streaming.dylib`](https://github.com/marek-simonik/record3d_unity_streaming/releases/download/v1.2.0/librecord3d_unity_streaming.dylib). Just copy it into `/usr/local/lib/`. Alternatively, you can `export` it into `DYLD_LIBRARY_PATH`. ### After opening the Unity project -1. Disable the "Exposure" settings **otherwise you will not see the animation** (I wasn't able to save it): - - Render Settings > Volume (Script) > Procedural Sky > uncheck Exposure - - Post Processing Settings > Volume (Script) > uncheck Exposure - -   +1. Open the LiveStreaming scene (`Assets/LiveStreaming.unity`). 1. Connect your iPhone or iPad to your computer via USB cable. To make things easier, try having connected only single iOS device (if multiple iOS devices are connected, you can change the index of USB device in the "Device Index" property of the "Record 3D Stream" Script). -1. Open Record3D, go to the Settings tab and enable "USB Streaming Mode" (purchase required) +1. Open Record3D, go to the Settings tab and enable "USB Streaming Mode" (purchase required). -1. Go to the Record tab and press the circular red toggle button (you should see "Started, Waiting for Connection" message on your iPhone/iPad) +1. Go to the Record tab and press the circular red toggle button (you should see "Started, Waiting for Connection" message on your iPhone/iPad). -1. Press the "Play" button in Unity and wait +1. Press the "Play" button in Unity and wait. -1. Live stream should appear — you can now switch into the Scene tab to inspect the live stream +1. Live stream should appear — you can now switch into the Scene tab to inspect the live stream. +You can contact me at support@record3d.app if you have any questions or encounter problems. -You can contact me at support@record3d.app if you have any questions or encounter problems. \ No newline at end of file + \ No newline at end of file diff --git a/img/r3d_uvfx_01.png b/img/r3d_uvfx_01.png deleted file mode 100644 index c1e4c8d..0000000 Binary files a/img/r3d_uvfx_01.png and /dev/null differ diff --git a/img/r3d_uvfx_02.png b/img/r3d_uvfx_02.png deleted file mode 100644 index 5cb5b60..0000000 Binary files a/img/r3d_uvfx_02.png and /dev/null differ diff --git a/img/record3d_unity_livestreaming_scene.png b/img/record3d_unity_livestreaming_scene.png new file mode 100644 index 0000000..69730d4 Binary files /dev/null and b/img/record3d_unity_livestreaming_scene.png differ