浏览代码

Updated to 2019.3.0f5 / Rebuilt VFX + Fixes in Game Options

/main
Thomas ICHÉ 5 年前
当前提交
04f0c1ef
共有 27 个文件被更改,包括 4996 次插入5576 次删除
  1. 902
      Assets/Samples/ARRadar/ARRadar.vfx
  2. 818
      Assets/Samples/BonFire/VFX/BonFire.vfx
  3. 263
      Assets/Samples/BonFire/VFX/Clouds.vfx
  4. 752
      Assets/Samples/BonFire/VFX/FlyingLeaves.vfx
  5. 468
      Assets/Samples/Butterflies/Butterflies.vfx
  6. 246
      Assets/Samples/EllenHologram/EllenHologram.vfx
  7. 796
      Assets/Samples/GenieMagicLamp/VFX/GenieFX.vfx
  8. 522
      Assets/Samples/GenieMagicLamp/VFX/SandFX.vfx
  9. 902
      Assets/Samples/GrassWind/Environment_GrassWind.vfx
  10. 277
      Assets/Samples/GrassWind/Grass.vfx
  11. 166
      Assets/Samples/MorphingFace/MorphingFace.vfx
  12. 271
      Assets/Samples/Portal/Portal.vfx
  13. 470
      Assets/Samples/RibbonPack/RibbonPack.vfx
  14. 340
      Assets/Samples/SpaceshipHoloTable/VFX/ARUI-Table-PinScreen.vfx
  15. 318
      Assets/Samples/UnityLogo/UnityLogo.vfx
  16. 812
      Assets/Samples/Visual Effect Graph/7.1.6/VisualEffectGraph Additions/VFX/Bonfire.vfx
  17. 272
      Assets/Samples/Visual Effect Graph/7.1.6/VisualEffectGraph Additions/VFX/Flames.vfx
  18. 889
      Assets/Samples/Visual Effect Graph/7.1.6/VisualEffectGraph Additions/VFX/Lightning.vfx
  19. 263
      Assets/Samples/Visual Effect Graph/7.1.6/VisualEffectGraph Additions/VFX/Smoke.vfx
  20. 214
      Assets/Samples/Visual Effect Graph/7.1.6/VisualEffectGraph Additions/VFX/Sparks.vfx
  21. 286
      Assets/Samples/Volumetric/Volumetric.vfx
  22. 267
      Assets/Samples/VoxelizedTerrain/VoxelizedTerrain.vfx
  23. 43
      Assets/VisualEffectSamples.unity
  24. 2
      Packages/manifest.json
  25. 7
      Packages/net.peeweek.game-options/Runtime/GameOptions.cs
  26. 2
      Packages/net.peeweek.game-options/Runtime/GraphicOptions.cs
  27. 4
      ProjectSettings/ProjectVersion.txt

902
Assets/Samples/ARRadar/ARRadar.vfx
文件差异内容过多而无法显示
查看文件

818
Assets/Samples/BonFire/VFX/BonFire.vfx


m_ShaderSources:
- compute: 1
name: '[Flame]Initialize Particle'
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\r\n\nstruct
1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\n\nstruct
uint particleId;\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\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<uint>
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<uint> eventList;\r\nByteAddressBuffer
inputAdditional;\r\n#endif\r\n\r\n#if HAS_STRIPS\r\nRWBuffer<uint> 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
uint particleId;\n bool alive;\n float age;\n};\n\nstruct SourceAttributes\n{\n};\n\n\n\n\n#define
USE_DEAD_LIST (VFX_USE_ALIVE_CURRENT && !HAS_STRIPS)\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 USE_DEAD_LIST\nRWStructuredBuffer<uint> 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<uint>
eventList;\nByteAddressBuffer inputAdditional;\n#endif\n\n#if HAS_STRIPS\nRWBuffer<uint>
stripDataBuffer;\n#endif\n\n#include \"Packages/com.unity.visualeffectgraph/Shaders/Common/VFXCommonCompute.hlsl\"\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\n\nvoid
*/\n{\n lifetime = lerp(A,B,RAND);\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
*/\n{\n lifetime = lerp(A,B,RAND);\n}\n\n\n\n#if HAS_STRIPS\nbool GetParticleIndex(inout
uint particleIndex, uint stripIndex)\n{\n\tuint relativeIndex;\n\tInterlockedAdd(STRIP_DATA(STRIP_NEXT_INDEX,
stripIndex), 1, relativeIndex);\n\tif (relativeIndex >= PARTICLE_PER_STRIP_COUNT)
// strip is full\n\t{\n\t\tInterlockedAdd(STRIP_DATA(STRIP_NEXT_INDEX, stripIndex),
-1); // Remove previous increment\n\t\treturn false;\n\t}\n\n\tparticleIndex
+ 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
+ relativeIndex) % PARTICLE_PER_STRIP_COUNT);\n return true;\n}\n#endif\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 USE_DEAD_LIST\n maxThreadId
= min(maxThreadId, deadListCount.Load(0x0));\n#elif VFX_USE_SPAWNER_FROM_GPU\n
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\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
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\t\tuint particleIndex = id + currentSpawnIndex;\n\t\t\n#if
!VFX_USE_SPAWNER_FROM_GPU\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\n\t\tAttributes
attributes = (Attributes)0;\n\t\tSourceAttributes sourceAttributes = (SourceAttributes)0;\n\t\t\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 SetAttribute_F01429A3(
\n\n#if VFX_USE_PARTICLEID_CURRENT\n attributes.particleId = particleIndex;\n#endif\n#if
VFX_USE_SEED_CURRENT\n attributes.seed = WangHash(particleIndex ^ systemSeed);\n#endif\n#if
VFX_USE_SPAWNINDEX_CURRENT\n attributes.spawnIndex = id;\n#endif\n#if
HAS_STRIPS\n#if !VFX_USE_SPAWNER_FROM_GPU\n\t\t\n#else\n uint stripIndex
= sourceIndex;\n#endif\n\t\tstripIndex = min(stripIndex, STRIP_COUNT);\n\n
if (!GetParticleIndex(particleIndex, stripIndex))\n return;\n\n
const StripData stripData = GetStripDataFromStripIndex(stripIndex, PARTICLE_PER_STRIP_COUNT);\n\t\tInitStripAttributes(particleIndex,
attributes, stripData);\n\t\t// TODO Change seed to be sure we're deterministic
on random with strip\n#endif\n \n {\n SetAttribute_F01429A3(
}\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
}\n \n\n\t\t\n#if VFX_USE_ALIVE_CURRENT\n if (attributes.alive)\n#endif
\n {\n#if USE_DEAD_LIST\n\t uint deadIndex = deadListIn.DecrementCounter();\n
uint index = deadListIn[deadIndex];\n#else\n uint index = particleIndex;\n#endif\n
attributeBuffer.Store((index * 0x2 + 0x0) << 2,asuint(attributes.lifetime));\n
attributeBuffer.Store((index * 0x1 + 0x40) << 2,asuint(attributes.seed));\n
attributeBuffer.Store((index * 0x3 + 0x60) << 2,asuint(attributes.angleZ));\n

\n\r\n }\r\n }\r\n}\r\n"
\n\n }\n }\n}\n"
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\r\nCBUFFER_START(parameters)\n
1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\nCBUFFER_START(parameters)\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<uint> deadListOut;\r\n#endif\r\n\r\n#if
VFX_HAS_INDIRECT_DRAW\r\nRWStructuredBuffer<uint> indirectBuffer;\r\n#endif\r\n\r\n#if
HAS_STRIPS\r\nRWBuffer<uint> stripDataBuffer;\r\n#endif\r\n\r\n#if VFX_USE_STRIPALIVE_CURRENT\r\nBuffer<uint>
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
bool alive;\n float age;\n};\n\nstruct SourceAttributes\n{\n};\n\n\n\n\n#define
USE_DEAD_LIST (VFX_USE_ALIVE_CURRENT && !HAS_STRIPS)\n\nRWByteAddressBuffer
attributeBuffer;\n\n#if USE_DEAD_LIST\nRWStructuredBuffer<uint> deadListOut;\n#endif\n\n#if
VFX_HAS_INDIRECT_DRAW\nRWStructuredBuffer<uint> indirectBuffer;\n#endif\n\n#if
HAS_STRIPS\nRWBuffer<uint> stripDataBuffer;\n#endif\n\n#if VFX_USE_STRIPALIVE_CURRENT\nBuffer<uint>
attachedStripDataBuffer;\n#endif\n\nCBUFFER_START(updateParams)\n uint nbMax;\n\tuint
dispatchWidth;\n\tuint systemSeed;\nCBUFFER_END\n\n#include \"Packages/com.unity.visualeffectgraph/Shaders/Common/VFXCommonCompute.hlsl\"\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\n\nvoid
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
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
* 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 * 0x3 + 0x61) << 2));\n\t\t\n\r\n\t\tif (attributes.alive)\r\n\t\t{\r\n\t\t\tattributes.lifetime
* NB_THREADS_PER_GROUP;\n\tuint index = id;\n\tif (id < nbMax)\n\t{\n
Attributes attributes = (Attributes)0;\n\t\tSourceAttributes sourceAttributes
= (SourceAttributes)0;\n\n#if VFX_USE_ALIVE_CURRENT\n\t\tattributes.alive =
(attributeBuffer.Load((index * 0x3 + 0x61) << 2));\n\t\t\n\n\t\tif (attributes.alive)\n\t\t{\n\t\t\tattributes.lifetime
asfloat(attributeBuffer.Load((index * 0x3 + 0x62) << 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
asfloat(attributeBuffer.Load((index * 0x3 + 0x62) << 2));\n\t\t\t\n\n\n// Initialize
built-in needed attributes\n#if VFX_USE_OLDPOSITION_CURRENT\n\t\t\tattributes.oldPosition
= attributes.position;\n#endif\n#if HAS_STRIPS\n const StripData
stripData = GetStripDataFromParticleIndex(index, PARTICLE_PER_STRIP_COUNT);\n
InitStripAttributes(index, attributes, stripData);\n#endif\n\t\t\t\n\t\t\t{\n\t\t\t
uint tmp_ba = attributes.particleId ^ asuint(uniform_c);\n\t\t\t float tmp_bb
= FixedRand(tmp_ba);\n\t\t\t float tmp_bc = uniform_b + tmp_bb;\n\t\t\t
float2 tmp_bf = GeneratePerlinNoise(tmp_bc, float3(0.25, 0.5, 2).x, (int)3,

float tmp_bm = (float)10 + tmp_bl;\n\t\t\t SetAttribute_4C62800C( /*inout
*/attributes.angleZ, tmp_bm, Blend_a);\n\t\t\t}\n\t\t\tAge( /*inout */attributes.age,
deltaTime_b);\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 * 0x3
+ 0x60) << 2,asuint(attributes.angleZ));\n\t\t\t\tattributeBuffer.Store((index
* 0x3 + 0x62) << 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
* 0x3 + 0x61) << 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,
deltaTime_b);\n\t\t\tReap(attributes.age, attributes.lifetime, /*inout */attributes.alive);\n\t\t\t\n\n\n\t\t\tif
(attributes.alive)\n\t\t\t{\n\t\t\t\tattributeBuffer.Store((index * 0x3 + 0x60)
<< 2,asuint(attributes.angleZ));\n\t\t\t\tattributeBuffer.Store((index * 0x3
+ 0x62) << 2,asuint(attributes.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\n#if HAS_STRIPS\t\t\t\n\t\t\t\tuint relativeIndexInStrip
= GetRelativeIndex(index, stripData);\n\t\t\t\tInterlockedMin(STRIP_DATA(STRIP_MIN_ALIVE,
stripData.stripIndex), relativeIndexInStrip);\n\t\t\t\tInterlockedMax(STRIP_DATA(STRIP_MAX_ALIVE,
stripData.stripIndex), relativeIndexInStrip);\n#endif\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tattributeBuffer.Store((index
* 0x3 + 0x61) << 2,uint(attributes.alive));\n\t\t\t\t\n\n#if USE_DEAD_LIST
&& !VFX_USE_STRIPALIVE_CURRENT\n\t\t\t\tuint deadIndex = deadListOut.IncrementCounter();\n\t\t\t\tdeadListOut[deadIndex]
= index;\n#endif\n\t\t\t}\n\t\t}\n#if USE_DEAD_LIST && VFX_USE_STRIPALIVE_CURRENT\n
else if (attributes.stripAlive)\n {\n if (STRIP_DATA_X(attachedStripDataBuffer,
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 * 0x2 + 0x0) << 2));\n\t\tattributes.angleZ
= asfloat(attributeBuffer.Load((index * 0x3 + 0x60) << 2));\n\t\tattributes.particleId
= (attributeBuffer.Load((index * 0x2 + 0x1) << 2));\n\t\tattributes.alive =
(attributeBuffer.Load((index * 0x3 + 0x61) << 2));\n\t\tattributes.age = asfloat(attributeBuffer.Load((index
* 0x3 + 0x62) << 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
the particle \n {\n uint deadIndex = deadListOut.IncrementCounter();\n\t\t\t\tdeadListOut[deadIndex]
= index;\n attributes.stripAlive = false;\n \n
} \n }\n#endif\n#else\n\t\tattributes.lifetime = asfloat(attributeBuffer.Load((index
* 0x2 + 0x0) << 2));\n\t\tattributes.angleZ = asfloat(attributeBuffer.Load((index
* 0x3 + 0x60) << 2));\n\t\tattributes.particleId = (attributeBuffer.Load((index
* 0x2 + 0x1) << 2));\n\t\tattributes.alive = (attributeBuffer.Load((index *
0x3 + 0x61) << 2));\n\t\tattributes.age = asfloat(attributeBuffer.Load((index
* 0x3 + 0x62) << 2));\n\t\t\n\n\t\t\n#if VFX_USE_OLDPOSITION_CURRENT\n\t\tattributes.oldPosition
= attributes.position;\n#endif\n#if HAS_STRIPS\n const StripData stripData
= GetStripDataFromParticleIndex(index, PARTICLE_PER_STRIP_COUNT);\n
InitStripAttributes(index, attributes, stripData);\n#endif\n\t\t\n\t\t{\n\t\t
uint tmp_ba = attributes.particleId ^ asuint(uniform_c);\n\t\t float tmp_bb
= FixedRand(tmp_ba);\n\t\t float tmp_bc = uniform_b + tmp_bb;\n\t\t float2
tmp_bf = GeneratePerlinNoise(tmp_bc, float3(0.25, 0.5, 2).x, (int)3, float3(0.25,

SetAttribute_4C62800C( /*inout */attributes.angleZ, tmp_bm, Blend_a);\n\t\t}\n\t\tAge(
/*inout */attributes.age, deltaTime_b);\n\t\tReap(attributes.age, attributes.lifetime,
/*inout */attributes.alive);\n\t\t\n\r\n\t\tattributeBuffer.Store((index *
0x3 + 0x60) << 2,asuint(attributes.angleZ));\n\t\tattributeBuffer.Store((index
/*inout */attributes.alive);\n\t\t\n\n\t\tattributeBuffer.Store((index * 0x3
+ 0x60) << 2,asuint(attributes.angleZ));\n\t\tattributeBuffer.Store((index
* 0x3 + 0x62) << 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"
* 0x3 + 0x62) << 2,asuint(attributes.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"
source: "Shader \"Hidden/VFX/BonFire/Flame/Output Particle Octagon\"\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\"
source: "Shader \"Hidden/VFX/BonFire/Flame/Output Particle Octagon\"\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\t\n\t\t\n\t\t\n\t\t\n\t\tBlend
SrcAlpha OneMinusSrcAlpha \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\n\t\t#define
NB_THREADS_PER_GROUP 64\n\t\t#define HAS_ATTRIBUTES 1\n\t\t#define VFX_PASSDEPTH_ACTUAL

to always use a valid instanceID\n\t\t#if defined(UNITY_STEREO_INSTANCING_ENABLED)\n\t\t\t#define
VFX_DECLARE_INSTANCE_ID UNITY_VERTEX_INPUT_INSTANCE_ID\n\t\t\t#define VFX_GET_INSTANCE_ID(i)
unity_InstanceID\n\t\t#else\n\t\t\t#define VFX_DECLARE_INSTANCE_ID uint
instanceID : SV_InstanceID;\n\t\t\t#define VFX_GET_INSTANCE_ID(i) i.instanceID\n\t\t#endif\n\t\t\n\t\tENDHLSL\n\t\t\n\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
instanceID : SV_InstanceID;\n\t\t\t#define VFX_GET_INSTANCE_ID(i) i.instanceID\n\t\t#endif\n\t\t\n\t\tENDHLSL\n\t\t\n\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"SceneSelectionPass\" }\n\t\t\n\t\t\tZWrite On\n\t\t\tBlend
Off\n\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#define VFX_PASSDEPTH VFX_PASSDEPTH_SELECTION\n\t\t\t#pragma
target 4.5\n\t\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

0.5f, encodedMotionVector);\n\t\t\t\t\t\t\t\n\t\t\t\t\treturn encodedMotionVector;\n\t\t\t\t#elif
VFX_PASSDEPTH == VFX_PASSDEPTH_SELECTION\n\t\t\t\t\treturn float4(_ObjectId,
_PassValue, 1.0, 1.0);\n\t\t\t\t#elif VFX_PASSDEPTH == VFX_PASSDEPTH_ACTUAL\n\t\t\t\t\treturn
(float4)0;\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH undefined \n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\t\r\n\t\t\r\n\t\t//
(float4)0;\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH undefined \n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\t\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#pragma multi_compile
_ DEBUG_DISPLAY\n\t\t\n\t\t\tstruct ps_input\n\t\t\t{\n\t\t\t\tfloat4 pos :

encodedMotionVector = 0.0f;\n\t\t\t\t\t\tVFXEncodeMotionVector(velocity * 0.5f,
encodedMotionVector);\n\t\t\t\t\t\t\n\t\t\t\to.outMotionVector = encodedMotionVector;\n\t\t
o.outMotionVector.a = o.color.a < i.VFX_VARYING_ALPHATHRESHOLD ? 0.0f : 1.0f;
//Independant clipping for motion vector pass\n\t\t#endif\n\t\t\t\treturn o;\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\t\r\n\t}\r\n}\r\n"
//Independant clipping for motion vector pass\n\t\t#endif\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"
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
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
VFX_LOCAL_SPACE 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\nCBUFFER_START(parameters)\n
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\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<uint> 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<uint>
eventList;\r\nByteAddressBuffer inputAdditional;\r\n#endif\r\n\r\n#if HAS_STRIPS\r\nRWBuffer<uint>
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
SourceAttributes\n{\n};\n\n\n\n\n#define USE_DEAD_LIST (VFX_USE_ALIVE_CURRENT
&& !HAS_STRIPS)\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
USE_DEAD_LIST\nRWStructuredBuffer<uint> 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<uint>
eventList;\nByteAddressBuffer inputAdditional;\n#endif\n\n#if HAS_STRIPS\nRWBuffer<uint>
stripDataBuffer;\n#endif\n\n#include \"Packages/com.unity.visualeffectgraph/Shaders/Common/VFXCommonCompute.hlsl\"\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\n\nvoid
PositionSphere_0(inout float3 position, inout uint seed, inout float3 direction,
float3 ArcSphere_sphere_center, float ArcSphere_sphere_radius, float ArcSphere_arc,
float volumeFactor) /*positionMode:Surface spawnMode:Random */\n{\n float

/*attribute:size Composition:Overwrite AlphaComposition:Overwrite SampleMode:Random
Mode:PerComponent ColorMode:ColorAndAlpha channels:XYZ */\n{\n float t =
RAND;\n float value = 0.0f;\n value = SampleCurve(Size, t);\n size
= value;\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
= value;\n}\n\n\n\n#if HAS_STRIPS\nbool GetParticleIndex(inout uint particleIndex,
uint stripIndex)\n{\n\tuint relativeIndex;\n\tInterlockedAdd(STRIP_DATA(STRIP_NEXT_INDEX,
stripIndex), 1, relativeIndex);\n\tif (relativeIndex >= PARTICLE_PER_STRIP_COUNT)
// strip is full\n\t{\n\t\tInterlockedAdd(STRIP_DATA(STRIP_NEXT_INDEX, stripIndex),
-1); // Remove previous increment\n\t\treturn false;\n\t}\n\n\tparticleIndex
+ 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
+ relativeIndex) % PARTICLE_PER_STRIP_COUNT);\n return true;\n}\n#endif\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 USE_DEAD_LIST\n maxThreadId
= min(maxThreadId, deadListCount.Load(0x0));\n#elif VFX_USE_SPAWNER_FROM_GPU\n
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\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
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\t\tuint particleIndex = id + currentSpawnIndex;\n\t\t\n#if
!VFX_USE_SPAWNER_FROM_GPU\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\n\t\tAttributes
attributes = (Attributes)0;\n\t\tSourceAttributes sourceAttributes = (SourceAttributes)0;\n\t\t\n
= (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 PositionSphere_0(
= (bool)true;\n attributes.age = (float)0;\n \n\n#if VFX_USE_PARTICLEID_CURRENT\n
attributes.particleId = particleIndex;\n#endif\n#if VFX_USE_SEED_CURRENT\n
attributes.seed = WangHash(particleIndex ^ systemSeed);\n#endif\n#if VFX_USE_SPAWNINDEX_CURRENT\n
attributes.spawnIndex = id;\n#endif\n#if HAS_STRIPS\n#if !VFX_USE_SPAWNER_FROM_GPU\n\t\t\n#else\n
uint stripIndex = sourceIndex;\n#endif\n\t\tstripIndex = min(stripIndex, STRIP_COUNT);\n\n
if (!GetParticleIndex(particleIndex, stripIndex))\n return;\n\n
const StripData stripData = GetStripDataFromStripIndex(stripIndex, PARTICLE_PER_STRIP_COUNT);\n\t\tInitStripAttributes(particleIndex,
attributes, stripData);\n\t\t// TODO Change seed to be sure we're deterministic
on random with strip\n#endif\n \n {\n PositionSphere_0(
/*inout */attributes.position, /*inout */attributes.seed, /*inout */attributes.direction,
float3(0, 0.200000003, 0), (float)0.400000006, (float)6.28318548, (float)1);\n
}\n {\n SetAttribute_E6295C0( /*inout */attributes.velocity,

}\n AttributeFromCurve_4D213503( /*inout */attributes.size, /*inout
*/attributes.seed, Size_d);\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 * 0x4 + 0x0) << 2,asuint(attributes.position));\n
attributeBuffer.Store((index * 0x2 + 0x80) << 2,asuint(attributes.seed));\n
attributeBuffer.Store3((index * 0x8 + 0xC0) << 2,asuint(attributes.velocity));\n
attributeBuffer.Store((index * 0x2 + 0x1C0) << 2,asuint(attributes.lifetime));\n
attributeBuffer.Store((index * 0x2 + 0x81) << 2,asuint(attributes.size));\n
attributeBuffer.Store((index * 0x2 + 0x1C1) << 2,asuint(attributes.particleId));\n
attributeBuffer.Store((index * 0x8 + 0xC3) << 2,uint(attributes.alive));\n
attributeBuffer.Store((index * 0x8 + 0xC4) << 2,asuint(attributes.age));\n
\n\r\n }\r\n }\r\n}\r\n"
*/attributes.seed, Size_d);\n \n\n\t\t\n#if VFX_USE_ALIVE_CURRENT\n
if (attributes.alive)\n#endif \n {\n#if USE_DEAD_LIST\n\t
uint deadIndex = deadListIn.DecrementCounter();\n uint index = deadListIn[deadIndex];\n#else\n
uint index = particleIndex;\n#endif\n attributeBuffer.Store3((index
* 0x4 + 0x0) << 2,asuint(attributes.position));\n attributeBuffer.Store((index
* 0x2 + 0x80) << 2,asuint(attributes.seed));\n attributeBuffer.Store3((index
* 0x8 + 0xC0) << 2,asuint(attributes.velocity));\n attributeBuffer.Store((index
* 0x2 + 0x1C0) << 2,asuint(attributes.lifetime));\n attributeBuffer.Store((index
* 0x2 + 0x81) << 2,asuint(attributes.size));\n attributeBuffer.Store((index
* 0x2 + 0x1C1) << 2,asuint(attributes.particleId));\n attributeBuffer.Store((index
* 0x8 + 0xC3) << 2,uint(attributes.alive));\n attributeBuffer.Store((index
* 0x8 + 0xC4) << 2,asuint(attributes.age));\n \n\n }\n
}\n}\n"
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
1\n#define VFX_HAS_INDIRECT_DRAW 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
1\n#define VFX_HAS_INDIRECT_DRAW 1\n#define VFX_LOCAL_SPACE 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\nCBUFFER_START(parameters)\n
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<uint>
deadListOut;\r\n#endif\r\n\r\n#if VFX_HAS_INDIRECT_DRAW\r\nRWStructuredBuffer<uint>
indirectBuffer;\r\n#endif\r\n\r\n#if HAS_STRIPS\r\nRWBuffer<uint> stripDataBuffer;\r\n#endif\r\n\r\n#if
VFX_USE_STRIPALIVE_CURRENT\r\nBuffer<uint> 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
SourceAttributes\n{\n};\n\n\n\n\n#define USE_DEAD_LIST (VFX_USE_ALIVE_CURRENT
&& !HAS_STRIPS)\n\nRWByteAddressBuffer attributeBuffer;\n\n#if USE_DEAD_LIST\nRWStructuredBuffer<uint>
deadListOut;\n#endif\n\n#if VFX_HAS_INDIRECT_DRAW\nRWStructuredBuffer<uint>
indirectBuffer;\n#endif\n\n#if HAS_STRIPS\nRWBuffer<uint> stripDataBuffer;\n#endif\n\n#if
VFX_USE_STRIPALIVE_CURRENT\nBuffer<uint> attachedStripDataBuffer;\n#endif\n\nCBUFFER_START(updateParams)\n
uint nbMax;\n\tuint dispatchWidth;\n\tuint systemSeed;\nCBUFFER_END\n\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\r\n\r\nvoid
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\n\nvoid
Force_1(inout float3 velocity, float mass, float3 Velocity, float Drag, float
deltaTime) /*Mode:Relative */\n{\n velocity += (Velocity - velocity) * min(1.0f,Drag
* deltaTime / mass);\n}\nvoid Turbulence_18C(float3 position, inout float3

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
}\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
* 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 + 0xC3) << 2));\n\t\t\n\r\n\t\tif (attributes.alive)\r\n\t\t{\r\n\t\t\tattributes.position
* NB_THREADS_PER_GROUP;\n\tuint index = id;\n\tif (id < nbMax)\n\t{\n
Attributes attributes = (Attributes)0;\n\t\tSourceAttributes sourceAttributes
= (SourceAttributes)0;\n\n#if VFX_USE_ALIVE_CURRENT\n\t\tattributes.alive =
(attributeBuffer.Load((index * 0x8 + 0xC3) << 2));\n\t\t\n\n\t\tif (attributes.alive)\n\t\t{\n\t\t\tattributes.position
* 0x8 + 0xC4) << 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 uint tmp_bf = attributes.particleId
* 0x8 + 0xC4) << 2));\n\t\t\t\n\n\n// Initialize built-in needed attributes\n#if
VFX_USE_OLDPOSITION_CURRENT\n\t\t\tattributes.oldPosition = attributes.position;\n#endif\n#if
HAS_STRIPS\n const StripData stripData = GetStripDataFromParticleIndex(index,
PARTICLE_PER_STRIP_COUNT);\n InitStripAttributes(index, attributes,
stripData);\n#endif\n\t\t\t\n\t\t\t{\n\t\t\t uint tmp_bf = attributes.particleId
^ asuint(uniform_d);\n\t\t\t float tmp_bg = FixedRand(tmp_bf);\n\t\t\t
float tmp_bh = uniform_c + tmp_bg;\n\t\t\t float2 tmp_bk = GeneratePerlinNoise(tmp_bh,
float3(0.25, 0.5, 2).x, (int)3, float3(0.25, 0.5, 2).y, float3(0.25, 0.5, 2).z);\n\t\t\t

(float)5, (float)1, (float)3, (float)0.5, (float)2, (int)3, 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
/*inout */attributes.alive);\n\t\t\t\n\n\n\t\t\tif (attributes.alive)\n\t\t\t{\n\t\t\t\tattributeBuffer.Store3((index
* 0x8 + 0xC4) << 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 + 0xC3) << 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,
* 0x8 + 0xC4) << 2,asuint(attributes.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\n#if HAS_STRIPS\t\t\t\n\t\t\t\tuint relativeIndexInStrip
= GetRelativeIndex(index, stripData);\n\t\t\t\tInterlockedMin(STRIP_DATA(STRIP_MIN_ALIVE,
stripData.stripIndex), relativeIndexInStrip);\n\t\t\t\tInterlockedMax(STRIP_DATA(STRIP_MAX_ALIVE,
stripData.stripIndex), relativeIndexInStrip);\n#endif\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tattributeBuffer.Store((index
* 0x8 + 0xC3) << 2,uint(attributes.alive));\n\t\t\t\t\n\n#if USE_DEAD_LIST
&& !VFX_USE_STRIPALIVE_CURRENT\n\t\t\t\tuint deadIndex = deadListOut.IncrementCounter();\n\t\t\t\tdeadListOut[deadIndex]
= index;\n#endif\n\t\t\t}\n\t\t}\n#if USE_DEAD_LIST && VFX_USE_STRIPALIVE_CURRENT\n
else if (attributes.stripAlive)\n {\n if (STRIP_DATA_X(attachedStripDataBuffer,
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.position
= asfloat(attributeBuffer.Load3((index * 0x4 + 0x0) << 2));\n\t\tattributes.velocity
= asfloat(attributeBuffer.Load3((index * 0x8 + 0xC0) << 2));\n\t\tattributes.lifetime
= asfloat(attributeBuffer.Load((index * 0x2 + 0x1C0) << 2));\n\t\tattributes.mass
= (float)1;\n\t\tattributes.particleId = (attributeBuffer.Load((index * 0x2
+ 0x1C1) << 2));\n\t\tattributes.alive = (attributeBuffer.Load((index * 0x8
+ 0xC3) << 2));\n\t\tattributes.age = asfloat(attributeBuffer.Load((index *
0x8 + 0xC4) << 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
uint tmp_bf = attributes.particleId ^ asuint(uniform_d);\n\t\t float tmp_bg
= FixedRand(tmp_bf);\n\t\t float tmp_bh = uniform_c + tmp_bg;\n\t\t float2
tmp_bk = GeneratePerlinNoise(tmp_bh, float3(0.25, 0.5, 2).x, (int)3, float3(0.25,
0.5, 2).y, float3(0.25, 0.5, 2).z);\n\t\t float tmp_bl = tmp_bk[0];\n\t\t
float tmp_bn = tmp_bl - (float)-1;\n\t\t float tmp_bp = tmp_bn / (float)2;\n\t\t
float3 tmp_bq = float3(tmp_bp, tmp_bp, tmp_bp);\n\t\t float3 tmp_bs = tmp_bq
* float3(2, -1, 0);\n\t\t float3 tmp_bt = float3(1, 1, 0) + tmp_bs;\n\t\t
float3 tmp_bu = mul((float3x3)uniform_b, tmp_bt);\n\t\t Force_1( /*inout
*/attributes.velocity, attributes.mass, tmp_bu, (float)0.5, deltaTime_a);\n\t\t}\n\t\t{\n\t\t
Turbulence_18C(attributes.position, /*inout */attributes.velocity, attributes.mass,
InvFieldTransform_b, FieldTransform_b, (float)5, (float)1, (float)3, (float)0.5,
(float)2, (int)3, 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
* 0x4 + 0x0) << 2,asuint(attributes.position));\n\t\tattributeBuffer.Store3((index
the particle \n {\n uint deadIndex = deadListOut.IncrementCounter();\n\t\t\t\tdeadListOut[deadIndex]
= index;\n attributes.stripAlive = false;\n \n
} \n }\n#endif\n#else\n\t\tattributes.position = asfloat(attributeBuffer.Load3((index
* 0x4 + 0x0) << 2));\n\t\tattributes.velocity = asfloat(attributeBuffer.Load3((index
* 0x8 + 0xC0) << 2));\n\t\tattributes.lifetime = asfloat(attributeBuffer.Load((index
* 0x2 + 0x1C0) << 2));\n\t\tattributes.mass = (float)1;\n\t\tattributes.particleId
= (attributeBuffer.Load((index * 0x2 + 0x1C1) << 2));\n\t\tattributes.alive
= (attributeBuffer.Load((index * 0x8 + 0xC3) << 2));\n\t\tattributes.age =
asfloat(attributeBuffer.Load((index * 0x8 + 0xC4) << 2));\n\t\t\n\n\t\t\n#if
VFX_USE_OLDPOSITION_CURRENT\n\t\tattributes.oldPosition = attributes.position;\n#endif\n#if
HAS_STRIPS\n const StripData stripData = GetStripDataFromParticleIndex(index,
PARTICLE_PER_STRIP_COUNT);\n InitStripAttributes(index, attributes,
stripData);\n#endif\n\t\t\n\t\t{\n\t\t uint tmp_bf = attributes.particleId
^ asuint(uniform_d);\n\t\t float tmp_bg = FixedRand(tmp_bf);\n\t\t float
tmp_bh = uniform_c + tmp_bg;\n\t\t float2 tmp_bk = GeneratePerlinNoise(tmp_bh,
float3(0.25, 0.5, 2).x, (int)3, float3(0.25, 0.5, 2).y, float3(0.25, 0.5, 2).z);\n\t\t
float tmp_bl = tmp_bk[0];\n\t\t float tmp_bn = tmp_bl - (float)-1;\n\t\t
float tmp_bp = tmp_bn / (float)2;\n\t\t float3 tmp_bq = float3(tmp_bp, tmp_bp,
tmp_bp);\n\t\t float3 tmp_bs = tmp_bq * float3(2, -1, 0);\n\t\t float3
tmp_bt = float3(1, 1, 0) + tmp_bs;\n\t\t float3 tmp_bu = mul((float3x3)uniform_b,
tmp_bt);\n\t\t Force_1( /*inout */attributes.velocity, attributes.mass,
tmp_bu, (float)0.5, deltaTime_a);\n\t\t}\n\t\t{\n\t\t Turbulence_18C(attributes.position,
/*inout */attributes.velocity, attributes.mass, InvFieldTransform_b, FieldTransform_b,
(float)5, (float)1, (float)3, (float)0.5, (float)2, (int)3, 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\n\t\tattributeBuffer.Store3((index * 0x4
+ 0x0) << 2,asuint(attributes.position));\n\t\tattributeBuffer.Store3((index
* 0x8 + 0xC4) << 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"
* 0x8 + 0xC4) << 2,asuint(attributes.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"
source: "Shader \"Hidden/VFX/BonFire/Embers/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\"
source: "Shader \"Hidden/VFX/BonFire/Embers/Output Particle Quad\"\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\t\n\t\t\n\t\t\n\t\t\n\t\tBlend
SrcAlpha OneMinusSrcAlpha \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\n\t\t#define
NB_THREADS_PER_GROUP 64\n\t\t#define HAS_ATTRIBUTES 1\n\t\t#define VFX_PASSDEPTH_ACTUAL

to always use a valid instanceID\n\t\t#if defined(UNITY_STEREO_INSTANCING_ENABLED)\n\t\t\t#define
VFX_DECLARE_INSTANCE_ID UNITY_VERTEX_INPUT_INSTANCE_ID\n\t\t\t#define VFX_GET_INSTANCE_ID(i)
unity_InstanceID\n\t\t#else\n\t\t\t#define VFX_DECLARE_INSTANCE_ID uint
instanceID : SV_InstanceID;\n\t\t\t#define VFX_GET_INSTANCE_ID(i) i.instanceID\n\t\t#endif\n\t\t\n\t\tENDHLSL\n\t\t\n\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
instanceID : SV_InstanceID;\n\t\t\t#define VFX_GET_INSTANCE_ID(i) i.instanceID\n\t\t#endif\n\t\t\n\t\tENDHLSL\n\t\t\n\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"SceneSelectionPass\" }\n\t\t\n\t\t\tZWrite On\n\t\t\tBlend
Off\n\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#define VFX_PASSDEPTH VFX_PASSDEPTH_SELECTION\n\t\t\t#pragma
target 4.5\n\t\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

0.5f, encodedMotionVector);\n\t\t\t\t\t\t\t\n\t\t\t\t\treturn encodedMotionVector;\n\t\t\t\t#elif
VFX_PASSDEPTH == VFX_PASSDEPTH_SELECTION\n\t\t\t\t\treturn float4(_ObjectId,
_PassValue, 1.0, 1.0);\n\t\t\t\t#elif VFX_PASSDEPTH == VFX_PASSDEPTH_ACTUAL\n\t\t\t\t\treturn
(float4)0;\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH undefined \n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\t\r\n\t\t\r\n\t\t//
(float4)0;\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH undefined \n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\t\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#pragma multi_compile
_ DEBUG_DISPLAY\n\t\t\n\t\t\tstruct ps_input\n\t\t\t{\n\t\t\t\tfloat4 pos :

encodedMotionVector = 0.0f;\n\t\t\t\t\t\tVFXEncodeMotionVector(velocity * 0.5f,
encodedMotionVector);\n\t\t\t\t\t\t\n\t\t\t\to.outMotionVector = encodedMotionVector;\n\t\t
o.outMotionVector.a = o.color.a < i.VFX_VARYING_ALPHATHRESHOLD ? 0.0f : 1.0f;
//Independant clipping for motion vector pass\n\t\t#endif\n\t\t\t\treturn o;\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\t\r\n\t}\r\n}\r\n"
//Independant clipping for motion vector pass\n\t\t#endif\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"
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
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
VFX_LOCAL_SPACE 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\nCBUFFER_START(parameters)\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\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<uint>
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<uint> eventList;\r\nByteAddressBuffer
inputAdditional;\r\n#endif\r\n\r\n#if HAS_STRIPS\r\nRWBuffer<uint> 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
bool alive;\n float age;\n};\n\nstruct SourceAttributes\n{\n};\n\n\n\n\n#define
USE_DEAD_LIST (VFX_USE_ALIVE_CURRENT && !HAS_STRIPS)\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 USE_DEAD_LIST\nRWStructuredBuffer<uint> 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<uint>
eventList;\nByteAddressBuffer inputAdditional;\n#endif\n\n#if HAS_STRIPS\nRWBuffer<uint>
stripDataBuffer;\n#endif\n\n#include \"Packages/com.unity.visualeffectgraph/Shaders/Common/VFXCommonCompute.hlsl\"\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\n\nvoid
SetAttribute_E6295C0(inout float3 velocity, inout uint seed, float3 A, float3
B) /*attribute:velocity Composition:Overwrite Source:Slot Random:PerComponent
channels:XYZ */\n{\n velocity = lerp(A,B,RAND3);\n}\nvoid SetAttribute_AA7D638(inout

Source:Slot Random:Uniform channels:Z */\n{\n angleZ = lerp(A.x,B.x,RAND);\n}\nvoid
SetAttribute_F01429A3(inout float lifetime, inout uint seed, float A, float
B) /*attribute:lifetime Composition:Overwrite Source:Slot Random:Uniform channels:XYZ
*/\n{\n lifetime = lerp(A,B,RAND);\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
*/\n{\n lifetime = lerp(A,B,RAND);\n}\n\n\n\n#if HAS_STRIPS\nbool GetParticleIndex(inout
uint particleIndex, uint stripIndex)\n{\n\tuint relativeIndex;\n\tInterlockedAdd(STRIP_DATA(STRIP_NEXT_INDEX,
stripIndex), 1, relativeIndex);\n\tif (relativeIndex >= PARTICLE_PER_STRIP_COUNT)
// strip is full\n\t{\n\t\tInterlockedAdd(STRIP_DATA(STRIP_NEXT_INDEX, stripIndex),
-1); // Remove previous increment\n\t\treturn false;\n\t}\n\n\tparticleIndex
+ 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
+ relativeIndex) % PARTICLE_PER_STRIP_COUNT);\n return true;\n}\n#endif\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 USE_DEAD_LIST\n maxThreadId
= min(maxThreadId, deadListCount.Load(0x0));\n#elif VFX_USE_SPAWNER_FROM_GPU\n
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\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
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\t\tuint particleIndex = id + currentSpawnIndex;\n\t\t\n#if
!VFX_USE_SPAWNER_FROM_GPU\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\n\t\tAttributes
attributes = (Attributes)0;\n\t\tSourceAttributes sourceAttributes = (SourceAttributes)0;\n\t\t\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 SetAttribute_E6295C0(
attributes.age = (float)0;\n \n\n#if VFX_USE_PARTICLEID_CURRENT\n
attributes.particleId = particleIndex;\n#endif\n#if VFX_USE_SEED_CURRENT\n
attributes.seed = WangHash(particleIndex ^ systemSeed);\n#endif\n#if VFX_USE_SPAWNINDEX_CURRENT\n
attributes.spawnIndex = id;\n#endif\n#if HAS_STRIPS\n#if !VFX_USE_SPAWNER_FROM_GPU\n\t\t\n#else\n
uint stripIndex = sourceIndex;\n#endif\n\t\tstripIndex = min(stripIndex, STRIP_COUNT);\n\n
if (!GetParticleIndex(particleIndex, stripIndex))\n return;\n\n
const StripData stripData = GetStripDataFromStripIndex(stripIndex, PARTICLE_PER_STRIP_COUNT);\n\t\tInitStripAttributes(particleIndex,
attributes, stripData);\n\t\t// TODO Change seed to be sure we're deterministic
on random with strip\n#endif\n \n {\n SetAttribute_E6295C0(
/*inout */attributes.velocity, /*inout */attributes.seed, float3(-0.100000001,
1, -0.100000001), float3(0.100000001, 1.5, 0.100000001));\n }\n
{\n uint tmp_bb = attributes.particleId ^ asuint(uniform_c);\n

SetAttribute_48A7C211( /*inout */attributes.angleZ, /*inout */attributes.seed,
(float)0, (float)360);\n }\n {\n SetAttribute_F01429A3(
/*inout */attributes.lifetime, /*inout */attributes.seed, (float)4, (float)5.5);\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
}\n \n\n\t\t\n#if VFX_USE_ALIVE_CURRENT\n if (attributes.alive)\n#endif
\n {\n#if USE_DEAD_LIST\n\t uint deadIndex = deadListIn.DecrementCounter();\n
uint index = deadListIn[deadIndex];\n#else\n uint index = particleIndex;\n#endif\n
attributeBuffer.Store3((index * 0x4 + 0x0) << 2,asuint(attributes.velocity));\n
attributeBuffer.Store((index * 0x1 + 0x80) << 2,asuint(attributes.angleZ));\n
attributeBuffer.Store((index * 0x1 + 0xA0) << 2,asuint(attributes.lifetime));\n

attributeBuffer.Store((index * 0x3 + 0xE1) << 2,uint(attributes.alive));\n
attributeBuffer.Store((index * 0x3 + 0xE2) << 2,asuint(attributes.age));\n
\n\r\n }\r\n }\r\n}\r\n"
\n\n }\n }\n}\n"
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
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
VFX_LOCAL_SPACE 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\nCBUFFER_START(parameters)\n
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<uint>
deadListOut;\r\n#endif\r\n\r\n#if VFX_HAS_INDIRECT_DRAW\r\nRWStructuredBuffer<uint>
indirectBuffer;\r\n#endif\r\n\r\n#if HAS_STRIPS\r\nRWBuffer<uint> stripDataBuffer;\r\n#endif\r\n\r\n#if
VFX_USE_STRIPALIVE_CURRENT\r\nBuffer<uint> 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
SourceAttributes\n{\n};\n\n\n\n\n#define USE_DEAD_LIST (VFX_USE_ALIVE_CURRENT
&& !HAS_STRIPS)\n\nRWByteAddressBuffer attributeBuffer;\n\n#if USE_DEAD_LIST\nRWStructuredBuffer<uint>
deadListOut;\n#endif\n\n#if VFX_HAS_INDIRECT_DRAW\nRWStructuredBuffer<uint>
indirectBuffer;\n#endif\n\n#if HAS_STRIPS\nRWBuffer<uint> stripDataBuffer;\n#endif\n\n#if
VFX_USE_STRIPALIVE_CURRENT\nBuffer<uint> attachedStripDataBuffer;\n#endif\n\nCBUFFER_START(updateParams)\n
uint nbMax;\n\tuint dispatchWidth;\n\tuint systemSeed;\nCBUFFER_END\n\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\r\n\r\nvoid
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\n\nvoid
Force_1(inout float3 velocity, float mass, float3 Velocity, float Drag, float
deltaTime) /*Mode:Relative */\n{\n velocity += (Velocity - velocity) * min(1.0f,Drag
* deltaTime / mass);\n}\nvoid FlipbookPlay_0(inout float texIndex, float FrameRate,

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 * 0x3 + 0xE1) << 2));\n\t\t\n\r\n\t\tif (attributes.alive)\r\n\t\t{\r\n\t\t\tattributes.velocity
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 Attributes attributes = (Attributes)0;\n\t\tSourceAttributes
sourceAttributes = (SourceAttributes)0;\n\n#if VFX_USE_ALIVE_CURRENT\n\t\tattributes.alive
= (attributeBuffer.Load((index * 0x3 + 0xE1) << 2));\n\t\t\n\n\t\tif (attributes.alive)\n\t\t{\n\t\t\tattributes.velocity
= asfloat(attributeBuffer.Load3((index * 0x4 + 0x0) << 2));\n\t\t\tattributes.lifetime
= asfloat(attributeBuffer.Load((index * 0x1 + 0xA0) << 2));\n\t\t\tattributes.particleId
= (attributeBuffer.Load((index * 0x1 + 0xC0) << 2));\n\t\t\tattributes.mass

* 0x3 + 0xE2) << 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 uint tmp_bd = attributes.particleId
* 0x3 + 0xE2) << 2));\n\t\t\t\n\n\n// Initialize built-in needed attributes\n#if
VFX_USE_OLDPOSITION_CURRENT\n\t\t\tattributes.oldPosition = attributes.position;\n#endif\n#if
HAS_STRIPS\n const StripData stripData = GetStripDataFromParticleIndex(index,
PARTICLE_PER_STRIP_COUNT);\n InitStripAttributes(index, attributes,
stripData);\n#endif\n\t\t\t\n\t\t\t{\n\t\t\t uint tmp_bd = attributes.particleId
^ asuint(uniform_d);\n\t\t\t float tmp_be = FixedRand(tmp_bd);\n\t\t\t
float tmp_bf = uniform_c + tmp_be;\n\t\t\t float2 tmp_bi = GeneratePerlinNoise(tmp_bf,
float3(0.25, 0.5, 2).x, (int)3, float3(0.25, 0.5, 2).y, float3(0.25, 0.5, 2).z);\n\t\t\t

/*inout */attributes.texIndex, (float)18, 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
/*inout */attributes.alive);\n\t\t\t\n\n\n\t\t\tif (attributes.alive)\n\t\t\t{\n\t\t\t\tattributeBuffer.Store3((index
* 0x3 + 0xE2) << 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
* 0x3 + 0xE1) << 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,
* 0x3 + 0xE2) << 2,asuint(attributes.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\n#if HAS_STRIPS\t\t\t\n\t\t\t\tuint relativeIndexInStrip
= GetRelativeIndex(index, stripData);\n\t\t\t\tInterlockedMin(STRIP_DATA(STRIP_MIN_ALIVE,
stripData.stripIndex), relativeIndexInStrip);\n\t\t\t\tInterlockedMax(STRIP_DATA(STRIP_MAX_ALIVE,
stripData.stripIndex), relativeIndexInStrip);\n#endif\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tattributeBuffer.Store((index
* 0x3 + 0xE1) << 2,uint(attributes.alive));\n\t\t\t\t\n\n#if USE_DEAD_LIST
&& !VFX_USE_STRIPALIVE_CURRENT\n\t\t\t\tuint deadIndex = deadListOut.IncrementCounter();\n\t\t\t\tdeadListOut[deadIndex]
= index;\n#endif\n\t\t\t}\n\t\t}\n#if USE_DEAD_LIST && VFX_USE_STRIPALIVE_CURRENT\n
else if (attributes.stripAlive)\n {\n if (STRIP_DATA_X(attachedStripDataBuffer,
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.velocity
= asfloat(attributeBuffer.Load3((index * 0x4 + 0x0) << 2));\n\t\tattributes.lifetime
= asfloat(attributeBuffer.Load((index * 0x1 + 0xA0) << 2));\n\t\tattributes.particleId
= (attributeBuffer.Load((index * 0x1 + 0xC0) << 2));\n\t\tattributes.mass =
(float)1;\n\t\tattributes.texIndex = asfloat(attributeBuffer.Load((index *
0x3 + 0xE0) << 2));\n\t\tattributes.position = asfloat(attributeBuffer.Load3((index
* 0x4 + 0x140) << 2));\n\t\tattributes.alive = (attributeBuffer.Load((index
* 0x3 + 0xE1) << 2));\n\t\tattributes.age = asfloat(attributeBuffer.Load((index
* 0x3 + 0xE2) << 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
uint tmp_bd = attributes.particleId ^ asuint(uniform_d);\n\t\t float tmp_be
= FixedRand(tmp_bd);\n\t\t float tmp_bf = uniform_c + tmp_be;\n\t\t float2
tmp_bi = GeneratePerlinNoise(tmp_bf, float3(0.25, 0.5, 2).x, (int)3, float3(0.25,
0.5, 2).y, float3(0.25, 0.5, 2).z);\n\t\t float tmp_bj = tmp_bi[0];\n\t\t
float tmp_bl = tmp_bj - (float)-1;\n\t\t float tmp_bn = tmp_bl / (float)2;\n\t\t
float3 tmp_bo = float3(tmp_bn, tmp_bn, tmp_bn);\n\t\t float3 tmp_bq = tmp_bo
* float3(2, -1, 0);\n\t\t float3 tmp_br = float3(1, 1, 0) + tmp_bq;\n\t\t
float3 tmp_bs = mul((float3x3)uniform_b, tmp_br);\n\t\t Force_1( /*inout
*/attributes.velocity, attributes.mass, tmp_bs, (float)0.200000003, deltaTime_a);\n\t\t}\n\t\t{\n\t\t
FlipbookPlay_0( /*inout */attributes.texIndex, (float)18, deltaTime_a);\n\t\t}\n\t\tEulerIntegration(
the particle \n {\n uint deadIndex = deadListOut.IncrementCounter();\n\t\t\t\tdeadListOut[deadIndex]
= index;\n attributes.stripAlive = false;\n \n
} \n }\n#endif\n#else\n\t\tattributes.velocity = asfloat(attributeBuffer.Load3((index
* 0x4 + 0x0) << 2));\n\t\tattributes.lifetime = asfloat(attributeBuffer.Load((index
* 0x1 + 0xA0) << 2));\n\t\tattributes.particleId = (attributeBuffer.Load((index
* 0x1 + 0xC0) << 2));\n\t\tattributes.mass = (float)1;\n\t\tattributes.texIndex
= asfloat(attributeBuffer.Load((index * 0x3 + 0xE0) << 2));\n\t\tattributes.position
= asfloat(attributeBuffer.Load3((index * 0x4 + 0x140) << 2));\n\t\tattributes.alive
= (attributeBuffer.Load((index * 0x3 + 0xE1) << 2));\n\t\tattributes.age =
asfloat(attributeBuffer.Load((index * 0x3 + 0xE2) << 2));\n\t\t\n\n\t\t\n#if
VFX_USE_OLDPOSITION_CURRENT\n\t\tattributes.oldPosition = attributes.position;\n#endif\n#if
HAS_STRIPS\n const StripData stripData = GetStripDataFromParticleIndex(index,
PARTICLE_PER_STRIP_COUNT);\n InitStripAttributes(index, attributes,
stripData);\n#endif\n\t\t\n\t\t{\n\t\t uint tmp_bd = attributes.particleId
^ asuint(uniform_d);\n\t\t float tmp_be = FixedRand(tmp_bd);\n\t\t float
tmp_bf = uniform_c + tmp_be;\n\t\t float2 tmp_bi = GeneratePerlinNoise(tmp_bf,
float3(0.25, 0.5, 2).x, (int)3, float3(0.25, 0.5, 2).y, float3(0.25, 0.5, 2).z);\n\t\t
float tmp_bj = tmp_bi[0];\n\t\t float tmp_bl = tmp_bj - (float)-1;\n\t\t
float tmp_bn = tmp_bl / (float)2;\n\t\t float3 tmp_bo = float3(tmp_bn, tmp_bn,
tmp_bn);\n\t\t float3 tmp_bq = tmp_bo * float3(2, -1, 0);\n\t\t float3
tmp_br = float3(1, 1, 0) + tmp_bq;\n\t\t float3 tmp_bs = mul((float3x3)uniform_b,
tmp_br);\n\t\t Force_1( /*inout */attributes.velocity, attributes.mass,
tmp_bs, (float)0.200000003, deltaTime_a);\n\t\t}\n\t\t{\n\t\t FlipbookPlay_0(
/*inout */attributes.texIndex, (float)18, deltaTime_a);\n\t\t}\n\t\tEulerIntegration(
/*inout */attributes.alive);\n\t\t\n\r\n\t\tattributeBuffer.Store3((index *
0x4 + 0x0) << 2,asuint(attributes.velocity));\n\t\tattributeBuffer.Store((index
/*inout */attributes.alive);\n\t\t\n\n\t\tattributeBuffer.Store3((index * 0x4
+ 0x0) << 2,asuint(attributes.velocity));\n\t\tattributeBuffer.Store((index
* 0x3 + 0xE2) << 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"
* 0x3 + 0xE2) << 2,asuint(attributes.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"
source: "Shader \"Hidden/VFX/BonFire/Smoke/Output Particle Lit Octagon\"\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\"
source: "Shader \"Hidden/VFX/BonFire/Smoke/Output Particle Lit Octagon\"\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\t\n\t\t\n\t\t\n\t\t\n\t\tBlend
One OneMinusSrcAlpha \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\n\t\t#define
NB_THREADS_PER_GROUP 64\n\t\t#define HAS_ATTRIBUTES 1\n\t\t#define VFX_PASSDEPTH_ACTUAL

to always use a valid instanceID\n\t\t#if defined(UNITY_STEREO_INSTANCING_ENABLED)\n\t\t\t#define
VFX_DECLARE_INSTANCE_ID UNITY_VERTEX_INPUT_INSTANCE_ID\n\t\t\t#define VFX_GET_INSTANCE_ID(i)
unity_InstanceID\n\t\t#else\n\t\t\t#define VFX_DECLARE_INSTANCE_ID uint
instanceID : SV_InstanceID;\n\t\t\t#define VFX_GET_INSTANCE_ID(i) i.instanceID\n\t\t#endif\n\t\t\n\t\tENDHLSL\n\t\t\n\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
instanceID : SV_InstanceID;\n\t\t\t#define VFX_GET_INSTANCE_ID(i) i.instanceID\n\t\t#endif\n\t\t\n\t\tENDHLSL\n\t\t\n\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"SceneSelectionPass\" }\n\t\t\n\t\t\tZWrite On\n\t\t\tBlend
Off\n\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#define VFX_PASSDEPTH VFX_PASSDEPTH_SELECTION\n\t\t\t#pragma
target 4.5\n\t\t\t#define UNITY_MATERIAL_LIT\n\t\t\t#pragma multi_compile _

for scene selection in the editor, this code allow to output the outline correctly\n\t\t\t\t\toutColor
= float4(_ObjectId, _PassValue, 1.0, 1.0);\n\t\t\t\t#elif VFX_PASSDEPTH ==
VFX_PASSDEPTH_ACTUAL\n\t\t\t\t\t//void\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH
undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//
undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\t\n\t\t\n\t\t\n\t\t//
Forward pass\n\t\tPass\n\t\t{\t\t\n\t\t\tTags { \"LightMode\"=\"Forward\"}\n\t\t\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#pragma
target 4.5\n\t\t\t\n\t\t\t#define UNITY_MATERIAL_LIT\n\t\t\t#define LIGHTLOOP_TILE_PASS\n\t\t\t#define
_ENABLE_FOG_ON_TRANSPARENT\n\t\t\t#define _DISABLE_DECALS\n\t\t\t#define _BLENDMODE_ALPHA\n\t\t\t\n\n\t\t\t#pragma

encodedMotionVector = 0.0f;\n\t\t\t\t\t\tVFXEncodeMotionVector(velocity * 0.5f,
encodedMotionVector);\n\t\t\t\t\t\t\n\t\t\t\toutMotionVector = encodedMotionVector;\n\t\t\t\toutMotionVector.a
= outColor.a < i.VFX_VARYING_ALPHATHRESHOLD ? 0.0f : 1.0f; //Independant clipping
for motion vector pass\n\t\t#endif\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\t\r\n\t}\r\n}\r\n"
for motion vector pass\n\t\t#endif\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\t\n\t}\n}\n"
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
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
1\n#define VFX_LOCAL_SPACE 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\nCBUFFER_START(parameters)\n
SourceAttributes\n{\n};\n\n\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\nCBUFFER_START(params)\r\n
uint nbMax;\r\n uint dispatchWidth;\r\nCBUFFER_END\r\n\r\nCBUFFER_START(cameraParams)\r\n
float3 cameraPosition;\r\nCBUFFER_END\r\n\r\nByteAddressBuffer attributeBuffer;\r\nStructuredBuffer<uint>
inputBuffer;\r\n\r\n#if USE_DEAD_LIST_COUNT\r\nByteAddressBuffer deadListCount;\r\n#endif\r\n\r\nstruct
Kvp\r\n{\r\n\tfloat sortKey;\r\n\tuint index;\r\n};\r\n\r\nRWStructuredBuffer<Kvp>
outputBuffer;\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
threshold = nbMax;\r\n#if USE_DEAD_LIST_COUNT\r\n\tthreshold -= deadListCount.Load(0);\r\n#endif\r\n\tuint
id = groupThreadId.x + groupId.x * NB_THREADS_PER_GROUP + groupId.y * dispatchWidth
* NB_THREADS_PER_GROUP;\r\n\tif (id < threshold)\r\n\t{\r\n\t\tuint index =
inputBuffer[id];\r\n\t\t\r\n\t\tAttributes attributes = (Attributes)0;\r\n\t\tattributes.position
= float3(0, 0, 0);\n\t\t\n\r\n\t\t\r\n#if VFX_LOCAL_SPACE\r\n\t\tfloat3 wPos
= mul(localToWorld,float4(attributes.position,1.0f)).xyz;\r\n#else\r\n\t\tfloat3
wPos = attributes.position;\r\n#endif\r\n\t\tfloat3 camToPos = wPos - cameraPosition;\r\n\t\t\r\n\t\tKvp
kvp;\r\n\t\tkvp.sortKey = dot(camToPos,camToPos); // sqr distance to the camera\r\n\t\tkvp.index
= index;\r\n\r\n\t\toutputBuffer[id] = kvp;\r\n\t}\r\n}\r\n"
SourceAttributes\n{\n};\n\n\n\n#include \"Packages/com.unity.visualeffectgraph/Shaders/Common/VFXCommonCompute.hlsl\"\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\n\nCBUFFER_START(params)\n
uint nbMax;\n uint dispatchWidth;\nCBUFFER_END\n\nCBUFFER_START(cameraParams)\n
float3 cameraPosition;\nCBUFFER_END\n\nByteAddressBuffer attributeBuffer;\nStructuredBuffer<uint>
inputBuffer;\n\n#if USE_DEAD_LIST_COUNT\nByteAddressBuffer deadListCount;\n#endif\n\nstruct
Kvp\n{\n\tfloat sortKey;\n\tuint index;\n};\n\nRWStructuredBuffer<Kvp> outputBuffer;\n\n[numthreads(NB_THREADS_PER_GROUP,1,1)]\nvoid
CSMain(uint3 groupId : SV_GroupID,\n uint3 groupThreadId
: SV_GroupThreadID)\n{\n\tuint threshold = nbMax;\n#if USE_DEAD_LIST_COUNT\n\tthreshold
-= deadListCount.Load(0);\n#endif\n\tuint id = groupThreadId.x + groupId.x
* NB_THREADS_PER_GROUP + groupId.y * dispatchWidth * NB_THREADS_PER_GROUP;\n\tif
(id < threshold)\n\t{\n\t\tuint index = inputBuffer[id];\n\t\t\n\t\tAttributes
attributes = (Attributes)0;\n\t\tattributes.position = float3(0, 0, 0);\n\t\t\n\n\t\t\n#if
VFX_LOCAL_SPACE\n\t\tfloat3 wPos = mul(localToWorld,float4(attributes.position,1.0f)).xyz;\n#else\n\t\tfloat3
wPos = attributes.position;\n#endif\n\t\tfloat3 camToPos = wPos - cameraPosition;\n\t\t\n\t\tKvp
kvp;\n\t\tkvp.sortKey = dot(camToPos,camToPos); // sqr distance to the camera\n\t\tkvp.index
= index;\n\n\t\toutputBuffer[id] = kvp;\n\t}\n}\n"
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
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
1\n#define VFX_LOCAL_SPACE 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\nCBUFFER_START(parameters)\n
SourceAttributes\n{\n};\n\n\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\nCBUFFER_START(params)\r\n
uint nbMax;\r\n uint dispatchWidth;\r\nCBUFFER_END\r\n\r\nCBUFFER_START(cameraParams)\r\n
float3 cameraPosition;\r\nCBUFFER_END\r\n\r\nByteAddressBuffer attributeBuffer;\r\nStructuredBuffer<uint>
inputBuffer;\r\n\r\n#if USE_DEAD_LIST_COUNT\r\nByteAddressBuffer deadListCount;\r\n#endif\r\n\r\nstruct
Kvp\r\n{\r\n\tfloat sortKey;\r\n\tuint index;\r\n};\r\n\r\nRWStructuredBuffer<Kvp>
outputBuffer;\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
threshold = nbMax;\r\n#if USE_DEAD_LIST_COUNT\r\n\tthreshold -= deadListCount.Load(0);\r\n#endif\r\n\tuint
id = groupThreadId.x + groupId.x * NB_THREADS_PER_GROUP + groupId.y * dispatchWidth
* NB_THREADS_PER_GROUP;\r\n\tif (id < threshold)\r\n\t{\r\n\t\tuint index =
inputBuffer[id];\r\n\t\t\r\n\t\tAttributes attributes = (Attributes)0;\r\n\t\tattributes.position
= asfloat(attributeBuffer.Load3((index * 0x4 + 0x0) << 2));\n\t\t\n\r\n\t\t\r\n#if
VFX_LOCAL_SPACE\r\n\t\tfloat3 wPos = mul(localToWorld,float4(attributes.position,1.0f)).xyz;\r\n#else\r\n\t\tfloat3
wPos = attributes.position;\r\n#endif\r\n\t\tfloat3 camToPos = wPos - cameraPosition;\r\n\t\t\r\n\t\tKvp
kvp;\r\n\t\tkvp.sortKey = dot(camToPos,camToPos); // sqr distance to the camera\r\n\t\tkvp.index
= index;\r\n\r\n\t\toutputBuffer[id] = kvp;\r\n\t}\r\n}\r\n"
SourceAttributes\n{\n};\n\n\n\n#include \"Packages/com.unity.visualeffectgraph/Shaders/Common/VFXCommonCompute.hlsl\"\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\n\nCBUFFER_START(params)\n
uint nbMax;\n uint dispatchWidth;\nCBUFFER_END\n\nCBUFFER_START(cameraParams)\n
float3 cameraPosition;\nCBUFFER_END\n\nByteAddressBuffer attributeBuffer;\nStructuredBuffer<uint>
inputBuffer;\n\n#if USE_DEAD_LIST_COUNT\nByteAddressBuffer deadListCount;\n#endif\n\nstruct
Kvp\n{\n\tfloat sortKey;\n\tuint index;\n};\n\nRWStructuredBuffer<Kvp> outputBuffer;\n\n[numthreads(NB_THREADS_PER_GROUP,1,1)]\nvoid
CSMain(uint3 groupId : SV_GroupID,\n uint3 groupThreadId
: SV_GroupThreadID)\n{\n\tuint threshold = nbMax;\n#if USE_DEAD_LIST_COUNT\n\tthreshold
-= deadListCount.Load(0);\n#endif\n\tuint id = groupThreadId.x + groupId.x
* NB_THREADS_PER_GROUP + groupId.y * dispatchWidth * NB_THREADS_PER_GROUP;\n\tif
(id < threshold)\n\t{\n\t\tuint index = inputBuffer[id];\n\t\t\n\t\tAttributes
attributes = (Attributes)0;\n\t\tattributes.position = asfloat(attributeBuffer.Load3((index
* 0x4 + 0x0) << 2));\n\t\t\n\n\t\t\n#if VFX_LOCAL_SPACE\n\t\tfloat3 wPos =
mul(localToWorld,float4(attributes.position,1.0f)).xyz;\n#else\n\t\tfloat3
wPos = attributes.position;\n#endif\n\t\tfloat3 camToPos = wPos - cameraPosition;\n\t\t\n\t\tKvp
kvp;\n\t\tkvp.sortKey = dot(camToPos,camToPos); // sqr distance to the camera\n\t\tkvp.index
= index;\n\n\t\toutputBuffer[id] = kvp;\n\t}\n}\n"
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
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
1\n#define VFX_LOCAL_SPACE 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\nCBUFFER_START(parameters)\n
SourceAttributes\n{\n};\n\n\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\nCBUFFER_START(params)\r\n
uint nbMax;\r\n uint dispatchWidth;\r\nCBUFFER_END\r\n\r\nCBUFFER_START(cameraParams)\r\n
float3 cameraPosition;\r\nCBUFFER_END\r\n\r\nByteAddressBuffer attributeBuffer;\r\nStructuredBuffer<uint>
inputBuffer;\r\n\r\n#if USE_DEAD_LIST_COUNT\r\nByteAddressBuffer deadListCount;\r\n#endif\r\n\r\nstruct
Kvp\r\n{\r\n\tfloat sortKey;\r\n\tuint index;\r\n};\r\n\r\nRWStructuredBuffer<Kvp>
outputBuffer;\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
threshold = nbMax;\r\n#if USE_DEAD_LIST_COUNT\r\n\tthreshold -= deadListCount.Load(0);\r\n#endif\r\n\tuint
id = groupThreadId.x + groupId.x * NB_THREADS_PER_GROUP + groupId.y * dispatchWidth
* NB_THREADS_PER_GROUP;\r\n\tif (id < threshold)\r\n\t{\r\n\t\tuint index =
inputBuffer[id];\r\n\t\t\r\n\t\tAttributes attributes = (Attributes)0;\r\n\t\tattributes.position
= asfloat(attributeBuffer.Load3((index * 0x4 + 0x140) << 2));\n\t\t\n\r\n\t\t\r\n#if
VFX_LOCAL_SPACE\r\n\t\tfloat3 wPos = mul(localToWorld,float4(attributes.position,1.0f)).xyz;\r\n#else\r\n\t\tfloat3
wPos = attributes.position;\r\n#endif\r\n\t\tfloat3 camToPos = wPos - cameraPosition;\r\n\t\t\r\n\t\tKvp
kvp;\r\n\t\tkvp.sortKey = dot(camToPos,camToPos); // sqr distance to the camera\r\n\t\tkvp.index
= index;\r\n\r\n\t\toutputBuffer[id] = kvp;\r\n\t}\r\n}\r\n"
SourceAttributes\n{\n};\n\n\n\n#include \"Packages/com.unity.visualeffectgraph/Shaders/Common/VFXCommonCompute.hlsl\"\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\n\nCBUFFER_START(params)\n
uint nbMax;\n uint dispatchWidth;\nCBUFFER_END\n\nCBUFFER_START(cameraParams)\n
float3 cameraPosition;\nCBUFFER_END\n\nByteAddressBuffer attributeBuffer;\nStructuredBuffer<uint>
inputBuffer;\n\n#if USE_DEAD_LIST_COUNT\nByteAddressBuffer deadListCount;\n#endif\n\nstruct
Kvp\n{\n\tfloat sortKey;\n\tuint index;\n};\n\nRWStructuredBuffer<Kvp> outputBuffer;\n\n[numthreads(NB_THREADS_PER_GROUP,1,1)]\nvoid
CSMain(uint3 groupId : SV_GroupID,\n uint3 groupThreadId
: SV_GroupThreadID)\n{\n\tuint threshold = nbMax;\n#if USE_DEAD_LIST_COUNT\n\tthreshold
-= deadListCount.Load(0);\n#endif\n\tuint id = groupThreadId.x + groupId.x
* NB_THREADS_PER_GROUP + groupId.y * dispatchWidth * NB_THREADS_PER_GROUP;\n\tif
(id < threshold)\n\t{\n\t\tuint index = inputBuffer[id];\n\t\t\n\t\tAttributes
attributes = (Attributes)0;\n\t\tattributes.position = asfloat(attributeBuffer.Load3((index
* 0x4 + 0x140) << 2));\n\t\t\n\n\t\t\n#if VFX_LOCAL_SPACE\n\t\tfloat3 wPos
= mul(localToWorld,float4(attributes.position,1.0f)).xyz;\n#else\n\t\tfloat3
wPos = attributes.position;\n#endif\n\t\tfloat3 camToPos = wPos - cameraPosition;\n\t\t\n\t\tKvp
kvp;\n\t\tkvp.sortKey = dot(camToPos,camToPos); // sqr distance to the camera\n\t\tkvp.index
= index;\n\n\t\toutputBuffer[id] = kvp;\n\t}\n}\n"
m_Infos:
m_Expressions:
m_Expressions:

263
Assets/Samples/BonFire/VFX/Clouds.vfx


m_ShaderSources:
- compute: 1
name: '[System 1]Initialize Particle'
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\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_SEED_CURRENT
1\n#define VFX_USE_DIRECTION_CURRENT 1\n#define VFX_USE_ANGLEX_CURRENT 1\n#define

1\n#define VFX_USE_SIZE_CURRENT 1\n#define VFX_USE_AGE_CURRENT 1\n#define VFX_USE_ALPHA_CURRENT
1\n#define VFX_USE_ALIVE_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
1\n#define VFX_USE_ALIVE_CURRENT 1\n#define VFX_LOCAL_SPACE 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\nCBUFFER_START(parameters)\n
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\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<uint> 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<uint>
eventList;\r\nByteAddressBuffer inputAdditional;\r\n#endif\r\n\r\n#if HAS_STRIPS\r\nRWBuffer<uint>
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
SourceAttributes\n{\n};\n\n\n\n\n#define USE_DEAD_LIST (VFX_USE_ALIVE_CURRENT
&& !HAS_STRIPS)\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
USE_DEAD_LIST\nRWStructuredBuffer<uint> 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<uint>
eventList;\nByteAddressBuffer inputAdditional;\n#endif\n\n#if HAS_STRIPS\nRWBuffer<uint>
stripDataBuffer;\n#endif\n\n#include \"Packages/com.unity.visualeffectgraph/Shaders/Common/VFXCommonCompute.hlsl\"\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\n\nvoid
PositionCircle_18D(inout float3 position, inout uint seed, inout float3 direction,
float rNorm, float sinTheta, float cosTheta, float3 ArcCircle_circle_center)
/*positionMode:Volume spawnMode:Random */\n{\n \n direction = float3(sinTheta,

SetAttribute_D5151642(inout float scaleX, inout float scaleY, inout float scaleZ,
float3 Scale) /*attribute:scale Composition:Overwrite Source:Slot Random:Off
channels:XYZ */\n{\n scaleX = Scale.x;\n scaleY = Scale.y;\n scaleZ
= Scale.z;\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
= Scale.z;\n}\n\n\n\n#if HAS_STRIPS\nbool GetParticleIndex(inout uint particleIndex,
uint stripIndex)\n{\n\tuint relativeIndex;\n\tInterlockedAdd(STRIP_DATA(STRIP_NEXT_INDEX,
stripIndex), 1, relativeIndex);\n\tif (relativeIndex >= PARTICLE_PER_STRIP_COUNT)
// strip is full\n\t{\n\t\tInterlockedAdd(STRIP_DATA(STRIP_NEXT_INDEX, stripIndex),
-1); // Remove previous increment\n\t\treturn false;\n\t}\n\n\tparticleIndex
+ 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
+ relativeIndex) % PARTICLE_PER_STRIP_COUNT);\n return true;\n}\n#endif\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 USE_DEAD_LIST\n maxThreadId
= min(maxThreadId, deadListCount.Load(0x0));\n#elif VFX_USE_SPAWNER_FROM_GPU\n
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\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
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\t\tuint particleIndex = id + currentSpawnIndex;\n\t\t\n#if
!VFX_USE_SPAWNER_FROM_GPU\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\n\t\tAttributes
attributes = (Attributes)0;\n\t\tSourceAttributes sourceAttributes = (SourceAttributes)0;\n\t\t\n
attributes.position = float3(0, 0, 0);\n attributes.seed = (uint)0;\n
attributes.direction = float3(0, 0, 1);\n attributes.angleX = (float)0;\n
attributes.angleY = (float)0;\n attributes.angleZ = (float)0;\n

0);\n attributes.size = (float)0.100000001;\n attributes.age
= (float)0;\n attributes.alpha = (float)1;\n attributes.alive
= (bool)true;\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 float tmp_z = Rand(attributes.seed);\n
float tmp_bb = pow(tmp_z, (float)0.5);\n float tmp_bd = tmp_bb *
(float)1200;\n float tmp_bf = Rand(attributes.seed);\n
= (bool)true;\n \n\n#if VFX_USE_PARTICLEID_CURRENT\n attributes.particleId
= particleIndex;\n#endif\n#if VFX_USE_SEED_CURRENT\n attributes.seed
= WangHash(particleIndex ^ systemSeed);\n#endif\n#if VFX_USE_SPAWNINDEX_CURRENT\n
attributes.spawnIndex = id;\n#endif\n#if HAS_STRIPS\n#if !VFX_USE_SPAWNER_FROM_GPU\n\t\t\n#else\n
uint stripIndex = sourceIndex;\n#endif\n\t\tstripIndex = min(stripIndex, STRIP_COUNT);\n\n
if (!GetParticleIndex(particleIndex, stripIndex))\n return;\n\n
const StripData stripData = GetStripDataFromStripIndex(stripIndex, PARTICLE_PER_STRIP_COUNT);\n\t\tInitStripAttributes(particleIndex,
attributes, stripData);\n\t\t// TODO Change seed to be sure we're deterministic
on random with strip\n#endif\n \n {\n float tmp_z
= Rand(attributes.seed);\n float tmp_bb = pow(tmp_z, (float)0.5);\n
float tmp_bd = tmp_bb * (float)1200;\n float tmp_bf = Rand(attributes.seed);\n
float tmp_bg = (float)6.28318548 * tmp_bf;\n float tmp_bh = sin(tmp_bg);\n
float tmp_bi = cos(tmp_bg);\n PositionCircle_18D( /*inout */attributes.position,
/*inout */attributes.seed, /*inout */attributes.direction, tmp_bd, tmp_bh,

float tmp_be = (float)10 + tmp_bd;\n float3 tmp_bf = float3(tmp_be,
tmp_be, tmp_be);\n SetAttribute_D5151642( /*inout */attributes.scaleX,
/*inout */attributes.scaleY, /*inout */attributes.scaleZ, tmp_bf);\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
}\n \n\n\t\t\n#if VFX_USE_ALIVE_CURRENT\n if (attributes.alive)\n#endif
\n {\n#if USE_DEAD_LIST\n\t uint deadIndex = deadListIn.DecrementCounter();\n
uint index = deadListIn[deadIndex];\n#else\n uint index = particleIndex;\n#endif\n
attributeBuffer.Store3((index * 0x4 + 0x0) << 2,asuint(attributes.position));\n
attributeBuffer.Store((index * 0x6 + 0x1300) << 2,asuint(attributes.angleX));\n
attributeBuffer.Store((index * 0x6 + 0x1301) << 2,asuint(attributes.angleY));\n

attributeBuffer.Store((index * 0x4 + 0x3443) << 2,asuint(attributes.age));\n
attributeBuffer.Store((index * 0x2 + 0x4741) << 2,asuint(attributes.alpha));\n
attributeBuffer.Store((index * 0x1 + 0x50C0) << 2,uint(attributes.alive));\n
\n\r\n }\r\n }\r\n}\r\n"
\n\n }\n }\n}\n"
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
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
VFX_LOCAL_SPACE 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\nCBUFFER_START(parameters)\n
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<uint>
deadListOut;\r\n#endif\r\n\r\n#if VFX_HAS_INDIRECT_DRAW\r\nRWStructuredBuffer<uint>
indirectBuffer;\r\n#endif\r\n\r\n#if HAS_STRIPS\r\nRWBuffer<uint> stripDataBuffer;\r\n#endif\r\n\r\n#if
VFX_USE_STRIPALIVE_CURRENT\r\nBuffer<uint> 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
SourceAttributes\n{\n};\n\n\n\n\n#define USE_DEAD_LIST (VFX_USE_ALIVE_CURRENT
&& !HAS_STRIPS)\n\nRWByteAddressBuffer attributeBuffer;\n\n#if USE_DEAD_LIST\nRWStructuredBuffer<uint>
deadListOut;\n#endif\n\n#if VFX_HAS_INDIRECT_DRAW\nRWStructuredBuffer<uint>
indirectBuffer;\n#endif\n\n#if HAS_STRIPS\nRWBuffer<uint> stripDataBuffer;\n#endif\n\n#if
VFX_USE_STRIPALIVE_CURRENT\nBuffer<uint> attachedStripDataBuffer;\n#endif\n\nCBUFFER_START(updateParams)\n
uint nbMax;\n\tuint dispatchWidth;\n\tuint systemSeed;\nCBUFFER_END\n\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\r\n\r\nvoid
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\n\nvoid
Force_1(inout float3 velocity, float mass, float3 Velocity, float Drag, float
deltaTime) /*Mode:Relative */\n{\n velocity += (Velocity - velocity) * min(1.0f,Drag
* deltaTime / mass);\n}\nvoid AttributeFromCurve_45ABB909(inout float size,

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 * 0x1 + 0x50C0) << 2));\n\t\t\n\r\n\t\tif (attributes.alive)\r\n\t\t{\r\n\t\t\tattributes.position
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 Attributes attributes = (Attributes)0;\n\t\tSourceAttributes
sourceAttributes = (SourceAttributes)0;\n\n#if VFX_USE_ALIVE_CURRENT\n\t\tattributes.alive
= (attributeBuffer.Load((index * 0x1 + 0x50C0) << 2));\n\t\t\n\n\t\tif (attributes.alive)\n\t\t{\n\t\t\tattributes.position
= asfloat(attributeBuffer.Load3((index * 0x4 + 0x0) << 2));\n\t\t\tattributes.lifetime
= asfloat(attributeBuffer.Load((index * 0x1 + 0x2F80) << 2));\n\t\t\tattributes.velocity
= asfloat(attributeBuffer.Load3((index * 0x4 + 0x3440) << 2));\n\t\t\tattributes.mass

* 0x2 + 0x4741) << 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 Force_1( /*inout */attributes.velocity,
* 0x2 + 0x4741) << 2));\n\t\t\t\n\n\n// Initialize built-in needed attributes\n#if
VFX_USE_OLDPOSITION_CURRENT\n\t\t\tattributes.oldPosition = attributes.position;\n#endif\n#if
HAS_STRIPS\n const StripData stripData = GetStripDataFromParticleIndex(index,
PARTICLE_PER_STRIP_COUNT);\n InitStripAttributes(index, attributes,
stripData);\n#endif\n\t\t\t\n\t\t\t{\n\t\t\t Force_1( /*inout */attributes.velocity,
/*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
/*inout */attributes.alive);\n\t\t\t\n\n\n\t\t\tif (attributes.alive)\n\t\t\t{\n\t\t\t\tattributeBuffer.Store3((index
* 0x2 + 0x4741) << 2,asuint(attributes.alpha));\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 + 0x50C0) << 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,
* 0x2 + 0x4741) << 2,asuint(attributes.alpha));\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\n#if HAS_STRIPS\t\t\t\n\t\t\t\tuint relativeIndexInStrip
= GetRelativeIndex(index, stripData);\n\t\t\t\tInterlockedMin(STRIP_DATA(STRIP_MIN_ALIVE,
stripData.stripIndex), relativeIndexInStrip);\n\t\t\t\tInterlockedMax(STRIP_DATA(STRIP_MAX_ALIVE,
stripData.stripIndex), relativeIndexInStrip);\n#endif\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tattributeBuffer.Store((index
* 0x1 + 0x50C0) << 2,uint(attributes.alive));\n\t\t\t\t\n\n#if USE_DEAD_LIST
&& !VFX_USE_STRIPALIVE_CURRENT\n\t\t\t\tuint deadIndex = deadListOut.IncrementCounter();\n\t\t\t\tdeadListOut[deadIndex]
= index;\n#endif\n\t\t\t}\n\t\t}\n#if USE_DEAD_LIST && VFX_USE_STRIPALIVE_CURRENT\n
else if (attributes.stripAlive)\n {\n if (STRIP_DATA_X(attachedStripDataBuffer,
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.position
= asfloat(attributeBuffer.Load3((index * 0x4 + 0x0) << 2));\n\t\tattributes.lifetime
= asfloat(attributeBuffer.Load((index * 0x1 + 0x2F80) << 2));\n\t\tattributes.velocity
= asfloat(attributeBuffer.Load3((index * 0x4 + 0x3440) << 2));\n\t\tattributes.mass
= (float)1;\n\t\tattributes.size = asfloat(attributeBuffer.Load((index * 0x2
+ 0x4740) << 2));\n\t\tattributes.age = asfloat(attributeBuffer.Load((index
* 0x4 + 0x3443) << 2));\n\t\tattributes.alpha = asfloat(attributeBuffer.Load((index
* 0x2 + 0x4741) << 2));\n\t\tattributes.alive = (attributeBuffer.Load((index
* 0x1 + 0x50C0) << 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
the particle \n {\n uint deadIndex = deadListOut.IncrementCounter();\n\t\t\t\tdeadListOut[deadIndex]
= index;\n attributes.stripAlive = false;\n \n
} \n }\n#endif\n#else\n\t\tattributes.position = asfloat(attributeBuffer.Load3((index
* 0x4 + 0x0) << 2));\n\t\tattributes.lifetime = asfloat(attributeBuffer.Load((index
* 0x1 + 0x2F80) << 2));\n\t\tattributes.velocity = asfloat(attributeBuffer.Load3((index
* 0x4 + 0x3440) << 2));\n\t\tattributes.mass = (float)1;\n\t\tattributes.size
= asfloat(attributeBuffer.Load((index * 0x2 + 0x4740) << 2));\n\t\tattributes.age
= asfloat(attributeBuffer.Load((index * 0x4 + 0x3443) << 2));\n\t\tattributes.alpha
= asfloat(attributeBuffer.Load((index * 0x2 + 0x4741) << 2));\n\t\tattributes.alive
= (attributeBuffer.Load((index * 0x1 + 0x50C0) << 2));\n\t\t\n\n\t\t\n#if VFX_USE_OLDPOSITION_CURRENT\n\t\tattributes.oldPosition
= attributes.position;\n#endif\n#if HAS_STRIPS\n const StripData stripData
= GetStripDataFromParticleIndex(index, PARTICLE_PER_STRIP_COUNT);\n
InitStripAttributes(index, attributes, stripData);\n#endif\n\t\t\n\t\t{\n\t\t
Force_1( /*inout */attributes.velocity, attributes.mass, float3(1, 0, 0), (float)1,
deltaTime_a);\n\t\t}\n\t\tAttributeFromCurve_45ABB909( /*inout */attributes.size,
attributes.age, attributes.lifetime, Size_b);\n\t\tAttributeFromCurve_7BA3F6A(

/*inout */attributes.alive);\n\t\t\n\r\n\t\tattributeBuffer.Store3((index *
0x4 + 0x0) << 2,asuint(attributes.position));\n\t\tattributeBuffer.Store3((index
/*inout */attributes.alive);\n\t\t\n\n\t\tattributeBuffer.Store3((index * 0x4
+ 0x0) << 2,asuint(attributes.position));\n\t\tattributeBuffer.Store3((index
* 0x1 + 0x50C0) << 2,uint(attributes.alive));\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"
* 0x1 + 0x50C0) << 2,uint(attributes.alive));\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"
source: "Shader \"Hidden/VFX/Clouds/System 1/Base Cloud\"\n{\r\n\tSubShader\r\n\t{\t\r\n\t\tTags
source: "Shader \"Hidden/VFX/Clouds/System 1/Base Cloud\"\n{\n\tSubShader\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\t\n\t\t\n\t\t\n\t\t\n\t\tBlend
One OneMinusSrcAlpha \n\t\tZTest LEqual\n\t\tZWrite On\n\t\tCull Back\n\t\t\n\t\n\t\t\t\n\t\tHLSLINCLUDE\n\t\t\n\t\t#define

to always use a valid instanceID\n\t\t#if defined(UNITY_STEREO_INSTANCING_ENABLED)\n\t\t\t#define
VFX_DECLARE_INSTANCE_ID UNITY_VERTEX_INPUT_INSTANCE_ID\n\t\t\t#define VFX_GET_INSTANCE_ID(i)
unity_InstanceID\n\t\t#else\n\t\t\t#define VFX_DECLARE_INSTANCE_ID uint
instanceID : SV_InstanceID;\n\t\t\t#define VFX_GET_INSTANCE_ID(i) i.instanceID\n\t\t#endif\n\t\t\n\t\tENDHLSL\n\t\t\n\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
instanceID : SV_InstanceID;\n\t\t\t#define VFX_GET_INSTANCE_ID(i) i.instanceID\n\t\t#endif\n\t\t\n\t\tENDHLSL\n\t\t\n\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"SceneSelectionPass\" }\n\t\t\n\t\t\tZWrite On\n\t\t\tBlend
Off\n\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#define VFX_PASSDEPTH VFX_PASSDEPTH_SELECTION\n\t\t\t\n\t\t\t#pragma
target 4.5\n\t\t\t#define UNITY_MATERIAL_LIT\n\t\t\t#pragma multi_compile _

for scene selection in the editor, this code allow to output the outline correctly\n\t\t\t\t\toutColor
= float4(_ObjectId, _PassValue, 1.0, 1.0);\n\t\t\t\t#elif VFX_PASSDEPTH ==
VFX_PASSDEPTH_ACTUAL\n\t\t\t\t\t//void\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH
undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\t\n\t\t\n\t\t\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"Forward\"}\n\t\t\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#pragma
target 4.5\n\t\t\t\n\t\t\t#define UNITY_MATERIAL_LIT\n\t\t\t#define LIGHTLOOP_TILE_PASS\n\t\t\t#define
_ENABLE_FOG_ON_TRANSPARENT\n\t\t\t#define _DISABLE_DECALS\n\t\t\t#define _BLENDMODE_ALPHA\n\t\t\t\n\n\t\t\t#pragma

encodedMotionVector = 0.0f;\n\t\t\t\t\t\t\tVFXEncodeMotionVector(velocity *
0.5f, encodedMotionVector);\n\t\t\t\t\t\t\t\n\t\t\t\t\toutMotionVector = encodedMotionVector;\n\t\t\t\t\toutMotionVector.a
= outColor.a < i.VFX_VARYING_ALPHATHRESHOLD ? 0.0f : 1.0f; //Independant clipping
for motion vector pass\n\t\t\t\t#endif\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\t\r\n\t}\r\n}\r\n"
for motion vector pass\n\t\t\t\t#endif\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\t\n\t}\n}\n"
source: "Shader \"Hidden/VFX/Clouds/System 1/Rims\"\n{\r\n\tSubShader\r\n\t{\r\n\t\tTags
source: "Shader \"Hidden/VFX/Clouds/System 1/Rims\"\n{\n\tSubShader\n\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\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 Back\n\t\t\n\t\n\t\t\t\n\t\tHLSLINCLUDE\n\t\t\n\t\t#define

to always use a valid instanceID\n\t\t#if defined(UNITY_STEREO_INSTANCING_ENABLED)\n\t\t\t#define
VFX_DECLARE_INSTANCE_ID UNITY_VERTEX_INPUT_INSTANCE_ID\n\t\t\t#define VFX_GET_INSTANCE_ID(i)
unity_InstanceID\n\t\t#else\n\t\t\t#define VFX_DECLARE_INSTANCE_ID uint
instanceID : SV_InstanceID;\n\t\t\t#define VFX_GET_INSTANCE_ID(i) i.instanceID\n\t\t#endif\n\t\t\n\t\tENDHLSL\n\t\t\n\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
instanceID : SV_InstanceID;\n\t\t\t#define VFX_GET_INSTANCE_ID(i) i.instanceID\n\t\t#endif\n\t\t\n\t\tENDHLSL\n\t\t\n\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"SceneSelectionPass\" }\n\t\t\n\t\t\tZWrite On\n\t\t\tBlend
Off\n\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#define VFX_PASSDEPTH VFX_PASSDEPTH_SELECTION\n\t\t\t#pragma
target 4.5\n\t\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

0.5f, encodedMotionVector);\n\t\t\t\t\t\t\t\n\t\t\t\t\treturn encodedMotionVector;\n\t\t\t\t#elif
VFX_PASSDEPTH == VFX_PASSDEPTH_SELECTION\n\t\t\t\t\treturn float4(_ObjectId,
_PassValue, 1.0, 1.0);\n\t\t\t\t#elif VFX_PASSDEPTH == VFX_PASSDEPTH_ACTUAL\n\t\t\t\t\treturn
(float4)0;\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\t\r\n\t\t\r\n\t\t//
(float4)0;\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\t\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#pragma multi_compile
_ DEBUG_DISPLAY\n\t\t\t\n\t\t\tstruct ps_input\n\t\t\t{\n\t\t\t\tfloat4 pos

encodedMotionVector = 0.0f;\n\t\t\t\t\t\tVFXEncodeMotionVector(velocity * 0.5f,
encodedMotionVector);\n\t\t\t\t\t\t\n\t\t\t\to.outMotionVector = encodedMotionVector;\n\t\t\t\to.outMotionVector.a
= o.color.a < i.VFX_VARYING_ALPHATHRESHOLD ? 0.0f : 1.0f; //Independant clipping
for motion vector pass\n\t\t#endif\n\t\t\t\treturn o;\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\t\r\n\t}\r\n}\r\n"
for motion vector pass\n\t\t#endif\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"
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
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
1\n#define VFX_LOCAL_SPACE 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\nCBUFFER_START(parameters)\n
SourceAttributes\n{\n};\n\n\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\nCBUFFER_START(params)\r\n
uint nbMax;\r\n uint dispatchWidth;\r\nCBUFFER_END\r\n\r\nCBUFFER_START(cameraParams)\r\n
float3 cameraPosition;\r\nCBUFFER_END\r\n\r\nByteAddressBuffer attributeBuffer;\r\nStructuredBuffer<uint>
inputBuffer;\r\n\r\n#if USE_DEAD_LIST_COUNT\r\nByteAddressBuffer deadListCount;\r\n#endif\r\n\r\nstruct
Kvp\r\n{\r\n\tfloat sortKey;\r\n\tuint index;\r\n};\r\n\r\nRWStructuredBuffer<Kvp>
outputBuffer;\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
threshold = nbMax;\r\n#if USE_DEAD_LIST_COUNT\r\n\tthreshold -= deadListCount.Load(0);\r\n#endif\r\n\tuint
id = groupThreadId.x + groupId.x * NB_THREADS_PER_GROUP + groupId.y * dispatchWidth
* NB_THREADS_PER_GROUP;\r\n\tif (id < threshold)\r\n\t{\r\n\t\tuint index =
inputBuffer[id];\r\n\t\t\r\n\t\tAttributes attributes = (Attributes)0;\r\n\t\tattributes.position
= asfloat(attributeBuffer.Load3((index * 0x4 + 0x0) << 2));\n\t\t\n\r\n\t\t\r\n#if
VFX_LOCAL_SPACE\r\n\t\tfloat3 wPos = mul(localToWorld,float4(attributes.position,1.0f)).xyz;\r\n#else\r\n\t\tfloat3
wPos = attributes.position;\r\n#endif\r\n\t\tfloat3 camToPos = wPos - cameraPosition;\r\n\t\t\r\n\t\tKvp
kvp;\r\n\t\tkvp.sortKey = dot(camToPos,camToPos); // sqr distance to the camera\r\n\t\tkvp.index
= index;\r\n\r\n\t\toutputBuffer[id] = kvp;\r\n\t}\r\n}\r\n"
SourceAttributes\n{\n};\n\n\n\n#include \"Packages/com.unity.visualeffectgraph/Shaders/Common/VFXCommonCompute.hlsl\"\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\n\nCBUFFER_START(params)\n
uint nbMax;\n uint dispatchWidth;\nCBUFFER_END\n\nCBUFFER_START(cameraParams)\n
float3 cameraPosition;\nCBUFFER_END\n\nByteAddressBuffer attributeBuffer;\nStructuredBuffer<uint>
inputBuffer;\n\n#if USE_DEAD_LIST_COUNT\nByteAddressBuffer deadListCount;\n#endif\n\nstruct
Kvp\n{\n\tfloat sortKey;\n\tuint index;\n};\n\nRWStructuredBuffer<Kvp> outputBuffer;\n\n[numthreads(NB_THREADS_PER_GROUP,1,1)]\nvoid
CSMain(uint3 groupId : SV_GroupID,\n uint3 groupThreadId
: SV_GroupThreadID)\n{\n\tuint threshold = nbMax;\n#if USE_DEAD_LIST_COUNT\n\tthreshold
-= deadListCount.Load(0);\n#endif\n\tuint id = groupThreadId.x + groupId.x
* NB_THREADS_PER_GROUP + groupId.y * dispatchWidth * NB_THREADS_PER_GROUP;\n\tif
(id < threshold)\n\t{\n\t\tuint index = inputBuffer[id];\n\t\t\n\t\tAttributes
attributes = (Attributes)0;\n\t\tattributes.position = asfloat(attributeBuffer.Load3((index
* 0x4 + 0x0) << 2));\n\t\t\n\n\t\t\n#if VFX_LOCAL_SPACE\n\t\tfloat3 wPos =
mul(localToWorld,float4(attributes.position,1.0f)).xyz;\n#else\n\t\tfloat3
wPos = attributes.position;\n#endif\n\t\tfloat3 camToPos = wPos - cameraPosition;\n\t\t\n\t\tKvp
kvp;\n\t\tkvp.sortKey = dot(camToPos,camToPos); // sqr distance to the camera\n\t\tkvp.index
= index;\n\n\t\toutputBuffer[id] = kvp;\n\t}\n}\n"
m_Infos:
m_Expressions:
m_Expressions:

m_NamedObject:
m_Array:
- m_ExpressionIndex: 16
m_Value: {fileID: 2800000, guid: 39d260fb62abfb54dafb82e14f715121, type: 3}
m_Value: {fileID: 0}
- m_ExpressionIndex: 32
m_Value: {fileID: 4300000, guid: 9dc27d21a95c0674b8ad502c28a8a395, type: 2}
m_Bool:

752
Assets/Samples/BonFire/VFX/FlyingLeaves.vfx


m_ShaderSources:
- compute: 1
name: '[System 1]Initialize Particle'
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\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_SIZE_CURRENT 1\n#define VFX_USE_SEED_CURRENT
1\n#define VFX_USE_VELOCITY_CURRENT 1\n#define VFX_USE_LIFETIME_CURRENT 1\n#define

VFX_USE_AXISX_CURRENT 1\n#define VFX_USE_AXISY_CURRENT 1\n#define VFX_USE_AXISZ_CURRENT
1\n#define VFX_USE_ANGLEX_CURRENT 1\n#define VFX_USE_ANGLEY_CURRENT 1\n#define
VFX_USE_ANGLEZ_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\n\nstruct
1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\n\nstruct
angleY;\n float angleZ;\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\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<uint>
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<uint> eventList;\r\nByteAddressBuffer
inputAdditional;\r\n#endif\r\n\r\n#if HAS_STRIPS\r\nRWBuffer<uint> 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
angleY;\n float angleZ;\n float age;\n};\n\nstruct SourceAttributes\n{\n};\n\n\n\n\n#define
USE_DEAD_LIST (VFX_USE_ALIVE_CURRENT && !HAS_STRIPS)\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 USE_DEAD_LIST\nRWStructuredBuffer<uint> 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<uint>
eventList;\nByteAddressBuffer inputAdditional;\n#endif\n\n#if HAS_STRIPS\nRWBuffer<uint>
stripDataBuffer;\n#endif\n\n#include \"Packages/com.unity.visualeffectgraph/Shaders/Common/VFXCommonCompute.hlsl\"\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\n\nvoid
SetAttribute_3278B545(inout float size, inout uint seed, float A, float B)
/*attribute:size Composition:Overwrite Source:Slot Random:Uniform channels:XYZ
*/\n{\n size = lerp(A,B,RAND);\n}\nvoid SetAttribute_E6295C0(inout float3

= lerp(A.x,B.x,RAND);\n angularVelocityY = lerp(A.y,B.y,RAND);\n angularVelocityZ
= lerp(A.z,B.z,RAND);\n}\nvoid PositionAABox_18D(inout float3 position, inout
uint seed, float3 Box_center, float3 Box_size) /*positionMode:Volume spawnMode:Random
*/\n{\n position = Box_size * (RAND3 - 0.5f) + Box_center;\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
*/\n{\n position = Box_size * (RAND3 - 0.5f) + Box_center;\n}\n\n\n\n#if
HAS_STRIPS\nbool GetParticleIndex(inout uint particleIndex, uint stripIndex)\n{\n\tuint
relativeIndex;\n\tInterlockedAdd(STRIP_DATA(STRIP_NEXT_INDEX, stripIndex),
1, relativeIndex);\n\tif (relativeIndex >= PARTICLE_PER_STRIP_COUNT) // strip
is full\n\t{\n\t\tInterlockedAdd(STRIP_DATA(STRIP_NEXT_INDEX, stripIndex),
-1); // Remove previous increment\n\t\treturn false;\n\t}\n\n\tparticleIndex
+ 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
+ relativeIndex) % PARTICLE_PER_STRIP_COUNT);\n return true;\n}\n#endif\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 USE_DEAD_LIST\n maxThreadId
= min(maxThreadId, deadListCount.Load(0x0));\n#elif VFX_USE_SPAWNER_FROM_GPU\n
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\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
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\t\tuint particleIndex = id + currentSpawnIndex;\n\t\t\n#if
!VFX_USE_SPAWNER_FROM_GPU\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\n\t\tAttributes
attributes = (Attributes)0;\n\t\tSourceAttributes sourceAttributes = (SourceAttributes)0;\n\t\t\n
attributes.size = (float)0.100000001;\n attributes.seed = (uint)0;\n
attributes.velocity = float3(0, 0, 0);\n attributes.lifetime = (float)1;\n
attributes.texIndex = (float)0;\n attributes.angularVelocityX = (float)0;\n

= float3(0, 1, 0);\n attributes.axisZ = float3(0, 0, 1);\n attributes.angleX
= (float)0;\n attributes.angleY = (float)0;\n attributes.angleZ
= (float)0;\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 SetAttribute_3278B545(
= (float)0;\n attributes.age = (float)0;\n \n\n#if VFX_USE_PARTICLEID_CURRENT\n
attributes.particleId = particleIndex;\n#endif\n#if VFX_USE_SEED_CURRENT\n
attributes.seed = WangHash(particleIndex ^ systemSeed);\n#endif\n#if VFX_USE_SPAWNINDEX_CURRENT\n
attributes.spawnIndex = id;\n#endif\n#if HAS_STRIPS\n#if !VFX_USE_SPAWNER_FROM_GPU\n\t\t\n#else\n
uint stripIndex = sourceIndex;\n#endif\n\t\tstripIndex = min(stripIndex, STRIP_COUNT);\n\n
if (!GetParticleIndex(particleIndex, stripIndex))\n return;\n\n
const StripData stripData = GetStripDataFromStripIndex(stripIndex, PARTICLE_PER_STRIP_COUNT);\n\t\tInitStripAttributes(particleIndex,
attributes, stripData);\n\t\t// TODO Change seed to be sure we're deterministic
on random with strip\n#endif\n \n {\n SetAttribute_3278B545(
/*inout */attributes.size, /*inout */attributes.seed, (float)0.0500000007,
(float)0.100000001);\n }\n {\n SetAttribute_E6295C0(
/*inout */attributes.velocity, /*inout */attributes.seed, float3(-0.333000004,

/*inout */attributes.angularVelocityZ, /*inout */attributes.seed, float3(-60,
-60, -60), float3(60, 60, 60));\n }\n {\n PositionAABox_18D(
/*inout */attributes.position, /*inout */attributes.seed, float3(0, 0, 0),
float3(10.9899998, 4.71000004, 6.42999983));\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
float3(10.9899998, 4.71000004, 6.42999983));\n }\n \n\n\t\t\n#if
VFX_USE_ALIVE_CURRENT\n if (attributes.alive)\n#endif \n
{\n#if USE_DEAD_LIST\n\t uint deadIndex = deadListIn.DecrementCounter();\n
uint index = deadListIn[deadIndex];\n#else\n uint index = particleIndex;\n#endif\n
attributeBuffer.Store((index * 0xC + 0x3) << 2,asuint(attributes.size));\n
attributeBuffer.Store3((index * 0xC + 0x180) << 2,asuint(attributes.velocity));\n
attributeBuffer.Store((index * 0x1 + 0x300) << 2,asuint(attributes.lifetime));\n

attributeBuffer.Store((index * 0xC + 0x188) << 2,asuint(attributes.angleY));\n
attributeBuffer.Store((index * 0xC + 0x189) << 2,asuint(attributes.angleZ));\n
attributeBuffer.Store((index * 0xC + 0x18A) << 2,asuint(attributes.age));\n
\n\r\n }\r\n }\r\n}\r\n"
\n\n }\n }\n}\n"
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\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_VELOCITY_CURRENT 1\n#define VFX_USE_LIFETIME_CURRENT
1\n#define VFX_USE_ANGULARVELOCITYX_CURRENT 1\n#define VFX_USE_ANGULARVELOCITYY_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
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\nCBUFFER_START(parameters)\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<uint> deadListOut;\r\n#endif\r\n\r\n#if
VFX_HAS_INDIRECT_DRAW\r\nRWStructuredBuffer<uint> indirectBuffer;\r\n#endif\r\n\r\n#if
HAS_STRIPS\r\nRWBuffer<uint> stripDataBuffer;\r\n#endif\r\n\r\n#if VFX_USE_STRIPALIVE_CURRENT\r\nBuffer<uint>
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
float age;\n};\n\nstruct SourceAttributes\n{\n};\n\n\n\n\n#define USE_DEAD_LIST
(VFX_USE_ALIVE_CURRENT && !HAS_STRIPS)\n\nRWByteAddressBuffer attributeBuffer;\n\n#if
USE_DEAD_LIST\nRWStructuredBuffer<uint> deadListOut;\n#endif\n\n#if VFX_HAS_INDIRECT_DRAW\nRWStructuredBuffer<uint>
indirectBuffer;\n#endif\n\n#if HAS_STRIPS\nRWBuffer<uint> stripDataBuffer;\n#endif\n\n#if
VFX_USE_STRIPALIVE_CURRENT\nBuffer<uint> attachedStripDataBuffer;\n#endif\n\nCBUFFER_START(updateParams)\n
uint nbMax;\n\tuint dispatchWidth;\n\tuint systemSeed;\nCBUFFER_END\n\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\r\n\r\nvoid
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\n\nvoid
Turbulence_18D(float3 position, inout float3 velocity, float mass, float4x4
InvFieldTransform, float4x4 FieldTransform, float Intensity, float Drag, float
frequency, float roughness, float lacunarity, int octaves, float deltaTime)

\n angleY += angularVelocityY * deltaTime;\n \n angleZ += angularVelocityZ
* deltaTime;\n \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 * 0xC + 0x183) << 2));\n\t\t\n\r\n\t\tif (attributes.alive)\r\n\t\t{\r\n\t\t\tattributes.velocity
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 Attributes attributes = (Attributes)0;\n\t\tSourceAttributes
sourceAttributes = (SourceAttributes)0;\n\n#if VFX_USE_ALIVE_CURRENT\n\t\tattributes.alive
= (attributeBuffer.Load((index * 0xC + 0x183) << 2));\n\t\t\n\n\t\tif (attributes.alive)\n\t\t{\n\t\t\tattributes.velocity
= asfloat(attributeBuffer.Load3((index * 0xC + 0x180) << 2));\n\t\t\tattributes.lifetime
= asfloat(attributeBuffer.Load((index * 0x1 + 0x300) << 2));\n\t\t\tattributes.angularVelocityX
= asfloat(attributeBuffer.Load((index * 0x3 + 0x340) << 2));\n\t\t\tattributes.angularVelocityY

* 0xC + 0x187) << 2));\n\t\t\tattributes.angleY = asfloat(attributeBuffer.Load((index
* 0xC + 0x188) << 2));\n\t\t\tattributes.angleZ = asfloat(attributeBuffer.Load((index
* 0xC + 0x189) << 2));\n\t\t\tattributes.age = asfloat(attributeBuffer.Load((index
* 0xC + 0x18A) << 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 Turbulence_18D(attributes.position,
* 0xC + 0x18A) << 2));\n\t\t\t\n\n\n// Initialize built-in needed attributes\n#if
VFX_USE_OLDPOSITION_CURRENT\n\t\t\tattributes.oldPosition = attributes.position;\n#endif\n#if
HAS_STRIPS\n const StripData stripData = GetStripDataFromParticleIndex(index,
PARTICLE_PER_STRIP_COUNT);\n InitStripAttributes(index, attributes,
stripData);\n#endif\n\t\t\t\n\t\t\t{\n\t\t\t Turbulence_18D(attributes.position,
/*inout */attributes.velocity, attributes.mass, float4x4(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),
float4x4(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1), (float)12, (float)0.699999988, (float)1,
(float)0.5, (float)2, (int)3, deltaTime_a);\n\t\t\t}\n\t\t\t{\n\t\t\t Force_1(

attributes.angularVelocityY, /*inout */attributes.angleZ, attributes.angularVelocityZ,
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 * 0xC
+ 0x180) << 2,asuint(attributes.velocity));\n\t\t\t\tattributeBuffer.Store3((index
attributes.lifetime, /*inout */attributes.alive);\n\t\t\t\n\n\n\t\t\tif (attributes.alive)\n\t\t\t{\n\t\t\t\tattributeBuffer.Store3((index
* 0xC + 0x180) << 2,asuint(attributes.velocity));\n\t\t\t\tattributeBuffer.Store3((index
* 0xC + 0x18A) << 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
* 0xC + 0x183) << 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,
* 0xC + 0x18A) << 2,asuint(attributes.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\n#if HAS_STRIPS\t\t\t\n\t\t\t\tuint relativeIndexInStrip
= GetRelativeIndex(index, stripData);\n\t\t\t\tInterlockedMin(STRIP_DATA(STRIP_MIN_ALIVE,
stripData.stripIndex), relativeIndexInStrip);\n\t\t\t\tInterlockedMax(STRIP_DATA(STRIP_MAX_ALIVE,
stripData.stripIndex), relativeIndexInStrip);\n#endif\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tattributeBuffer.Store((index
* 0xC + 0x183) << 2,uint(attributes.alive));\n\t\t\t\t\n\n#if USE_DEAD_LIST
&& !VFX_USE_STRIPALIVE_CURRENT\n\t\t\t\tuint deadIndex = deadListOut.IncrementCounter();\n\t\t\t\tdeadListOut[deadIndex]
= index;\n#endif\n\t\t\t}\n\t\t}\n#if USE_DEAD_LIST && VFX_USE_STRIPALIVE_CURRENT\n
else if (attributes.stripAlive)\n {\n if (STRIP_DATA_X(attachedStripDataBuffer,
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.velocity
= asfloat(attributeBuffer.Load3((index * 0xC + 0x180) << 2));\n\t\tattributes.lifetime
= asfloat(attributeBuffer.Load((index * 0x1 + 0x300) << 2));\n\t\tattributes.angularVelocityX
= asfloat(attributeBuffer.Load((index * 0x3 + 0x340) << 2));\n\t\tattributes.angularVelocityY
= asfloat(attributeBuffer.Load((index * 0x3 + 0x341) << 2));\n\t\tattributes.angularVelocityZ
= asfloat(attributeBuffer.Load((index * 0x3 + 0x342) << 2));\n\t\tattributes.position
= asfloat(attributeBuffer.Load3((index * 0xC + 0x184) << 2));\n\t\tattributes.mass
= (float)1;\n\t\tattributes.alive = (attributeBuffer.Load((index * 0xC + 0x183)
<< 2));\n\t\tattributes.angleX = asfloat(attributeBuffer.Load((index * 0xC
+ 0x187) << 2));\n\t\tattributes.angleY = asfloat(attributeBuffer.Load((index
* 0xC + 0x188) << 2));\n\t\tattributes.angleZ = asfloat(attributeBuffer.Load((index
* 0xC + 0x189) << 2));\n\t\tattributes.age = asfloat(attributeBuffer.Load((index
* 0xC + 0x18A) << 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
Turbulence_18D(attributes.position, /*inout */attributes.velocity, attributes.mass,
float4x4(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1), float4x4(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),
(float)12, (float)0.699999988, (float)1, (float)0.5, (float)2, (int)3, deltaTime_a);\n\t\t}\n\t\t{\n\t\t
Force_1( /*inout */attributes.velocity, attributes.mass, Velocity_b, (float)1,
deltaTime_a);\n\t\t}\n\t\tEulerIntegration( /*inout */attributes.position,
attributes.velocity, deltaTime_a);\n\t\tAngularEulerIntegration( /*inout */attributes.angleX,
attributes.angularVelocityX, /*inout */attributes.angleY, attributes.angularVelocityY,
/*inout */attributes.angleZ, attributes.angularVelocityZ, 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 *
0xC + 0x180) << 2,asuint(attributes.velocity));\n\t\tattributeBuffer.Store3((index
the particle \n {\n uint deadIndex = deadListOut.IncrementCounter();\n\t\t\t\tdeadListOut[deadIndex]
= index;\n attributes.stripAlive = false;\n \n
} \n }\n#endif\n#else\n\t\tattributes.velocity = asfloat(attributeBuffer.Load3((index
* 0xC + 0x180) << 2));\n\t\tattributes.lifetime = asfloat(attributeBuffer.Load((index
* 0x1 + 0x300) << 2));\n\t\tattributes.angularVelocityX = asfloat(attributeBuffer.Load((index
* 0x3 + 0x340) << 2));\n\t\tattributes.angularVelocityY = asfloat(attributeBuffer.Load((index
* 0x3 + 0x341) << 2));\n\t\tattributes.angularVelocityZ = asfloat(attributeBuffer.Load((index
* 0x3 + 0x342) << 2));\n\t\tattributes.position = asfloat(attributeBuffer.Load3((index
* 0xC + 0x184) << 2));\n\t\tattributes.mass = (float)1;\n\t\tattributes.alive
= (attributeBuffer.Load((index * 0xC + 0x183) << 2));\n\t\tattributes.angleX
= asfloat(attributeBuffer.Load((index * 0xC + 0x187) << 2));\n\t\tattributes.angleY
= asfloat(attributeBuffer.Load((index * 0xC + 0x188) << 2));\n\t\tattributes.angleZ
= asfloat(attributeBuffer.Load((index * 0xC + 0x189) << 2));\n\t\tattributes.age
= asfloat(attributeBuffer.Load((index * 0xC + 0x18A) << 2));\n\t\t\n\n\t\t\n#if
VFX_USE_OLDPOSITION_CURRENT\n\t\tattributes.oldPosition = attributes.position;\n#endif\n#if
HAS_STRIPS\n const StripData stripData = GetStripDataFromParticleIndex(index,
PARTICLE_PER_STRIP_COUNT);\n InitStripAttributes(index, attributes,
stripData);\n#endif\n\t\t\n\t\t{\n\t\t Turbulence_18D(attributes.position,
/*inout */attributes.velocity, attributes.mass, float4x4(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),
float4x4(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1), (float)12, (float)0.699999988, (float)1,
(float)0.5, (float)2, (int)3, deltaTime_a);\n\t\t}\n\t\t{\n\t\t Force_1(
/*inout */attributes.velocity, attributes.mass, Velocity_b, (float)1, deltaTime_a);\n\t\t}\n\t\tEulerIntegration(
/*inout */attributes.position, attributes.velocity, deltaTime_a);\n\t\tAngularEulerIntegration(
/*inout */attributes.angleX, attributes.angularVelocityX, /*inout */attributes.angleY,
attributes.angularVelocityY, /*inout */attributes.angleZ, attributes.angularVelocityZ,
deltaTime_a);\n\t\tAge( /*inout */attributes.age, deltaTime_a);\n\t\tReap(attributes.age,
attributes.lifetime, /*inout */attributes.alive);\n\t\t\n\n\t\tattributeBuffer.Store3((index
* 0xC + 0x180) << 2,asuint(attributes.velocity));\n\t\tattributeBuffer.Store3((index
* 0xC + 0x18A) << 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"
* 0xC + 0x18A) << 2,asuint(attributes.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"
source: "Shader \"Hidden/VFX/FlyingLeaves/System 1/Output Particle Lit Quad\"\n{\r\n\tSubShader\r\n\t{\t\r\n\t\tCull
Off\r\n\t\t\r\n\t\tTags { \"Queue\"=\"Geometry+450\" \"IgnoreProjector\"=\"False\"
source: "Shader \"Hidden/VFX/FlyingLeaves/System 1/Output Particle Lit Quad\"\n{\n\tSubShader\n\t{\t\n\t\tCull
Off\n\t\t\n\t\tTags { \"Queue\"=\"Geometry+450\" \"IgnoreProjector\"=\"False\"
\"RenderType\"=\"Opaque\" }\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\t\n\t\t\n\t\t\n\t\t\n\t\tZTest
LEqual\n\t\tZWrite On\n\t\tCull Off\n\t\t\n\t\n\t\t\t\n\t\tHLSLINCLUDE\n\t\t\n\t\t#define
NB_THREADS_PER_GROUP 64\n\t\t#define HAS_ATTRIBUTES 1\n\t\t#define VFX_PASSDEPTH_ACTUAL

to always use a valid instanceID\n\t\t#if defined(UNITY_STEREO_INSTANCING_ENABLED)\n\t\t\t#define
VFX_DECLARE_INSTANCE_ID UNITY_VERTEX_INPUT_INSTANCE_ID\n\t\t\t#define VFX_GET_INSTANCE_ID(i)
unity_InstanceID\n\t\t#else\n\t\t\t#define VFX_DECLARE_INSTANCE_ID uint
instanceID : SV_InstanceID;\n\t\t\t#define VFX_GET_INSTANCE_ID(i) i.instanceID\n\t\t#endif\n\t\t\n\t\tENDHLSL\n\t\t\n\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
instanceID : SV_InstanceID;\n\t\t\t#define VFX_GET_INSTANCE_ID(i) i.instanceID\n\t\t#endif\n\t\t\n\t\tENDHLSL\n\t\t\n\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"SceneSelectionPass\" }\n\t\t\n\t\t\tZWrite On\n\t\t\tBlend
Off\n\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#define VFX_PASSDEPTH VFX_PASSDEPTH_SELECTION\n\t\t\t#pragma
target 4.5\n\t\t\t#define UNITY_MATERIAL_LIT\n\t\t\t#pragma multi_compile _

for scene selection in the editor, this code allow to output the outline correctly\n\t\t\t\t\toutColor
= float4(_ObjectId, _PassValue, 1.0, 1.0);\n\t\t\t\t#elif VFX_PASSDEPTH ==
VFX_PASSDEPTH_ACTUAL\n\t\t\t\t\t//void\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH
undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"DepthOnly\" }\n\t\t\n\t\t\tZWrite On\n\t\t\tBlend Off\n\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#define
VFX_PASSDEPTH VFX_PASSDEPTH_ACTUAL\n\t\t\t#pragma target 4.5\n\t\t\t#define
UNITY_MATERIAL_LIT\n\t\t\t#pragma multi_compile _ WRITE_NORMAL_BUFFER\n\t\t\t\n\t\t\t#define

for scene selection in the editor, this code allow to output the outline correctly\n\t\t\t\t\toutColor
= float4(_ObjectId, _PassValue, 1.0, 1.0);\n\t\t\t\t#elif VFX_PASSDEPTH ==
VFX_PASSDEPTH_ACTUAL\n\t\t\t\t\t//void\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH
undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"MotionVectors\" }\n\t\t\t\n\t\t\tStencil\n\t\t\t{\n\t\t\t
WriteMask 176\n\t\t\t Ref 160\n\t\t\t Comp Always\n\t\t\t Pass Replace\n\t\t\t}\n\n\t\t\n\t\t\tZWrite
On\n\t\t\tBlend Off\n\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#define VFX_PASSDEPTH

for scene selection in the editor, this code allow to output the outline correctly\n\t\t\t\t\toutColor
= float4(_ObjectId, _PassValue, 1.0, 1.0);\n\t\t\t\t#elif VFX_PASSDEPTH ==
VFX_PASSDEPTH_ACTUAL\n\t\t\t\t\t//void\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH
undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"GBuffer\" }\n\t\t\t\n\t\t\tStencil\n\t\t\t{\n\t\t\t\tWriteMask
7\n\t\t\t\tRef 2\n\t\t\t\tComp Always\n\t\t\t\tPass Replace\n\t\t\t}\t\n\t\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#pragma
target 4.5\n\t\t\t\n\t\t\t#pragma multi_compile _ LIGHT_LAYERS\n\t\t\t#pragma

\n\t\t VFXSetupBuiltin(builtin,surface,builtin.emissiveColor, i);\n\t\t
ENCODE_INTO_GBUFFER(surface, builtin, i.VFX_VARYING_POSCS.xy, outGBuffer);\n\t\t
#else\n\t\t VFXComputePixelOutputToGBuffer(i,normalWS,uvData,outGBuffer);\n\t\t
#endif\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\t// Forward pass\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
#endif\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\t// Forward pass\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"Forward\"}\n\t\t\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#pragma
target 4.5\n\t\t\t\n\t\t\t#define UNITY_MATERIAL_LIT\n\t\t\t#define LIGHTLOOP_TILE_PASS\n\t\t\t#define
_ENABLE_FOG_ON_TRANSPARENT\n\t\t\t#define _DISABLE_DECALS\n\t\t\t\n\n\t\t\t#pragma

encodedMotionVector = 0.0f;\n\t\t\t\t\t\tVFXEncodeMotionVector(velocity * 0.5f,
encodedMotionVector);\n\t\t\t\t\t\t\n\t\t\t\toutMotionVector = encodedMotionVector;\n\t\t\t\toutMotionVector.a
= outColor.a < i.VFX_VARYING_ALPHATHRESHOLD ? 0.0f : 1.0f; //Independant clipping
for motion vector pass\n\t\t#endif\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\t\r\n\t}\r\n}\r\n"
for motion vector pass\n\t\t#endif\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\t\n\t}\n}\n"
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\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_SIZE_CURRENT 1\n#define VFX_USE_SEED_CURRENT
1\n#define VFX_USE_VELOCITY_CURRENT 1\n#define VFX_USE_LIFETIME_CURRENT 1\n#define

1\n#define VFX_USE_STRIPALIVE_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\n\nstruct
\"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\n\nstruct
oldPosition;\n bool stripAlive;\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\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<uint>
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<uint> eventList;\r\nByteAddressBuffer
inputAdditional;\r\n#endif\r\n\r\n#if HAS_STRIPS\r\nRWBuffer<uint> 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
oldPosition;\n bool stripAlive;\n};\n\nstruct SourceAttributes\n{\n};\n\n\n\n\n#define
USE_DEAD_LIST (VFX_USE_ALIVE_CURRENT && !HAS_STRIPS)\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 USE_DEAD_LIST\nRWStructuredBuffer<uint> 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<uint>
eventList;\nByteAddressBuffer inputAdditional;\n#endif\n\n#if HAS_STRIPS\nRWBuffer<uint>
stripDataBuffer;\n#endif\n\n#include \"Packages/com.unity.visualeffectgraph/Shaders/Common/VFXCommonCompute.hlsl\"\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\n\nvoid
SetAttribute_3278B545(inout float size, inout uint seed, float A, float B)
/*attribute:size Composition:Overwrite Source:Slot Random:Uniform channels:XYZ
*/\n{\n size = lerp(A,B,RAND);\n}\nvoid SetAttribute_E6295C0(inout float3

Source:Slot Random:Uniform channels:XYZ */\n{\n texIndex = lerp(A,B,RAND);\n}\nvoid
PositionAABox_18D(inout float3 position, inout uint seed, float3 Box_center,
float3 Box_size) /*positionMode:Volume spawnMode:Random */\n{\n position
= Box_size * (RAND3 - 0.5f) + Box_center;\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
= Box_size * (RAND3 - 0.5f) + Box_center;\n}\n\n\n\n#if HAS_STRIPS\nbool GetParticleIndex(inout
uint particleIndex, uint stripIndex)\n{\n\tuint relativeIndex;\n\tInterlockedAdd(STRIP_DATA(STRIP_NEXT_INDEX,
stripIndex), 1, relativeIndex);\n\tif (relativeIndex >= PARTICLE_PER_STRIP_COUNT)
// strip is full\n\t{\n\t\tInterlockedAdd(STRIP_DATA(STRIP_NEXT_INDEX, stripIndex),
-1); // Remove previous increment\n\t\treturn false;\n\t}\n\n\tparticleIndex
+ 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
+ relativeIndex) % PARTICLE_PER_STRIP_COUNT);\n return true;\n}\n#endif\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 USE_DEAD_LIST\n maxThreadId
= min(maxThreadId, deadListCount.Load(0x0));\n#elif VFX_USE_SPAWNER_FROM_GPU\n
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\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
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\t\tuint particleIndex = id + currentSpawnIndex;\n\t\t\n#if
!VFX_USE_SPAWNER_FROM_GPU\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\n\t\tAttributes
attributes = (Attributes)0;\n\t\tSourceAttributes sourceAttributes = (SourceAttributes)0;\n\t\t\n
attributes.size = (float)0.100000001;\n attributes.seed = (uint)0;\n
attributes.velocity = float3(0, 0, 0);\n attributes.lifetime = (float)1;\n
attributes.texIndex = (float)0;\n attributes.position = float3(0, 0,

= float3(0, 0, 0);\n attributes.stripAlive = (bool)true;\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 SetAttribute_3278B545(
= float3(0, 0, 0);\n attributes.stripAlive = (bool)true;\n \n\n#if
VFX_USE_PARTICLEID_CURRENT\n attributes.particleId = particleIndex;\n#endif\n#if
VFX_USE_SEED_CURRENT\n attributes.seed = WangHash(particleIndex ^ systemSeed);\n#endif\n#if
VFX_USE_SPAWNINDEX_CURRENT\n attributes.spawnIndex = id;\n#endif\n#if
HAS_STRIPS\n#if !VFX_USE_SPAWNER_FROM_GPU\n\t\t\n#else\n uint stripIndex
= sourceIndex;\n#endif\n\t\tstripIndex = min(stripIndex, STRIP_COUNT);\n\n
if (!GetParticleIndex(particleIndex, stripIndex))\n return;\n\n
const StripData stripData = GetStripDataFromStripIndex(stripIndex, PARTICLE_PER_STRIP_COUNT);\n\t\tInitStripAttributes(particleIndex,
attributes, stripData);\n\t\t// TODO Change seed to be sure we're deterministic
on random with strip\n#endif\n \n {\n SetAttribute_3278B545(
/*inout */attributes.size, /*inout */attributes.seed, (float)0.0399999991,
(float)0.100000001);\n }\n {\n SetAttribute_E6295C0(
/*inout */attributes.velocity, /*inout */attributes.seed, float3(-0.333000004,

SetAttribute_CA100327( /*inout */attributes.texIndex, /*inout */attributes.seed,
(float)0, (float)4);\n }\n {\n PositionAABox_18D(
/*inout */attributes.position, /*inout */attributes.seed, float3(0, 0, 0),
float3(10.9899998, 4.71000004, 6.42999983));\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
float3(10.9899998, 4.71000004, 6.42999983));\n }\n \n\n\t\t\n#if
VFX_USE_ALIVE_CURRENT\n if (attributes.alive)\n#endif \n
{\n#if USE_DEAD_LIST\n\t uint deadIndex = deadListIn.DecrementCounter();\n
uint index = deadListIn[deadIndex];\n#else\n uint index = particleIndex;\n#endif\n
attributeBuffer.Store((index * 0x2 + 0x2C1) << 2,asuint(attributes.size));\n
attributeBuffer.Store3((index * 0x8 + 0x0) << 2,asuint(attributes.velocity));\n
attributeBuffer.Store((index * 0x1 + 0x100) << 2,asuint(attributes.lifetime));\n

attributeBuffer.Store((index * 0x1 + 0x2A0) << 2,uint(attributes.alive));\n
attributeBuffer.Store3((index * 0x8 + 0x1A4) << 2,asuint(attributes.oldPosition));\n
attributeBuffer.Store((index * 0x8 + 0x5) << 2,uint(attributes.stripAlive));\n
\n\r\n }\r\n }\r\n}\r\n"
\n\n }\n }\n}\n"
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\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_VELOCITY_CURRENT 1\n#define VFX_USE_LIFETIME_CURRENT
1\n#define VFX_USE_POSITION_CURRENT 1\n#define VFX_USE_MASS_CURRENT 1\n#define

VFX_USE_STRIPALIVE_CURRENT 1\n#define VFX_HAS_INDIRECT_DRAW 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
1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\nCBUFFER_START(parameters)\n
eventListOut_a;\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<uint>
deadListOut;\r\n#endif\r\n\r\n#if VFX_HAS_INDIRECT_DRAW\r\nRWStructuredBuffer<uint>
indirectBuffer;\r\n#endif\r\n\r\n#if HAS_STRIPS\r\nRWBuffer<uint> stripDataBuffer;\r\n#endif\r\n\r\n#if
VFX_USE_STRIPALIVE_CURRENT\r\nBuffer<uint> 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
eventListOut_a;\n\n\n\n#define USE_DEAD_LIST (VFX_USE_ALIVE_CURRENT && !HAS_STRIPS)\n\nRWByteAddressBuffer
attributeBuffer;\n\n#if USE_DEAD_LIST\nRWStructuredBuffer<uint> deadListOut;\n#endif\n\n#if
VFX_HAS_INDIRECT_DRAW\nRWStructuredBuffer<uint> indirectBuffer;\n#endif\n\n#if
HAS_STRIPS\nRWBuffer<uint> stripDataBuffer;\n#endif\n\n#if VFX_USE_STRIPALIVE_CURRENT\nBuffer<uint>
attachedStripDataBuffer;\n#endif\n\nCBUFFER_START(updateParams)\n uint nbMax;\n\tuint
dispatchWidth;\n\tuint systemSeed;\nCBUFFER_END\n\n#include \"Packages/com.unity.visualeffectgraph/Shaders/Common/VFXCommonCompute.hlsl\"\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\n\nvoid
Turbulence_18D(float3 position, inout float3 velocity, float mass, float4x4
InvFieldTransform, float4x4 FieldTransform, float Intensity, float Drag, float
frequency, float roughness, float lacunarity, int octaves, float deltaTime)

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
}\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
* 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 + 0x2A0) << 2));\n\t\tattributes.stripAlive
= (attributeBuffer.Load((index * 0x8 + 0x5) << 2));\n\t\t\n\r\n\t\tif (attributes.alive)\r\n\t\t{\r\n\t\t\tattributes.velocity
* NB_THREADS_PER_GROUP;\n\tuint index = id;\n\tif (id < nbMax)\n\t{\n
Attributes attributes = (Attributes)0;\n\t\tSourceAttributes sourceAttributes
= (SourceAttributes)0;\n\n#if VFX_USE_ALIVE_CURRENT\n\t\tattributes.alive =
(attributeBuffer.Load((index * 0x1 + 0x2A0) << 2));\n\t\tattributes.stripAlive
= (attributeBuffer.Load((index * 0x8 + 0x5) << 2));\n\t\t\n\n\t\tif (attributes.alive)\n\t\t{\n\t\t\tattributes.velocity
= asfloat(attributeBuffer.Load3((index * 0x8 + 0x0) << 2));\n\t\t\tattributes.lifetime
= asfloat(attributeBuffer.Load((index * 0x1 + 0x100) << 2));\n\t\t\tattributes.position
= asfloat(attributeBuffer.Load3((index * 0x4 + 0x120) << 2));\n\t\t\tattributes.mass

+ 0x1A0) << 2));\n\t\t\tattributes.alpha = asfloat(attributeBuffer.Load((index
* 0x8 + 0x1A3) << 2));\n\t\t\tattributes.age = asfloat(attributeBuffer.Load((index
* 0x8 + 0x4) << 2));\n\t\t\tattributes.oldPosition = asfloat(attributeBuffer.Load3((index
* 0x8 + 0x1A4) << 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 Turbulence_18D(attributes.position,
* 0x8 + 0x1A4) << 2));\n\t\t\t\n\n\n// Initialize built-in needed attributes\n#if
VFX_USE_OLDPOSITION_CURRENT\n\t\t\tattributes.oldPosition = attributes.position;\n#endif\n#if
HAS_STRIPS\n const StripData stripData = GetStripDataFromParticleIndex(index,
PARTICLE_PER_STRIP_COUNT);\n InitStripAttributes(index, attributes,
stripData);\n#endif\n\t\t\t\n\t\t\t{\n\t\t\t Turbulence_18D(attributes.position,
/*inout */attributes.velocity, attributes.mass, float4x4(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),
float4x4(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1), (float)20, (float)0.699999988, (float)1,
(float)0.5, (float)2, (int)2, deltaTime_a);\n\t\t\t}\n\t\t\t{\n\t\t\t Force_1(

*/attributes.color, /*inout */attributes.alpha, attributes.age, attributes.lifetime,
Color_d);\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
+ 0x0) << 2,asuint(attributes.velocity));\n\t\t\t\tattributeBuffer.Store3((index
attributes.lifetime, /*inout */attributes.alive);\n\t\t\t\n\n\n\t\t\tif (attributes.alive)\n\t\t\t{\n\t\t\t\tattributeBuffer.Store3((index
* 0x8 + 0x0) << 2,asuint(attributes.velocity));\n\t\t\t\tattributeBuffer.Store3((index
* 0x4 + 0x120) << 2,asuint(attributes.position));\n\t\t\t\tattributeBuffer.Store((index
* 0x8 + 0x3) << 2,asuint(attributes.rateCount_c));\n\t\t\t\tattributeBuffer.Store3((index
* 0x8 + 0x1A0) << 2,asuint(attributes.color));\n\t\t\t\tattributeBuffer.Store((index

* 0x8 + 0x5) << 2,uint(attributes.stripAlive));\n\t\t\t\tfor (uint i = 0; i
< eventCount_a; ++i) eventListOut_a.Append(index);\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
< eventCount_a; ++i) eventListOut_a.Append(index);\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\n#if HAS_STRIPS\t\t\t\n\t\t\t\tuint relativeIndexInStrip
= GetRelativeIndex(index, stripData);\n\t\t\t\tInterlockedMin(STRIP_DATA(STRIP_MIN_ALIVE,
stripData.stripIndex), relativeIndexInStrip);\n\t\t\t\tInterlockedMax(STRIP_DATA(STRIP_MAX_ALIVE,
stripData.stripIndex), relativeIndexInStrip);\n#endif\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tattributeBuffer.Store((index
eventCount_a; ++i) eventListOut_a.Append(index);\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,
eventCount_a; ++i) eventListOut_a.Append(index);\n\t\t\t\t\n\n#if USE_DEAD_LIST
&& !VFX_USE_STRIPALIVE_CURRENT\n\t\t\t\tuint deadIndex = deadListOut.IncrementCounter();\n\t\t\t\tdeadListOut[deadIndex]
= index;\n#endif\n\t\t\t}\n\t\t}\n#if USE_DEAD_LIST && VFX_USE_STRIPALIVE_CURRENT\n
else if (attributes.stripAlive)\n {\n if (STRIP_DATA_X(attachedStripDataBuffer,
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
attributeBuffer.Store((index * 0x8 + 0x5) << 2,uint(attributes.stripAlive));\n
\n\r\n } \r\n }\r\n#endif\r\n#else\r\n\t\tattributes.velocity
= asfloat(attributeBuffer.Load3((index * 0x8 + 0x0) << 2));\n\t\tattributes.lifetime
= asfloat(attributeBuffer.Load((index * 0x1 + 0x100) << 2));\n\t\tattributes.position
= asfloat(attributeBuffer.Load3((index * 0x4 + 0x120) << 2));\n\t\tattributes.mass
= (float)1;\n\t\tattributes.rateCount_c = asfloat(attributeBuffer.Load((index
* 0x8 + 0x3) << 2));\n\t\tattributes.eventCount = (uint)0;\n\t\tuint eventCount_a
= 0u;\n\t\tattributes.color = asfloat(attributeBuffer.Load3((index * 0x8 +
0x1A0) << 2));\n\t\tattributes.alpha = asfloat(attributeBuffer.Load((index
the particle \n {\n uint deadIndex = deadListOut.IncrementCounter();\n\t\t\t\tdeadListOut[deadIndex]
= index;\n attributes.stripAlive = false;\n attributeBuffer.Store((index
* 0x8 + 0x5) << 2,uint(attributes.stripAlive));\n \n\n
} \n }\n#endif\n#else\n\t\tattributes.velocity = asfloat(attributeBuffer.Load3((index
* 0x8 + 0x0) << 2));\n\t\tattributes.lifetime = asfloat(attributeBuffer.Load((index
* 0x1 + 0x100) << 2));\n\t\tattributes.position = asfloat(attributeBuffer.Load3((index
* 0x4 + 0x120) << 2));\n\t\tattributes.mass = (float)1;\n\t\tattributes.rateCount_c
= asfloat(attributeBuffer.Load((index * 0x8 + 0x3) << 2));\n\t\tattributes.eventCount
= (uint)0;\n\t\tuint eventCount_a = 0u;\n\t\tattributes.color = asfloat(attributeBuffer.Load3((index
* 0x8 + 0x1A0) << 2));\n\t\tattributes.alpha = asfloat(attributeBuffer.Load((index
* 0x8 + 0x5) << 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
* 0x8 + 0x5) << 2));\n\t\t\n\n\t\t\n#if VFX_USE_OLDPOSITION_CURRENT\n\t\tattributes.oldPosition
= attributes.position;\n#endif\n#if HAS_STRIPS\n const StripData stripData
= GetStripDataFromParticleIndex(index, PARTICLE_PER_STRIP_COUNT);\n
InitStripAttributes(index, attributes, stripData);\n#endif\n\t\t\n\t\t{\n\t\t
Turbulence_18D(attributes.position, /*inout */attributes.velocity, attributes.mass,
float4x4(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1), float4x4(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),
(float)20, (float)0.699999988, (float)1, (float)0.5, (float)2, (int)2, deltaTime_a);\n\t\t}\n\t\t{\n\t\t

/*inout */attributes.color, /*inout */attributes.alpha, attributes.age, attributes.lifetime,
Color_d);\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
attributes.lifetime, /*inout */attributes.alive);\n\t\t\n\n\t\tattributeBuffer.Store3((index
* 0x8 + 0x0) << 2,asuint(attributes.velocity));\n\t\tattributeBuffer.Store3((index
* 0x4 + 0x120) << 2,asuint(attributes.position));\n\t\tattributeBuffer.Store((index
* 0x8 + 0x3) << 2,asuint(attributes.rateCount_c));\n\t\tattributeBuffer.Store3((index

* 0x1 + 0x2A0) << 2,uint(attributes.alive));\n\t\tattributeBuffer.Store3((index
* 0x8 + 0x1A4) << 2,asuint(attributes.oldPosition));\n\t\tattributeBuffer.Store((index
* 0x8 + 0x5) << 2,uint(attributes.stripAlive));\n\t\tfor (uint i = 0; i < eventCount_a;
++i) eventListOut_a.Append(index);\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"
++i) eventListOut_a.Append(index);\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"
source: "Shader \"Hidden/VFX/FlyingLeaves/System 2/Output Particle Point\"\n{\r\n\tSubShader\r\n\t{\t\r\n\t\tTags
source: "Shader \"Hidden/VFX/FlyingLeaves/System 2/Output Particle Point\"\n{\n\tSubShader\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\t\n\t\t\n\t\t\n\t\t\n\t\tBlend
SrcAlpha OneMinusSrcAlpha \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\n\t\t#define

to always use a valid instanceID\n\t\t#if defined(UNITY_STEREO_INSTANCING_ENABLED)\n\t\t\t#define
VFX_DECLARE_INSTANCE_ID UNITY_VERTEX_INPUT_INSTANCE_ID\n\t\t\t#define VFX_GET_INSTANCE_ID(i)
unity_InstanceID\n\t\t#else\n\t\t\t#define VFX_DECLARE_INSTANCE_ID uint
instanceID : SV_InstanceID;\n\t\t\t#define VFX_GET_INSTANCE_ID(i) i.instanceID\n\t\t#endif\n\t\t\n\t\tENDHLSL\n\t\t\n\r\n\t\t//
instanceID : SV_InstanceID;\n\t\t\t#define VFX_GET_INSTANCE_ID(i) i.instanceID\n\t\t#endif\n\t\t\n\t\tENDHLSL\n\t\t\n\n\t\t//
Depth pass\n\t\tPass\n\t\t{\t\t\n\t\t\tTags { \"LightMode\"=\"SceneSelectionPass\"
}\n\t\t\t\n\t\t\tZWrite On\n\t\t\tBlend Off\n\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#define
VFX_PASSDEPTH VFX_PASSDEPTH_SELECTION\n\t\t\t\n\t\t\t#pragma target 4.5\n\t\t\t\n\t\t\tstruct

alpha = VFXGetFragmentColor(i).a;\n\t\t\t\tVFXClipFragmentColor(alpha,i);\n\t\t\t#if
VFX_PASSDEPTH == VFX_PASSDEPTH_SELECTION\n\t\t\t\treturn float4(_ObjectId,
_PassValue, 1.0, 1.0);\n\t\t\t#elif VFX_PASSDEPTH == VFX_PASSDEPTH_ACTUAL\n\t\t\t\treturn
(float4)0;\n\t\t\t#else\n\t\t\t\t#error VFX_PASSDEPTH undefined \n\t\t\t#endif\n\t\t\t}\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\t\r\n\t\t//
(float4)0;\n\t\t\t#else\n\t\t\t\t#error VFX_PASSDEPTH undefined \n\t\t\t#endif\n\t\t\t}\n\t\t\n\t\t\tENDHLSL\n\t\t}\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\n\t\t\tHLSLPROGRAM\n\t\t\t#pragma target 4.5\n\t\t\t#pragma multi_compile
_ DEBUG_DISPLAY\n\t\t\t\n\t\t\tstruct ps_input\n\t\t\t{\n\t\t\t\tfloat4 pos

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\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\to.color = VFXTransformFinalColor(o.color);\n\t\t\t\treturn
o;\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\t\r\n\t}\r\n}\r\n"
o;\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\t\n\t}\n}\n"
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\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_COLOR_CURRENT
1\n#define VFX_USE_POSITION_CURRENT 1\n#define VFX_USE_ALPHA_CURRENT 1\n#define

32u\n#define PARTICLE_PER_STRIP_COUNT 128u\n#define VFX_USE_SPAWNER_FROM_GPU
1\n#define HAS_STRIPS 1\n#define VFX_LOCAL_SPACE 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\r\n\nstruct
1\n#define HAS_STRIPS 1\n#define VFX_LOCAL_SPACE 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\n\nstruct
float size;\n};\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<uint> deadListIn;\r\nByteAddressBuffer
float size;\n};\n\n\n\n\n#define USE_DEAD_LIST (VFX_USE_ALIVE_CURRENT && !HAS_STRIPS)\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 USE_DEAD_LIST\nRWStructuredBuffer<uint> deadListIn;\nByteAddressBuffer
API currently prevent from copying to CB\r\n#endif\r\n\r\n#if VFX_USE_SPAWNER_FROM_GPU\r\nStructuredBuffer<uint>
eventList;\r\nByteAddressBuffer inputAdditional;\r\n#endif\r\n\r\n#if HAS_STRIPS\r\nRWBuffer<uint>
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
API currently prevent from copying to CB\n#endif\n\n#if VFX_USE_SPAWNER_FROM_GPU\nStructuredBuffer<uint>
eventList;\nByteAddressBuffer inputAdditional;\n#endif\n\n#if HAS_STRIPS\nRWBuffer<uint>
stripDataBuffer;\n#endif\n\n#include \"Packages/com.unity.visualeffectgraph/Shaders/Common/VFXCommonCompute.hlsl\"\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\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_FDCE071E(inout float3 color, float3 Value)

float alpha, float Value) /*attribute:alpha Composition:Overwrite Source:Source
Random:Off channels:XYZ */\n{\n alpha = Value;\n}\nvoid SetAttribute_32764A86(inout
float size, float Value) /*attribute:size Composition:Overwrite Source:Source
Random:Off channels:XYZ */\n{\n size = Value;\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
Random:Off channels:XYZ */\n{\n size = Value;\n}\n\n\n\n#if HAS_STRIPS\nbool
GetParticleIndex(inout uint particleIndex, uint stripIndex)\n{\n\tuint relativeIndex;\n\tInterlockedAdd(STRIP_DATA(STRIP_NEXT_INDEX,
stripIndex), 1, relativeIndex);\n\tif (relativeIndex >= PARTICLE_PER_STRIP_COUNT)
// strip is full\n\t{\n\t\tInterlockedAdd(STRIP_DATA(STRIP_NEXT_INDEX, stripIndex),
-1); // Remove previous increment\n\t\treturn false;\n\t}\n\n\tparticleIndex
+ 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
+ relativeIndex) % PARTICLE_PER_STRIP_COUNT);\n return true;\n}\n#endif\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 USE_DEAD_LIST\n maxThreadId
= min(maxThreadId, deadListCount.Load(0x0));\n#elif VFX_USE_SPAWNER_FROM_GPU\n
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 \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
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\t\tuint particleIndex = id + currentSpawnIndex;\n\t\t\n#if
!VFX_USE_SPAWNER_FROM_GPU\n \n#endif\n\n\t\tAttributes attributes =
(Attributes)0;\n\t\tSourceAttributes sourceAttributes = (SourceAttributes)0;\n\t\t\n
attributes.lifetime = (float)1;\n attributes.color = float3(1, 1, 1);\n
attributes.position = float3(0, 0, 0);\n attributes.alpha = (float)1;\n
attributes.size = (float)0.100000001;\n attributes.age = (float)0;\n

* 0x8 + 0x1A3) << 2));\n sourceAttributes.size = asfloat(sourceAttributeBuffer.Load((sourceIndex
* 0x2 + 0x2C1) << 2));\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 SetAttribute_F0142CB9(
* 0x2 + 0x2C1) << 2));\n \n\n#if VFX_USE_PARTICLEID_CURRENT\n
attributes.particleId = particleIndex;\n#endif\n#if VFX_USE_SEED_CURRENT\n
attributes.seed = WangHash(particleIndex ^ systemSeed);\n#endif\n#if VFX_USE_SPAWNINDEX_CURRENT\n
attributes.spawnIndex = id;\n#endif\n#if HAS_STRIPS\n#if !VFX_USE_SPAWNER_FROM_GPU\n\t\t\n#else\n
uint stripIndex = sourceIndex;\n#endif\n\t\tstripIndex = min(stripIndex, STRIP_COUNT);\n\n
if (!GetParticleIndex(particleIndex, stripIndex))\n return;\n\n
const StripData stripData = GetStripDataFromStripIndex(stripIndex, PARTICLE_PER_STRIP_COUNT);\n\t\tInitStripAttributes(particleIndex,
attributes, stripData);\n\t\t// TODO Change seed to be sure we're deterministic
on random with strip\n#endif\n \n {\n SetAttribute_F0142CB9(
/*inout */attributes.lifetime, (float)2);\n }\n {\n
float3 tmp_q = sourceAttributes.color;\n SetAttribute_FDCE071E(
/*inout */attributes.color, tmp_q);\n }\n {\n float3

tmp_q);\n }\n {\n float tmp_q = sourceAttributes.size;\n
SetAttribute_32764A86( /*inout */attributes.size, tmp_q);\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
\n\n\t\t\n#if VFX_USE_ALIVE_CURRENT\n if (attributes.alive)\n#endif
\n {\n#if USE_DEAD_LIST\n\t uint deadIndex = deadListIn.DecrementCounter();\n
uint index = deadListIn[deadIndex];\n#else\n uint index = particleIndex;\n#endif\n
attributeBuffer.Store((index * 0x1 + 0x0) << 2,asuint(attributes.lifetime));\n
attributeBuffer.Store3((index * 0x8 + 0x1000) << 2,asuint(attributes.color));\n
attributeBuffer.Store3((index * 0x8 + 0x1004) << 2,asuint(attributes.position));\n

attributeBuffer.Store((index * 0x1 + 0xA000) << 2,uint(attributes.alive));\n
\n\r\n }\r\n }\r\n}\r\n"
\n\n }\n }\n}\n"
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
128u\n#define HAS_STRIPS 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
128u\n#define HAS_STRIPS 1\n#define VFX_LOCAL_SPACE 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\nCBUFFER_START(parameters)\n
float lifetime;\n float age;\n bool alive;\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<uint> deadListOut;\r\n#endif\r\n\r\n#if
VFX_HAS_INDIRECT_DRAW\r\nRWStructuredBuffer<uint> indirectBuffer;\r\n#endif\r\n\r\n#if
HAS_STRIPS\r\nRWBuffer<uint> stripDataBuffer;\r\n#endif\r\n\r\n#if VFX_USE_STRIPALIVE_CURRENT\r\nBuffer<uint>
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
float lifetime;\n float age;\n bool alive;\n};\n\nstruct SourceAttributes\n{\n};\n\n\n\n\n#define
USE_DEAD_LIST (VFX_USE_ALIVE_CURRENT && !HAS_STRIPS)\n\nRWByteAddressBuffer
attributeBuffer;\n\n#if USE_DEAD_LIST\nRWStructuredBuffer<uint> deadListOut;\n#endif\n\n#if
VFX_HAS_INDIRECT_DRAW\nRWStructuredBuffer<uint> indirectBuffer;\n#endif\n\n#if
HAS_STRIPS\nRWBuffer<uint> stripDataBuffer;\n#endif\n\n#if VFX_USE_STRIPALIVE_CURRENT\nBuffer<uint>
attachedStripDataBuffer;\n#endif\n\nCBUFFER_START(updateParams)\n uint nbMax;\n\tuint
dispatchWidth;\n\tuint systemSeed;\nCBUFFER_END\n\n#include \"Packages/com.unity.visualeffectgraph/Shaders/Common/VFXCommonCompute.hlsl\"\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\n\nvoid
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
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
* 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 + 0xA000) << 2));\n\t\t\n\r\n\t\tif (attributes.alive)\r\n\t\t{\r\n\t\t\tattributes.lifetime
* NB_THREADS_PER_GROUP;\n\tuint index = id;\n\tif (id < nbMax)\n\t{\n
Attributes attributes = (Attributes)0;\n\t\tSourceAttributes sourceAttributes
= (SourceAttributes)0;\n\n#if VFX_USE_ALIVE_CURRENT\n\t\tattributes.alive =
(attributeBuffer.Load((index * 0x1 + 0xA000) << 2));\n\t\t\n\n\t\tif (attributes.alive)\n\t\t{\n\t\t\tattributes.lifetime
= asfloat(attributeBuffer.Load((index * 0x1 + 0x9000) << 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(
= asfloat(attributeBuffer.Load((index * 0x1 + 0x9000) << 2));\n\t\t\t\n\n\n//
Initialize built-in needed attributes\n#if VFX_USE_OLDPOSITION_CURRENT\n\t\t\tattributes.oldPosition
= attributes.position;\n#endif\n#if HAS_STRIPS\n const StripData
stripData = GetStripDataFromParticleIndex(index, PARTICLE_PER_STRIP_COUNT);\n
InitStripAttributes(index, attributes, stripData);\n#endif\n\t\t\t\n\t\t\tAge(
/*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 + 0x9000) << 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 + 0xA000) << 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,
/*inout */attributes.alive);\n\t\t\t\n\n\n\t\t\tif (attributes.alive)\n\t\t\t{\n\t\t\t\tattributeBuffer.Store((index
* 0x1 + 0x9000) << 2,asuint(attributes.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\n#if HAS_STRIPS\t\t\t\n\t\t\t\tuint relativeIndexInStrip
= GetRelativeIndex(index, stripData);\n\t\t\t\tInterlockedMin(STRIP_DATA(STRIP_MIN_ALIVE,
stripData.stripIndex), relativeIndexInStrip);\n\t\t\t\tInterlockedMax(STRIP_DATA(STRIP_MAX_ALIVE,
stripData.stripIndex), relativeIndexInStrip);\n#endif\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tattributeBuffer.Store((index
* 0x1 + 0xA000) << 2,uint(attributes.alive));\n\t\t\t\t\n\n#if USE_DEAD_LIST
&& !VFX_USE_STRIPALIVE_CURRENT\n\t\t\t\tuint deadIndex = deadListOut.IncrementCounter();\n\t\t\t\tdeadListOut[deadIndex]
= index;\n#endif\n\t\t\t}\n\t\t}\n#if USE_DEAD_LIST && VFX_USE_STRIPALIVE_CURRENT\n
else if (attributes.stripAlive)\n {\n if (STRIP_DATA_X(attachedStripDataBuffer,
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.age
= asfloat(attributeBuffer.Load((index * 0x1 + 0x9000) << 2));\n\t\tattributes.alive
= (attributeBuffer.Load((index * 0x1 + 0xA000) << 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 + 0x9000) << 2,asuint(attributes.age));\n\t\tattributeBuffer.Store((index
* 0x1 + 0xA000) << 2,uint(attributes.alive));\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"
the particle \n {\n uint deadIndex = deadListOut.IncrementCounter();\n\t\t\t\tdeadListOut[deadIndex]
= index;\n attributes.stripAlive = false;\n \n
} \n }\n#endif\n#else\n\t\tattributes.lifetime = asfloat(attributeBuffer.Load((index
* 0x1 + 0x0) << 2));\n\t\tattributes.age = asfloat(attributeBuffer.Load((index
* 0x1 + 0x9000) << 2));\n\t\tattributes.alive = (attributeBuffer.Load((index
* 0x1 + 0xA000) << 2));\n\t\t\n\n\t\t\n#if VFX_USE_OLDPOSITION_CURRENT\n\t\tattributes.oldPosition
= attributes.position;\n#endif\n#if HAS_STRIPS\n const StripData stripData
= GetStripDataFromParticleIndex(index, PARTICLE_PER_STRIP_COUNT);\n
InitStripAttributes(index, attributes, stripData);\n#endif\n\t\t\n\t\tAge(
/*inout */attributes.age, deltaTime_a);\n\t\tReap(attributes.age, attributes.lifetime,
/*inout */attributes.alive);\n\t\t\n\n\t\tattributeBuffer.Store((index * 0x1
+ 0x9000) << 2,asuint(attributes.age));\n\t\tattributeBuffer.Store((index *
0x1 + 0xA000) << 2,uint(attributes.alive));\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"
source: "Shader \"Hidden/VFX/FlyingLeaves/System 3/Output ParticleStrip 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\"
source: "Shader \"Hidden/VFX/FlyingLeaves/System 3/Output ParticleStrip Quad\"\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\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\n\t\t#define
NB_THREADS_PER_GROUP 64\n\t\t#define HAS_ATTRIBUTES 1\n\t\t#define VFX_PASSDEPTH_ACTUAL

to always use a valid instanceID\n\t\t#if defined(UNITY_STEREO_INSTANCING_ENABLED)\n\t\t\t#define
VFX_DECLARE_INSTANCE_ID UNITY_VERTEX_INPUT_INSTANCE_ID\n\t\t\t#define VFX_GET_INSTANCE_ID(i)
unity_InstanceID\n\t\t#else\n\t\t\t#define VFX_DECLARE_INSTANCE_ID uint
instanceID : SV_InstanceID;\n\t\t\t#define VFX_GET_INSTANCE_ID(i) i.instanceID\n\t\t#endif\n\t\t\n\t\tENDHLSL\n\t\t\n\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
instanceID : SV_InstanceID;\n\t\t\t#define VFX_GET_INSTANCE_ID(i) i.instanceID\n\t\t#endif\n\t\t\n\t\tENDHLSL\n\t\t\n\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"SceneSelectionPass\" }\n\t\t\n\t\t\tZWrite On\n\t\t\tBlend
Off\n\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#define VFX_PASSDEPTH VFX_PASSDEPTH_SELECTION\n\t\t\t#pragma
target 4.5\n\t\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

0.5f, encodedMotionVector);\n\t\t\t\t\t\t\t\n\t\t\t\t\treturn encodedMotionVector;\n\t\t\t\t#elif
VFX_PASSDEPTH == VFX_PASSDEPTH_SELECTION\n\t\t\t\t\treturn float4(_ObjectId,
_PassValue, 1.0, 1.0);\n\t\t\t\t#elif VFX_PASSDEPTH == VFX_PASSDEPTH_ACTUAL\n\t\t\t\t\treturn
(float4)0;\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH undefined \n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\t\r\n\t\t\r\n\t\t//
(float4)0;\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH undefined \n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\t\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#pragma multi_compile
_ DEBUG_DISPLAY\n\t\t\n\t\t\tstruct ps_input\n\t\t\t{\n\t\t\t\tfloat4 pos :

encodedMotionVector = 0.0f;\n\t\t\t\t\t\tVFXEncodeMotionVector(velocity * 0.5f,
encodedMotionVector);\n\t\t\t\t\t\t\n\t\t\t\to.outMotionVector = encodedMotionVector;\n\t\t
o.outMotionVector.a = o.color.a < i.VFX_VARYING_ALPHATHRESHOLD ? 0.0f : 1.0f;
//Independant clipping for motion vector pass\n\t\t#endif\n\t\t\t\treturn o;\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\t\r\n\t}\r\n}\r\n"
//Independant clipping for motion vector pass\n\t\t#endif\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"
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\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_SIZE_CURRENT 1\n#define VFX_USE_VELOCITY_CURRENT
1\n#define VFX_USE_LIFETIME_CURRENT 1\n#define VFX_USE_POSITION_CURRENT 1\n#define

1\n#define VFX_USE_PIVOTX_CURRENT 1\n#define VFX_USE_PIVOTY_CURRENT 1\n#define
VFX_USE_PIVOTZ_CURRENT 1\n#define VFX_USE_SCALEX_CURRENT 1\n#define VFX_USE_SCALEY_CURRENT
1\n#define VFX_USE_SCALEZ_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
VFX_LOCAL_SPACE 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\nCBUFFER_START(parameters)\n
float4 Size_b;\n float currentFrameIndex;\n uint3 PADDING_0;\nCBUFFER_END\n\nstruct
Attributes\n{\n float size;\n float3 velocity;\n float lifetime;\n
float3 position;\n float alpha;\n bool alive;\n float3 axisX;\n

SourceAttributes\n{\n};\n\nTexture2D baseColorMap;\nSamplerState samplerbaseColorMap;\nfloat4
baseColorMap_TexelSize;\n\n\r\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXCommon.hlsl\"\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\r\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\r\n\r\nByteAddressBuffer
attributeBuffer;\r\nRWByteAddressBuffer elementToVFXBuffer;\r\n#if VFX_USE_ALIVE_CURRENT\r\nStructuredBuffer<uint>
deadListOut;\r\n#endif\r\n\r\n#if VFX_HAS_INDIRECT_DRAW\r\nStructuredBuffer<uint>
indirectBuffer;\r\n#endif\r\n\r\nCBUFFER_START(updateParams)\r\n\tuint nbMax;\r\n\tuint
dispatchWidth;\r\n\tuint systemSeed;\r\nCBUFFER_END\r\n\r\nvoid Orient_94A(inout
baseColorMap_TexelSize;\n\n\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXCommon.hlsl\"\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nByteAddressBuffer
attributeBuffer;\nRWByteAddressBuffer elementToVFXBuffer;\n#if VFX_USE_ALIVE_CURRENT\nStructuredBuffer<uint>
deadListOut;\n#endif\n\n#if VFX_HAS_INDIRECT_DRAW\nStructuredBuffer<uint> indirectBuffer;\n#endif\n\nCBUFFER_START(updateParams)\n\tuint
nbMax;\n\tuint dispatchWidth;\n\tuint systemSeed;\nCBUFFER_END\n\nvoid Orient_94A(inout
float3 axisX, inout float3 axisY, inout float3 axisZ, float3 position, float3
velocity) /*mode:AlongVelocity axes:ZY */\n{\n \n axisY = normalize(velocity);\n
axisZ = position - GetViewVFXPosition();\n axisX = normalize(cross(axisY,axisZ));\n

channels:XYZ */\n{\n float t = age / lifetime;\n float value = 0.0f;\n
value = SampleCurve(Size, t);\n size *= value;\n}\n\n\r\n\r\n[numthreads(NB_THREADS_PER_GROUP,1,1)]\r\nvoid
CSMain(uint3 groupId\t\t: SV_GroupID,\r\n\t\t\tuint3 groupThreadId\t: SV_GroupThreadID)\r\n{\r\n\tuint
value = SampleCurve(Size, t);\n size *= value;\n}\n\n\n\n[numthreads(NB_THREADS_PER_GROUP,1,1)]\nvoid
CSMain(uint3 groupId\t\t: SV_GroupID,\n\t\t\tuint3 groupThreadId\t: SV_GroupThreadID)\n{\n\tuint
* NB_THREADS_PER_GROUP;\r\n\tuint index = id;\r\n\tif (id < nbMax)\r\n\t{\r\n\t\tAttributes
attributes = (Attributes)0;\r\n\t\tSourceAttributes sourceAttributes = (SourceAttributes)0;\r\n\t\t\r\n\t\tattributes.alive
= (attributeBuffer.Load((index * 0xC + 0x183) << 2));\n\n\r\n\t\tif (attributes.alive)\r\n\t\t{\r\n\t\t\tattributes.size
* NB_THREADS_PER_GROUP;\n\tuint index = id;\n\tif (id < nbMax)\n\t{\n\t\tAttributes
attributes = (Attributes)0;\n\t\tSourceAttributes sourceAttributes = (SourceAttributes)0;\n\t\t\n\t\tattributes.alive
= (attributeBuffer.Load((index * 0xC + 0x183) << 2));\n\n\n\t\tif (attributes.alive)\n\t\t{\n\t\t\tattributes.size
= asfloat(attributeBuffer.Load((index * 0xC + 0x3) << 2));\nattributes.velocity
= asfloat(attributeBuffer.Load3((index * 0xC + 0x180) << 2));\nattributes.lifetime
= asfloat(attributeBuffer.Load((index * 0x1 + 0x300) << 2));\nattributes.position

* 0xC + 0x189) << 2));\nattributes.pivotX = (float)0;\nattributes.pivotY =
(float)0;\nattributes.pivotZ = (float)0;\nattributes.scaleX = (float)1;\nattributes.scaleY
= (float)1;\nattributes.scaleZ = (float)1;\nattributes.age = asfloat(attributeBuffer.Load((index
* 0xC + 0x18A) << 2));\n\n\r\n\t\t\tOrient_94A( /*inout */attributes.axisX,
* 0xC + 0x18A) << 2));\n\n\n\t\t\tOrient_94A( /*inout */attributes.axisX,
attributes.age, attributes.lifetime, Size_b);\n\t\t\t\n\r\n\t\t\t\r\n\t\t\t\n\t\t\tfloat3
attributes.age, attributes.lifetime, Size_b);\n\t\t\t\n\n\t\t\t\n\t\t\t\n\t\t\tfloat3
VFX_USE_SCALEZ_CURRENT\n\t\t\tsize3.z *= attributes.scaleZ;\n\t\t\t#endif\n\t\t\t\r\n\t\t\tfloat4x4
elementToVFX = GetElementToVFXMatrix(\r\n\t\t\t\tattributes.axisX,\r\n\t\t\t\tattributes.axisY,\r\n\t\t\t\tattributes.axisZ,\r\n\t\t\t\tfloat3(attributes.angleX,attributes.angleY,attributes.angleZ),\r\n\t\t\t\tfloat3(attributes.pivotX,attributes.pivotY,attributes.pivotZ),\r\n\t\t\t\tsize3,\r\n\t\t\t\tattributes.position);\r\n\t\t\r\n\t\t\tUNITY_UNROLL\r\n\t\t\tfor
(int itIndexMatrixRow = 0; itIndexMatrixRow < 3; ++itIndexMatrixRow)\r\n\t\t\t{\r\n\t\t\t\tUNITY_UNROLL\r\n\t\t\t\tfor
(int itIndexMatrixCol = 0; itIndexMatrixCol < 4; ++itIndexMatrixCol)\r\n\t\t\t\t{\r\n\t\t\t\t\tuint
itIndexMatrix = itIndexMatrixCol * 4 + itIndexMatrixRow;\r\n\t\t\t\t\tfloat
value = elementToVFX[itIndexMatrixRow][itIndexMatrixCol];\r\n\t\t\t\t\telementToVFXBuffer.Store((index
* 16 + itIndexMatrix) << 2, asuint(value));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n
VFX_USE_SCALEZ_CURRENT\n\t\t\tsize3.z *= attributes.scaleZ;\n\t\t\t#endif\n\t\t\t\n\t\t\tfloat4x4
elementToVFX = GetElementToVFXMatrix(\n\t\t\t\tattributes.axisX,\n\t\t\t\tattributes.axisY,\n\t\t\t\tattributes.axisZ,\n\t\t\t\tfloat3(attributes.angleX,attributes.angleY,attributes.angleZ),\n\t\t\t\tfloat3(attributes.pivotX,attributes.pivotY,attributes.pivotZ),\n\t\t\t\tsize3,\n\t\t\t\tattributes.position);\n\t\t\n\t\t\tUNITY_UNROLL\n\t\t\tfor
(int itIndexMatrixRow = 0; itIndexMatrixRow < 3; ++itIndexMatrixRow)\n\t\t\t{\n\t\t\t\tUNITY_UNROLL\n\t\t\t\tfor
(int itIndexMatrixCol = 0; itIndexMatrixCol < 4; ++itIndexMatrixCol)\n\t\t\t\t{\n\t\t\t\t\tuint
itIndexMatrix = itIndexMatrixCol * 4 + itIndexMatrixRow;\n\t\t\t\t\tfloat value
= elementToVFX[itIndexMatrixRow][itIndexMatrixCol];\n\t\t\t\t\telementToVFXBuffer.Store((index
* 16 + itIndexMatrix) << 2, asuint(value));\n\t\t\t\t}\n\t\t\t}\n\n
: 0u);\r\n\t\t}\t\t\r\n\t}\r\n}\r\n"
: 0u);\n\t\t}\t\t\n\t}\n}\n"
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
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
1\n#define VFX_LOCAL_SPACE 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\nCBUFFER_START(parameters)\n
SourceAttributes\n{\n};\n\n\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\nCBUFFER_START(params)\r\n
uint nbMax;\r\n uint dispatchWidth;\r\nCBUFFER_END\r\n\r\nCBUFFER_START(cameraParams)\r\n
float3 cameraPosition;\r\nCBUFFER_END\r\n\r\nByteAddressBuffer attributeBuffer;\r\nStructuredBuffer<uint>
inputBuffer;\r\n\r\n#if USE_DEAD_LIST_COUNT\r\nByteAddressBuffer deadListCount;\r\n#endif\r\n\r\nstruct
Kvp\r\n{\r\n\tfloat sortKey;\r\n\tuint index;\r\n};\r\n\r\nRWStructuredBuffer<Kvp>
outputBuffer;\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
threshold = nbMax;\r\n#if USE_DEAD_LIST_COUNT\r\n\tthreshold -= deadListCount.Load(0);\r\n#endif\r\n\tuint
id = groupThreadId.x + groupId.x * NB_THREADS_PER_GROUP + groupId.y * dispatchWidth
* NB_THREADS_PER_GROUP;\r\n\tif (id < threshold)\r\n\t{\r\n\t\tuint index =
inputBuffer[id];\r\n\t\t\r\n\t\tAttributes attributes = (Attributes)0;\r\n\t\tattributes.position
= asfloat(attributeBuffer.Load3((index * 0x4 + 0x120) << 2));\n\t\t\n\r\n\t\t\r\n#if
VFX_LOCAL_SPACE\r\n\t\tfloat3 wPos = mul(localToWorld,float4(attributes.position,1.0f)).xyz;\r\n#else\r\n\t\tfloat3
wPos = attributes.position;\r\n#endif\r\n\t\tfloat3 camToPos = wPos - cameraPosition;\r\n\t\t\r\n\t\tKvp
kvp;\r\n\t\tkvp.sortKey = dot(camToPos,camToPos); // sqr distance to the camera\r\n\t\tkvp.index
= index;\r\n\r\n\t\toutputBuffer[id] = kvp;\r\n\t}\r\n}\r\n"
SourceAttributes\n{\n};\n\n\n\n#include \"Packages/com.unity.visualeffectgraph/Shaders/Common/VFXCommonCompute.hlsl\"\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\n\nCBUFFER_START(params)\n
uint nbMax;\n uint dispatchWidth;\nCBUFFER_END\n\nCBUFFER_START(cameraParams)\n
float3 cameraPosition;\nCBUFFER_END\n\nByteAddressBuffer attributeBuffer;\nStructuredBuffer<uint>
inputBuffer;\n\n#if USE_DEAD_LIST_COUNT\nByteAddressBuffer deadListCount;\n#endif\n\nstruct
Kvp\n{\n\tfloat sortKey;\n\tuint index;\n};\n\nRWStructuredBuffer<Kvp> outputBuffer;\n\n[numthreads(NB_THREADS_PER_GROUP,1,1)]\nvoid
CSMain(uint3 groupId : SV_GroupID,\n uint3 groupThreadId
: SV_GroupThreadID)\n{\n\tuint threshold = nbMax;\n#if USE_DEAD_LIST_COUNT\n\tthreshold
-= deadListCount.Load(0);\n#endif\n\tuint id = groupThreadId.x + groupId.x
* NB_THREADS_PER_GROUP + groupId.y * dispatchWidth * NB_THREADS_PER_GROUP;\n\tif
(id < threshold)\n\t{\n\t\tuint index = inputBuffer[id];\n\t\t\n\t\tAttributes
attributes = (Attributes)0;\n\t\tattributes.position = asfloat(attributeBuffer.Load3((index
* 0x4 + 0x120) << 2));\n\t\t\n\n\t\t\n#if VFX_LOCAL_SPACE\n\t\tfloat3 wPos
= mul(localToWorld,float4(attributes.position,1.0f)).xyz;\n#else\n\t\tfloat3
wPos = attributes.position;\n#endif\n\t\tfloat3 camToPos = wPos - cameraPosition;\n\t\t\n\t\tKvp
kvp;\n\t\tkvp.sortKey = dot(camToPos,camToPos); // sqr distance to the camera\n\t\tkvp.index
= index;\n\n\t\toutputBuffer[id] = kvp;\n\t}\n}\n"
m_Infos:
m_Expressions:
m_Expressions:

468
Assets/Samples/Butterflies/Butterflies.vfx


m_ShaderSources:
- compute: 1
name: '[System 1]Initialize Particle'
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\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_SEED_CURRENT
1\n#define VFX_USE_DIRECTION_CURRENT 1\n#define VFX_USE_VELOCITY_CURRENT 1\n#define

1\n#define VFX_USE_ANGLEX_CURRENT 1\n#define VFX_USE_ANGLEY_CURRENT 1\n#define
VFX_USE_AGE_CURRENT 1\n#define VFX_USE_COLOR_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\n\nstruct
1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\n\nstruct
color;\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\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<uint> 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<uint>
eventList;\r\nByteAddressBuffer inputAdditional;\r\n#endif\r\n\r\n#if HAS_STRIPS\r\nRWBuffer<uint>
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
color;\n};\n\nstruct SourceAttributes\n{\n};\n\n\n\n\n#define USE_DEAD_LIST
(VFX_USE_ALIVE_CURRENT && !HAS_STRIPS)\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
USE_DEAD_LIST\nRWStructuredBuffer<uint> 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<uint>
eventList;\nByteAddressBuffer inputAdditional;\n#endif\n\n#if HAS_STRIPS\nRWBuffer<uint>
stripDataBuffer;\n#endif\n\n#include \"Packages/com.unity.visualeffectgraph/Shaders/Common/VFXCommonCompute.hlsl\"\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\n\nvoid
PositionSphere_31A(inout float3 position, inout uint seed, inout float3 direction,
float3 ArcSphere_sphere_center, float ArcSphere_sphere_radius, float ArcSphere_arc,
float volumeFactor) /*positionMode:ThicknessAbsolute spawnMode:Random */\n{\n

= VFXSafeNormalize(lerp(direction, randomDirection, DirectionBlend));\n
velocity += direction * speed;\n}\nvoid SetAttribute_CA100327(inout float texIndex,
inout uint seed, float A, float B) /*attribute:texIndex Composition:Overwrite
Source:Slot Random:Uniform channels:XYZ */\n{\n texIndex = lerp(A,B,RAND);\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
Source:Slot Random:Uniform channels:XYZ */\n{\n texIndex = lerp(A,B,RAND);\n}\n\n\n\n#if
HAS_STRIPS\nbool GetParticleIndex(inout uint particleIndex, uint stripIndex)\n{\n\tuint
relativeIndex;\n\tInterlockedAdd(STRIP_DATA(STRIP_NEXT_INDEX, stripIndex),
1, relativeIndex);\n\tif (relativeIndex >= PARTICLE_PER_STRIP_COUNT) // strip
is full\n\t{\n\t\tInterlockedAdd(STRIP_DATA(STRIP_NEXT_INDEX, stripIndex),
-1); // Remove previous increment\n\t\treturn false;\n\t}\n\n\tparticleIndex
+ 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
+ relativeIndex) % PARTICLE_PER_STRIP_COUNT);\n return true;\n}\n#endif\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 USE_DEAD_LIST\n maxThreadId
= min(maxThreadId, deadListCount.Load(0x0));\n#elif VFX_USE_SPAWNER_FROM_GPU\n
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\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
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\t\tuint particleIndex = id + currentSpawnIndex;\n\t\t\n#if
!VFX_USE_SPAWNER_FROM_GPU\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\n\t\tAttributes
attributes = (Attributes)0;\n\t\tSourceAttributes sourceAttributes = (SourceAttributes)0;\n\t\t\n
attributes.position = float3(0, 0, 0);\n attributes.seed = (uint)0;\n
attributes.direction = float3(0, 0, 1);\n attributes.velocity = float3(0,
0, 0);\n attributes.texIndex = (float)0;\n attributes.scaleX

= float3(0, 0, 1);\n attributes.angleX = (float)0;\n attributes.angleY
= (float)0;\n attributes.age = (float)0;\n attributes.color =
float3(1, 1, 1);\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 PositionSphere_31A(
float3(1, 1, 1);\n \n\n#if VFX_USE_PARTICLEID_CURRENT\n attributes.particleId
= particleIndex;\n#endif\n#if VFX_USE_SEED_CURRENT\n attributes.seed
= WangHash(particleIndex ^ systemSeed);\n#endif\n#if VFX_USE_SPAWNINDEX_CURRENT\n
attributes.spawnIndex = id;\n#endif\n#if HAS_STRIPS\n#if !VFX_USE_SPAWNER_FROM_GPU\n\t\t\n#else\n
uint stripIndex = sourceIndex;\n#endif\n\t\tstripIndex = min(stripIndex, STRIP_COUNT);\n\n
if (!GetParticleIndex(particleIndex, stripIndex))\n return;\n\n
const StripData stripData = GetStripDataFromStripIndex(stripIndex, PARTICLE_PER_STRIP_COUNT);\n\t\tInitStripAttributes(particleIndex,
attributes, stripData);\n\t\t// TODO Change seed to be sure we're deterministic
on random with strip\n#endif\n \n {\n PositionSphere_31A(
/*inout */attributes.position, /*inout */attributes.seed, /*inout */attributes.direction,
float3(0, 0, 0), (float)1, (float)6.28318548, (float)0.86349088);\n
}\n {\n float3 tmp_z = attributes.position * attributes.position;\n

*/attributes.velocity, /*inout */attributes.direction, /*inout */attributes.seed,
(float)0.200000003, (float)1, (float)1);\n }\n {\n
SetAttribute_CA100327( /*inout */attributes.texIndex, /*inout */attributes.seed,
(float)0, (float)8);\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.Store3((index * 0x4 + 0x0) << 2,asuint(attributes.position));\n
attributeBuffer.Store3((index * 0x4 + 0xD0) << 2,asuint(attributes.direction));\n
attributeBuffer.Store3((index * 0x4 + 0x1A0) << 2,asuint(attributes.velocity));\n
attributeBuffer.Store((index * 0x1 + 0x270) << 2,asuint(attributes.texIndex));\n
attributeBuffer.Store((index * 0x3 + 0x2A4) << 2,asuint(attributes.scaleX));\n
attributeBuffer.Store((index * 0x3 + 0x2A5) << 2,asuint(attributes.scaleY));\n
attributeBuffer.Store((index * 0x3 + 0x2A6) << 2,asuint(attributes.pivotX));\n
attributeBuffer.Store((index * 0x1 + 0x340) << 2,asuint(attributes.particleId));\n
attributeBuffer.Store3((index * 0xC + 0x374) << 2,asuint(attributes.axisX));\n
attributeBuffer.Store3((index * 0xC + 0x378) << 2,asuint(attributes.axisY));\n
attributeBuffer.Store3((index * 0xC + 0x37C) << 2,asuint(attributes.axisZ));\n
attributeBuffer.Store((index * 0x2 + 0x5E4) << 2,asuint(attributes.angleX));\n
attributeBuffer.Store((index * 0x2 + 0x5E5) << 2,asuint(attributes.angleY));\n
attributeBuffer.Store((index * 0x4 + 0x1A3) << 2,asuint(attributes.age));\n
attributeBuffer.Store3((index * 0x4 + 0x64C) << 2,asuint(attributes.color));\n
\n\r\n }\r\n }\r\n}\r\n"
(float)0, (float)8);\n }\n \n\n\t\t\n#if VFX_USE_ALIVE_CURRENT\n
if (attributes.alive)\n#endif \n {\n#if USE_DEAD_LIST\n\t
uint deadIndex = deadListIn.DecrementCounter();\n uint index = deadListIn[deadIndex];\n#else\n
uint index = particleIndex;\n#endif\n attributeBuffer.Store3((index
* 0x4 + 0x0) << 2,asuint(attributes.position));\n attributeBuffer.Store3((index
* 0x4 + 0xD0) << 2,asuint(attributes.direction));\n attributeBuffer.Store3((index
* 0x4 + 0x1A0) << 2,asuint(attributes.velocity));\n attributeBuffer.Store((index
* 0x1 + 0x270) << 2,asuint(attributes.texIndex));\n attributeBuffer.Store((index
* 0x3 + 0x2A4) << 2,asuint(attributes.scaleX));\n attributeBuffer.Store((index
* 0x3 + 0x2A5) << 2,asuint(attributes.scaleY));\n attributeBuffer.Store((index
* 0x3 + 0x2A6) << 2,asuint(attributes.pivotX));\n attributeBuffer.Store((index
* 0x1 + 0x340) << 2,asuint(attributes.particleId));\n attributeBuffer.Store3((index
* 0xC + 0x374) << 2,asuint(attributes.axisX));\n attributeBuffer.Store3((index
* 0xC + 0x378) << 2,asuint(attributes.axisY));\n attributeBuffer.Store3((index
* 0xC + 0x37C) << 2,asuint(attributes.axisZ));\n attributeBuffer.Store((index
* 0x2 + 0x5E4) << 2,asuint(attributes.angleX));\n attributeBuffer.Store((index
* 0x2 + 0x5E5) << 2,asuint(attributes.angleY));\n attributeBuffer.Store((index
* 0x4 + 0x1A3) << 2,asuint(attributes.age));\n attributeBuffer.Store3((index
* 0x4 + 0x64C) << 2,asuint(attributes.color));\n \n\n }\n
}\n}\n"
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
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
VFX_LOCAL_SPACE 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\nCBUFFER_START(parameters)\n
particleId;\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<uint> deadListOut;\r\n#endif\r\n\r\n#if
VFX_HAS_INDIRECT_DRAW\r\nRWStructuredBuffer<uint> indirectBuffer;\r\n#endif\r\n\r\n#if
HAS_STRIPS\r\nRWBuffer<uint> stripDataBuffer;\r\n#endif\r\n\r\n#if VFX_USE_STRIPALIVE_CURRENT\r\nBuffer<uint>
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
particleId;\n float age;\n};\n\nstruct SourceAttributes\n{\n};\n\n\n\n\n#define
USE_DEAD_LIST (VFX_USE_ALIVE_CURRENT && !HAS_STRIPS)\n\nRWByteAddressBuffer
attributeBuffer;\n\n#if USE_DEAD_LIST\nRWStructuredBuffer<uint> deadListOut;\n#endif\n\n#if
VFX_HAS_INDIRECT_DRAW\nRWStructuredBuffer<uint> indirectBuffer;\n#endif\n\n#if
HAS_STRIPS\nRWBuffer<uint> stripDataBuffer;\n#endif\n\n#if VFX_USE_STRIPALIVE_CURRENT\nBuffer<uint>
attachedStripDataBuffer;\n#endif\n\nCBUFFER_START(updateParams)\n uint nbMax;\n\tuint
dispatchWidth;\n\tuint systemSeed;\nCBUFFER_END\n\n#include \"Packages/com.unity.visualeffectgraph/Shaders/Common/VFXCommonCompute.hlsl\"\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\n\nvoid
Force_1(inout float3 velocity, float mass, float3 Velocity, float Drag, float
deltaTime) /*Mode:Relative */\n{\n velocity += (Velocity - velocity) * min(1.0f,Drag
* deltaTime / mass);\n}\nvoid Turbulence_18D(float3 position, inout float3

/*attribute:pivot Composition:Overwrite Source:Slot Random:Off channels:X */\n{\n
pivotX = Pivot.x;\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}\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\t\r\n\t\tif
(attributes.alive)\r\n\t\t{\r\n\t\t\tattributes.position = asfloat(attributeBuffer.Load3((index
float age, float deltaTime)\n{\n age += deltaTime;\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 Attributes attributes = (Attributes)0;\n\t\tSourceAttributes
sourceAttributes = (SourceAttributes)0;\n\n#if VFX_USE_ALIVE_CURRENT\n\t\t\n\t\tif
(attributes.alive)\n\t\t{\n\t\t\tattributes.position = asfloat(attributeBuffer.Load3((index
* 0x4 + 0x0) << 2));\n\t\t\tattributes.direction = asfloat(attributeBuffer.Load3((index
* 0x4 + 0xD0) << 2));\n\t\t\tattributes.velocity = asfloat(attributeBuffer.Load3((index
* 0x4 + 0x1A0) << 2));\n\t\t\tattributes.mass = (float)1;\n\t\t\tattributes.scaleX

= (attributeBuffer.Load((index * 0x1 + 0x340) << 2));\n\t\t\tattributes.age
= asfloat(attributeBuffer.Load((index * 0x4 + 0x1A3) << 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
= asfloat(attributeBuffer.Load((index * 0x4 + 0x1A3) << 2));\n\t\t\t\n\n\n//
Initialize built-in needed attributes\n#if VFX_USE_OLDPOSITION_CURRENT\n\t\t\tattributes.oldPosition
= attributes.position;\n#endif\n#if HAS_STRIPS\n const StripData
stripData = GetStripDataFromParticleIndex(index, PARTICLE_PER_STRIP_COUNT);\n
InitStripAttributes(index, attributes, stripData);\n#endif\n\t\t\t\n\t\t\t{\n\t\t\t
float3 tmp_be = attributes.position * attributes.position;\n\t\t\t float
tmp_bf = tmp_be[2];\n\t\t\t float tmp_bg = tmp_be[1];\n\t\t\t float tmp_bh
= tmp_bf + tmp_bg;\n\t\t\t float tmp_bi = tmp_be[0];\n\t\t\t float tmp_bj

float2(0.600000024, 1));\n\t\t\t}\n\t\t\t{\n\t\t\t SetAttribute_65DEC946(
/*inout */attributes.pivotX, (float)0.449999988);\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\t\n\r\n\r\n\t\t\tif (attributes.alive)\r\n\t\t\t{\r\n\t\t\t\tattributeBuffer.Store3((index
/*inout */attributes.age, deltaTime_a);\n\t\t\t\n\n\n\t\t\tif (attributes.alive)\n\t\t\t{\n\t\t\t\tattributeBuffer.Store3((index
* 0x4 + 0x1A3) << 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\t\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,
* 0x4 + 0x1A3) << 2,asuint(attributes.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\n#if HAS_STRIPS\t\t\t\n\t\t\t\tuint relativeIndexInStrip
= GetRelativeIndex(index, stripData);\n\t\t\t\tInterlockedMin(STRIP_DATA(STRIP_MIN_ALIVE,
stripData.stripIndex), relativeIndexInStrip);\n\t\t\t\tInterlockedMax(STRIP_DATA(STRIP_MAX_ALIVE,
stripData.stripIndex), relativeIndexInStrip);\n#endif\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t\n#if
USE_DEAD_LIST && !VFX_USE_STRIPALIVE_CURRENT\n\t\t\t\tuint deadIndex = deadListOut.IncrementCounter();\n\t\t\t\tdeadListOut[deadIndex]
= index;\n#endif\n\t\t\t}\n\t\t}\n#if USE_DEAD_LIST && VFX_USE_STRIPALIVE_CURRENT\n
else if (attributes.stripAlive)\n {\n if (STRIP_DATA_X(attachedStripDataBuffer,
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.position
= asfloat(attributeBuffer.Load3((index * 0x4 + 0x0) << 2));\n\t\tattributes.direction
= asfloat(attributeBuffer.Load3((index * 0x4 + 0xD0) << 2));\n\t\tattributes.velocity
= asfloat(attributeBuffer.Load3((index * 0x4 + 0x1A0) << 2));\n\t\tattributes.mass
= (float)1;\n\t\tattributes.scaleX = asfloat(attributeBuffer.Load((index *
0x3 + 0x2A4) << 2));\n\t\tattributes.scaleY = asfloat(attributeBuffer.Load((index
* 0x3 + 0x2A5) << 2));\n\t\tattributes.pivotX = asfloat(attributeBuffer.Load((index
* 0x3 + 0x2A6) << 2));\n\t\tattributes.particleId = (attributeBuffer.Load((index
* 0x1 + 0x340) << 2));\n\t\tattributes.age = asfloat(attributeBuffer.Load((index
* 0x4 + 0x1A3) << 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_be = attributes.position * attributes.position;\n\t\t float tmp_bf
= tmp_be[2];\n\t\t float tmp_bg = tmp_be[1];\n\t\t float tmp_bh = tmp_bf
+ tmp_bg;\n\t\t float tmp_bi = tmp_be[0];\n\t\t float tmp_bj = tmp_bh
+ tmp_bi;\n\t\t float tmp_bl = pow(tmp_bj, (float)0.5);\n\t\t float tmp_bm
= (float)1 / tmp_bl;\n\t\t float3 tmp_bn = float3(tmp_bm, tmp_bm, tmp_bm);\n\t\t
float3 tmp_bo = attributes.position * tmp_bn;\n\t\t float tmp_bp = tmp_bo[1];\n\t\t
float tmp_bq = attributes.direction[2];\n\t\t float tmp_br = tmp_bp * tmp_bq;\n\t\t
float tmp_bs = tmp_bo[2];\n\t\t float tmp_bt = attributes.direction[1];\n\t\t
float tmp_bu = tmp_bs * tmp_bt;\n\t\t float tmp_bv = tmp_br - tmp_bu;\n\t\t
float tmp_bw = attributes.direction[0];\n\t\t float tmp_bx = tmp_bs * tmp_bw;\n\t\t
float tmp_by = tmp_bo[0];\n\t\t float tmp_bz = tmp_by * tmp_bq;\n\t\t
float tmp_ca = tmp_bx - tmp_bz;\n\t\t float tmp_cb = tmp_by * tmp_bt;\n\t\t
float tmp_cc = tmp_bp * tmp_bw;\n\t\t float tmp_cd = tmp_cb - tmp_cc;\n\t\t
float3 tmp_ce = float3(tmp_bv, tmp_ca, tmp_cd);\n\t\t float tmp_cf = (float)attributes.particleId;\n\t\t
float tmp_ch = tmp_cf / (float)2;\n\t\t float tmp_ci = frac(tmp_ch);\n\t\t
the particle \n {\n uint deadIndex = deadListOut.IncrementCounter();\n\t\t\t\tdeadListOut[deadIndex]
= index;\n attributes.stripAlive = false;\n \n
} \n }\n#endif\n#else\n\t\tattributes.position = asfloat(attributeBuffer.Load3((index
* 0x4 + 0x0) << 2));\n\t\tattributes.direction = asfloat(attributeBuffer.Load3((index
* 0x4 + 0xD0) << 2));\n\t\tattributes.velocity = asfloat(attributeBuffer.Load3((index
* 0x4 + 0x1A0) << 2));\n\t\tattributes.mass = (float)1;\n\t\tattributes.scaleX
= asfloat(attributeBuffer.Load((index * 0x3 + 0x2A4) << 2));\n\t\tattributes.scaleY
= asfloat(attributeBuffer.Load((index * 0x3 + 0x2A5) << 2));\n\t\tattributes.pivotX
= asfloat(attributeBuffer.Load((index * 0x3 + 0x2A6) << 2));\n\t\tattributes.particleId
= (attributeBuffer.Load((index * 0x1 + 0x340) << 2));\n\t\tattributes.age =
asfloat(attributeBuffer.Load((index * 0x4 + 0x1A3) << 2));\n\t\t\n\n\t\t\n#if
VFX_USE_OLDPOSITION_CURRENT\n\t\tattributes.oldPosition = attributes.position;\n#endif\n#if
HAS_STRIPS\n const StripData stripData = GetStripDataFromParticleIndex(index,
PARTICLE_PER_STRIP_COUNT);\n InitStripAttributes(index, attributes,
stripData);\n#endif\n\t\t\n\t\t{\n\t\t float3 tmp_be = attributes.position
* attributes.position;\n\t\t float tmp_bf = tmp_be[2];\n\t\t float tmp_bg
= tmp_be[1];\n\t\t float tmp_bh = tmp_bf + tmp_bg;\n\t\t float tmp_bi
= tmp_be[0];\n\t\t float tmp_bj = tmp_bh + tmp_bi;\n\t\t float tmp_bl
= pow(tmp_bj, (float)0.5);\n\t\t float tmp_bm = (float)1 / tmp_bl;\n\t\t
float3 tmp_bn = float3(tmp_bm, tmp_bm, tmp_bm);\n\t\t float3 tmp_bo = attributes.position
* tmp_bn;\n\t\t float tmp_bp = tmp_bo[1];\n\t\t float tmp_bq = attributes.direction[2];\n\t\t
float tmp_br = tmp_bp * tmp_bq;\n\t\t float tmp_bs = tmp_bo[2];\n\t\t
float tmp_bt = attributes.direction[1];\n\t\t float tmp_bu = tmp_bs * tmp_bt;\n\t\t
float tmp_bv = tmp_br - tmp_bu;\n\t\t float tmp_bw = attributes.direction[0];\n\t\t
float tmp_bx = tmp_bs * tmp_bw;\n\t\t float tmp_by = tmp_bo[0];\n\t\t
float tmp_bz = tmp_by * tmp_bq;\n\t\t float tmp_ca = tmp_bx - tmp_bz;\n\t\t
float tmp_cb = tmp_by * tmp_bt;\n\t\t float tmp_cc = tmp_bp * tmp_bw;\n\t\t
float tmp_cd = tmp_cb - tmp_cc;\n\t\t float3 tmp_ce = float3(tmp_bv, tmp_ca,
tmp_cd);\n\t\t float tmp_cf = (float)attributes.particleId;\n\t\t float
tmp_ch = tmp_cf / (float)2;\n\t\t float tmp_ci = frac(tmp_ch);\n\t\t
float tmp_cj = tmp_ci * (float)2;\n\t\t bool tmp_cl = tmp_cj == (float)0;\n\t\t
float tmp_co = tmp_cl ? (float)4 : (float)-4;\n\t\t float3 tmp_cp = float3(tmp_co,
tmp_co, tmp_co);\n\t\t float3 tmp_cq = tmp_ce * tmp_cp;\n\t\t uint tmp_cs

float2(0.600000024, 1));\n\t\t}\n\t\t{\n\t\t SetAttribute_65DEC946( /*inout
*/attributes.pivotX, (float)0.449999988);\n\t\t}\n\t\tEulerIntegration( /*inout
*/attributes.position, attributes.velocity, deltaTime_a);\n\t\tAge( /*inout
*/attributes.age, deltaTime_a);\n\t\t\n\r\n\t\tattributeBuffer.Store3((index
*/attributes.age, deltaTime_a);\n\t\t\n\n\t\tattributeBuffer.Store3((index
* 0x4 + 0x1A3) << 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"
* 0x4 + 0x1A3) << 2,asuint(attributes.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"
name: '[System 1]A Left Wing'
source: "Shader \"Hidden/VFX/Butterflies/System 1/(A) Left Wing\"\n{\r\n\tSubShader\r\n\t{\t\r\n\t\tCull
Off\r\n\t\t\r\n\t\tTags { \"Queue\"=\"Geometry+450\" \"IgnoreProjector\"=\"False\"
name: '[System 1]Left Wing'
source: "Shader \"Hidden/VFX/Butterflies/System 1/Left Wing\"\n{\n\tSubShader\n\t{\t\n\t\tCull
Off\n\t\t\n\t\tTags { \"Queue\"=\"Geometry+450\" \"IgnoreProjector\"=\"False\"
\"RenderType\"=\"Opaque\" }\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\t\n\t\t\n\t\t\n\t\t\n\t\tZTest
LEqual\n\t\tZWrite On\n\t\tCull Off\n\t\t\n\t\n\t\t\t\n\t\tHLSLINCLUDE\n\t\t\n\t\t#define
NB_THREADS_PER_GROUP 64\n\t\t#define HAS_ATTRIBUTES 1\n\t\t#define VFX_PASSDEPTH_ACTUAL

to always use a valid instanceID\n\t\t#if defined(UNITY_STEREO_INSTANCING_ENABLED)\n\t\t\t#define
VFX_DECLARE_INSTANCE_ID UNITY_VERTEX_INPUT_INSTANCE_ID\n\t\t\t#define VFX_GET_INSTANCE_ID(i)
unity_InstanceID\n\t\t#else\n\t\t\t#define VFX_DECLARE_INSTANCE_ID uint
instanceID : SV_InstanceID;\n\t\t\t#define VFX_GET_INSTANCE_ID(i) i.instanceID\n\t\t#endif\n\t\t\n\t\tENDHLSL\n\t\t\n\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
instanceID : SV_InstanceID;\n\t\t\t#define VFX_GET_INSTANCE_ID(i) i.instanceID\n\t\t#endif\n\t\t\n\t\tENDHLSL\n\t\t\n\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"SceneSelectionPass\" }\n\t\t\n\t\t\tZWrite On\n\t\t\tBlend
Off\n\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#define VFX_PASSDEPTH VFX_PASSDEPTH_SELECTION\n\t\t\t#pragma
target 4.5\n\t\t\t#define UNITY_MATERIAL_LIT\n\t\t\t#pragma multi_compile _

for scene selection in the editor, this code allow to output the outline correctly\n\t\t\t\t\toutColor
= float4(_ObjectId, _PassValue, 1.0, 1.0);\n\t\t\t\t#elif VFX_PASSDEPTH ==
VFX_PASSDEPTH_ACTUAL\n\t\t\t\t\t//void\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH
undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"DepthOnly\" }\n\t\t\n\t\t\tZWrite On\n\t\t\tBlend Off\n\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#define
VFX_PASSDEPTH VFX_PASSDEPTH_ACTUAL\n\t\t\t#pragma target 4.5\n\t\t\t#define
UNITY_MATERIAL_LIT\n\t\t\t#pragma multi_compile _ WRITE_NORMAL_BUFFER\n\t\t\t\n\t\t\t#define

for scene selection in the editor, this code allow to output the outline correctly\n\t\t\t\t\toutColor
= float4(_ObjectId, _PassValue, 1.0, 1.0);\n\t\t\t\t#elif VFX_PASSDEPTH ==
VFX_PASSDEPTH_ACTUAL\n\t\t\t\t\t//void\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH
undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"MotionVectors\" }\n\t\t\t\n\t\t\tStencil\n\t\t\t{\n\t\t\t
WriteMask 176\n\t\t\t Ref 160\n\t\t\t Comp Always\n\t\t\t Pass Replace\n\t\t\t}\n\n\t\t\n\t\t\tZWrite
On\n\t\t\tBlend Off\n\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#define VFX_PASSDEPTH

for scene selection in the editor, this code allow to output the outline correctly\n\t\t\t\t\toutColor
= float4(_ObjectId, _PassValue, 1.0, 1.0);\n\t\t\t\t#elif VFX_PASSDEPTH ==
VFX_PASSDEPTH_ACTUAL\n\t\t\t\t\t//void\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH
undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"GBuffer\" }\n\t\t\t\n\t\t\tStencil\n\t\t\t{\n\t\t\t\tWriteMask
7\n\t\t\t\tRef 2\n\t\t\t\tComp Always\n\t\t\t\tPass Replace\n\t\t\t}\t\n\t\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#pragma
target 4.5\n\t\t\t\n\t\t\t#pragma multi_compile _ LIGHT_LAYERS\n\t\t\t#pragma

\n\t\t VFXSetupBuiltin(builtin,surface,builtin.emissiveColor, i);\n\t\t
ENCODE_INTO_GBUFFER(surface, builtin, i.VFX_VARYING_POSCS.xy, outGBuffer);\n\t\t
#else\n\t\t VFXComputePixelOutputToGBuffer(i,normalWS,uvData,outGBuffer);\n\t\t
#endif\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\t// Forward pass\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
#endif\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\t// Forward pass\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"Forward\"}\n\t\t\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#pragma
target 4.5\n\t\t\t\n\t\t\t#define UNITY_MATERIAL_LIT\n\t\t\t#define LIGHTLOOP_TILE_PASS\n\t\t\t#define
_ENABLE_FOG_ON_TRANSPARENT\n\t\t\t#define _DISABLE_DECALS\n\t\t\t\n\n\t\t\t#pragma

encodedMotionVector = 0.0f;\n\t\t\t\t\t\tVFXEncodeMotionVector(velocity * 0.5f,
encodedMotionVector);\n\t\t\t\t\t\t\n\t\t\t\toutMotionVector = encodedMotionVector;\n\t\t\t\toutMotionVector.a
= outColor.a < i.VFX_VARYING_ALPHATHRESHOLD ? 0.0f : 1.0f; //Independant clipping
for motion vector pass\n\t\t#endif\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
for motion vector pass\n\t\t#endif\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"ShadowCaster\" }\n\t\t\n\t\t\tZWrite On\n\t\t\tBlend Off\n\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#pragma
target 4.5\n\t\t\t#if !USE_ALPHA_TEST && IS_TRANSPARENT_PARTICLE\n\t\t\t#define
USE_ALPHA_TEST 1\n\t\t\t#endif\n\t\t\t\n\t\t\tstruct ps_input\n\t\t\t{\n\t\t\t\tfloat4

VFX_SHADERGRAPH\n\t\t\t\n\t\t\t\t\n\t\t\n\t\t\t\t\n\t\t\n\t\t\t\tfloat alpha
= OUTSG.;\n\t\t\t#else\n\t\t\t\tfloat alpha = VFXGetFragmentColor(i).a;\n\t\t\t\t#if
HDRP_USE_BASE_COLOR_MAP_ALPHA\n\t\t\t\t\t\talpha *= VFXGetTextureColor(VFX_SAMPLER(baseColorMap),i).a;\t\n\t\t\t\t#endif\n\t\t\t#endif\n\t\t\t\tVFXClipFragmentColor(alpha,i);\n\t\t\n\t\t\t\treturn
0;\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t}\r\n}\r\n"
0;\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t}\n}\n"
name: '[System 1]B Right Wing'
source: "Shader \"Hidden/VFX/Butterflies/System 1/(B) Right Wing\"\n{\r\n\tSubShader\r\n\t{\t\r\n\t\tCull
Off\r\n\t\t\r\n\t\tTags { \"Queue\"=\"Geometry+450\" \"IgnoreProjector\"=\"False\"
name: '[System 1]Right Wing'
source: "Shader \"Hidden/VFX/Butterflies/System 1/Right Wing\"\n{\n\tSubShader\n\t{\t\n\t\tCull
Off\n\t\t\n\t\tTags { \"Queue\"=\"Geometry+450\" \"IgnoreProjector\"=\"False\"
\"RenderType\"=\"Opaque\" }\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\t\n\t\t\n\t\t\n\t\t\n\t\tZTest
LEqual\n\t\tZWrite On\n\t\tCull Off\n\t\t\n\t\n\t\t\t\n\t\tHLSLINCLUDE\n\t\t\n\t\t#define
NB_THREADS_PER_GROUP 64\n\t\t#define HAS_ATTRIBUTES 1\n\t\t#define VFX_PASSDEPTH_ACTUAL

to always use a valid instanceID\n\t\t#if defined(UNITY_STEREO_INSTANCING_ENABLED)\n\t\t\t#define
VFX_DECLARE_INSTANCE_ID UNITY_VERTEX_INPUT_INSTANCE_ID\n\t\t\t#define VFX_GET_INSTANCE_ID(i)
unity_InstanceID\n\t\t#else\n\t\t\t#define VFX_DECLARE_INSTANCE_ID uint
instanceID : SV_InstanceID;\n\t\t\t#define VFX_GET_INSTANCE_ID(i) i.instanceID\n\t\t#endif\n\t\t\n\t\tENDHLSL\n\t\t\n\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
instanceID : SV_InstanceID;\n\t\t\t#define VFX_GET_INSTANCE_ID(i) i.instanceID\n\t\t#endif\n\t\t\n\t\tENDHLSL\n\t\t\n\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"SceneSelectionPass\" }\n\t\t\n\t\t\tZWrite On\n\t\t\tBlend
Off\n\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#define VFX_PASSDEPTH VFX_PASSDEPTH_SELECTION\n\t\t\t#pragma
target 4.5\n\t\t\t#define UNITY_MATERIAL_LIT\n\t\t\t#pragma multi_compile _

for scene selection in the editor, this code allow to output the outline correctly\n\t\t\t\t\toutColor
= float4(_ObjectId, _PassValue, 1.0, 1.0);\n\t\t\t\t#elif VFX_PASSDEPTH ==
VFX_PASSDEPTH_ACTUAL\n\t\t\t\t\t//void\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH
undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"DepthOnly\" }\n\t\t\n\t\t\tZWrite On\n\t\t\tBlend Off\n\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#define
VFX_PASSDEPTH VFX_PASSDEPTH_ACTUAL\n\t\t\t#pragma target 4.5\n\t\t\t#define
UNITY_MATERIAL_LIT\n\t\t\t#pragma multi_compile _ WRITE_NORMAL_BUFFER\n\t\t\t\n\t\t\t#define

for scene selection in the editor, this code allow to output the outline correctly\n\t\t\t\t\toutColor
= float4(_ObjectId, _PassValue, 1.0, 1.0);\n\t\t\t\t#elif VFX_PASSDEPTH ==
VFX_PASSDEPTH_ACTUAL\n\t\t\t\t\t//void\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH
undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"MotionVectors\" }\n\t\t\t\n\t\t\tStencil\n\t\t\t{\n\t\t\t
WriteMask 176\n\t\t\t Ref 160\n\t\t\t Comp Always\n\t\t\t Pass Replace\n\t\t\t}\n\n\t\t\n\t\t\tZWrite
On\n\t\t\tBlend Off\n\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#define VFX_PASSDEPTH

for scene selection in the editor, this code allow to output the outline correctly\n\t\t\t\t\toutColor
= float4(_ObjectId, _PassValue, 1.0, 1.0);\n\t\t\t\t#elif VFX_PASSDEPTH ==
VFX_PASSDEPTH_ACTUAL\n\t\t\t\t\t//void\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH
undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"GBuffer\" }\n\t\t\t\n\t\t\tStencil\n\t\t\t{\n\t\t\t\tWriteMask
7\n\t\t\t\tRef 2\n\t\t\t\tComp Always\n\t\t\t\tPass Replace\n\t\t\t}\t\n\t\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#pragma
target 4.5\n\t\t\t\n\t\t\t#pragma multi_compile _ LIGHT_LAYERS\n\t\t\t#pragma

\n\t\t VFXSetupBuiltin(builtin,surface,builtin.emissiveColor, i);\n\t\t
ENCODE_INTO_GBUFFER(surface, builtin, i.VFX_VARYING_POSCS.xy, outGBuffer);\n\t\t
#else\n\t\t VFXComputePixelOutputToGBuffer(i,normalWS,uvData,outGBuffer);\n\t\t
#endif\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\t// Forward pass\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
#endif\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\t// Forward pass\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"Forward\"}\n\t\t\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#pragma
target 4.5\n\t\t\t\n\t\t\t#define UNITY_MATERIAL_LIT\n\t\t\t#define LIGHTLOOP_TILE_PASS\n\t\t\t#define
_ENABLE_FOG_ON_TRANSPARENT\n\t\t\t#define _DISABLE_DECALS\n\t\t\t\n\n\t\t\t#pragma

encodedMotionVector = 0.0f;\n\t\t\t\t\t\tVFXEncodeMotionVector(velocity * 0.5f,
encodedMotionVector);\n\t\t\t\t\t\t\n\t\t\t\toutMotionVector = encodedMotionVector;\n\t\t\t\toutMotionVector.a
= outColor.a < i.VFX_VARYING_ALPHATHRESHOLD ? 0.0f : 1.0f; //Independant clipping
for motion vector pass\n\t\t#endif\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
for motion vector pass\n\t\t#endif\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"ShadowCaster\" }\n\t\t\n\t\t\tZWrite On\n\t\t\tBlend Off\n\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#pragma
target 4.5\n\t\t\t#if !USE_ALPHA_TEST && IS_TRANSPARENT_PARTICLE\n\t\t\t#define
USE_ALPHA_TEST 1\n\t\t\t#endif\n\t\t\t\n\t\t\tstruct ps_input\n\t\t\t{\n\t\t\t\tfloat4

VFX_SHADERGRAPH\n\t\t\t\n\t\t\t\t\n\t\t\n\t\t\t\t\n\t\t\n\t\t\t\tfloat alpha
= OUTSG.;\n\t\t\t#else\n\t\t\t\tfloat alpha = VFXGetFragmentColor(i).a;\n\t\t\t\t#if
HDRP_USE_BASE_COLOR_MAP_ALPHA\n\t\t\t\t\t\talpha *= VFXGetTextureColor(VFX_SAMPLER(baseColorMap),i).a;\t\n\t\t\t\t#endif\n\t\t\t#endif\n\t\t\t\tVFXClipFragmentColor(alpha,i);\n\t\t\n\t\t\t\treturn
0;\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t}\r\n}\r\n"
0;\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t}\n}\n"
name: '[System 1]C Output Particle Lit Mesh'
source: "Shader \"Hidden/VFX/Butterflies/System 1/(C) Output Particle Lit Mesh\"\n{\r\n\tSubShader\r\n\t{\t\r\n\t\tTags
name: '[System 1]Output Particle Lit Mesh'
source: "Shader \"Hidden/VFX/Butterflies/System 1/Output Particle Lit Mesh\"\n{\n\tSubShader\n\t{\t\n\t\tTags
{ \"Queue\"=\"Geometry+0\" \"IgnoreProjector\"=\"False\" \"RenderType\"=\"Opaque\"
}\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\t\n\t\t\n\t\t\n\t\t\n\t\tZTest
LEqual\n\t\tZWrite On\n\t\tCull Back\n\t\t\n\t\n\t\t\t\n\t\tHLSLINCLUDE\n\t\t\n\t\t#define

to always use a valid instanceID\n\t\t#if defined(UNITY_STEREO_INSTANCING_ENABLED)\n\t\t\t#define
VFX_DECLARE_INSTANCE_ID UNITY_VERTEX_INPUT_INSTANCE_ID\n\t\t\t#define VFX_GET_INSTANCE_ID(i)
unity_InstanceID\n\t\t#else\n\t\t\t#define VFX_DECLARE_INSTANCE_ID uint
instanceID : SV_InstanceID;\n\t\t\t#define VFX_GET_INSTANCE_ID(i) i.instanceID\n\t\t#endif\n\t\t\n\t\tENDHLSL\n\t\t\n\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
instanceID : SV_InstanceID;\n\t\t\t#define VFX_GET_INSTANCE_ID(i) i.instanceID\n\t\t#endif\n\t\t\n\t\tENDHLSL\n\t\t\n\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"SceneSelectionPass\" }\n\t\t\n\t\t\tZWrite On\n\t\t\tBlend
Off\n\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#define VFX_PASSDEPTH VFX_PASSDEPTH_SELECTION\n\t\t\t\n\t\t\t#pragma
target 4.5\n\t\t\t#define UNITY_MATERIAL_LIT\n\t\t\t#pragma multi_compile _

for scene selection in the editor, this code allow to output the outline correctly\n\t\t\t\t\toutColor
= float4(_ObjectId, _PassValue, 1.0, 1.0);\n\t\t\t\t#elif VFX_PASSDEPTH ==
VFX_PASSDEPTH_ACTUAL\n\t\t\t\t\t//void\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH
undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"DepthOnly\" }\n\t\t\n\t\t\tZWrite On\n\t\t\tBlend Off\n\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#define
VFX_PASSDEPTH VFX_PASSDEPTH_ACTUAL\n\t\t\t\n\t\t\t#pragma target 4.5\n\t\t\t#define
UNITY_MATERIAL_LIT\n\t\t\t#pragma multi_compile _ WRITE_NORMAL_BUFFER\n\t\t\t\n\t\t\tstruct

for scene selection in the editor, this code allow to output the outline correctly\n\t\t\t\t\toutColor
= float4(_ObjectId, _PassValue, 1.0, 1.0);\n\t\t\t\t#elif VFX_PASSDEPTH ==
VFX_PASSDEPTH_ACTUAL\n\t\t\t\t\t//void\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH
undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"MotionVectors\" }\n\t\t\t\n\t\t\tStencil\n\t\t\t{\n\t\t\t
WriteMask 176\n\t\t\t Ref 160\n\t\t\t Comp Always\n\t\t\t Pass Replace\n\t\t\t}\n\n\t\t\n\t\t\tZWrite
On\n\t\t\tBlend Off\n\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#define VFX_PASSDEPTH

for scene selection in the editor, this code allow to output the outline correctly\n\t\t\t\t\toutColor
= float4(_ObjectId, _PassValue, 1.0, 1.0);\n\t\t\t\t#elif VFX_PASSDEPTH ==
VFX_PASSDEPTH_ACTUAL\n\t\t\t\t\t//void\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH
undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"GBuffer\" }\n\t\t\t\n\t\t\tStencil\n\t\t\t{\n\t\t\t\tWriteMask
7\n\t\t\t\tRef 2\n\t\t\t\tComp Always\n\t\t\t\tPass Replace\n\t\t\t}\t\n\t\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#pragma
target 4.5\n\t\t\t\n\t\t\t#pragma multi_compile _ LIGHT_LAYERS\n\t\t\t#pragma

\n\t\t VFXSetupBuiltin(builtin,surface,builtin.emissiveColor, i);\n\t\t
ENCODE_INTO_GBUFFER(surface, builtin, i.VFX_VARYING_POSCS.xy, outGBuffer);\n\t\t
#else\n\t\t VFXComputePixelOutputToGBuffer(i,normalWS,uvData,outGBuffer);\n\t\t
#endif\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
#endif\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"Forward\"}\n\t\t\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#pragma
target 4.5\n\t\t\t\n\t\t\t#define UNITY_MATERIAL_LIT\n\t\t\t#define LIGHTLOOP_TILE_PASS\n\t\t\t#define
_ENABLE_FOG_ON_TRANSPARENT\n\t\t\t#define _DISABLE_DECALS\n\t\t\t\n\n\t\t\t#pragma

encodedMotionVector = 0.0f;\n\t\t\t\t\t\t\tVFXEncodeMotionVector(velocity *
0.5f, encodedMotionVector);\n\t\t\t\t\t\t\t\n\t\t\t\t\toutMotionVector = encodedMotionVector;\n\t\t\t\t\toutMotionVector.a
= outColor.a < i.VFX_VARYING_ALPHATHRESHOLD ? 0.0f : 1.0f; //Independant clipping
for motion vector pass\n\t\t\t\t#endif\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\t//
for motion vector pass\n\t\t\t\t#endif\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\t//
Shadow pass\n\t\tPass\n\t\t{\t\t\n\t\t\tTags { \"LightMode\"=\"ShadowCaster\"
}\n\t\t\n\t\t\tZWrite On\n\t\t\tBlend Off\n\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#pragma
target 4.5\n\t\t\t#if !USE_ALPHA_TEST && IS_TRANSPARENT_PARTICLE\n\t\t\t#define

alpha = OUTSG.;\n\t\t #else\n\t\t\t\tfloat alpha = VFXGetFragmentColor(i).a;\n\t\t
#if HDRP_USE_BASE_COLOR_MAP_ALPHA\n\t\t alpha *= VFXGetTextureColor(VFX_SAMPLER(baseColorMap),i).a;\n\t\t
#endif\t\n\t\t #endif\n\t\t\t\tVFXClipFragmentColor(alpha,i);\n\t\t\t\treturn
0;\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t}\r\n}\r\n"
0;\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t}\n}\n"
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\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_VELOCITY_CURRENT
1\n#define VFX_USE_SCALEX_CURRENT 1\n#define VFX_USE_SCALEY_CURRENT 1\n#define

1\n#define VFX_USE_ANGLEY_CURRENT 1\n#define VFX_USE_ANGLEZ_CURRENT 1\n#define
VFX_USE_PIVOTY_CURRENT 1\n#define VFX_USE_PIVOTZ_CURRENT 1\n#define VFX_USE_SIZE_CURRENT
1\n#define VFX_USE_SCALEZ_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
VFX_LOCAL_SPACE 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\nCBUFFER_START(parameters)\n
float uniform_b;\n float Angle_d;\n float currentFrameIndex;\n uint
PADDING_0;\nCBUFFER_END\n\nstruct Attributes\n{\n float3 position;\n
float3 velocity;\n float scaleX;\n float scaleY;\n float pivotX;\n

scaleZ;\n float age;\n};\n\nstruct SourceAttributes\n{\n};\n\nTexture2D
baseColorMap;\nSamplerState samplerbaseColorMap;\nfloat4 baseColorMap_TexelSize;\n\n\r\n#include
baseColorMap;\nSamplerState samplerbaseColorMap;\nfloat4 baseColorMap_TexelSize;\n\n\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\r\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\r\n\r\nByteAddressBuffer
attributeBuffer;\r\nRWByteAddressBuffer elementToVFXBuffer;\r\n#if VFX_USE_ALIVE_CURRENT\r\nStructuredBuffer<uint>
deadListOut;\r\n#endif\r\n\r\n#if VFX_HAS_INDIRECT_DRAW\r\nStructuredBuffer<uint>
indirectBuffer;\r\n#endif\r\n\r\nCBUFFER_START(updateParams)\r\n\tuint nbMax;\r\n\tuint
dispatchWidth;\r\n\tuint systemSeed;\r\nCBUFFER_END\r\n\r\nvoid Orient_630(inout
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nByteAddressBuffer
attributeBuffer;\nRWByteAddressBuffer elementToVFXBuffer;\n#if VFX_USE_ALIVE_CURRENT\nStructuredBuffer<uint>
deadListOut;\n#endif\n\n#if VFX_HAS_INDIRECT_DRAW\nStructuredBuffer<uint> indirectBuffer;\n#endif\n\nCBUFFER_START(updateParams)\n\tuint
nbMax;\n\tuint dispatchWidth;\n\tuint systemSeed;\nCBUFFER_END\n\nvoid Orient_630(inout
float3 axisX, inout float3 axisY, inout float3 axisZ, float3 AxisZ, float3
AxisY) /*mode:Advanced axes:ZY */\n{\n \n axisZ = normalize(AxisZ);\n
axisX = normalize(cross(AxisY, AxisZ));\n axisY = cross(axisZ, axisX);\n

Composition:Overwrite Source:Slot Random:Off channels:Y */\n{\n angleY =
Angle.x;\n}\nvoid SetAttribute_48A7BEF9(inout float angleX, float Angle) /*attribute:angle
Composition:Overwrite Source:Slot Random:Off channels:X */\n{\n angleX =
Angle.x;\n}\n\n\r\n\r\n[numthreads(NB_THREADS_PER_GROUP,1,1)]\r\nvoid CSMain(uint3
groupId\t\t: SV_GroupID,\r\n\t\t\tuint3 groupThreadId\t: SV_GroupThreadID)\r\n{\r\n\tuint
Angle.x;\n}\n\n\n\n[numthreads(NB_THREADS_PER_GROUP,1,1)]\nvoid CSMain(uint3
groupId\t\t: SV_GroupID,\n\t\t\tuint3 groupThreadId\t: SV_GroupThreadID)\n{\n\tuint
* NB_THREADS_PER_GROUP;\r\n\tuint index = id;\r\n\tif (id < nbMax)\r\n\t{\r\n\t\tAttributes
attributes = (Attributes)0;\r\n\t\tSourceAttributes sourceAttributes = (SourceAttributes)0;\r\n\t\t\r\n\t\tattributes.alive
= (bool)true;\n\n\r\n\t\tif (attributes.alive)\r\n\t\t{\r\n\t\t\tattributes.position
* NB_THREADS_PER_GROUP;\n\tuint index = id;\n\tif (id < nbMax)\n\t{\n\t\tAttributes
attributes = (Attributes)0;\n\t\tSourceAttributes sourceAttributes = (SourceAttributes)0;\n\t\t\n\t\tattributes.alive
= (bool)true;\n\n\n\t\tif (attributes.alive)\n\t\t{\n\t\t\tattributes.position
= asfloat(attributeBuffer.Load3((index * 0x4 + 0x0) << 2));\nattributes.velocity
= asfloat(attributeBuffer.Load3((index * 0x4 + 0x1A0) << 2));\nattributes.scaleX
= asfloat(attributeBuffer.Load((index * 0x3 + 0x2A4) << 2));\nattributes.scaleY

= asfloat(attributeBuffer.Load((index * 0x2 + 0x5E5) << 2));\nattributes.angleZ
= (float)0;\nattributes.pivotY = (float)0;\nattributes.pivotZ = (float)0;\nattributes.size
= (float)0.100000001;\nattributes.scaleZ = (float)1;\nattributes.age = asfloat(attributeBuffer.Load((index
* 0x4 + 0x1A3) << 2));\n\n\r\n\t\t\t{\n\t\t\t float3 tmp_bg = attributes.velocity
* 0x4 + 0x1A3) << 2));\n\n\n\t\t\t{\n\t\t\t float3 tmp_bg = attributes.velocity
* float3(1, 0, 1);\n\t\t\t float3 tmp_bi = tmp_bg * tmp_bg;\n\t\t\t float
tmp_bj = tmp_bi[2];\n\t\t\t float tmp_bk = tmp_bi[1];\n\t\t\t float tmp_bl
= tmp_bj + tmp_bk;\n\t\t\t float tmp_bm = tmp_bi[0];\n\t\t\t float tmp_bn

float tmp_bv = tmp_bt / (float)2;\n\t\t\t float tmp_bx = tmp_bv * (float)120;\n\t\t\t
float tmp_by = (float)20 + tmp_bx;\n\t\t\t SetAttribute_48A7BEF8( /*inout
*/attributes.angleY, tmp_by);\n\t\t\t}\n\t\t\tSetAttribute_48A7BEF9( /*inout
*/attributes.angleX, Angle_d);\n\t\t\t\n\r\n\t\t\t\r\n\t\t\t\n\t\t\tfloat3
size3 = float3(attributes.size,attributes.size,attributes.size);\n\t\t\t#if
VFX_USE_SCALEX_CURRENT\n\t\t\tsize3.x *= attributes.scaleX;\n\t\t\t#endif\n\t\t\t#if
VFX_USE_SCALEY_CURRENT\n\t\t\tsize3.y *= attributes.scaleY;\n\t\t\t#endif\n\t\t\t#if
VFX_USE_SCALEZ_CURRENT\n\t\t\tsize3.z *= attributes.scaleZ;\n\t\t\t#endif\n\t\t\t\r\n\t\t\tfloat4x4
elementToVFX = GetElementToVFXMatrix(\r\n\t\t\t\tattributes.axisX,\r\n\t\t\t\tattributes.axisY,\r\n\t\t\t\tattributes.axisZ,\r\n\t\t\t\tfloat3(attributes.angleX,attributes.angleY,attributes.angleZ),\r\n\t\t\t\tfloat3(attributes.pivotX,attributes.pivotY,attributes.pivotZ),\r\n\t\t\t\tsize3,\r\n\t\t\t\tattributes.position);\r\n\t\t\r\n\t\t\tUNITY_UNROLL\r\n\t\t\tfor
(int itIndexMatrixRow = 0; itIndexMatrixRow < 3; ++itIndexMatrixRow)\r\n\t\t\t{\r\n\t\t\t\tUNITY_UNROLL\r\n\t\t\t\tfor
(int itIndexMatrixCol = 0; itIndexMatrixCol < 4; ++itIndexMatrixCol)\r\n\t\t\t\t{\r\n\t\t\t\t\tuint
itIndexMatrix = itIndexMatrixCol * 4 + itIndexMatrixRow;\r\n\t\t\t\t\tfloat
value = elementToVFX[itIndexMatrixRow][itIndexMatrixCol];\r\n\t\t\t\t\telementToVFXBuffer.Store((index
* 16 + itIndexMatrix) << 2, asuint(value));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n
*/attributes.angleX, Angle_d);\n\t\t\t\n\n\t\t\t\n\t\t\t\n\t\t\tfloat3 size3
= float3(attributes.size,attributes.size,attributes.size);\n\t\t\t#if VFX_USE_SCALEX_CURRENT\n\t\t\tsize3.x
*= attributes.scaleX;\n\t\t\t#endif\n\t\t\t#if VFX_USE_SCALEY_CURRENT\n\t\t\tsize3.y
*= attributes.scaleY;\n\t\t\t#endif\n\t\t\t#if VFX_USE_SCALEZ_CURRENT\n\t\t\tsize3.z
*= attributes.scaleZ;\n\t\t\t#endif\n\t\t\t\n\t\t\tfloat4x4 elementToVFX =
GetElementToVFXMatrix(\n\t\t\t\tattributes.axisX,\n\t\t\t\tattributes.axisY,\n\t\t\t\tattributes.axisZ,\n\t\t\t\tfloat3(attributes.angleX,attributes.angleY,attributes.angleZ),\n\t\t\t\tfloat3(attributes.pivotX,attributes.pivotY,attributes.pivotZ),\n\t\t\t\tsize3,\n\t\t\t\tattributes.position);\n\t\t\n\t\t\tUNITY_UNROLL\n\t\t\tfor
(int itIndexMatrixRow = 0; itIndexMatrixRow < 3; ++itIndexMatrixRow)\n\t\t\t{\n\t\t\t\tUNITY_UNROLL\n\t\t\t\tfor
(int itIndexMatrixCol = 0; itIndexMatrixCol < 4; ++itIndexMatrixCol)\n\t\t\t\t{\n\t\t\t\t\tuint
itIndexMatrix = itIndexMatrixCol * 4 + itIndexMatrixRow;\n\t\t\t\t\tfloat value
= elementToVFX[itIndexMatrixRow][itIndexMatrixCol];\n\t\t\t\t\telementToVFXBuffer.Store((index
* 16 + itIndexMatrix) << 2, asuint(value));\n\t\t\t\t}\n\t\t\t}\n\n
: 0u);\r\n\t\t}\t\t\r\n\t}\r\n}\r\n"
: 0u);\n\t\t}\t\t\n\t}\n}\n"
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\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_VELOCITY_CURRENT
1\n#define VFX_USE_SCALEX_CURRENT 1\n#define VFX_USE_SCALEY_CURRENT 1\n#define

1\n#define VFX_USE_ANGLEY_CURRENT 1\n#define VFX_USE_ANGLEZ_CURRENT 1\n#define
VFX_USE_PIVOTY_CURRENT 1\n#define VFX_USE_PIVOTZ_CURRENT 1\n#define VFX_USE_SIZE_CURRENT
1\n#define VFX_USE_SCALEZ_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
VFX_LOCAL_SPACE 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\nCBUFFER_START(parameters)\n
float uniform_b;\n float Angle_d;\n float currentFrameIndex;\n uint
PADDING_0;\nCBUFFER_END\n\nstruct Attributes\n{\n float3 position;\n
float3 velocity;\n float scaleX;\n float scaleY;\n float pivotX;\n

scaleZ;\n float age;\n};\n\nstruct SourceAttributes\n{\n};\n\nTexture2D
baseColorMap;\nSamplerState samplerbaseColorMap;\nfloat4 baseColorMap_TexelSize;\n\n\r\n#include
baseColorMap;\nSamplerState samplerbaseColorMap;\nfloat4 baseColorMap_TexelSize;\n\n\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\r\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\r\n\r\nByteAddressBuffer
attributeBuffer;\r\nRWByteAddressBuffer elementToVFXBuffer;\r\n#if VFX_USE_ALIVE_CURRENT\r\nStructuredBuffer<uint>
deadListOut;\r\n#endif\r\n\r\n#if VFX_HAS_INDIRECT_DRAW\r\nStructuredBuffer<uint>
indirectBuffer;\r\n#endif\r\n\r\nCBUFFER_START(updateParams)\r\n\tuint nbMax;\r\n\tuint
dispatchWidth;\r\n\tuint systemSeed;\r\nCBUFFER_END\r\n\r\nvoid Orient_630(inout
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nByteAddressBuffer
attributeBuffer;\nRWByteAddressBuffer elementToVFXBuffer;\n#if VFX_USE_ALIVE_CURRENT\nStructuredBuffer<uint>
deadListOut;\n#endif\n\n#if VFX_HAS_INDIRECT_DRAW\nStructuredBuffer<uint> indirectBuffer;\n#endif\n\nCBUFFER_START(updateParams)\n\tuint
nbMax;\n\tuint dispatchWidth;\n\tuint systemSeed;\nCBUFFER_END\n\nvoid Orient_630(inout
float3 axisX, inout float3 axisY, inout float3 axisZ, float3 AxisZ, float3
AxisY) /*mode:Advanced axes:ZY */\n{\n \n axisZ = normalize(AxisZ);\n
axisX = normalize(cross(AxisY, AxisZ));\n axisY = cross(axisZ, axisX);\n

Composition:Overwrite Source:Slot Random:Off channels:Y */\n{\n angleY =
Angle.x;\n}\nvoid SetAttribute_48A7BEF9(inout float angleX, float Angle) /*attribute:angle
Composition:Overwrite Source:Slot Random:Off channels:X */\n{\n angleX =
Angle.x;\n}\n\n\r\n\r\n[numthreads(NB_THREADS_PER_GROUP,1,1)]\r\nvoid CSMain(uint3
groupId\t\t: SV_GroupID,\r\n\t\t\tuint3 groupThreadId\t: SV_GroupThreadID)\r\n{\r\n\tuint
Angle.x;\n}\n\n\n\n[numthreads(NB_THREADS_PER_GROUP,1,1)]\nvoid CSMain(uint3
groupId\t\t: SV_GroupID,\n\t\t\tuint3 groupThreadId\t: SV_GroupThreadID)\n{\n\tuint
* NB_THREADS_PER_GROUP;\r\n\tuint index = id;\r\n\tif (id < nbMax)\r\n\t{\r\n\t\tAttributes
attributes = (Attributes)0;\r\n\t\tSourceAttributes sourceAttributes = (SourceAttributes)0;\r\n\t\t\r\n\t\tattributes.alive
= (bool)true;\n\n\r\n\t\tif (attributes.alive)\r\n\t\t{\r\n\t\t\tattributes.position
* NB_THREADS_PER_GROUP;\n\tuint index = id;\n\tif (id < nbMax)\n\t{\n\t\tAttributes
attributes = (Attributes)0;\n\t\tSourceAttributes sourceAttributes = (SourceAttributes)0;\n\t\t\n\t\tattributes.alive
= (bool)true;\n\n\n\t\tif (attributes.alive)\n\t\t{\n\t\t\tattributes.position
= asfloat(attributeBuffer.Load3((index * 0x4 + 0x0) << 2));\nattributes.velocity
= asfloat(attributeBuffer.Load3((index * 0x4 + 0x1A0) << 2));\nattributes.scaleX
= asfloat(attributeBuffer.Load((index * 0x3 + 0x2A4) << 2));\nattributes.scaleY

= asfloat(attributeBuffer.Load((index * 0x2 + 0x5E5) << 2));\nattributes.angleZ
= (float)0;\nattributes.pivotY = (float)0;\nattributes.pivotZ = (float)0;\nattributes.size
= (float)0.100000001;\nattributes.scaleZ = (float)1;\nattributes.age = asfloat(attributeBuffer.Load((index
* 0x4 + 0x1A3) << 2));\n\n\r\n\t\t\t{\n\t\t\t float3 tmp_bg = attributes.velocity
* 0x4 + 0x1A3) << 2));\n\n\n\t\t\t{\n\t\t\t float3 tmp_bg = attributes.velocity
* float3(1, 0, 1);\n\t\t\t float3 tmp_bi = tmp_bg * tmp_bg;\n\t\t\t float
tmp_bj = tmp_bi[2];\n\t\t\t float tmp_bk = tmp_bi[1];\n\t\t\t float tmp_bl
= tmp_bj + tmp_bk;\n\t\t\t float tmp_bm = tmp_bi[0];\n\t\t\t float tmp_bn

float tmp_bv = tmp_bt / (float)2;\n\t\t\t float tmp_bx = tmp_bv * (float)120;\n\t\t\t
float tmp_by = (float)20 + tmp_bx;\n\t\t\t float tmp_bz = (float)-1 * tmp_by;\n\t\t\t
SetAttribute_48A7BEF8( /*inout */attributes.angleY, tmp_bz);\n\t\t\t}\n\t\t\tSetAttribute_48A7BEF9(
/*inout */attributes.angleX, Angle_d);\n\t\t\t\n\r\n\t\t\t\r\n\t\t\t\n\t\t\tfloat3
/*inout */attributes.angleX, Angle_d);\n\t\t\t\n\n\t\t\t\n\t\t\t\n\t\t\tfloat3
VFX_USE_SCALEZ_CURRENT\n\t\t\tsize3.z *= attributes.scaleZ;\n\t\t\t#endif\n\t\t\t\r\n\t\t\tfloat4x4
elementToVFX = GetElementToVFXMatrix(\r\n\t\t\t\tattributes.axisX,\r\n\t\t\t\tattributes.axisY,\r\n\t\t\t\tattributes.axisZ,\r\n\t\t\t\tfloat3(attributes.angleX,attributes.angleY,attributes.angleZ),\r\n\t\t\t\tfloat3(attributes.pivotX,attributes.pivotY,attributes.pivotZ),\r\n\t\t\t\tsize3,\r\n\t\t\t\tattributes.position);\r\n\t\t\r\n\t\t\tUNITY_UNROLL\r\n\t\t\tfor
(int itIndexMatrixRow = 0; itIndexMatrixRow < 3; ++itIndexMatrixRow)\r\n\t\t\t{\r\n\t\t\t\tUNITY_UNROLL\r\n\t\t\t\tfor
(int itIndexMatrixCol = 0; itIndexMatrixCol < 4; ++itIndexMatrixCol)\r\n\t\t\t\t{\r\n\t\t\t\t\tuint
itIndexMatrix = itIndexMatrixCol * 4 + itIndexMatrixRow;\r\n\t\t\t\t\tfloat
value = elementToVFX[itIndexMatrixRow][itIndexMatrixCol];\r\n\t\t\t\t\telementToVFXBuffer.Store((index
* 16 + itIndexMatrix) << 2, asuint(value));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n
VFX_USE_SCALEZ_CURRENT\n\t\t\tsize3.z *= attributes.scaleZ;\n\t\t\t#endif\n\t\t\t\n\t\t\tfloat4x4
elementToVFX = GetElementToVFXMatrix(\n\t\t\t\tattributes.axisX,\n\t\t\t\tattributes.axisY,\n\t\t\t\tattributes.axisZ,\n\t\t\t\tfloat3(attributes.angleX,attributes.angleY,attributes.angleZ),\n\t\t\t\tfloat3(attributes.pivotX,attributes.pivotY,attributes.pivotZ),\n\t\t\t\tsize3,\n\t\t\t\tattributes.position);\n\t\t\n\t\t\tUNITY_UNROLL\n\t\t\tfor
(int itIndexMatrixRow = 0; itIndexMatrixRow < 3; ++itIndexMatrixRow)\n\t\t\t{\n\t\t\t\tUNITY_UNROLL\n\t\t\t\tfor
(int itIndexMatrixCol = 0; itIndexMatrixCol < 4; ++itIndexMatrixCol)\n\t\t\t\t{\n\t\t\t\t\tuint
itIndexMatrix = itIndexMatrixCol * 4 + itIndexMatrixRow;\n\t\t\t\t\tfloat value
= elementToVFX[itIndexMatrixRow][itIndexMatrixCol];\n\t\t\t\t\telementToVFXBuffer.Store((index
* 16 + itIndexMatrix) << 2, asuint(value));\n\t\t\t\t}\n\t\t\t}\n\n
: 0u);\r\n\t\t}\t\t\r\n\t}\r\n}\r\n"
: 0u);\n\t\t}\t\t\n\t}\n}\n"
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\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_VELOCITY_CURRENT
1\n#define VFX_USE_SCALEX_CURRENT 1\n#define VFX_USE_SCALEY_CURRENT 1\n#define

1\n#define VFX_USE_ANGLEY_CURRENT 1\n#define VFX_USE_ANGLEZ_CURRENT 1\n#define
VFX_USE_PIVOTY_CURRENT 1\n#define VFX_USE_PIVOTZ_CURRENT 1\n#define VFX_USE_SIZE_CURRENT
1\n#define VFX_USE_SCALEZ_CURRENT 1\n#define VFX_USE_AGE_CURRENT 1\n#define
VFX_USE_COLOR_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
VFX_USE_COLOR_CURRENT 1\n#define VFX_LOCAL_SPACE 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\nCBUFFER_START(parameters)\n
float uniform_b;\n float currentFrameIndex;\n uint2 PADDING_0;\nCBUFFER_END\n\nstruct
Attributes\n{\n float3 position;\n float3 velocity;\n float scaleX;\n
float scaleY;\n float pivotX;\n uint particleId;\n float alpha;\n

SourceAttributes\n{\n};\n\nTexture2D baseColorMap;\nSamplerState samplerbaseColorMap;\nfloat4
baseColorMap_TexelSize;\n\n\r\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXCommon.hlsl\"\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\r\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\r\n\r\nByteAddressBuffer
attributeBuffer;\r\nRWByteAddressBuffer elementToVFXBuffer;\r\n#if VFX_USE_ALIVE_CURRENT\r\nStructuredBuffer<uint>
deadListOut;\r\n#endif\r\n\r\n#if VFX_HAS_INDIRECT_DRAW\r\nStructuredBuffer<uint>
indirectBuffer;\r\n#endif\r\n\r\nCBUFFER_START(updateParams)\r\n\tuint nbMax;\r\n\tuint
dispatchWidth;\r\n\tuint systemSeed;\r\nCBUFFER_END\r\n\r\nvoid Orient_630(inout
baseColorMap_TexelSize;\n\n\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXCommon.hlsl\"\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nByteAddressBuffer
attributeBuffer;\nRWByteAddressBuffer elementToVFXBuffer;\n#if VFX_USE_ALIVE_CURRENT\nStructuredBuffer<uint>
deadListOut;\n#endif\n\n#if VFX_HAS_INDIRECT_DRAW\nStructuredBuffer<uint> indirectBuffer;\n#endif\n\nCBUFFER_START(updateParams)\n\tuint
nbMax;\n\tuint dispatchWidth;\n\tuint systemSeed;\nCBUFFER_END\n\nvoid Orient_630(inout
float3 axisX, inout float3 axisY, inout float3 axisZ, float3 AxisZ, float3
AxisY) /*mode:Advanced axes:ZY */\n{\n \n axisZ = normalize(AxisZ);\n
axisX = normalize(cross(AxisY, AxisZ));\n axisY = cross(axisZ, axisX);\n

float3 position, float3 Position) /*attribute:position Composition:Add Source:Slot
Random:Off channels:XYZ */\n{\n position += Position;\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[numthreads(NB_THREADS_PER_GROUP,1,1)]\r\nvoid
CSMain(uint3 groupId\t\t: SV_GroupID,\r\n\t\t\tuint3 groupThreadId\t: SV_GroupThreadID)\r\n{\r\n\tuint
Random:Off channels:XYZ */\n{\n color = Color;\n}\n\n\n\n[numthreads(NB_THREADS_PER_GROUP,1,1)]\nvoid
CSMain(uint3 groupId\t\t: SV_GroupID,\n\t\t\tuint3 groupThreadId\t: SV_GroupThreadID)\n{\n\tuint
* NB_THREADS_PER_GROUP;\r\n\tuint index = id;\r\n\tif (id < nbMax)\r\n\t{\r\n\t\tAttributes
attributes = (Attributes)0;\r\n\t\tSourceAttributes sourceAttributes = (SourceAttributes)0;\r\n\t\t\r\n\t\tattributes.alive
= (bool)true;\n\n\r\n\t\tif (attributes.alive)\r\n\t\t{\r\n\t\t\tattributes.position
* NB_THREADS_PER_GROUP;\n\tuint index = id;\n\tif (id < nbMax)\n\t{\n\t\tAttributes
attributes = (Attributes)0;\n\t\tSourceAttributes sourceAttributes = (SourceAttributes)0;\n\t\t\n\t\tattributes.alive
= (bool)true;\n\n\n\t\tif (attributes.alive)\n\t\t{\n\t\t\tattributes.position
= asfloat(attributeBuffer.Load3((index * 0x4 + 0x0) << 2));\nattributes.velocity
= asfloat(attributeBuffer.Load3((index * 0x4 + 0x1A0) << 2));\nattributes.scaleX
= asfloat(attributeBuffer.Load((index * 0x3 + 0x2A4) << 2));\nattributes.scaleY

= (float)0;\nattributes.pivotY = (float)0;\nattributes.pivotZ = (float)0;\nattributes.size
= (float)0.100000001;\nattributes.scaleZ = (float)1;\nattributes.age = asfloat(attributeBuffer.Load((index
* 0x4 + 0x1A3) << 2));\nattributes.color = asfloat(attributeBuffer.Load3((index
* 0x4 + 0x64C) << 2));\n\n\r\n\t\t\t{\n\t\t\t float3 tmp_bf = attributes.velocity
* 0x4 + 0x64C) << 2));\n\n\n\t\t\t{\n\t\t\t float3 tmp_bf = attributes.velocity
* float3(1, 0, 1);\n\t\t\t float3 tmp_bh = tmp_bf * tmp_bf;\n\t\t\t float
tmp_bi = tmp_bh[2];\n\t\t\t float tmp_bj = tmp_bh[1];\n\t\t\t float tmp_bk
= tmp_bi + tmp_bj;\n\t\t\t float tmp_bl = tmp_bh[0];\n\t\t\t float tmp_bm

float3 tmp_bv = float3(tmp_bu, tmp_bu, tmp_bu);\n\t\t\t float3 tmp_bw =
float3(0, 1, 0) * tmp_bv;\n\t\t\t SetAttribute_C707D62A( /*inout */attributes.position,
tmp_bw);\n\t\t\t}\n\t\t\t{\n\t\t\t SetAttribute_FDD06EC7( /*inout */attributes.color,
float3(0.119999997, 0.119999997, 0.119999997));\n\t\t\t}\n\t\t\t\n\r\n\t\t\t\r\n\t\t\t\n\t\t\tfloat3
float3(0.119999997, 0.119999997, 0.119999997));\n\t\t\t}\n\t\t\t\n\n\t\t\t\n\t\t\t\n\t\t\tfloat3
VFX_USE_SCALEZ_CURRENT\n\t\t\tsize3.z *= attributes.scaleZ;\n\t\t\t#endif\n\t\t\t\r\n\t\t\tfloat4x4
elementToVFX = GetElementToVFXMatrix(\r\n\t\t\t\tattributes.axisX,\r\n\t\t\t\tattributes.axisY,\r\n\t\t\t\tattributes.axisZ,\r\n\t\t\t\tfloat3(attributes.angleX,attributes.angleY,attributes.angleZ),\r\n\t\t\t\tfloat3(attributes.pivotX,attributes.pivotY,attributes.pivotZ),\r\n\t\t\t\tsize3,\r\n\t\t\t\tattributes.position);\r\n\t\t\r\n\t\t\tUNITY_UNROLL\r\n\t\t\tfor
(int itIndexMatrixRow = 0; itIndexMatrixRow < 3; ++itIndexMatrixRow)\r\n\t\t\t{\r\n\t\t\t\tUNITY_UNROLL\r\n\t\t\t\tfor
(int itIndexMatrixCol = 0; itIndexMatrixCol < 4; ++itIndexMatrixCol)\r\n\t\t\t\t{\r\n\t\t\t\t\tuint
itIndexMatrix = itIndexMatrixCol * 4 + itIndexMatrixRow;\r\n\t\t\t\t\tfloat
value = elementToVFX[itIndexMatrixRow][itIndexMatrixCol];\r\n\t\t\t\t\telementToVFXBuffer.Store((index
* 16 + itIndexMatrix) << 2, asuint(value));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n
VFX_USE_SCALEZ_CURRENT\n\t\t\tsize3.z *= attributes.scaleZ;\n\t\t\t#endif\n\t\t\t\n\t\t\tfloat4x4
elementToVFX = GetElementToVFXMatrix(\n\t\t\t\tattributes.axisX,\n\t\t\t\tattributes.axisY,\n\t\t\t\tattributes.axisZ,\n\t\t\t\tfloat3(attributes.angleX,attributes.angleY,attributes.angleZ),\n\t\t\t\tfloat3(attributes.pivotX,attributes.pivotY,attributes.pivotZ),\n\t\t\t\tsize3,\n\t\t\t\tattributes.position);\n\t\t\n\t\t\tUNITY_UNROLL\n\t\t\tfor
(int itIndexMatrixRow = 0; itIndexMatrixRow < 3; ++itIndexMatrixRow)\n\t\t\t{\n\t\t\t\tUNITY_UNROLL\n\t\t\t\tfor
(int itIndexMatrixCol = 0; itIndexMatrixCol < 4; ++itIndexMatrixCol)\n\t\t\t\t{\n\t\t\t\t\tuint
itIndexMatrix = itIndexMatrixCol * 4 + itIndexMatrixRow;\n\t\t\t\t\tfloat value
= elementToVFX[itIndexMatrixRow][itIndexMatrixCol];\n\t\t\t\t\telementToVFXBuffer.Store((index
* 16 + itIndexMatrix) << 2, asuint(value));\n\t\t\t\t}\n\t\t\t}\n\n
: 0u);\r\n\t\t}\t\t\r\n\t}\r\n}\r\n"
: 0u);\n\t\t}\t\t\n\t}\n}\n"
m_Infos:
m_Expressions:
m_Expressions:

246
Assets/Samples/EllenHologram/EllenHologram.vfx


m_ShaderSources:
- compute: 1
name: '[System 1]Initialize Particle'
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
1\n#define VFX_USE_AGE_CURRENT 1\n#define VFX_WORLD_SPACE 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\r\nCBUFFER_START(parameters)\n
1\n#define VFX_USE_AGE_CURRENT 1\n#define VFX_WORLD_SPACE 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\nCBUFFER_START(parameters)\n
float4x4 ClipToVFX_c;\n float3 Position_d;\n float Size_b;\n float3
uniform_f;\n uint PADDING_0;\n float2 Camera_pixelDimensions_c;\n
uint2 PADDING_1;\nCBUFFER_END\n\nstruct Attributes\n{\n float lifetime;\n

Camera_colorBuffer_c;\nSamplerState samplerCamera_colorBuffer_c;\nfloat4 Camera_colorBuffer_c_TexelSize;\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<uint>
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<uint> eventList;\r\nByteAddressBuffer
inputAdditional;\r\n#endif\r\n\r\n#if HAS_STRIPS\r\nRWBuffer<uint> 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
Camera_colorBuffer_c;\nSamplerState samplerCamera_colorBuffer_c;\nfloat4 Camera_colorBuffer_c_TexelSize;\n\n\n\n#define
USE_DEAD_LIST (VFX_USE_ALIVE_CURRENT && !HAS_STRIPS)\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 USE_DEAD_LIST\nRWStructuredBuffer<uint> 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<uint>
eventList;\nByteAddressBuffer inputAdditional;\n#endif\n\n#if HAS_STRIPS\nRWBuffer<uint>
stripDataBuffer;\n#endif\n\n#include \"Packages/com.unity.visualeffectgraph/Shaders/Common/VFXCommonCompute.hlsl\"\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\n\nvoid
SetAttribute_F01429A3(inout float lifetime, inout uint seed, float A, float
B) /*attribute:lifetime Composition:Overwrite Source:Slot Random:Uniform channels:XYZ
*/\n{\n lifetime = lerp(A,B,RAND);\n}\nvoid SetAttribute_3278B22F(inout

Position) /*attribute:position Composition:Add Source:Slot Random:Off channels:XYZ
*/\n{\n position += Position;\n}\nvoid SetAttribute_CAC29747(inout float3
position, float3 Position) /*attribute:position Composition:Overwrite Source:Slot
Random:Off channels:XYZ */\n{\n position = Position;\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
Random:Off channels:XYZ */\n{\n position = Position;\n}\n\n\n\n#if HAS_STRIPS\nbool
GetParticleIndex(inout uint particleIndex, uint stripIndex)\n{\n\tuint relativeIndex;\n\tInterlockedAdd(STRIP_DATA(STRIP_NEXT_INDEX,
stripIndex), 1, relativeIndex);\n\tif (relativeIndex >= PARTICLE_PER_STRIP_COUNT)
// strip is full\n\t{\n\t\tInterlockedAdd(STRIP_DATA(STRIP_NEXT_INDEX, stripIndex),
-1); // Remove previous increment\n\t\treturn false;\n\t}\n\n\tparticleIndex
+ 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
+ relativeIndex) % PARTICLE_PER_STRIP_COUNT);\n return true;\n}\n#endif\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 USE_DEAD_LIST\n maxThreadId
= min(maxThreadId, deadListCount.Load(0x0));\n#elif VFX_USE_SPAWNER_FROM_GPU\n
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\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
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\t\tuint particleIndex = id + currentSpawnIndex;\n\t\t\n#if
!VFX_USE_SPAWNER_FROM_GPU\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\n\t\tAttributes
attributes = (Attributes)0;\n\t\tSourceAttributes sourceAttributes = (SourceAttributes)0;\n\t\t\n
= (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 SetAttribute_F01429A3(
= (float)0;\n \n\n#if VFX_USE_PARTICLEID_CURRENT\n attributes.particleId
= particleIndex;\n#endif\n#if VFX_USE_SEED_CURRENT\n attributes.seed
= WangHash(particleIndex ^ systemSeed);\n#endif\n#if VFX_USE_SPAWNINDEX_CURRENT\n
attributes.spawnIndex = id;\n#endif\n#if HAS_STRIPS\n#if !VFX_USE_SPAWNER_FROM_GPU\n\t\t\n#else\n
uint stripIndex = sourceIndex;\n#endif\n\t\tstripIndex = min(stripIndex, STRIP_COUNT);\n\n
if (!GetParticleIndex(particleIndex, stripIndex))\n return;\n\n
const StripData stripData = GetStripDataFromStripIndex(stripIndex, PARTICLE_PER_STRIP_COUNT);\n\t\tInitStripAttributes(particleIndex,
attributes, stripData);\n\t\t// TODO Change seed to be sure we're deterministic
on random with strip\n#endif\n \n {\n SetAttribute_F01429A3(
/*inout */attributes.lifetime, /*inout */attributes.seed, (float)0.0500000007,
(float)0.150000006);\n }\n SetAttribute_3278B22F( /*inout */attributes.size,
Size_b);\n {\n PositionDepth_3B85AF8( /*inout */attributes.position,

Position_d);\n {\n float3 tmp_bc = attributes.position /
uniform_f;\n float3 tmp_bd = floor(tmp_bc);\n float3
tmp_be = tmp_bd * uniform_f;\n SetAttribute_CAC29747( /*inout */attributes.position,
tmp_be);\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.Store((index * 0x8 + 0x60003) << 2,asuint(attributes.size));\n
attributeBuffer.Store3((index * 0x8 + 0x60000) << 2,asuint(attributes.position));\n
attributeBuffer.Store3((index * 0x8 + 0x60004) << 2,asuint(attributes.color));\n
attributeBuffer.Store((index * 0x1 + 0x360000) << 2,asuint(attributes.particleId));\n
attributeBuffer.Store((index * 0x1 + 0x3C0000) << 2,uint(attributes.alive));\n
attributeBuffer.Store((index * 0x1 + 0x420000) << 2,asuint(attributes.age));\n
\n\r\n }\r\n }\r\n}\r\n"
tmp_be);\n }\n \n\n\t\t\n#if VFX_USE_ALIVE_CURRENT\n if
(attributes.alive)\n#endif \n {\n#if USE_DEAD_LIST\n\t
uint deadIndex = deadListIn.DecrementCounter();\n uint index = deadListIn[deadIndex];\n#else\n
uint index = particleIndex;\n#endif\n attributeBuffer.Store((index
* 0x1 + 0x0) << 2,asuint(attributes.lifetime));\n attributeBuffer.Store((index
* 0x8 + 0x60003) << 2,asuint(attributes.size));\n attributeBuffer.Store3((index
* 0x8 + 0x60000) << 2,asuint(attributes.position));\n attributeBuffer.Store3((index
* 0x8 + 0x60004) << 2,asuint(attributes.color));\n attributeBuffer.Store((index
* 0x1 + 0x360000) << 2,asuint(attributes.particleId));\n attributeBuffer.Store((index
* 0x1 + 0x3C0000) << 2,uint(attributes.alive));\n attributeBuffer.Store((index
* 0x1 + 0x420000) << 2,asuint(attributes.age));\n \n\n }\n
}\n}\n"
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
1\n#define VFX_USE_AGE_CURRENT 1\n#define VFX_WORLD_SPACE 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\r\nCBUFFER_START(parameters)\n
1\n#define VFX_USE_AGE_CURRENT 1\n#define VFX_WORLD_SPACE 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\nCBUFFER_START(parameters)\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<uint> deadListOut;\r\n#endif\r\n\r\n#if
VFX_HAS_INDIRECT_DRAW\r\nRWStructuredBuffer<uint> indirectBuffer;\r\n#endif\r\n\r\n#if
HAS_STRIPS\r\nRWBuffer<uint> stripDataBuffer;\r\n#endif\r\n\r\n#if VFX_USE_STRIPALIVE_CURRENT\r\nBuffer<uint>
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
float lifetime;\n bool alive;\n float age;\n};\n\nstruct SourceAttributes\n{\n};\n\n\n\n\n#define
USE_DEAD_LIST (VFX_USE_ALIVE_CURRENT && !HAS_STRIPS)\n\nRWByteAddressBuffer
attributeBuffer;\n\n#if USE_DEAD_LIST\nRWStructuredBuffer<uint> deadListOut;\n#endif\n\n#if
VFX_HAS_INDIRECT_DRAW\nRWStructuredBuffer<uint> indirectBuffer;\n#endif\n\n#if
HAS_STRIPS\nRWBuffer<uint> stripDataBuffer;\n#endif\n\n#if VFX_USE_STRIPALIVE_CURRENT\nBuffer<uint>
attachedStripDataBuffer;\n#endif\n\nCBUFFER_START(updateParams)\n uint nbMax;\n\tuint
dispatchWidth;\n\tuint systemSeed;\nCBUFFER_END\n\n#include \"Packages/com.unity.visualeffectgraph/Shaders/Common/VFXCommonCompute.hlsl\"\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\n\nvoid
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
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
* 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 + 0x3C0000) << 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.age = asfloat(attributeBuffer.Load((index
* 0x1 + 0x420000) << 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
+ 0x420000) << 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 + 0x3C0000) << 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,
* NB_THREADS_PER_GROUP;\n\tuint index = id;\n\tif (id < nbMax)\n\t{\n
Attributes attributes = (Attributes)0;\n\t\tSourceAttributes sourceAttributes
= (SourceAttributes)0;\n\n#if VFX_USE_ALIVE_CURRENT\n\t\tattributes.alive =
(attributeBuffer.Load((index * 0x1 + 0x3C0000) << 2));\n\t\t\n\n\t\tif (attributes.alive)\n\t\t{\n\t\t\tattributes.lifetime
= asfloat(attributeBuffer.Load((index * 0x1 + 0x0) << 2));\n\t\t\tattributes.age
= asfloat(attributeBuffer.Load((index * 0x1 + 0x420000) << 2));\n\t\t\t\n\n\n//
Initialize built-in needed attributes\n#if VFX_USE_OLDPOSITION_CURRENT\n\t\t\tattributes.oldPosition
= attributes.position;\n#endif\n#if HAS_STRIPS\n const StripData
stripData = GetStripDataFromParticleIndex(index, PARTICLE_PER_STRIP_COUNT);\n
InitStripAttributes(index, attributes, stripData);\n#endif\n\t\t\t\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\n\n\t\t\tif (attributes.alive)\n\t\t\t{\n\t\t\t\tattributeBuffer.Store((index
* 0x1 + 0x420000) << 2,asuint(attributes.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\n#if HAS_STRIPS\t\t\t\n\t\t\t\tuint relativeIndexInStrip
= GetRelativeIndex(index, stripData);\n\t\t\t\tInterlockedMin(STRIP_DATA(STRIP_MIN_ALIVE,
stripData.stripIndex), relativeIndexInStrip);\n\t\t\t\tInterlockedMax(STRIP_DATA(STRIP_MAX_ALIVE,
stripData.stripIndex), relativeIndexInStrip);\n#endif\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tattributeBuffer.Store((index
* 0x1 + 0x3C0000) << 2,uint(attributes.alive));\n\t\t\t\t\n\n#if USE_DEAD_LIST
&& !VFX_USE_STRIPALIVE_CURRENT\n\t\t\t\tuint deadIndex = deadListOut.IncrementCounter();\n\t\t\t\tdeadListOut[deadIndex]
= index;\n#endif\n\t\t\t}\n\t\t}\n#if USE_DEAD_LIST && VFX_USE_STRIPALIVE_CURRENT\n
else if (attributes.stripAlive)\n {\n if (STRIP_DATA_X(attachedStripDataBuffer,
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.alive
= (attributeBuffer.Load((index * 0x1 + 0x3C0000) << 2));\n\t\tattributes.age
= asfloat(attributeBuffer.Load((index * 0x1 + 0x420000) << 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 + 0x3C0000) << 2,uint(attributes.alive));\n\t\tattributeBuffer.Store((index
* 0x1 + 0x420000) << 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"
the particle \n {\n uint deadIndex = deadListOut.IncrementCounter();\n\t\t\t\tdeadListOut[deadIndex]
= index;\n attributes.stripAlive = false;\n \n
} \n }\n#endif\n#else\n\t\tattributes.lifetime = asfloat(attributeBuffer.Load((index
* 0x1 + 0x0) << 2));\n\t\tattributes.alive = (attributeBuffer.Load((index *
0x1 + 0x3C0000) << 2));\n\t\tattributes.age = asfloat(attributeBuffer.Load((index
* 0x1 + 0x420000) << 2));\n\t\t\n\n\t\t\n#if VFX_USE_OLDPOSITION_CURRENT\n\t\tattributes.oldPosition
= attributes.position;\n#endif\n#if HAS_STRIPS\n const StripData stripData
= GetStripDataFromParticleIndex(index, PARTICLE_PER_STRIP_COUNT);\n
InitStripAttributes(index, attributes, stripData);\n#endif\n\t\t\n\t\tAge(
/*inout */attributes.age, deltaTime_a);\n\t\tReap(attributes.age, attributes.lifetime,
/*inout */attributes.alive);\n\t\t\n\n\t\tattributeBuffer.Store((index * 0x1
+ 0x3C0000) << 2,uint(attributes.alive));\n\t\tattributeBuffer.Store((index
* 0x1 + 0x420000) << 2,asuint(attributes.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"
name: '[System 1]A Output Particle Quad'
source: "Shader \"Hidden/VFX/EllenHologram/System 1/(A) 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+400\" \"IgnoreProjector\"=\"True\"
name: '[System 1]Output Particle Quad'
source: "Shader \"Hidden/VFX/EllenHologram/System 1/Output Particle Quad\"\n{\n\tSubShader\n\t{\t\n\t\tCull
Off\n\t\t\n\t\tTags { \"Queue\"=\"Transparent+400\" \"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\t\n\t\t\n\t\t\n\t\t\n\t\tBlend
SrcAlpha One , Zero 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\n\t\t#define
NB_THREADS_PER_GROUP 64\n\t\t#define HAS_ATTRIBUTES 1\n\t\t#define VFX_PASSDEPTH_ACTUAL

to always use a valid instanceID\n\t\t#if defined(UNITY_STEREO_INSTANCING_ENABLED)\n\t\t\t#define
VFX_DECLARE_INSTANCE_ID UNITY_VERTEX_INPUT_INSTANCE_ID\n\t\t\t#define VFX_GET_INSTANCE_ID(i)
unity_InstanceID\n\t\t#else\n\t\t\t#define VFX_DECLARE_INSTANCE_ID uint
instanceID : SV_InstanceID;\n\t\t\t#define VFX_GET_INSTANCE_ID(i) i.instanceID\n\t\t#endif\n\t\t\n\t\tENDHLSL\n\t\t\n\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
instanceID : SV_InstanceID;\n\t\t\t#define VFX_GET_INSTANCE_ID(i) i.instanceID\n\t\t#endif\n\t\t\n\t\tENDHLSL\n\t\t\n\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"SceneSelectionPass\" }\n\t\t\n\t\t\tZWrite On\n\t\t\tBlend
Off\n\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#define VFX_PASSDEPTH VFX_PASSDEPTH_SELECTION\n\t\t\t#pragma
target 4.5\n\t\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

0.5f, encodedMotionVector);\n\t\t\t\t\t\t\t\n\t\t\t\t\treturn encodedMotionVector;\n\t\t\t\t#elif
VFX_PASSDEPTH == VFX_PASSDEPTH_SELECTION\n\t\t\t\t\treturn float4(_ObjectId,
_PassValue, 1.0, 1.0);\n\t\t\t\t#elif VFX_PASSDEPTH == VFX_PASSDEPTH_ACTUAL\n\t\t\t\t\treturn
(float4)0;\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH undefined \n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\t\r\n\t\t\r\n\t\t//
(float4)0;\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH undefined \n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\t\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#pragma multi_compile
_ DEBUG_DISPLAY\n\t\t\n\t\t\tstruct ps_input\n\t\t\t{\n\t\t\t\tfloat4 pos :

encodedMotionVector = 0.0f;\n\t\t\t\t\t\tVFXEncodeMotionVector(velocity * 0.5f,
encodedMotionVector);\n\t\t\t\t\t\t\n\t\t\t\to.outMotionVector = encodedMotionVector;\n\t\t
o.outMotionVector.a = o.color.a < i.VFX_VARYING_ALPHATHRESHOLD ? 0.0f : 1.0f;
//Independant clipping for motion vector pass\n\t\t#endif\n\t\t\t\treturn o;\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\t//
//Independant clipping for motion vector pass\n\t\t#endif\n\t\t\t\treturn o;\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\t//
Shadow pass\n\t\tPass\n\t\t{\t\t\n\t\t\tTags { \"LightMode\"=\"ShadowCaster\"
}\n\t\t\n\t\t\tZWrite On\n\t\t\tBlend Off\n\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#pragma
target 4.5\n\t\t\t#if !USE_ALPHA_TEST && IS_TRANSPARENT_PARTICLE\n\t\t\t#define

= OUTSG.;\n\t\t\t\t#else\n\t\t\t\t\tfloat alpha = VFXGetFragmentColor(i).a;\n\t\t\t\t\talpha
*= VFXGetTextureColor(VFX_SAMPLER(mainTexture),i).a;\n\t\t\t\t#endif\n\t\t\t\tVFXClipFragmentColor(alpha,i);\n\t\t\n\t\t#ifndef
USE_ALPHA_TEST\n\t\t\t\tclip(alpha - 1e-5);\n\t\t#endif\n\t\t\n\t\t\t\treturn
0;\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t}\r\n}\r\n"
0;\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t}\n}\n"
name: '[System 1]B Output Particle Quad'
source: "Shader \"Hidden/VFX/EllenHologram/System 1/(B) 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+400\" \"IgnoreProjector\"=\"True\"
name: '[System 1]Output Particle Quad'
source: "Shader \"Hidden/VFX/EllenHologram/System 1/Output Particle Quad\"\n{\n\tSubShader\n\t{\t\n\t\tCull
Off\n\t\t\n\t\tTags { \"Queue\"=\"Transparent+400\" \"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\t\n\t\t\n\t\t\n\t\t\n\t\tBlend
SrcAlpha One , Zero 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\n\t\t#define
NB_THREADS_PER_GROUP 64\n\t\t#define HAS_ATTRIBUTES 1\n\t\t#define VFX_PASSDEPTH_ACTUAL

to always use a valid instanceID\n\t\t#if defined(UNITY_STEREO_INSTANCING_ENABLED)\n\t\t\t#define
VFX_DECLARE_INSTANCE_ID UNITY_VERTEX_INPUT_INSTANCE_ID\n\t\t\t#define VFX_GET_INSTANCE_ID(i)
unity_InstanceID\n\t\t#else\n\t\t\t#define VFX_DECLARE_INSTANCE_ID uint
instanceID : SV_InstanceID;\n\t\t\t#define VFX_GET_INSTANCE_ID(i) i.instanceID\n\t\t#endif\n\t\t\n\t\tENDHLSL\n\t\t\n\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
instanceID : SV_InstanceID;\n\t\t\t#define VFX_GET_INSTANCE_ID(i) i.instanceID\n\t\t#endif\n\t\t\n\t\tENDHLSL\n\t\t\n\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"SceneSelectionPass\" }\n\t\t\n\t\t\tZWrite On\n\t\t\tBlend
Off\n\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#define VFX_PASSDEPTH VFX_PASSDEPTH_SELECTION\n\t\t\t#pragma
target 4.5\n\t\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

0.5f, encodedMotionVector);\n\t\t\t\t\t\t\t\n\t\t\t\t\treturn encodedMotionVector;\n\t\t\t\t#elif
VFX_PASSDEPTH == VFX_PASSDEPTH_SELECTION\n\t\t\t\t\treturn float4(_ObjectId,
_PassValue, 1.0, 1.0);\n\t\t\t\t#elif VFX_PASSDEPTH == VFX_PASSDEPTH_ACTUAL\n\t\t\t\t\treturn
(float4)0;\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH undefined \n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\t\r\n\t\t\r\n\t\t//
(float4)0;\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH undefined \n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\t\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#pragma multi_compile
_ DEBUG_DISPLAY\n\t\t\n\t\t\tstruct ps_input\n\t\t\t{\n\t\t\t\tfloat4 pos :

encodedMotionVector = 0.0f;\n\t\t\t\t\t\tVFXEncodeMotionVector(velocity * 0.5f,
encodedMotionVector);\n\t\t\t\t\t\t\n\t\t\t\to.outMotionVector = encodedMotionVector;\n\t\t
o.outMotionVector.a = o.color.a < i.VFX_VARYING_ALPHATHRESHOLD ? 0.0f : 1.0f;
//Independant clipping for motion vector pass\n\t\t#endif\n\t\t\t\treturn o;\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\t\r\n\t}\r\n}\r\n"
//Independant clipping for motion vector pass\n\t\t#endif\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"
m_Infos:
m_Expressions:
m_Expressions:

796
Assets/Samples/GenieMagicLamp/VFX/GenieFX.vfx
文件差异内容过多而无法显示
查看文件

522
Assets/Samples/GenieMagicLamp/VFX/SandFX.vfx


m_ShaderSources:
- compute: 1
name: '[System 1]Initialize Particle'
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\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_LIFETIME_CURRENT 1\n#define VFX_USE_SEED_CURRENT 1\n#define

1\n#define VFX_USE_AXISZ_CURRENT 1\n#define VFX_USE_SCALEX_CURRENT 1\n#define
VFX_USE_SCALEY_CURRENT 1\n#define VFX_USE_SCALEZ_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
1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/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\n\nstruct
Attributes\n{\n float3 position;\n uint particleId;\n float lifetime;\n
uint seed;\n float3 color;\n float size;\n float3 velocity;\n float

attributeMap_a_TexelSize;\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<uint> 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<uint>
eventList;\r\nByteAddressBuffer inputAdditional;\r\n#endif\r\n\r\n#if HAS_STRIPS\r\nRWBuffer<uint>
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
attributeMap_a_TexelSize;\n\n\n\n#define USE_DEAD_LIST (VFX_USE_ALIVE_CURRENT
&& !HAS_STRIPS)\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
USE_DEAD_LIST\nRWStructuredBuffer<uint> 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<uint>
eventList;\nByteAddressBuffer inputAdditional;\n#endif\n\n#if HAS_STRIPS\nRWBuffer<uint>
stripDataBuffer;\n#endif\n\n#include \"Packages/com.unity.visualeffectgraph/Shaders/Common/VFXCommonCompute.hlsl\"\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\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

float3 A, float3 B) /*attribute:color Composition:Overwrite Source:Slot Random:Uniform
channels:XYZ */\n{\n color = lerp(A,B,RAND);\n}\nvoid SetAttribute_3278B22F(inout
float size, float Size) /*attribute:size Composition:Overwrite Source:Slot
Random:Off channels:XYZ */\n{\n size = Size;\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
Random:Off channels:XYZ */\n{\n size = Size;\n}\n\n\n\n#if HAS_STRIPS\nbool
GetParticleIndex(inout uint particleIndex, uint stripIndex)\n{\n\tuint relativeIndex;\n\tInterlockedAdd(STRIP_DATA(STRIP_NEXT_INDEX,
stripIndex), 1, relativeIndex);\n\tif (relativeIndex >= PARTICLE_PER_STRIP_COUNT)
// strip is full\n\t{\n\t\tInterlockedAdd(STRIP_DATA(STRIP_NEXT_INDEX, stripIndex),
-1); // Remove previous increment\n\t\treturn false;\n\t}\n\n\tparticleIndex
+ 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
+ relativeIndex) % PARTICLE_PER_STRIP_COUNT);\n return true;\n}\n#endif\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 USE_DEAD_LIST\n maxThreadId
= min(maxThreadId, deadListCount.Load(0x0));\n#elif VFX_USE_SPAWNER_FROM_GPU\n
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\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
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\t\tuint particleIndex = id + currentSpawnIndex;\n\t\t\n#if
!VFX_USE_SPAWNER_FROM_GPU\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\n\t\tAttributes
attributes = (Attributes)0;\n\t\tSourceAttributes sourceAttributes = (SourceAttributes)0;\n\t\t\n
attributes.position = float3(0, 0, 0);\n attributes.particleId = (uint)0;\n
attributes.lifetime = (float)1;\n attributes.seed = (uint)0;\n
attributes.color = float3(1, 1, 1);\n attributes.size = (float)0.100000001;\n

0);\n attributes.axisZ = float3(0, 0, 1);\n attributes.scaleX
= (float)1;\n attributes.scaleY = (float)1;\n attributes.scaleZ
= (float)1;\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(
= (float)1;\n \n\n#if VFX_USE_PARTICLEID_CURRENT\n attributes.particleId
= particleIndex;\n#endif\n#if VFX_USE_SEED_CURRENT\n attributes.seed
= WangHash(particleIndex ^ systemSeed);\n#endif\n#if VFX_USE_SPAWNINDEX_CURRENT\n
attributes.spawnIndex = id;\n#endif\n#if HAS_STRIPS\n#if !VFX_USE_SPAWNER_FROM_GPU\n\t\t\n#else\n
uint stripIndex = sourceIndex;\n#endif\n\t\tstripIndex = min(stripIndex, STRIP_COUNT);\n\n
if (!GetParticleIndex(particleIndex, stripIndex))\n return;\n\n
const StripData stripData = GetStripDataFromStripIndex(stripIndex, PARTICLE_PER_STRIP_COUNT);\n\t\tInitStripAttributes(particleIndex,
attributes, stripData);\n\t\t// TODO Change seed to be sure we're deterministic
on random with strip\n#endif\n \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 float3 tmp_bc = mul(float4x4(-32,0,-2.79752885E-06,0,0,32,0,0.0500000007,2.79752885E-06,0,-32,0,0,0,0,1),

SetAttribute_FDD071DD( /*inout */attributes.color, /*inout */attributes.seed,
float3(1, 1, 1), float3(0.391572565, 0.318546832, 0.104616493));\n }\n
{\n SetAttribute_3278B22F( /*inout */attributes.size, (float)1);\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
}\n \n\n\t\t\n#if VFX_USE_ALIVE_CURRENT\n if (attributes.alive)\n#endif
\n {\n#if USE_DEAD_LIST\n\t uint deadIndex = deadListIn.DecrementCounter();\n
uint index = deadListIn[deadIndex];\n#else\n uint index = particleIndex;\n#endif\n
attributeBuffer.Store3((index * 0x8 + 0x0) << 2,asuint(attributes.position));\n
attributeBuffer.Store((index * 0x2 + 0x1F400) << 2,asuint(attributes.particleId));\n
attributeBuffer.Store((index * 0x2 + 0x1F401) << 2,asuint(attributes.lifetime));\n

attributeBuffer.Store((index * 0x14 + 0x2710B) << 2,asuint(attributes.scaleX));\n
attributeBuffer.Store((index * 0x14 + 0x2710F) << 2,asuint(attributes.scaleY));\n
attributeBuffer.Store((index * 0x14 + 0x27110) << 2,asuint(attributes.scaleZ));\n
\n\r\n }\r\n }\r\n}\r\n"
\n\n }\n }\n}\n"
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
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
1\n#define VFX_LOCAL_SPACE 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\nCBUFFER_START(parameters)\n
VectorField_a_TexelSize;\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<uint>
deadListOut;\r\n#endif\r\n\r\n#if VFX_HAS_INDIRECT_DRAW\r\nRWStructuredBuffer<uint>
indirectBuffer;\r\n#endif\r\n\r\n#if HAS_STRIPS\r\nRWBuffer<uint> stripDataBuffer;\r\n#endif\r\n\r\n#if
VFX_USE_STRIPALIVE_CURRENT\r\nBuffer<uint> 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
VectorField_a_TexelSize;\n\n\n\n#define USE_DEAD_LIST (VFX_USE_ALIVE_CURRENT
&& !HAS_STRIPS)\n\nRWByteAddressBuffer attributeBuffer;\n\n#if USE_DEAD_LIST\nRWStructuredBuffer<uint>
deadListOut;\n#endif\n\n#if VFX_HAS_INDIRECT_DRAW\nRWStructuredBuffer<uint>
indirectBuffer;\n#endif\n\n#if HAS_STRIPS\nRWBuffer<uint> stripDataBuffer;\n#endif\n\n#if
VFX_USE_STRIPALIVE_CURRENT\nBuffer<uint> attachedStripDataBuffer;\n#endif\n\nCBUFFER_START(updateParams)\n
uint nbMax;\n\tuint dispatchWidth;\n\tuint systemSeed;\nCBUFFER_END\n\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\r\n\r\nvoid
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\n\nvoid
VectorFieldForce_267A9(inout float3 velocity, float mass, float3 position,
VFXSampler3D VectorField, float4x4 InvFieldTransform, float4x4 FieldTransform,
float Intensity, float Drag, float deltaTime) /*DataEncoding:UnsignedNormalized

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
}\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
* 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 + 0x4) << 2));\n\t\t\n\r\n\t\tif (attributes.alive)\r\n\t\t{\r\n\t\t\tattributes.position
* NB_THREADS_PER_GROUP;\n\tuint index = id;\n\tif (id < nbMax)\n\t{\n
Attributes attributes = (Attributes)0;\n\t\tSourceAttributes sourceAttributes
= (SourceAttributes)0;\n\n#if VFX_USE_ALIVE_CURRENT\n\t\tattributes.alive =
(attributeBuffer.Load((index * 0x8 + 0x4) << 2));\n\t\t\n\n\t\tif (attributes.alive)\n\t\t{\n\t\t\tattributes.position
+ 0x3) << 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 uint tmp_bd = attributes.particleId
^ asuint(uniform_e);\n\t\t\t float tmp_be = FixedRand(tmp_bd);\n\t\t\t
float tmp_bf = SampleCurve(uniform_d,tmp_be);\n\t\t\t float tmp_bh = tmp_bf
* (float)4.5;\n\t\t\t float tmp_bj = tmp_be * (float)3;\n\t\t\t float
tmp_bl = max(tmp_bj, (float)0);\n\t\t\t VectorFieldForce_267A9( /*inout
+ 0x3) << 2));\n\t\t\t\n\n\n// Initialize built-in needed attributes\n#if VFX_USE_OLDPOSITION_CURRENT\n\t\t\tattributes.oldPosition
= attributes.position;\n#endif\n#if HAS_STRIPS\n const StripData
stripData = GetStripDataFromParticleIndex(index, PARTICLE_PER_STRIP_COUNT);\n
InitStripAttributes(index, attributes, stripData);\n#endif\n\t\t\t\n\t\t\t{\n\t\t\t
uint tmp_bd = attributes.particleId ^ asuint(uniform_e);\n\t\t\t float tmp_be
= FixedRand(tmp_bd);\n\t\t\t float tmp_bf = SampleCurve(uniform_d,tmp_be);\n\t\t\t
float tmp_bh = tmp_bf * (float)4.5;\n\t\t\t float tmp_bj = tmp_be * (float)3;\n\t\t\t
float tmp_bl = max(tmp_bj, (float)0);\n\t\t\t VectorFieldForce_267A9( /*inout
*/attributes.velocity, attributes.mass, attributes.position, GetVFXSampler(VectorField_a,
samplerVectorField_a), InvFieldTransform_a, FieldTransform_a, tmp_bh, tmp_bl,
deltaTime_a);\n\t\t\t}\n\t\t\t{\n\t\t\t uint tmp_be = attributes.particleId

tmp_bn, (float)0);\n\t\t\t SetAttribute_AA7D638( /*inout */attributes.velocity,
tmp_bp);\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
+ 0x0) << 2,asuint(attributes.position));\n\t\t\t\tattributeBuffer.Store3((index
attributes.lifetime, /*inout */attributes.alive);\n\t\t\t\n\n\n\t\t\tif (attributes.alive)\n\t\t\t{\n\t\t\t\tattributeBuffer.Store3((index
* 0x8 + 0x0) << 2,asuint(attributes.position));\n\t\t\t\tattributeBuffer.Store3((index
* 0x8 + 0x3) << 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 + 0x4) << 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,
* 0x8 + 0x3) << 2,asuint(attributes.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\n#if HAS_STRIPS\t\t\t\n\t\t\t\tuint relativeIndexInStrip
= GetRelativeIndex(index, stripData);\n\t\t\t\tInterlockedMin(STRIP_DATA(STRIP_MIN_ALIVE,
stripData.stripIndex), relativeIndexInStrip);\n\t\t\t\tInterlockedMax(STRIP_DATA(STRIP_MAX_ALIVE,
stripData.stripIndex), relativeIndexInStrip);\n#endif\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tattributeBuffer.Store((index
* 0x8 + 0x4) << 2,uint(attributes.alive));\n\t\t\t\t\n\n#if USE_DEAD_LIST &&
!VFX_USE_STRIPALIVE_CURRENT\n\t\t\t\tuint deadIndex = deadListOut.IncrementCounter();\n\t\t\t\tdeadListOut[deadIndex]
= index;\n#endif\n\t\t\t}\n\t\t}\n#if USE_DEAD_LIST && VFX_USE_STRIPALIVE_CURRENT\n
else if (attributes.stripAlive)\n {\n if (STRIP_DATA_X(attachedStripDataBuffer,
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.position
= asfloat(attributeBuffer.Load3((index * 0x8 + 0x0) << 2));\n\t\tattributes.particleId
= (attributeBuffer.Load((index * 0x2 + 0x1F400) << 2));\n\t\tattributes.lifetime
= asfloat(attributeBuffer.Load((index * 0x2 + 0x1F401) << 2));\n\t\tattributes.velocity
= asfloat(attributeBuffer.Load3((index * 0x4 + 0x79180) << 2));\n\t\tattributes.mass
= (float)1;\n\t\tattributes.age = asfloat(attributeBuffer.Load((index * 0x8
+ 0x3) << 2));\n\t\tattributes.alive = (attributeBuffer.Load((index * 0x8 +
0x4) << 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
the particle \n {\n uint deadIndex = deadListOut.IncrementCounter();\n\t\t\t\tdeadListOut[deadIndex]
= index;\n attributes.stripAlive = false;\n \n
} \n }\n#endif\n#else\n\t\tattributes.position = asfloat(attributeBuffer.Load3((index
* 0x8 + 0x0) << 2));\n\t\tattributes.particleId = (attributeBuffer.Load((index
* 0x2 + 0x1F400) << 2));\n\t\tattributes.lifetime = asfloat(attributeBuffer.Load((index
* 0x2 + 0x1F401) << 2));\n\t\tattributes.velocity = asfloat(attributeBuffer.Load3((index
* 0x4 + 0x79180) << 2));\n\t\tattributes.mass = (float)1;\n\t\tattributes.age
= asfloat(attributeBuffer.Load((index * 0x8 + 0x3) << 2));\n\t\tattributes.alive
= (attributeBuffer.Load((index * 0x8 + 0x4) << 2));\n\t\t\n\n\t\t\n#if VFX_USE_OLDPOSITION_CURRENT\n\t\tattributes.oldPosition
= attributes.position;\n#endif\n#if HAS_STRIPS\n const StripData stripData
= GetStripDataFromParticleIndex(index, PARTICLE_PER_STRIP_COUNT);\n
InitStripAttributes(index, attributes, stripData);\n#endif\n\t\t\n\t\t{\n\t\t
uint tmp_bd = attributes.particleId ^ asuint(uniform_e);\n\t\t float tmp_be
= FixedRand(tmp_bd);\n\t\t float tmp_bf = SampleCurve(uniform_d,tmp_be);\n\t\t
float tmp_bh = tmp_bf * (float)4.5;\n\t\t float tmp_bj = tmp_be * (float)3;\n\t\t

tmp_bn, (float)0);\n\t\t SetAttribute_AA7D638( /*inout */attributes.velocity,
tmp_bp);\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
attributes.lifetime, /*inout */attributes.alive);\n\t\t\n\n\t\tattributeBuffer.Store3((index
* 0x8 + 0x4) << 2,uint(attributes.alive));\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"
* 0x8 + 0x4) << 2,uint(attributes.alive));\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"
source: "Shader \"Hidden/VFX/SandFX/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\"
source: "Shader \"Hidden/VFX/SandFX/System 1/Output Particle Quad\"\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\t\n\t\t\n\t\t\n\t\t\n\t\tBlend
SrcAlpha One \n\t\tBlend 1 SrcAlpha OneMinusSrcAlpha\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\n\t\t#define NB_THREADS_PER_GROUP

to always use a valid instanceID\n\t\t#if defined(UNITY_STEREO_INSTANCING_ENABLED)\n\t\t\t#define
VFX_DECLARE_INSTANCE_ID UNITY_VERTEX_INPUT_INSTANCE_ID\n\t\t\t#define VFX_GET_INSTANCE_ID(i)
unity_InstanceID\n\t\t#else\n\t\t\t#define VFX_DECLARE_INSTANCE_ID uint
instanceID : SV_InstanceID;\n\t\t\t#define VFX_GET_INSTANCE_ID(i) i.instanceID\n\t\t#endif\n\t\t\n\t\tENDHLSL\n\t\t\n\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
instanceID : SV_InstanceID;\n\t\t\t#define VFX_GET_INSTANCE_ID(i) i.instanceID\n\t\t#endif\n\t\t\n\t\tENDHLSL\n\t\t\n\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"SceneSelectionPass\" }\n\t\t\n\t\t\tZWrite On\n\t\t\tBlend
Off\n\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#define VFX_PASSDEPTH VFX_PASSDEPTH_SELECTION\n\t\t\t#pragma
target 4.5\n\t\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

0.5f, encodedMotionVector);\n\t\t\t\t\t\t\t\n\t\t\t\t\treturn encodedMotionVector;\n\t\t\t\t#elif
VFX_PASSDEPTH == VFX_PASSDEPTH_SELECTION\n\t\t\t\t\treturn float4(_ObjectId,
_PassValue, 1.0, 1.0);\n\t\t\t\t#elif VFX_PASSDEPTH == VFX_PASSDEPTH_ACTUAL\n\t\t\t\t\treturn
(float4)0;\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH undefined \n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\t\r\n\t\t\r\n\t\t//
(float4)0;\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH undefined \n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\t\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#pragma multi_compile
_ DEBUG_DISPLAY\n\t\t\n\t\t\tstruct ps_input\n\t\t\t{\n\t\t\t\tfloat4 pos :

encodedMotionVector = 0.0f;\n\t\t\t\t\t\tVFXEncodeMotionVector(velocity * 0.5f,
encodedMotionVector);\n\t\t\t\t\t\t\n\t\t\t\to.outMotionVector = encodedMotionVector;\n\t\t
o.outMotionVector.a = o.color.a < i.VFX_VARYING_ALPHATHRESHOLD ? 0.0f : 1.0f;
//Independant clipping for motion vector pass\n\t\t#endif\n\t\t\t\treturn o;\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\t\r\n\t}\r\n}\r\n"
//Independant clipping for motion vector pass\n\t\t#endif\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"
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
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
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\nCBUFFER_START(parameters)\n
attributeMap_a;\nSamplerState samplerattributeMap_a;\nfloat4 attributeMap_a_TexelSize;\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<uint>
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<uint> eventList;\r\nByteAddressBuffer
inputAdditional;\r\n#endif\r\n\r\n#if HAS_STRIPS\r\nRWBuffer<uint> 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
attributeMap_a;\nSamplerState samplerattributeMap_a;\nfloat4 attributeMap_a_TexelSize;\n\n\n\n#define
USE_DEAD_LIST (VFX_USE_ALIVE_CURRENT && !HAS_STRIPS)\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 USE_DEAD_LIST\nRWStructuredBuffer<uint> 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<uint>
eventList;\nByteAddressBuffer inputAdditional;\n#endif\n\n#if HAS_STRIPS\nRWBuffer<uint>
stripDataBuffer;\n#endif\n\n#include \"Packages/com.unity.visualeffectgraph/Shaders/Common/VFXCommonCompute.hlsl\"\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\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

/*attribute:color Composition:Overwrite Source:Slot Random:Off channels:XYZ
*/\n{\n color = Color;\n}\nvoid SetAttribute_3278B22F(inout float size,
float Size) /*attribute:size Composition:Overwrite Source:Slot Random:Off channels:XYZ
*/\n{\n size = Size;\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
*/\n{\n size = Size;\n}\n\n\n\n#if HAS_STRIPS\nbool GetParticleIndex(inout
uint particleIndex, uint stripIndex)\n{\n\tuint relativeIndex;\n\tInterlockedAdd(STRIP_DATA(STRIP_NEXT_INDEX,
stripIndex), 1, relativeIndex);\n\tif (relativeIndex >= PARTICLE_PER_STRIP_COUNT)
// strip is full\n\t{\n\t\tInterlockedAdd(STRIP_DATA(STRIP_NEXT_INDEX, stripIndex),
-1); // Remove previous increment\n\t\treturn false;\n\t}\n\n\tparticleIndex
+ 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
+ relativeIndex) % PARTICLE_PER_STRIP_COUNT);\n return true;\n}\n#endif\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 USE_DEAD_LIST\n maxThreadId
= min(maxThreadId, deadListCount.Load(0x0));\n#elif VFX_USE_SPAWNER_FROM_GPU\n
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\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
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\t\tuint particleIndex = id + currentSpawnIndex;\n\t\t\n#if
!VFX_USE_SPAWNER_FROM_GPU\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\n\t\tAttributes
attributes = (Attributes)0;\n\t\tSourceAttributes sourceAttributes = (SourceAttributes)0;\n\t\t\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(
\n\n#if VFX_USE_PARTICLEID_CURRENT\n attributes.particleId = particleIndex;\n#endif\n#if
VFX_USE_SEED_CURRENT\n attributes.seed = WangHash(particleIndex ^ systemSeed);\n#endif\n#if
VFX_USE_SPAWNINDEX_CURRENT\n attributes.spawnIndex = id;\n#endif\n#if
HAS_STRIPS\n#if !VFX_USE_SPAWNER_FROM_GPU\n\t\t\n#else\n uint stripIndex
= sourceIndex;\n#endif\n\t\tstripIndex = min(stripIndex, STRIP_COUNT);\n\n
if (!GetParticleIndex(particleIndex, stripIndex))\n return;\n\n
const StripData stripData = GetStripDataFromStripIndex(stripIndex, PARTICLE_PER_STRIP_COUNT);\n\t\tInitStripAttributes(particleIndex,
attributes, stripData);\n\t\t// TODO Change seed to be sure we're deterministic
on random with strip\n#endif\n \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 float3 tmp_bc = mul(float4x4(-32,0,-2.79752885E-06,0,0,32,0,0.0500000007,2.79752885E-06,0,-32,0,0,0,0,1),

/*inout */attributes.position, tmp_br);\n }\n {\n
SetAttribute_FDD06EC7( /*inout */attributes.color, float3(1, 0.741999984, 0.405999988));\n
}\n {\n SetAttribute_3278B22F( /*inout */attributes.size,
(float)1);\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.Store3((index * 0x8 + 0x0) << 2,asuint(attributes.position));\n
attributeBuffer.Store((index * 0x1 + 0x2000) << 2,asuint(attributes.particleId));\n
attributeBuffer.Store((index * 0x1 + 0x2400) << 2,asuint(attributes.lifetime));\n
attributeBuffer.Store((index * 0x8 + 0x2803) << 2,asuint(attributes.seed));\n
attributeBuffer.Store3((index * 0x8 + 0x2800) << 2,asuint(attributes.color));\n
attributeBuffer.Store((index * 0x8 + 0x2804) << 2,asuint(attributes.size));\n
attributeBuffer.Store((index * 0x8 + 0x3) << 2,uint(attributes.alive));\n
attributeBuffer.Store((index * 0x8 + 0x4) << 2,asuint(attributes.texIndex));\n
attributeBuffer.Store3((index * 0x4 + 0x4800) << 2,asuint(attributes.velocity));\n
attributeBuffer.Store((index * 0x8 + 0x5) << 2,asuint(attributes.age));\n
\n\r\n }\r\n }\r\n}\r\n"
(float)1);\n }\n \n\n\t\t\n#if VFX_USE_ALIVE_CURRENT\n
if (attributes.alive)\n#endif \n {\n#if USE_DEAD_LIST\n\t
uint deadIndex = deadListIn.DecrementCounter();\n uint index = deadListIn[deadIndex];\n#else\n
uint index = particleIndex;\n#endif\n attributeBuffer.Store3((index
* 0x8 + 0x0) << 2,asuint(attributes.position));\n attributeBuffer.Store((index
* 0x1 + 0x2000) << 2,asuint(attributes.particleId));\n attributeBuffer.Store((index
* 0x1 + 0x2400) << 2,asuint(attributes.lifetime));\n attributeBuffer.Store((index
* 0x8 + 0x2803) << 2,asuint(attributes.seed));\n attributeBuffer.Store3((index
* 0x8 + 0x2800) << 2,asuint(attributes.color));\n attributeBuffer.Store((index
* 0x8 + 0x2804) << 2,asuint(attributes.size));\n attributeBuffer.Store((index
* 0x8 + 0x3) << 2,uint(attributes.alive));\n attributeBuffer.Store((index
* 0x8 + 0x4) << 2,asuint(attributes.texIndex));\n attributeBuffer.Store3((index
* 0x4 + 0x4800) << 2,asuint(attributes.velocity));\n attributeBuffer.Store((index
* 0x8 + 0x5) << 2,asuint(attributes.age));\n \n\n }\n
}\n}\n"
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
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
1\n#define VFX_LOCAL_SPACE 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\nCBUFFER_START(parameters)\n
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<uint>
deadListOut;\r\n#endif\r\n\r\n#if VFX_HAS_INDIRECT_DRAW\r\nRWStructuredBuffer<uint>
indirectBuffer;\r\n#endif\r\n\r\n#if HAS_STRIPS\r\nRWBuffer<uint> stripDataBuffer;\r\n#endif\r\n\r\n#if
VFX_USE_STRIPALIVE_CURRENT\r\nBuffer<uint> 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
SourceAttributes\n{\n};\n\n\n\n\n#define USE_DEAD_LIST (VFX_USE_ALIVE_CURRENT
&& !HAS_STRIPS)\n\nRWByteAddressBuffer attributeBuffer;\n\n#if USE_DEAD_LIST\nRWStructuredBuffer<uint>
deadListOut;\n#endif\n\n#if VFX_HAS_INDIRECT_DRAW\nRWStructuredBuffer<uint>
indirectBuffer;\n#endif\n\n#if HAS_STRIPS\nRWBuffer<uint> stripDataBuffer;\n#endif\n\n#if
VFX_USE_STRIPALIVE_CURRENT\nBuffer<uint> attachedStripDataBuffer;\n#endif\n\nCBUFFER_START(updateParams)\n
uint nbMax;\n\tuint dispatchWidth;\n\tuint systemSeed;\nCBUFFER_END\n\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\r\n\r\nvoid
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\n\nvoid
KillAABox_1(float3 position, inout bool alive, float3 box_center, float3 box_size)
/*mode:Inverted */\n{\n \n float3 dir = position - box_center;\n float3
absDir = abs(dir);\n float3 size = box_size * 0.5f;\n bool collision

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 + 0x3) << 2));\n\t\t\n\r\n\t\tif (attributes.alive)\r\n\t\t{\r\n\t\t\tattributes.position
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 Attributes attributes = (Attributes)0;\n\t\tSourceAttributes
sourceAttributes = (SourceAttributes)0;\n\n#if VFX_USE_ALIVE_CURRENT\n\t\tattributes.alive
= (attributeBuffer.Load((index * 0x8 + 0x3) << 2));\n\t\t\n\n\t\tif (attributes.alive)\n\t\t{\n\t\t\tattributes.position
= asfloat(attributeBuffer.Load((index * 0x8 + 0x5) << 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
= asfloat(attributeBuffer.Load((index * 0x8 + 0x5) << 2));\n\t\t\t\n\n\n//
Initialize built-in needed attributes\n#if VFX_USE_OLDPOSITION_CURRENT\n\t\t\tattributes.oldPosition
= attributes.position;\n#endif\n#if HAS_STRIPS\n const StripData
stripData = GetStripDataFromParticleIndex(index, PARTICLE_PER_STRIP_COUNT);\n
InitStripAttributes(index, attributes, stripData);\n#endif\n\t\t\t\n\t\t\t{\n\t\t\t
KillAABox_1(attributes.position, /*inout */attributes.alive, float3(-1.88016891,
5.14057446, -4.68257141), float3(88.6153793, 4.52800751, 86.7191925));\n\t\t\t}\n\t\t\t{\n\t\t\t
FlipbookPlay_0( /*inout */attributes.texIndex, (float)15, deltaTime_b);\n\t\t\t}\n\t\t\t{\n\t\t\t

/*inout */attributes.velocity, tmp_bl);\n\t\t\t}\n\t\t\tEulerIntegration( /*inout
*/attributes.position, attributes.velocity, deltaTime_b);\n\t\t\tAge( /*inout
*/attributes.age, deltaTime_b);\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
/*inout */attributes.alive);\n\t\t\t\n\n\n\t\t\tif (attributes.alive)\n\t\t\t{\n\t\t\t\tattributeBuffer.Store3((index
* 0x8 + 0x5) << 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 + 0x3) << 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,
* 0x8 + 0x5) << 2,asuint(attributes.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\n#if HAS_STRIPS\t\t\t\n\t\t\t\tuint relativeIndexInStrip
= GetRelativeIndex(index, stripData);\n\t\t\t\tInterlockedMin(STRIP_DATA(STRIP_MIN_ALIVE,
stripData.stripIndex), relativeIndexInStrip);\n\t\t\t\tInterlockedMax(STRIP_DATA(STRIP_MAX_ALIVE,
stripData.stripIndex), relativeIndexInStrip);\n#endif\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tattributeBuffer.Store((index
* 0x8 + 0x3) << 2,uint(attributes.alive));\n\t\t\t\t\n\n#if USE_DEAD_LIST &&
!VFX_USE_STRIPALIVE_CURRENT\n\t\t\t\tuint deadIndex = deadListOut.IncrementCounter();\n\t\t\t\tdeadListOut[deadIndex]
= index;\n#endif\n\t\t\t}\n\t\t}\n#if USE_DEAD_LIST && VFX_USE_STRIPALIVE_CURRENT\n
else if (attributes.stripAlive)\n {\n if (STRIP_DATA_X(attachedStripDataBuffer,
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.position
= asfloat(attributeBuffer.Load3((index * 0x8 + 0x0) << 2));\n\t\tattributes.particleId
= (attributeBuffer.Load((index * 0x1 + 0x2000) << 2));\n\t\tattributes.lifetime
= asfloat(attributeBuffer.Load((index * 0x1 + 0x2400) << 2));\n\t\tattributes.alive
= (attributeBuffer.Load((index * 0x8 + 0x3) << 2));\n\t\tattributes.texIndex
= asfloat(attributeBuffer.Load((index * 0x8 + 0x4) << 2));\n\t\tattributes.velocity
= asfloat(attributeBuffer.Load3((index * 0x4 + 0x4800) << 2));\n\t\tattributes.age
= asfloat(attributeBuffer.Load((index * 0x8 + 0x5) << 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 KillAABox_1(attributes.position,
/*inout */attributes.alive, float3(-1.88016891, 5.14057446, -4.68257141), float3(88.6153793,
4.52800751, 86.7191925));\n\t\t}\n\t\t{\n\t\t FlipbookPlay_0( /*inout */attributes.texIndex,
(float)15, deltaTime_b);\n\t\t}\n\t\t{\n\t\t uint tmp_ba = attributes.particleId
^ asuint(uniform_c);\n\t\t float tmp_bb = FixedRand(tmp_ba);\n\t\t float
tmp_bd = tmp_bb * (float)13;\n\t\t float tmp_be = (float)2 + tmp_bd;\n\t\t
float tmp_bf = tmp_be * deltaTime_b;\n\t\t float tmp_bg = attributes.age
/ attributes.lifetime;\n\t\t float tmp_bh = tmp_bg * deltaTime_b;\n\t\t
float tmp_bj = tmp_bh * (float)-2.79999995;\n\t\t float3 tmp_bl = float3(tmp_bf,
tmp_bj, (float)0);\n\t\t SetAttribute_AA7D638( /*inout */attributes.velocity,
tmp_bl);\n\t\t}\n\t\tEulerIntegration( /*inout */attributes.position, attributes.velocity,
deltaTime_b);\n\t\tAge( /*inout */attributes.age, deltaTime_b);\n\t\tReap(attributes.age,
attributes.lifetime, /*inout */attributes.alive);\n\t\t\n\r\n\t\tattributeBuffer.Store3((index
* 0x8 + 0x0) << 2,asuint(attributes.position));\n\t\tattributeBuffer.Store((index
the particle \n {\n uint deadIndex = deadListOut.IncrementCounter();\n\t\t\t\tdeadListOut[deadIndex]
= index;\n attributes.stripAlive = false;\n \n
} \n }\n#endif\n#else\n\t\tattributes.position = asfloat(attributeBuffer.Load3((index
* 0x8 + 0x0) << 2));\n\t\tattributes.particleId = (attributeBuffer.Load((index
* 0x1 + 0x2000) << 2));\n\t\tattributes.lifetime = asfloat(attributeBuffer.Load((index
* 0x1 + 0x2400) << 2));\n\t\tattributes.alive = (attributeBuffer.Load((index
* 0x8 + 0x3) << 2));\n\t\tattributes.texIndex = asfloat(attributeBuffer.Load((index
* 0x8 + 0x4) << 2));\n\t\tattributes.velocity = asfloat(attributeBuffer.Load3((index
* 0x4 + 0x4800) << 2));\n\t\tattributes.age = asfloat(attributeBuffer.Load((index
* 0x8 + 0x5) << 2));\n\t\t\n\n\t\t\n#if VFX_USE_OLDPOSITION_CURRENT\n\t\tattributes.oldPosition
= attributes.position;\n#endif\n#if HAS_STRIPS\n const StripData stripData
= GetStripDataFromParticleIndex(index, PARTICLE_PER_STRIP_COUNT);\n
InitStripAttributes(index, attributes, stripData);\n#endif\n\t\t\n\t\t{\n\t\t
KillAABox_1(attributes.position, /*inout */attributes.alive, float3(-1.88016891,
5.14057446, -4.68257141), float3(88.6153793, 4.52800751, 86.7191925));\n\t\t}\n\t\t{\n\t\t
FlipbookPlay_0( /*inout */attributes.texIndex, (float)15, deltaTime_b);\n\t\t}\n\t\t{\n\t\t
uint tmp_ba = attributes.particleId ^ asuint(uniform_c);\n\t\t float tmp_bb
= FixedRand(tmp_ba);\n\t\t float tmp_bd = tmp_bb * (float)13;\n\t\t float
tmp_be = (float)2 + tmp_bd;\n\t\t float tmp_bf = tmp_be * deltaTime_b;\n\t\t
float tmp_bg = attributes.age / attributes.lifetime;\n\t\t float tmp_bh
= tmp_bg * deltaTime_b;\n\t\t float tmp_bj = tmp_bh * (float)-2.79999995;\n\t\t
float3 tmp_bl = float3(tmp_bf, tmp_bj, (float)0);\n\t\t SetAttribute_AA7D638(
/*inout */attributes.velocity, tmp_bl);\n\t\t}\n\t\tEulerIntegration( /*inout
*/attributes.position, attributes.velocity, deltaTime_b);\n\t\tAge( /*inout
*/attributes.age, deltaTime_b);\n\t\tReap(attributes.age, attributes.lifetime,
/*inout */attributes.alive);\n\t\t\n\n\t\tattributeBuffer.Store3((index * 0x8
+ 0x0) << 2,asuint(attributes.position));\n\t\tattributeBuffer.Store((index
* 0x8 + 0x5) << 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"
* 0x8 + 0x5) << 2,asuint(attributes.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"
source: "Shader \"Hidden/VFX/SandFX/System 2/Output Particle Octagon\"\n{\r\n\tSubShader\r\n\t{\t\r\n\t\tCull
Off\r\n\t\t\r\n\t\tTags { \"Queue\"=\"Transparent+400\" \"IgnoreProjector\"=\"True\"
source: "Shader \"Hidden/VFX/SandFX/System 2/Output Particle Octagon\"\n{\n\tSubShader\n\t{\t\n\t\tCull
Off\n\t\t\n\t\tTags { \"Queue\"=\"Transparent+400\" \"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\t\n\t\t\n\t\t\n\t\t\n\t\tBlend
SrcAlpha One , Zero 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\n\t\t#define
NB_THREADS_PER_GROUP 64\n\t\t#define HAS_ATTRIBUTES 1\n\t\t#define VFX_PASSDEPTH_ACTUAL

to always use a valid instanceID\n\t\t#if defined(UNITY_STEREO_INSTANCING_ENABLED)\n\t\t\t#define
VFX_DECLARE_INSTANCE_ID UNITY_VERTEX_INPUT_INSTANCE_ID\n\t\t\t#define VFX_GET_INSTANCE_ID(i)
unity_InstanceID\n\t\t#else\n\t\t\t#define VFX_DECLARE_INSTANCE_ID uint
instanceID : SV_InstanceID;\n\t\t\t#define VFX_GET_INSTANCE_ID(i) i.instanceID\n\t\t#endif\n\t\t\n\t\tENDHLSL\n\t\t\n\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
instanceID : SV_InstanceID;\n\t\t\t#define VFX_GET_INSTANCE_ID(i) i.instanceID\n\t\t#endif\n\t\t\n\t\tENDHLSL\n\t\t\n\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"SceneSelectionPass\" }\n\t\t\n\t\t\tZWrite On\n\t\t\tBlend
Off\n\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#define VFX_PASSDEPTH VFX_PASSDEPTH_SELECTION\n\t\t\t#pragma
target 4.5\n\t\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

0.5f, encodedMotionVector);\n\t\t\t\t\t\t\t\n\t\t\t\t\treturn encodedMotionVector;\n\t\t\t\t#elif
VFX_PASSDEPTH == VFX_PASSDEPTH_SELECTION\n\t\t\t\t\treturn float4(_ObjectId,
_PassValue, 1.0, 1.0);\n\t\t\t\t#elif VFX_PASSDEPTH == VFX_PASSDEPTH_ACTUAL\n\t\t\t\t\treturn
(float4)0;\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH undefined \n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\t\r\n\t\t\r\n\t\t//
(float4)0;\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH undefined \n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\t\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#pragma multi_compile
_ DEBUG_DISPLAY\n\t\t\n\t\t\tstruct ps_input\n\t\t\t{\n\t\t\t\tfloat4 pos :

encodedMotionVector = 0.0f;\n\t\t\t\t\t\tVFXEncodeMotionVector(velocity * 0.5f,
encodedMotionVector);\n\t\t\t\t\t\t\n\t\t\t\to.outMotionVector = encodedMotionVector;\n\t\t
o.outMotionVector.a = o.color.a < i.VFX_VARYING_ALPHATHRESHOLD ? 0.0f : 1.0f;
//Independant clipping for motion vector pass\n\t\t#endif\n\t\t\t\treturn o;\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\t\r\n\t}\r\n}\r\n"
//Independant clipping for motion vector pass\n\t\t#endif\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"
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\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_LIFETIME_CURRENT 1\n#define VFX_USE_SEED_CURRENT 1\n#define

VFX_USE_ANGLEZ_CURRENT 1\n#define VFX_USE_PIVOTX_CURRENT 1\n#define VFX_USE_PIVOTY_CURRENT
1\n#define VFX_USE_PIVOTZ_CURRENT 1\n#define VFX_USE_SCALEX_CURRENT 1\n#define
VFX_USE_SCALEY_CURRENT 1\n#define VFX_USE_SCALEZ_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
1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\nCBUFFER_START(parameters)\n
float gradient_a;\n float uniform_c;\n float currentFrameIndex;\n
uint PADDING_0;\nCBUFFER_END\n\nstruct Attributes\n{\n float3 position;\n
uint particleId;\n float lifetime;\n uint seed;\n float3 color;\n

pivotZ;\n float scaleX;\n float scaleY;\n float scaleZ;\n};\n\nstruct
SourceAttributes\n{\n};\n\nTexture2D mainTexture;\nSamplerState samplermainTexture;\nfloat4
mainTexture_TexelSize;\n\n\r\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXCommon.hlsl\"\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\r\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\r\n\r\nByteAddressBuffer
attributeBuffer;\r\nRWByteAddressBuffer elementToVFXBuffer;\r\n#if VFX_USE_ALIVE_CURRENT\r\nStructuredBuffer<uint>
deadListOut;\r\n#endif\r\n\r\n#if VFX_HAS_INDIRECT_DRAW\r\nStructuredBuffer<uint>
indirectBuffer;\r\n#endif\r\n\r\nCBUFFER_START(updateParams)\r\n\tuint nbMax;\r\n\tuint
dispatchWidth;\r\n\tuint systemSeed;\r\nCBUFFER_END\r\n\r\nvoid ColorOverLife_733E3(float
mainTexture_TexelSize;\n\n\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXCommon.hlsl\"\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nByteAddressBuffer
attributeBuffer;\nRWByteAddressBuffer elementToVFXBuffer;\n#if VFX_USE_ALIVE_CURRENT\nStructuredBuffer<uint>
deadListOut;\n#endif\n\n#if VFX_HAS_INDIRECT_DRAW\nStructuredBuffer<uint> indirectBuffer;\n#endif\n\nCBUFFER_START(updateParams)\n\tuint
nbMax;\n\tuint dispatchWidth;\n\tuint systemSeed;\nCBUFFER_END\n\nvoid ColorOverLife_733E3(float
age, float lifetime, inout float3 color, inout float alpha, float gradient)
/*mode:ColorAndAlpha ColorComposition:Multiply AlphaComposition:Multiply */\n{\n
\n float4 sampledColor = SampleGradient(gradient, age/lifetime);\n color

float2 newScale = (float2(PixelSize, PixelSize) * (_ScreenParams.xy/ReferenceResolution)
* clipPosW) / (size * 0.5f * min(UNITY_MATRIX_P[0][0] * _ScreenParams.x,-UNITY_MATRIX_P[1][1]
* _ScreenParams.y));\n scaleX = newScale.x;\n scaleY = newScale.y;\n
scaleZ = scaleX;\n}\n\n\r\n\r\n[numthreads(NB_THREADS_PER_GROUP,1,1)]\r\nvoid
CSMain(uint3 groupId\t\t: SV_GroupID,\r\n\t\t\tuint3 groupThreadId\t: SV_GroupThreadID)\r\n{\r\n\tuint
scaleZ = scaleX;\n}\n\n\n\n[numthreads(NB_THREADS_PER_GROUP,1,1)]\nvoid CSMain(uint3
groupId\t\t: SV_GroupID,\n\t\t\tuint3 groupThreadId\t: SV_GroupThreadID)\n{\n\tuint
* NB_THREADS_PER_GROUP;\r\n\tuint index = id;\r\n\tif (id < nbMax)\r\n\t{\r\n\t\tAttributes
attributes = (Attributes)0;\r\n\t\tSourceAttributes sourceAttributes = (SourceAttributes)0;\r\n\t\t\r\n\t\tattributes.alive
= (attributeBuffer.Load((index * 0x8 + 0x4) << 2));\n\n\r\n\t\tif (attributes.alive)\r\n\t\t{\r\n\t\t\tattributes.position
* NB_THREADS_PER_GROUP;\n\tuint index = id;\n\tif (id < nbMax)\n\t{\n\t\tAttributes
attributes = (Attributes)0;\n\t\tSourceAttributes sourceAttributes = (SourceAttributes)0;\n\t\t\n\t\tattributes.alive
= (attributeBuffer.Load((index * 0x8 + 0x4) << 2));\n\n\n\t\tif (attributes.alive)\n\t\t{\n\t\t\tattributes.position
= asfloat(attributeBuffer.Load3((index * 0x8 + 0x0) << 2));\nattributes.particleId
= (attributeBuffer.Load((index * 0x2 + 0x1F400) << 2));\nattributes.lifetime
= asfloat(attributeBuffer.Load((index * 0x2 + 0x1F401) << 2));\nattributes.seed

= (float)0;\nattributes.pivotY = (float)0;\nattributes.pivotZ = (float)0;\nattributes.scaleX
= asfloat(attributeBuffer.Load((index * 0x14 + 0x2710B) << 2));\nattributes.scaleY
= asfloat(attributeBuffer.Load((index * 0x14 + 0x2710F) << 2));\nattributes.scaleZ
= asfloat(attributeBuffer.Load((index * 0x14 + 0x27110) << 2));\n\n\r\n\t\t\tColorOverLife_733E3(attributes.age,
= asfloat(attributeBuffer.Load((index * 0x14 + 0x27110) << 2));\n\n\n\t\t\tColorOverLife_733E3(attributes.age,
attributes.lifetime, /*inout */attributes.color, /*inout */attributes.alpha,
gradient_a);\n\t\t\tOrient_189( /*inout */attributes.axisX, /*inout */attributes.axisY,
/*inout */attributes.axisZ, attributes.position);\n\t\t\t{\n\t\t\t SetAttribute_CEEAF4E1(

float tmp_bi = tmp_bg * (float)3;\n\t\t\t float tmp_bj = (float)2 + tmp_bi;\n\t\t\t
ScreenSpaceSize_18C(attributes.position, attributes.size, /*inout */attributes.scaleX,
/*inout */attributes.scaleY, /*inout */attributes.scaleZ, float2(1920, 1080),
tmp_bj);\n\t\t\t}\n\t\t\t\n\r\n\t\t\t\r\n\t\t\t\n\t\t\tfloat3 size3 = float3(attributes.size,attributes.size,attributes.size);\n\t\t\t#if
tmp_bj);\n\t\t\t}\n\t\t\t\n\n\t\t\t\n\t\t\t\n\t\t\tfloat3 size3 = float3(attributes.size,attributes.size,attributes.size);\n\t\t\t#if
VFX_USE_SCALEZ_CURRENT\n\t\t\tsize3.z *= attributes.scaleZ;\n\t\t\t#endif\n\t\t\t\r\n\t\t\tfloat4x4
elementToVFX = GetElementToVFXMatrix(\r\n\t\t\t\tattributes.axisX,\r\n\t\t\t\tattributes.axisY,\r\n\t\t\t\tattributes.axisZ,\r\n\t\t\t\tfloat3(attributes.angleX,attributes.angleY,attributes.angleZ),\r\n\t\t\t\tfloat3(attributes.pivotX,attributes.pivotY,attributes.pivotZ),\r\n\t\t\t\tsize3,\r\n\t\t\t\tattributes.position);\r\n\t\t\r\n\t\t\tUNITY_UNROLL\r\n\t\t\tfor
(int itIndexMatrixRow = 0; itIndexMatrixRow < 3; ++itIndexMatrixRow)\r\n\t\t\t{\r\n\t\t\t\tUNITY_UNROLL\r\n\t\t\t\tfor
(int itIndexMatrixCol = 0; itIndexMatrixCol < 4; ++itIndexMatrixCol)\r\n\t\t\t\t{\r\n\t\t\t\t\tuint
itIndexMatrix = itIndexMatrixCol * 4 + itIndexMatrixRow;\r\n\t\t\t\t\tfloat
value = elementToVFX[itIndexMatrixRow][itIndexMatrixCol];\r\n\t\t\t\t\telementToVFXBuffer.Store((index
* 16 + itIndexMatrix) << 2, asuint(value));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n
VFX_USE_SCALEZ_CURRENT\n\t\t\tsize3.z *= attributes.scaleZ;\n\t\t\t#endif\n\t\t\t\n\t\t\tfloat4x4
elementToVFX = GetElementToVFXMatrix(\n\t\t\t\tattributes.axisX,\n\t\t\t\tattributes.axisY,\n\t\t\t\tattributes.axisZ,\n\t\t\t\tfloat3(attributes.angleX,attributes.angleY,attributes.angleZ),\n\t\t\t\tfloat3(attributes.pivotX,attributes.pivotY,attributes.pivotZ),\n\t\t\t\tsize3,\n\t\t\t\tattributes.position);\n\t\t\n\t\t\tUNITY_UNROLL\n\t\t\tfor
(int itIndexMatrixRow = 0; itIndexMatrixRow < 3; ++itIndexMatrixRow)\n\t\t\t{\n\t\t\t\tUNITY_UNROLL\n\t\t\t\tfor
(int itIndexMatrixCol = 0; itIndexMatrixCol < 4; ++itIndexMatrixCol)\n\t\t\t\t{\n\t\t\t\t\tuint
itIndexMatrix = itIndexMatrixCol * 4 + itIndexMatrixRow;\n\t\t\t\t\tfloat value
= elementToVFX[itIndexMatrixRow][itIndexMatrixCol];\n\t\t\t\t\telementToVFXBuffer.Store((index
* 16 + itIndexMatrix) << 2, asuint(value));\n\t\t\t\t}\n\t\t\t}\n\n
: 0u);\r\n\t\t}\t\t\r\n\t}\r\n}\r\n"
: 0u);\n\t\t}\t\t\n\t}\n}\n"
m_Infos:
m_Expressions:
m_Expressions:

902
Assets/Samples/GrassWind/Environment_GrassWind.vfx
文件差异内容过多而无法显示
查看文件

277
Assets/Samples/GrassWind/Grass.vfx


m_ShaderSources:
- compute: 1
name: '[System 1]Initialize Particle'
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
1\n#define VFX_WORLD_SPACE 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\r\nCBUFFER_START(parameters)\n
1\n#define VFX_WORLD_SPACE 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\nCBUFFER_START(parameters)\n
samplerattributeMap_b;\nfloat4 attributeMap_b_TexelSize;\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<uint>
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<uint> eventList;\r\nByteAddressBuffer
inputAdditional;\r\n#endif\r\n\r\n#if HAS_STRIPS\r\nRWBuffer<uint> 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
samplerattributeMap_b;\nfloat4 attributeMap_b_TexelSize;\n\n\n\n#define USE_DEAD_LIST
(VFX_USE_ALIVE_CURRENT && !HAS_STRIPS)\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
USE_DEAD_LIST\nRWStructuredBuffer<uint> 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<uint>
eventList;\nByteAddressBuffer inputAdditional;\n#endif\n\n#if HAS_STRIPS\nRWBuffer<uint>
stripDataBuffer;\n#endif\n\n#include \"Packages/com.unity.visualeffectgraph/Shaders/Common/VFXCommonCompute.hlsl\"\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\n\nvoid
AttributeFromMap_6F6C3099(inout float3 position, uint particleId, VFXSampler2D
attributeMap, float3 valueBias, float3 valueScale) /*attribute:position Composition:Overwrite
SampleMode:Sequential channels:XYZ */\n{\n \n uint width, height;\n

float alpha, float Alpha) /*attribute:alpha Composition:Overwrite Source:Slot
Random:Off channels:XYZ */\n{\n alpha = Alpha;\n}\nvoid SetAttribute_CA100327(inout
float texIndex, inout uint seed, float A, float B) /*attribute:texIndex Composition:Overwrite
Source:Slot Random:Uniform channels:XYZ */\n{\n texIndex = lerp(A,B,RAND);\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
Source:Slot Random:Uniform channels:XYZ */\n{\n texIndex = lerp(A,B,RAND);\n}\n\n\n\n#if
HAS_STRIPS\nbool GetParticleIndex(inout uint particleIndex, uint stripIndex)\n{\n\tuint
relativeIndex;\n\tInterlockedAdd(STRIP_DATA(STRIP_NEXT_INDEX, stripIndex),
1, relativeIndex);\n\tif (relativeIndex >= PARTICLE_PER_STRIP_COUNT) // strip
is full\n\t{\n\t\tInterlockedAdd(STRIP_DATA(STRIP_NEXT_INDEX, stripIndex),
-1); // Remove previous increment\n\t\treturn false;\n\t}\n\n\tparticleIndex
+ 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
+ relativeIndex) % PARTICLE_PER_STRIP_COUNT);\n return true;\n}\n#endif\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 USE_DEAD_LIST\n maxThreadId
= min(maxThreadId, deadListCount.Load(0x0));\n#elif VFX_USE_SPAWNER_FROM_GPU\n
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\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
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\t\tuint particleIndex = id + currentSpawnIndex;\n\t\t\n#if
!VFX_USE_SPAWNER_FROM_GPU\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\n\t\tAttributes
attributes = (Attributes)0;\n\t\tSourceAttributes sourceAttributes = (SourceAttributes)0;\n\t\t\n
= (float)1;\n attributes.texIndex = (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_6F6C3099(
= (float)1;\n attributes.texIndex = (float)0;\n \n\n#if VFX_USE_PARTICLEID_CURRENT\n
attributes.particleId = particleIndex;\n#endif\n#if VFX_USE_SEED_CURRENT\n
attributes.seed = WangHash(particleIndex ^ systemSeed);\n#endif\n#if VFX_USE_SPAWNINDEX_CURRENT\n
attributes.spawnIndex = id;\n#endif\n#if HAS_STRIPS\n#if !VFX_USE_SPAWNER_FROM_GPU\n\t\t\n#else\n
uint stripIndex = sourceIndex;\n#endif\n\t\tstripIndex = min(stripIndex, STRIP_COUNT);\n\n
if (!GetParticleIndex(particleIndex, stripIndex))\n return;\n\n
const StripData stripData = GetStripDataFromStripIndex(stripIndex, PARTICLE_PER_STRIP_COUNT);\n\t\tInitStripAttributes(particleIndex,
attributes, stripData);\n\t\t// TODO Change seed to be sure we're deterministic
on random with strip\n#endif\n \n {\n AttributeFromMap_6F6C3099(
/*inout */attributes.position, attributes.particleId, GetVFXSampler(attributeMap_a,
samplerattributeMap_a), float3(0, 0.119999997, 0), float3(1, 1, -1));\n
}\n {\n AttributeFromMap_E1EAF699( /*inout */attributes.direction,

/*inout */attributes.velocity, float3(0, 0, 0));\n }\n {\n
SetAttribute_CEEAF35C( /*inout */attributes.alpha, (float)1);\n }\n
{\n SetAttribute_CA100327( /*inout */attributes.texIndex, /*inout
*/attributes.seed, (float)0, (float)4);\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.Store3((index * 0x4 + 0x0) << 2,asuint(attributes.position));\n
attributeBuffer.Store((index * 0x4 + 0x3) << 2,asuint(attributes.particleId));\n
attributeBuffer.Store3((index * 0x8 + 0x40000) << 2,asuint(attributes.targetPosition));\n
attributeBuffer.Store3((index * 0x8 + 0x40004) << 2,asuint(attributes.color));\n
attributeBuffer.Store3((index * 0x4 + 0xC0000) << 2,asuint(attributes.velocity));\n
attributeBuffer.Store((index * 0x4 + 0xC0003) << 2,asuint(attributes.alpha));\n
attributeBuffer.Store((index * 0x8 + 0x40003) << 2,asuint(attributes.texIndex));\n
\n\r\n }\r\n }\r\n}\r\n"
*/attributes.seed, (float)0, (float)4);\n }\n \n\n\t\t\n#if VFX_USE_ALIVE_CURRENT\n
if (attributes.alive)\n#endif \n {\n#if USE_DEAD_LIST\n\t
uint deadIndex = deadListIn.DecrementCounter();\n uint index = deadListIn[deadIndex];\n#else\n
uint index = particleIndex;\n#endif\n attributeBuffer.Store3((index
* 0x4 + 0x0) << 2,asuint(attributes.position));\n attributeBuffer.Store((index
* 0x4 + 0x3) << 2,asuint(attributes.particleId));\n attributeBuffer.Store3((index
* 0x8 + 0x40000) << 2,asuint(attributes.targetPosition));\n attributeBuffer.Store3((index
* 0x8 + 0x40004) << 2,asuint(attributes.color));\n attributeBuffer.Store3((index
* 0x4 + 0xC0000) << 2,asuint(attributes.velocity));\n attributeBuffer.Store((index
* 0x4 + 0xC0003) << 2,asuint(attributes.alpha));\n attributeBuffer.Store((index
* 0x8 + 0x40003) << 2,asuint(attributes.texIndex));\n \n\n
}\n }\n}\n"
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
VFX_WORLD_SPACE 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\r\nCBUFFER_START(parameters)\n
VFX_WORLD_SPACE 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\nCBUFFER_START(parameters)\n
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<uint>
deadListOut;\r\n#endif\r\n\r\n#if VFX_HAS_INDIRECT_DRAW\r\nRWStructuredBuffer<uint>
indirectBuffer;\r\n#endif\r\n\r\n#if HAS_STRIPS\r\nRWBuffer<uint> stripDataBuffer;\r\n#endif\r\n\r\n#if
VFX_USE_STRIPALIVE_CURRENT\r\nBuffer<uint> 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
SourceAttributes\n{\n};\n\n\n\n\n#define USE_DEAD_LIST (VFX_USE_ALIVE_CURRENT
&& !HAS_STRIPS)\n\nRWByteAddressBuffer attributeBuffer;\n\n#if USE_DEAD_LIST\nRWStructuredBuffer<uint>
deadListOut;\n#endif\n\n#if VFX_HAS_INDIRECT_DRAW\nRWStructuredBuffer<uint>
indirectBuffer;\n#endif\n\n#if HAS_STRIPS\nRWBuffer<uint> stripDataBuffer;\n#endif\n\n#if
VFX_USE_STRIPALIVE_CURRENT\nBuffer<uint> attachedStripDataBuffer;\n#endif\n\nCBUFFER_START(updateParams)\n
uint nbMax;\n\tuint dispatchWidth;\n\tuint systemSeed;\nCBUFFER_END\n\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\r\n\r\nvoid
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\n\nvoid
Source:Slot Random:Off channels:XYZ */\n{\n velocity = Velocity;\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\t\r\n\t\tif
(attributes.alive)\r\n\t\t{\r\n\t\t\tattributes.position = asfloat(attributeBuffer.Load3((index
Source:Slot Random:Off channels:XYZ */\n{\n velocity = Velocity;\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 Attributes attributes = (Attributes)0;\n\t\tSourceAttributes
sourceAttributes = (SourceAttributes)0;\n\n#if VFX_USE_ALIVE_CURRENT\n\t\t\n\t\tif
(attributes.alive)\n\t\t{\n\t\t\tattributes.position = asfloat(attributeBuffer.Load3((index
* 0x4 + 0xC0003) << 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_bf = attributes.position
* 0x4 + 0xC0003) << 2));\n\t\t\t\n\n\n// Initialize built-in needed attributes\n#if
VFX_USE_OLDPOSITION_CURRENT\n\t\t\tattributes.oldPosition = attributes.position;\n#endif\n#if
HAS_STRIPS\n const StripData stripData = GetStripDataFromParticleIndex(index,
PARTICLE_PER_STRIP_COUNT);\n InitStripAttributes(index, attributes,
stripData);\n#endif\n\t\t\t\n\t\t\t{\n\t\t\t float3 tmp_bf = attributes.position
- uniform_e;\n\t\t\t float3 tmp_bg = tmp_bf * tmp_bf;\n\t\t\t float tmp_bh
= tmp_bg[2];\n\t\t\t float tmp_bi = tmp_bg[1];\n\t\t\t float tmp_bj =
tmp_bh + tmp_bi;\n\t\t\t float tmp_bk = tmp_bg[0];\n\t\t\t float tmp_bl

float3 tmp_bh = float3(tmp_bg, tmp_bg, tmp_bg);\n\t\t\t float3 tmp_bj =
float3(0, 0, 0) - attributes.velocity;\n\t\t\t float3 tmp_bk = tmp_bh *
tmp_bj;\n\t\t\t float3 tmp_bl = attributes.velocity + tmp_bk;\n\t\t\t
SetAttribute_E629755( /*inout */attributes.velocity, tmp_bl);\n\t\t\t}\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 * 0x4
+ 0xC0000) << 2,asuint(attributes.velocity));\n\t\t\t\tattributeBuffer.Store((index
* 0x4 + 0xC0003) << 2,asuint(attributes.alpha));\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\t\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,
SetAttribute_E629755( /*inout */attributes.velocity, tmp_bl);\n\t\t\t}\n\t\t\t\n\n\n\t\t\tif
(attributes.alive)\n\t\t\t{\n\t\t\t\tattributeBuffer.Store3((index * 0x4 +
0xC0000) << 2,asuint(attributes.velocity));\n\t\t\t\tattributeBuffer.Store((index
* 0x4 + 0xC0003) << 2,asuint(attributes.alpha));\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\n#if HAS_STRIPS\t\t\t\n\t\t\t\tuint relativeIndexInStrip
= GetRelativeIndex(index, stripData);\n\t\t\t\tInterlockedMin(STRIP_DATA(STRIP_MIN_ALIVE,
stripData.stripIndex), relativeIndexInStrip);\n\t\t\t\tInterlockedMax(STRIP_DATA(STRIP_MAX_ALIVE,
stripData.stripIndex), relativeIndexInStrip);\n#endif\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t\n#if
USE_DEAD_LIST && !VFX_USE_STRIPALIVE_CURRENT\n\t\t\t\tuint deadIndex = deadListOut.IncrementCounter();\n\t\t\t\tdeadListOut[deadIndex]
= index;\n#endif\n\t\t\t}\n\t\t}\n#if USE_DEAD_LIST && VFX_USE_STRIPALIVE_CURRENT\n
else if (attributes.stripAlive)\n {\n if (STRIP_DATA_X(attachedStripDataBuffer,
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.position
= asfloat(attributeBuffer.Load3((index * 0x4 + 0x0) << 2));\n\t\tattributes.particleId
= (attributeBuffer.Load((index * 0x4 + 0x3) << 2));\n\t\tattributes.velocity
= asfloat(attributeBuffer.Load3((index * 0x4 + 0xC0000) << 2));\n\t\tattributes.alpha
= asfloat(attributeBuffer.Load((index * 0x4 + 0xC0003) << 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_bf = attributes.position
- uniform_e;\n\t\t float3 tmp_bg = tmp_bf * tmp_bf;\n\t\t float tmp_bh
= tmp_bg[2];\n\t\t float tmp_bi = tmp_bg[1];\n\t\t float tmp_bj = tmp_bh
+ tmp_bi;\n\t\t float tmp_bk = tmp_bg[0];\n\t\t float tmp_bl = tmp_bj
+ tmp_bk;\n\t\t float tmp_bn = pow(tmp_bl, (float)0.5);\n\t\t uint tmp_bp
= attributes.particleId ^ asuint(uniform_f);\n\t\t float tmp_bq = FixedRand(tmp_bp);\n\t\t
float tmp_bs = tmp_bq * (float)0.200000048;\n\t\t float tmp_bt = (float)0.899999976
+ tmp_bs;\n\t\t float tmp_bu = tmp_bn * tmp_bt;\n\t\t float tmp_bv =
SampleCurve(uniform_d,tmp_bu);\n\t\t float tmp_bw = tmp_bv * uniform_g;\n\t\t
float tmp_bx = uniform_b + tmp_bw;\n\t\t float tmp_by = tmp_bx - uniform_b;\n\t\t
float tmp_bz = uniform_c * tmp_by;\n\t\t float tmp_ca = uniform_b + tmp_bz;\n\t\t
float tmp_cb = tmp_ca * uniform_h;\n\t\t float tmp_cc = tmp_cb + attributes.alpha;\n\t\t
float tmp_ce = max(tmp_cc, (float)-2);\n\t\t float tmp_cg = min(tmp_ce,
(float)1);\n\t\t SetAttribute_CEEAF35C( /*inout */attributes.alpha, tmp_cg);\n\t\t}\n\t\t{\n\t\t
float tmp_bg = saturate(attributes.alpha);\n\t\t float tmp_bh = (float)1
- tmp_bg;\n\t\t float3 tmp_bi = float3(tmp_bh, tmp_bh, tmp_bh);\n\t\t
float3 tmp_bj = tmp_bi * uniform_i;\n\t\t float3 tmp_bk = attributes.position
- uniform_e;\n\t\t float3 tmp_bl = tmp_bk * tmp_bk;\n\t\t float tmp_bm
= tmp_bl[2];\n\t\t float tmp_bn = tmp_bl[1];\n\t\t float tmp_bo = tmp_bm
+ tmp_bn;\n\t\t float tmp_bp = tmp_bl[0];\n\t\t float tmp_bq = tmp_bo
+ tmp_bp;\n\t\t float tmp_bs = pow(tmp_bq, (float)0.5);\n\t\t uint tmp_bu
= attributes.particleId ^ asuint(uniform_f);\n\t\t float tmp_bv = FixedRand(tmp_bu);\n\t\t
float tmp_bx = tmp_bv * (float)0.200000048;\n\t\t float tmp_by = (float)0.899999976
the particle \n {\n uint deadIndex = deadListOut.IncrementCounter();\n\t\t\t\tdeadListOut[deadIndex]
= index;\n attributes.stripAlive = false;\n \n
} \n }\n#endif\n#else\n\t\tattributes.position = asfloat(attributeBuffer.Load3((index
* 0x4 + 0x0) << 2));\n\t\tattributes.particleId = (attributeBuffer.Load((index
* 0x4 + 0x3) << 2));\n\t\tattributes.velocity = asfloat(attributeBuffer.Load3((index
* 0x4 + 0xC0000) << 2));\n\t\tattributes.alpha = asfloat(attributeBuffer.Load((index
* 0x4 + 0xC0003) << 2));\n\t\t\n\n\t\t\n#if VFX_USE_OLDPOSITION_CURRENT\n\t\tattributes.oldPosition
= attributes.position;\n#endif\n#if HAS_STRIPS\n const StripData stripData
= GetStripDataFromParticleIndex(index, PARTICLE_PER_STRIP_COUNT);\n
InitStripAttributes(index, attributes, stripData);\n#endif\n\t\t\n\t\t{\n\t\t
float3 tmp_bf = attributes.position - uniform_e;\n\t\t float3 tmp_bg = tmp_bf
* tmp_bf;\n\t\t float tmp_bh = tmp_bg[2];\n\t\t float tmp_bi = tmp_bg[1];\n\t\t
float tmp_bj = tmp_bh + tmp_bi;\n\t\t float tmp_bk = tmp_bg[0];\n\t\t
float tmp_bl = tmp_bj + tmp_bk;\n\t\t float tmp_bn = pow(tmp_bl, (float)0.5);\n\t\t
uint tmp_bp = attributes.particleId ^ asuint(uniform_f);\n\t\t float tmp_bq
= FixedRand(tmp_bp);\n\t\t float tmp_bs = tmp_bq * (float)0.200000048;\n\t\t
float tmp_bt = (float)0.899999976 + tmp_bs;\n\t\t float tmp_bu = tmp_bn
* tmp_bt;\n\t\t float tmp_bv = SampleCurve(uniform_d,tmp_bu);\n\t\t float
tmp_bw = tmp_bv * uniform_g;\n\t\t float tmp_bx = uniform_b + tmp_bw;\n\t\t
float tmp_by = tmp_bx - uniform_b;\n\t\t float tmp_bz = uniform_c * tmp_by;\n\t\t
float tmp_ca = uniform_b + tmp_bz;\n\t\t float tmp_cb = tmp_ca * uniform_h;\n\t\t
float tmp_cc = tmp_cb + attributes.alpha;\n\t\t float tmp_ce = max(tmp_cc,
(float)-2);\n\t\t float tmp_cg = min(tmp_ce, (float)1);\n\t\t SetAttribute_CEEAF35C(
/*inout */attributes.alpha, tmp_cg);\n\t\t}\n\t\t{\n\t\t float tmp_bg =
saturate(attributes.alpha);\n\t\t float tmp_bh = (float)1 - tmp_bg;\n\t\t
float3 tmp_bi = float3(tmp_bh, tmp_bh, tmp_bh);\n\t\t float3 tmp_bj = tmp_bi
* uniform_i;\n\t\t float3 tmp_bk = attributes.position - uniform_e;\n\t\t
float3 tmp_bl = tmp_bk * tmp_bk;\n\t\t float tmp_bm = tmp_bl[2];\n\t\t
float tmp_bn = tmp_bl[1];\n\t\t float tmp_bo = tmp_bm + tmp_bn;\n\t\t
float tmp_bp = tmp_bl[0];\n\t\t float tmp_bq = tmp_bo + tmp_bp;\n\t\t
float tmp_bs = pow(tmp_bq, (float)0.5);\n\t\t uint tmp_bu = attributes.particleId
^ asuint(uniform_f);\n\t\t float tmp_bv = FixedRand(tmp_bu);\n\t\t float
tmp_bx = tmp_bv * (float)0.200000048;\n\t\t float tmp_by = (float)0.899999976
+ tmp_bx;\n\t\t float tmp_bz = tmp_bs * tmp_by;\n\t\t float tmp_ca =
SampleCurve(uniform_d,tmp_bz);\n\t\t float3 tmp_cb = float3(tmp_ca, tmp_ca,
tmp_ca);\n\t\t float3 tmp_cc = tmp_bj * tmp_cb;\n\t\t SetAttribute_AA7D638(

0, 0) - attributes.velocity;\n\t\t float3 tmp_bk = tmp_bh * tmp_bj;\n\t\t
float3 tmp_bl = attributes.velocity + tmp_bk;\n\t\t SetAttribute_E629755(
/*inout */attributes.velocity, tmp_bl);\n\t\t}\n\t\t\n\r\n\t\tattributeBuffer.Store3((index
/*inout */attributes.velocity, tmp_bl);\n\t\t}\n\t\t\n\n\t\tattributeBuffer.Store3((index
* 0x4 + 0xC0003) << 2,asuint(attributes.alpha));\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"
* 0x4 + 0xC0003) << 2,asuint(attributes.alpha));\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"
source: "Shader \"Hidden/VFX/Grass/System 1/Output Particle Lit Quad\"\n{\r\n\tSubShader\r\n\t{\t\r\n\t\tCull
Off\r\n\t\t\r\n\t\tTags { \"Queue\"=\"Geometry+450\" \"IgnoreProjector\"=\"False\"
source: "Shader \"Hidden/VFX/Grass/System 1/Output Particle Lit Quad\"\n{\n\tSubShader\n\t{\t\n\t\tCull
Off\n\t\t\n\t\tTags { \"Queue\"=\"Geometry+450\" \"IgnoreProjector\"=\"False\"
\"RenderType\"=\"Opaque\" }\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\t\n\t\t\n\t\t\n\t\t\n\t\tZTest
LEqual\n\t\tZWrite On\n\t\tCull Off\n\t\t\n\t\n\t\t\t\n\t\tHLSLINCLUDE\n\t\t\n\t\t#define
NB_THREADS_PER_GROUP 64\n\t\t#define HAS_ATTRIBUTES 1\n\t\t#define VFX_PASSDEPTH_ACTUAL

to always use a valid instanceID\n\t\t#if defined(UNITY_STEREO_INSTANCING_ENABLED)\n\t\t\t#define
VFX_DECLARE_INSTANCE_ID UNITY_VERTEX_INPUT_INSTANCE_ID\n\t\t\t#define VFX_GET_INSTANCE_ID(i)
unity_InstanceID\n\t\t#else\n\t\t\t#define VFX_DECLARE_INSTANCE_ID uint
instanceID : SV_InstanceID;\n\t\t\t#define VFX_GET_INSTANCE_ID(i) i.instanceID\n\t\t#endif\n\t\t\n\t\tENDHLSL\n\t\t\n\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
instanceID : SV_InstanceID;\n\t\t\t#define VFX_GET_INSTANCE_ID(i) i.instanceID\n\t\t#endif\n\t\t\n\t\tENDHLSL\n\t\t\n\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"SceneSelectionPass\" }\n\t\t\n\t\t\tZWrite On\n\t\t\tBlend
Off\n\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#define VFX_PASSDEPTH VFX_PASSDEPTH_SELECTION\n\t\t\t#pragma
target 4.5\n\t\t\t#define UNITY_MATERIAL_LIT\n\t\t\t#pragma multi_compile _

for scene selection in the editor, this code allow to output the outline correctly\n\t\t\t\t\toutColor
= float4(_ObjectId, _PassValue, 1.0, 1.0);\n\t\t\t\t#elif VFX_PASSDEPTH ==
VFX_PASSDEPTH_ACTUAL\n\t\t\t\t\t//void\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH
undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"DepthOnly\" }\n\t\t\n\t\t\tZWrite On\n\t\t\tBlend Off\n\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#define
VFX_PASSDEPTH VFX_PASSDEPTH_ACTUAL\n\t\t\t#pragma target 4.5\n\t\t\t#define
UNITY_MATERIAL_LIT\n\t\t\t#pragma multi_compile _ WRITE_NORMAL_BUFFER\n\t\t\t\n\t\t\t#define

for scene selection in the editor, this code allow to output the outline correctly\n\t\t\t\t\toutColor
= float4(_ObjectId, _PassValue, 1.0, 1.0);\n\t\t\t\t#elif VFX_PASSDEPTH ==
VFX_PASSDEPTH_ACTUAL\n\t\t\t\t\t//void\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH
undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\t\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\t\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"GBuffer\" }\n\t\t\t\n\t\t\tStencil\n\t\t\t{\n\t\t\t\tWriteMask
7\n\t\t\t\tRef 2\n\t\t\t\tComp Always\n\t\t\t\tPass Replace\n\t\t\t}\t\n\t\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#pragma
target 4.5\n\t\t\t\n\t\t\t#pragma multi_compile _ LIGHT_LAYERS\n\t\t\t#pragma

\n\t\t VFXSetupBuiltin(builtin,surface,builtin.emissiveColor, i);\n\t\t
ENCODE_INTO_GBUFFER(surface, builtin, i.VFX_VARYING_POSCS.xy, outGBuffer);\n\t\t
#else\n\t\t VFXComputePixelOutputToGBuffer(i,normalWS,uvData,outGBuffer);\n\t\t
#endif\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\t// Forward pass\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
#endif\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\t// Forward pass\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"Forward\"}\n\t\t\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#pragma
target 4.5\n\t\t\t\n\t\t\t#define UNITY_MATERIAL_LIT\n\t\t\t#define LIGHTLOOP_TILE_PASS\n\t\t\t#define
_ENABLE_FOG_ON_TRANSPARENT\n\t\t\t#define _DISABLE_DECALS\n\t\t\t\n\n\t\t\t#pragma

encodedMotionVector = 0.0f;\n\t\t\t\t\t\tVFXEncodeMotionVector(velocity * 0.5f,
encodedMotionVector);\n\t\t\t\t\t\t\n\t\t\t\toutMotionVector = encodedMotionVector;\n\t\t\t\toutMotionVector.a
= outColor.a < i.VFX_VARYING_ALPHATHRESHOLD ? 0.0f : 1.0f; //Independant clipping
for motion vector pass\n\t\t#endif\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
for motion vector pass\n\t\t#endif\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"ShadowCaster\" }\n\t\t\n\t\t\tZWrite On\n\t\t\tBlend Off\n\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#pragma
target 4.5\n\t\t\t#if !USE_ALPHA_TEST && IS_TRANSPARENT_PARTICLE\n\t\t\t#define
USE_ALPHA_TEST 1\n\t\t\t#endif\n\t\t\t\n\t\t\tstruct ps_input\n\t\t\t{\n\t\t\t\tfloat4

VFX_SHADERGRAPH\n\t\t\t\n\t\t\t\t\n\t\t\n\t\t\t\t\n\t\t\n\t\t\t\tfloat alpha
= OUTSG.;\n\t\t\t#else\n\t\t\t\tfloat alpha = VFXGetFragmentColor(i).a;\n\t\t\t\t#if
HDRP_USE_BASE_COLOR_MAP_ALPHA\n\t\t\t\t\t\talpha *= VFXGetTextureColor(VFX_SAMPLER(baseColorMap),i).a;\t\n\t\t\t\t#endif\n\t\t\t#endif\n\t\t\t\tVFXClipFragmentColor(alpha,i);\n\t\t\n\t\t\t\treturn
0;\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t}\r\n}\r\n"
0;\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t}\n}\n"
m_Infos:
m_Expressions:
m_Expressions:

166
Assets/Samples/MorphingFace/MorphingFace.vfx


m_ShaderSources:
- compute: 1
name: '[System 1]Initialize Particle'
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
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
VFX_LOCAL_SPACE 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\nCBUFFER_START(parameters)\n
attributeMap_b_TexelSize;\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<uint> 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<uint>
eventList;\r\nByteAddressBuffer inputAdditional;\r\n#endif\r\n\r\n#if HAS_STRIPS\r\nRWBuffer<uint>
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
attributeMap_b_TexelSize;\n\n\n\n#define USE_DEAD_LIST (VFX_USE_ALIVE_CURRENT
&& !HAS_STRIPS)\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
USE_DEAD_LIST\nRWStructuredBuffer<uint> 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<uint>
eventList;\nByteAddressBuffer inputAdditional;\n#endif\n\n#if HAS_STRIPS\nRWBuffer<uint>
stripDataBuffer;\n#endif\n\n#include \"Packages/com.unity.visualeffectgraph/Shaders/Common/VFXCommonCompute.hlsl\"\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\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

uint Seed) /*attribute:scale Composition:Overwrite AlphaComposition:Overwrite
SampleMode:RandomConstantPerParticle Mode:PerComponent ColorMode:ColorAndAlpha
channels:Y */\n{\n float t = FIXED_RAND(Seed);\n float value = 0.0f;\n
value = SampleCurve(Scale, t);\n scaleY = value.x;\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
value = SampleCurve(Scale, t);\n scaleY = value.x;\n}\n\n\n\n#if HAS_STRIPS\nbool
GetParticleIndex(inout uint particleIndex, uint stripIndex)\n{\n\tuint relativeIndex;\n\tInterlockedAdd(STRIP_DATA(STRIP_NEXT_INDEX,
stripIndex), 1, relativeIndex);\n\tif (relativeIndex >= PARTICLE_PER_STRIP_COUNT)
// strip is full\n\t{\n\t\tInterlockedAdd(STRIP_DATA(STRIP_NEXT_INDEX, stripIndex),
-1); // Remove previous increment\n\t\treturn false;\n\t}\n\n\tparticleIndex
+ 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
+ relativeIndex) % PARTICLE_PER_STRIP_COUNT);\n return true;\n}\n#endif\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 USE_DEAD_LIST\n maxThreadId
= min(maxThreadId, deadListCount.Load(0x0));\n#elif VFX_USE_SPAWNER_FROM_GPU\n
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\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
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\t\tuint particleIndex = id + currentSpawnIndex;\n\t\t\n#if
!VFX_USE_SPAWNER_FROM_GPU\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\n\t\tAttributes
attributes = (Attributes)0;\n\t\tSourceAttributes sourceAttributes = (SourceAttributes)0;\n\t\t\n
attributes.scaleZ = (float)1;\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(
attributes.scaleZ = (float)1;\n \n\n#if VFX_USE_PARTICLEID_CURRENT\n
attributes.particleId = particleIndex;\n#endif\n#if VFX_USE_SEED_CURRENT\n
attributes.seed = WangHash(particleIndex ^ systemSeed);\n#endif\n#if VFX_USE_SPAWNINDEX_CURRENT\n
attributes.spawnIndex = id;\n#endif\n#if HAS_STRIPS\n#if !VFX_USE_SPAWNER_FROM_GPU\n\t\t\n#else\n
uint stripIndex = sourceIndex;\n#endif\n\t\tstripIndex = min(stripIndex, STRIP_COUNT);\n\n
if (!GetParticleIndex(particleIndex, stripIndex))\n return;\n\n
const StripData stripData = GetStripDataFromStripIndex(stripIndex, PARTICLE_PER_STRIP_COUNT);\n\t\tInitStripAttributes(particleIndex,
attributes, stripData);\n\t\t// TODO Change seed to be sure we're deterministic
on random with strip\n#endif\n \n {\n AttributeFromMap_6F6C36D5(
/*inout */attributes.position, attributes.particleId, GetVFXSampler(attributeMap_a,
samplerattributeMap_a), (uint)0, float3(-0.5, 0, -3.20000005), float3(1, 1,
1));\n }\n {\n AttributeFromMap_9AACC55( /*inout */attributes.color,

(float)-45, (float)45);\n }\n {\n SetAttribute_48A7C211(
/*inout */attributes.angleZ, /*inout */attributes.seed, (float)-45, (float)45);\n
}\n {\n AttributeFromCurve_5E96E8EC( /*inout */attributes.scaleY,
attributes.particleId, Scale_e, (uint)0);\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
attributes.particleId, Scale_e, (uint)0);\n }\n \n\n\t\t\n#if
VFX_USE_ALIVE_CURRENT\n if (attributes.alive)\n#endif \n
{\n#if USE_DEAD_LIST\n\t uint deadIndex = deadListIn.DecrementCounter();\n
uint index = deadListIn[deadIndex];\n#else\n uint index = particleIndex;\n#endif\n
attributeBuffer.Store3((index * 0x4 + 0x0) << 2,asuint(attributes.position));\n
attributeBuffer.Store3((index * 0x8 + 0x9D00) << 2,asuint(attributes.color));\n
attributeBuffer.Store((index * 0x8 + 0x9D03) << 2,asuint(attributes.angleX));\n

attributeBuffer.Store((index * 0x8 + 0x9D07) << 2,asuint(attributes.scaleZ));\n
\n\r\n }\r\n }\r\n}\r\n"
\n\n }\n }\n}\n"
source: "Shader \"Hidden/VFX/MorphingFace/System 1/Output Particle Lit Cube\"\n{\r\n\tSubShader\r\n\t{\t\r\n\t\tCull
Back\r\n\t\t\r\n\t\tTags { \"Queue\"=\"Geometry+0\" \"IgnoreProjector\"=\"False\"
source: "Shader \"Hidden/VFX/MorphingFace/System 1/Output Particle Lit Cube\"\n{\n\tSubShader\n\t{\t\n\t\tCull
Back\n\t\t\n\t\tTags { \"Queue\"=\"Geometry+0\" \"IgnoreProjector\"=\"False\"
\"RenderType\"=\"Opaque\" }\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\t\n\t\t\n\t\t\n\t\t\n\t\tZTest
LEqual\n\t\tZWrite On\n\t\tCull Off\n\t\t\n\t\n\t\t\t\n\t\tHLSLINCLUDE\n\t\t\n\t\t#define
NB_THREADS_PER_GROUP 64\n\t\t#define HAS_ATTRIBUTES 1\n\t\t#define VFX_PASSDEPTH_ACTUAL

to always use a valid instanceID\n\t\t#if defined(UNITY_STEREO_INSTANCING_ENABLED)\n\t\t\t#define
VFX_DECLARE_INSTANCE_ID UNITY_VERTEX_INPUT_INSTANCE_ID\n\t\t\t#define VFX_GET_INSTANCE_ID(i)
unity_InstanceID\n\t\t#else\n\t\t\t#define VFX_DECLARE_INSTANCE_ID uint
instanceID : SV_InstanceID;\n\t\t\t#define VFX_GET_INSTANCE_ID(i) i.instanceID\n\t\t#endif\n\t\t\n\t\tENDHLSL\n\t\t\n\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
instanceID : SV_InstanceID;\n\t\t\t#define VFX_GET_INSTANCE_ID(i) i.instanceID\n\t\t#endif\n\t\t\n\t\tENDHLSL\n\t\t\n\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"SceneSelectionPass\" }\n\t\t\n\t\t\tZWrite On\n\t\t\tBlend
Off\n\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#define VFX_PASSDEPTH VFX_PASSDEPTH_SELECTION\n\t\t\t#pragma
target 4.5\n\t\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

0.5f, encodedMotionVector);\n\t\t\t\t\t\t\t\n\t\t\t\t\treturn encodedMotionVector;\n\t\t\t\t#elif
VFX_PASSDEPTH == VFX_PASSDEPTH_SELECTION\n\t\t\t\t\treturn float4(_ObjectId,
_PassValue, 1.0, 1.0);\n\t\t\t\t#elif VFX_PASSDEPTH == VFX_PASSDEPTH_ACTUAL\n\t\t\t\t\treturn
(float4)0;\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\t//
(float4)0;\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\t//
Depth pass\n\t\tPass\n\t\t{\t\t\n\t\t\tTags { \"LightMode\"=\"DepthForwardOnly\"
}\n\t\t\n\t\t\tZWrite On\n\t\t\tBlend Off\n\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#define
VFX_PASSDEPTH VFX_PASSDEPTH_ACTUAL\n\t\t\t#pragma target 4.5\n\t\t\t\n\t\t\tstruct

0.5f, encodedMotionVector);\n\t\t\t\t\t\t\t\n\t\t\t\t\treturn encodedMotionVector;\n\t\t\t\t#elif
VFX_PASSDEPTH == VFX_PASSDEPTH_SELECTION\n\t\t\t\t\treturn float4(_ObjectId,
_PassValue, 1.0, 1.0);\n\t\t\t\t#elif VFX_PASSDEPTH == VFX_PASSDEPTH_ACTUAL\n\t\t\t\t\treturn
(float4)0;\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
(float4)0;\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"MotionVectors\" }\n\t\t\t\n\t\t\tStencil\n\t\t\t{\n\t\t\t
WriteMask 176\n\t\t\t Ref 160\n\t\t\t Comp Always\n\t\t\t Pass Replace\n\t\t\t}\n\n\t\t\n\t\t\tZWrite
On\n\t\t\tBlend Off\n\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#define VFX_PASSDEPTH

0.5f, encodedMotionVector);\n\t\t\t\t\t\t\t\n\t\t\t\t\treturn encodedMotionVector;\n\t\t\t\t#elif
VFX_PASSDEPTH == VFX_PASSDEPTH_SELECTION\n\t\t\t\t\treturn float4(_ObjectId,
_PassValue, 1.0, 1.0);\n\t\t\t\t#elif VFX_PASSDEPTH == VFX_PASSDEPTH_ACTUAL\n\t\t\t\t\treturn
(float4)0;\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\t//
(float4)0;\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\t//
Forward pass\n\t\tPass\n\t\t{\t\t\n\t\t\tTags { \"LightMode\"=\"GBuffer\" }\n\t\t\t\n\t\t\tStencil\n\t\t\t{\n\t\t\t\tWriteMask
7\n\t\t\t\tRef 2\n\t\t\t\tComp Always\n\t\t\t\tPass Replace\n\t\t\t}\t\n\t\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#pragma
target 4.5\n\t\t\t\n\t\t\t#pragma multi_compile _ LIGHT_LAYERS\n\t\t\t#pragma

n = SampleNormalMap(VFX_SAMPLER(normalMap),uvData);\n\t\t\t\tnormalWS = VFXCubeTransformNormalTS(i,n,frontFace);\n\t\t\t\tnormalWS
= lerp(VFXCubeGetLocalNormal(i) * faceMul,normalWS,i.materialProperties.z);\n\t\t\t\t#else\n\t\t\t\tnormalWS
= VFXCubeGetLocalNormal(i) * faceMul;\n\t\t\t\t#endif\n\t\t\t\tnormalWS = VFXCubeTransformNormalWS(i,normalWS);\n\t\t\t\tnormalWS
= normalize(normalWS);\n\t\t\n\t\t\t\tVFXComputePixelOutputToGBuffer(i,normalWS,uvData,outGBuffer);\n\t\t\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\t//
= normalize(normalWS);\n\t\t\n\t\t\t\tVFXComputePixelOutputToGBuffer(i,normalWS,uvData,outGBuffer);\n\t\t\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\t//
Shadow pass\n\t\tPass\n\t\t{\t\t\n\t\t\tTags { \"LightMode\"=\"ShadowCaster\"
}\n\t\t\n\t\t\tZWrite On\n\t\t\tBlend Off\n\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#if
!USE_ALPHA_TEST && IS_TRANSPARENT_PARTICLE\n\t\t\t#define USE_ALPHA_TEST 1\n\t\t\t#endif\n\t\t\t#pragma

fragment frag\n\t\t\tfloat frag(ps_input i) : SV_Target0\n\t\t\t{\n\t\t\t\tUNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i);\n\t\t\t\tVFXTransformPSInputs(i);\n\t\t\t\tfloat
alpha = VFXGetFragmentColor(i).a;\n\t\t#if HDRP_USE_BASE_COLOR_MAP_ALPHA\n\t\t\t\talpha
*= VFXGetTextureColorWithProceduralUV(VFX_SAMPLER(baseColorMap),i,VFXCubeGetUV(i)).a;\n\t\t#endif\n\t\t\t\tVFXClipFragmentColor(alpha,i);\n\t\t\t\treturn
0;\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t}\r\n}\r\n"
0;\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t}\n}\n"
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\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_COLOR_CURRENT
1\n#define VFX_USE_ANGLEX_CURRENT 1\n#define VFX_USE_ANGLEZ_CURRENT 1\n#define

1\n#define VFX_USE_PIVOTY_CURRENT 1\n#define VFX_USE_PIVOTZ_CURRENT 1\n#define
VFX_USE_SIZE_CURRENT 1\n#define VFX_USE_SCALEX_CURRENT 1\n#define VFX_USE_SCALEZ_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
1\n#define VFX_LOCAL_SPACE 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\nCBUFFER_START(parameters)\n
float scaleZ;\n};\n\nstruct SourceAttributes\n{\n};\n\n\n\r\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXCommon.hlsl\"\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\r\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\r\n\r\nByteAddressBuffer
attributeBuffer;\r\nRWByteAddressBuffer elementToVFXBuffer;\r\n#if VFX_USE_ALIVE_CURRENT\r\nStructuredBuffer<uint>
deadListOut;\r\n#endif\r\n\r\n#if VFX_HAS_INDIRECT_DRAW\r\nStructuredBuffer<uint>
indirectBuffer;\r\n#endif\r\n\r\nCBUFFER_START(updateParams)\r\n\tuint nbMax;\r\n\tuint
dispatchWidth;\r\n\tuint systemSeed;\r\nCBUFFER_END\r\n\r\nvoid SetAttribute_D5151640(inout
float scaleZ;\n};\n\nstruct SourceAttributes\n{\n};\n\n\n\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXCommon.hlsl\"\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nByteAddressBuffer
attributeBuffer;\nRWByteAddressBuffer elementToVFXBuffer;\n#if VFX_USE_ALIVE_CURRENT\nStructuredBuffer<uint>
deadListOut;\n#endif\n\n#if VFX_HAS_INDIRECT_DRAW\nStructuredBuffer<uint> indirectBuffer;\n#endif\n\nCBUFFER_START(updateParams)\n\tuint
nbMax;\n\tuint dispatchWidth;\n\tuint systemSeed;\nCBUFFER_END\n\nvoid SetAttribute_D5151640(inout
float scaleX, inout float scaleZ, float2 Scale) /*attribute:scale Composition:Overwrite
Source:Slot Random:Off channels:XZ */\n{\n scaleX = Scale.x;\n scaleZ
= Scale.y;\n}\nvoid SetAttribute_545F0ED(inout float3 color, float3 Color)

SetAttribute_E0455985(inout float scaleX, inout float scaleY, inout float scaleZ,
float3 Scale, float Blend) /*attribute:scale Composition:Blend Source:Slot
Random:Off channels:XYZ */\n{\n scaleX = lerp(scaleX,Scale.x,Blend);\n
scaleY = lerp(scaleY,Scale.y,Blend);\n scaleZ = lerp(scaleZ,Scale.z,Blend);\n}\n\n\r\n\r\n[numthreads(NB_THREADS_PER_GROUP,1,1)]\r\nvoid
CSMain(uint3 groupId\t\t: SV_GroupID,\r\n\t\t\tuint3 groupThreadId\t: SV_GroupThreadID)\r\n{\r\n\tuint
scaleY = lerp(scaleY,Scale.y,Blend);\n scaleZ = lerp(scaleZ,Scale.z,Blend);\n}\n\n\n\n[numthreads(NB_THREADS_PER_GROUP,1,1)]\nvoid
CSMain(uint3 groupId\t\t: SV_GroupID,\n\t\t\tuint3 groupThreadId\t: SV_GroupThreadID)\n{\n\tuint
* NB_THREADS_PER_GROUP;\r\n\tuint index = id;\r\n\tif (id < nbMax)\r\n\t{\r\n\t\tAttributes
attributes = (Attributes)0;\r\n\t\tSourceAttributes sourceAttributes = (SourceAttributes)0;\r\n\t\t\r\n\t\tattributes.alive
= (bool)true;\n\n\r\n\t\tif (attributes.alive)\r\n\t\t{\r\n\t\t\tattributes.position
* NB_THREADS_PER_GROUP;\n\tuint index = id;\n\tif (id < nbMax)\n\t{\n\t\tAttributes
attributes = (Attributes)0;\n\t\tSourceAttributes sourceAttributes = (SourceAttributes)0;\n\t\t\n\t\tattributes.alive
= (bool)true;\n\n\n\t\tif (attributes.alive)\n\t\t{\n\t\t\tattributes.position
= asfloat(attributeBuffer.Load3((index * 0x4 + 0x0) << 2));\nattributes.color
= asfloat(attributeBuffer.Load3((index * 0x8 + 0x9D00) << 2));\nattributes.angleX
= asfloat(attributeBuffer.Load((index * 0x8 + 0x9D03) << 2));\nattributes.angleZ

= (float)0;\nattributes.pivotY = (float)0;\nattributes.pivotZ = (float)0;\nattributes.size
= (float)0.100000001;\nattributes.scaleX = asfloat(attributeBuffer.Load((index
* 0x8 + 0x9D06) << 2));\nattributes.scaleZ = asfloat(attributeBuffer.Load((index
* 0x8 + 0x9D07) << 2));\n\n\r\n\t\t\t{\n\t\t\t SetAttribute_D5151640( /*inout
* 0x8 + 0x9D07) << 2));\n\n\n\t\t\t{\n\t\t\t SetAttribute_D5151640( /*inout
*/attributes.scaleX, /*inout */attributes.scaleZ, float2(0.5, 0.5));\n\t\t\t}\n\t\t\t{\n\t\t\t
float tmp_x = attributes.color[0];\n\t\t\t float tmp_y = attributes.color[1];\n\t\t\t
float tmp_z = attributes.color[2];\n\t\t\t float4 tmp_bb = float4(tmp_x,

tmp_bo = (float)1 - tmp_bn;\n\t\t\t float tmp_bp = max(tmp_bo, (float)0);\n\t\t\t
float tmp_bq = min(tmp_bp, (float)1);\n\t\t\t SetAttribute_E0455985( /*inout
*/attributes.scaleX, /*inout */attributes.scaleY, /*inout */attributes.scaleZ,
float3(1, 1, 1), tmp_bq);\n\t\t\t}\n\t\t\t\n\r\n\t\t\t\r\n\t\t\t\n\t\t\tfloat3
float3(1, 1, 1), tmp_bq);\n\t\t\t}\n\t\t\t\n\n\t\t\t\n\t\t\t\n\t\t\tfloat3
VFX_USE_SCALEZ_CURRENT\n\t\t\tsize3.z *= attributes.scaleZ;\n\t\t\t#endif\n\t\t\t\r\n\t\t\tfloat4x4
elementToVFX = GetElementToVFXMatrix(\r\n\t\t\t\tattributes.axisX,\r\n\t\t\t\tattributes.axisY,\r\n\t\t\t\tattributes.axisZ,\r\n\t\t\t\tfloat3(attributes.angleX,attributes.angleY,attributes.angleZ),\r\n\t\t\t\tfloat3(attributes.pivotX,attributes.pivotY,attributes.pivotZ),\r\n\t\t\t\tsize3,\r\n\t\t\t\tattributes.position);\r\n\t\t\r\n\t\t\tUNITY_UNROLL\r\n\t\t\tfor
(int itIndexMatrixRow = 0; itIndexMatrixRow < 3; ++itIndexMatrixRow)\r\n\t\t\t{\r\n\t\t\t\tUNITY_UNROLL\r\n\t\t\t\tfor
(int itIndexMatrixCol = 0; itIndexMatrixCol < 4; ++itIndexMatrixCol)\r\n\t\t\t\t{\r\n\t\t\t\t\tuint
itIndexMatrix = itIndexMatrixCol * 4 + itIndexMatrixRow;\r\n\t\t\t\t\tfloat
value = elementToVFX[itIndexMatrixRow][itIndexMatrixCol];\r\n\t\t\t\t\telementToVFXBuffer.Store((index
* 16 + itIndexMatrix) << 2, asuint(value));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n
VFX_USE_SCALEZ_CURRENT\n\t\t\tsize3.z *= attributes.scaleZ;\n\t\t\t#endif\n\t\t\t\n\t\t\tfloat4x4
elementToVFX = GetElementToVFXMatrix(\n\t\t\t\tattributes.axisX,\n\t\t\t\tattributes.axisY,\n\t\t\t\tattributes.axisZ,\n\t\t\t\tfloat3(attributes.angleX,attributes.angleY,attributes.angleZ),\n\t\t\t\tfloat3(attributes.pivotX,attributes.pivotY,attributes.pivotZ),\n\t\t\t\tsize3,\n\t\t\t\tattributes.position);\n\t\t\n\t\t\tUNITY_UNROLL\n\t\t\tfor
(int itIndexMatrixRow = 0; itIndexMatrixRow < 3; ++itIndexMatrixRow)\n\t\t\t{\n\t\t\t\tUNITY_UNROLL\n\t\t\t\tfor
(int itIndexMatrixCol = 0; itIndexMatrixCol < 4; ++itIndexMatrixCol)\n\t\t\t\t{\n\t\t\t\t\tuint
itIndexMatrix = itIndexMatrixCol * 4 + itIndexMatrixRow;\n\t\t\t\t\tfloat value
= elementToVFX[itIndexMatrixRow][itIndexMatrixCol];\n\t\t\t\t\telementToVFXBuffer.Store((index
* 16 + itIndexMatrix) << 2, asuint(value));\n\t\t\t\t}\n\t\t\t}\n\n
: 0u);\r\n\t\t}\t\t\r\n\t}\r\n}\r\n"
: 0u);\n\t\t}\t\t\n\t}\n}\n"
m_Infos:
m_Expressions:
m_Expressions:

271
Assets/Samples/Portal/Portal.vfx


m_ShaderSources:
- compute: 1
name: '[System 1]Initialize Particle'
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\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_SEED_CURRENT
1\n#define VFX_USE_DIRECTION_CURRENT 1\n#define VFX_USE_COLOR_CURRENT 1\n#define

1\n#define VFX_USE_AXISY_CURRENT 1\n#define VFX_USE_AXISZ_CURRENT 1\n#define
VFX_USE_PIVOTX_CURRENT 1\n#define VFX_USE_PIVOTY_CURRENT 1\n#define VFX_USE_PIVOTZ_CURRENT
1\n#define VFX_USE_SCALEX_CURRENT 1\n#define VFX_USE_SCALEY_CURRENT 1\n#define
VFX_WORLD_SPACE 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\r\nCBUFFER_START(parameters)\n
VFX_WORLD_SPACE 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\nCBUFFER_START(parameters)\n
float4x4 uniform_o;\n float4x4 uniform_p;\n float4 uniform_f;\n float4
uniform_q;\n float3 ArcTorus_center_a;\n float uniform_c;\n float3
uniform_h;\n float uniform_d;\n float uniform_e;\n float uniform_g;\n

float alpha;\n bool alive;\n float3 axisX;\n float3 axisY;\n float3
axisZ;\n float pivotX;\n float pivotY;\n float pivotZ;\n float
scaleX;\n float scaleY;\n};\n\nstruct SourceAttributes\n{\n};\n\nTexture3D
attributeMap_b;\nSamplerState samplerattributeMap_b;\nfloat4 attributeMap_b_TexelSize;\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<uint>
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<uint> eventList;\r\nByteAddressBuffer
inputAdditional;\r\n#endif\r\n\r\n#if HAS_STRIPS\r\nRWBuffer<uint> 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
attributeMap_b;\nSamplerState samplerattributeMap_b;\nfloat4 attributeMap_b_TexelSize;\n\n\n\n#define
USE_DEAD_LIST (VFX_USE_ALIVE_CURRENT && !HAS_STRIPS)\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 USE_DEAD_LIST\nRWStructuredBuffer<uint> 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<uint>
eventList;\nByteAddressBuffer inputAdditional;\n#endif\n\n#if HAS_STRIPS\nRWBuffer<uint>
stripDataBuffer;\n#endif\n\n#include \"Packages/com.unity.visualeffectgraph/Shaders/Common/VFXCommonCompute.hlsl\"\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\n\nvoid
PositionTorus_18D(inout float3 position, inout uint seed, inout float3 direction,
float3 ArcTorus_center, float ArcTorus_majorRadius, float ArcTorus_minorRadius,
float ArcTorus_arc, float volumeFactor, float r) /*positionMode:Volume spawnMode:Random

Source:Slot Random:Uniform channels:XYZ */\n{\n mass = lerp(A,B,RAND);\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
= Lifetime;\n}\n\n\n\n#if HAS_STRIPS\nbool GetParticleIndex(inout uint particleIndex,
uint stripIndex)\n{\n\tuint relativeIndex;\n\tInterlockedAdd(STRIP_DATA(STRIP_NEXT_INDEX,
stripIndex), 1, relativeIndex);\n\tif (relativeIndex >= PARTICLE_PER_STRIP_COUNT)
// strip is full\n\t{\n\t\tInterlockedAdd(STRIP_DATA(STRIP_NEXT_INDEX, stripIndex),
-1); // Remove previous increment\n\t\treturn false;\n\t}\n\n\tparticleIndex
+ 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
+ relativeIndex) % PARTICLE_PER_STRIP_COUNT);\n return true;\n}\n#endif\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 USE_DEAD_LIST\n maxThreadId
= min(maxThreadId, deadListCount.Load(0x0));\n#elif VFX_USE_SPAWNER_FROM_GPU\n
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\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
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\t\tuint particleIndex = id + currentSpawnIndex;\n\t\t\n#if
!VFX_USE_SPAWNER_FROM_GPU\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\n\t\tAttributes
attributes = (Attributes)0;\n\t\tSourceAttributes sourceAttributes = (SourceAttributes)0;\n\t\t\n
attributes.position = float3(0, 0, 0);\n attributes.seed = (uint)0;\n
attributes.direction = float3(0, 0, 1);\n attributes.color = float3(1,
1, 1);\n attributes.velocity = float3(0, 0, 0);\n attributes.mass

= float3(1, 0, 0);\n attributes.axisY = float3(0, 1, 0);\n attributes.axisZ
= float3(0, 0, 1);\n attributes.pivotX = (float)0;\n attributes.pivotY
= (float)0;\n attributes.pivotZ = (float)0;\n attributes.scaleX
= (float)1;\n attributes.scaleY = (float)1;\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 PositionTorus_18D(
= (float)1;\n attributes.scaleY = (float)1;\n \n\n#if VFX_USE_PARTICLEID_CURRENT\n
attributes.particleId = particleIndex;\n#endif\n#if VFX_USE_SEED_CURRENT\n
attributes.seed = WangHash(particleIndex ^ systemSeed);\n#endif\n#if VFX_USE_SPAWNINDEX_CURRENT\n
attributes.spawnIndex = id;\n#endif\n#if HAS_STRIPS\n#if !VFX_USE_SPAWNER_FROM_GPU\n\t\t\n#else\n
uint stripIndex = sourceIndex;\n#endif\n\t\tstripIndex = min(stripIndex, STRIP_COUNT);\n\n
if (!GetParticleIndex(particleIndex, stripIndex))\n return;\n\n
const StripData stripData = GetStripDataFromStripIndex(stripIndex, PARTICLE_PER_STRIP_COUNT);\n\t\tInitStripAttributes(particleIndex,
attributes, stripData);\n\t\t// TODO Change seed to be sure we're deterministic
on random with strip\n#endif\n \n {\n PositionTorus_18D(
/*inout */attributes.position, /*inout */attributes.seed, /*inout */attributes.direction,
ArcTorus_center_a, (float)1, (float)0.0399999991, (float)6.28318548, (float)0,
(float)0.0399999991);\n }\n {\n float3 tmp_bs = attributes.position

= tmp_cq * (float)0.49999997;\n float tmp_cx = (float)0.400000006
+ tmp_cw;\n float tmp_cy = tmp_cf ? tmp_ct : tmp_cx;\n
SetAttribute_F0142CB9( /*inout */attributes.lifetime, tmp_cy);\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
\n\n\t\t\n#if VFX_USE_ALIVE_CURRENT\n if (attributes.alive)\n#endif
\n {\n#if USE_DEAD_LIST\n\t uint deadIndex = deadListIn.DecrementCounter();\n
uint index = deadListIn[deadIndex];\n#else\n uint index = particleIndex;\n#endif\n
attributeBuffer.Store3((index * 0x8 + 0x0) << 2,asuint(attributes.position));\n
attributeBuffer.Store((index * 0x1 + 0xC3600) << 2,asuint(attributes.seed));\n
attributeBuffer.Store3((index * 0x14 + 0xDBCC0) << 2,asuint(attributes.color));\n

attributeBuffer.Store((index * 0x14 + 0xDBCCF) << 2,asuint(attributes.pivotZ));\n
attributeBuffer.Store((index * 0x14 + 0xDBCD0) << 2,asuint(attributes.scaleX));\n
attributeBuffer.Store((index * 0x14 + 0xDBCD1) << 2,asuint(attributes.scaleY));\n
\n\r\n }\r\n }\r\n}\r\n"
\n\n }\n }\n}\n"
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
1\n#define VFX_WORLD_SPACE 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\r\nCBUFFER_START(parameters)\n
1\n#define VFX_WORLD_SPACE 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\nCBUFFER_START(parameters)\n
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<uint>
deadListOut;\r\n#endif\r\n\r\n#if VFX_HAS_INDIRECT_DRAW\r\nRWStructuredBuffer<uint>
indirectBuffer;\r\n#endif\r\n\r\n#if HAS_STRIPS\r\nRWBuffer<uint> stripDataBuffer;\r\n#endif\r\n\r\n#if
VFX_USE_STRIPALIVE_CURRENT\r\nBuffer<uint> 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
SourceAttributes\n{\n};\n\n\n\n\n#define USE_DEAD_LIST (VFX_USE_ALIVE_CURRENT
&& !HAS_STRIPS)\n\nRWByteAddressBuffer attributeBuffer;\n\n#if USE_DEAD_LIST\nRWStructuredBuffer<uint>
deadListOut;\n#endif\n\n#if VFX_HAS_INDIRECT_DRAW\nRWStructuredBuffer<uint>
indirectBuffer;\n#endif\n\n#if HAS_STRIPS\nRWBuffer<uint> stripDataBuffer;\n#endif\n\n#if
VFX_USE_STRIPALIVE_CURRENT\nBuffer<uint> attachedStripDataBuffer;\n#endif\n\nCBUFFER_START(updateParams)\n
uint nbMax;\n\tuint dispatchWidth;\n\tuint systemSeed;\nCBUFFER_END\n\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\r\n\r\nvoid
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\n\nvoid
Turbulence_18D(float3 position, inout float3 velocity, float mass, float4x4
InvFieldTransform, float4x4 FieldTransform, float Intensity, float Drag, float
frequency, float roughness, float lacunarity, int octaves, float deltaTime)

}\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\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 + 0x7) << 2));\n\t\t\n\r\n\t\tif (attributes.alive)\r\n\t\t{\r\n\t\t\tattributes.position
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 Attributes attributes = (Attributes)0;\n\t\tSourceAttributes
sourceAttributes = (SourceAttributes)0;\n\n#if VFX_USE_ALIVE_CURRENT\n\t\tattributes.alive
= (attributeBuffer.Load((index * 0x8 + 0x7) << 2));\n\t\t\n\n\t\tif (attributes.alive)\n\t\t{\n\t\t\tattributes.position
= asfloat(attributeBuffer.Load((index * 0x8 + 0x3) << 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
= asfloat(attributeBuffer.Load((index * 0x8 + 0x3) << 2));\n\t\t\t\n\n\n//
Initialize built-in needed attributes\n#if VFX_USE_OLDPOSITION_CURRENT\n\t\t\tattributes.oldPosition
= attributes.position;\n#endif\n#if HAS_STRIPS\n const StripData
stripData = GetStripDataFromParticleIndex(index, PARTICLE_PER_STRIP_COUNT);\n
InitStripAttributes(index, attributes, stripData);\n#endif\n\t\t\t\n\t\t\t{\n\t\t\t
float tmp_be = attributes.age / attributes.lifetime;\n\t\t\t float tmp_bf
= (float)1 - tmp_be;\n\t\t\t float tmp_bg = attributes.position[1];\n\t\t\t
float tmp_bi = max(tmp_bg, (float)0.200000003);\n\t\t\t float tmp_bk = min(tmp_bi,

(float)0.100000001, (float)0, (float)0, deltaTime_a, (float)1, (float)0);\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
/*inout */attributes.alive);\n\t\t\t\n\n\n\t\t\tif (attributes.alive)\n\t\t\t{\n\t\t\t\tattributeBuffer.Store3((index
* 0x8 + 0x3) << 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 + 0x7) << 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,
* 0x8 + 0x3) << 2,asuint(attributes.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\n#if HAS_STRIPS\t\t\t\n\t\t\t\tuint relativeIndexInStrip
= GetRelativeIndex(index, stripData);\n\t\t\t\tInterlockedMin(STRIP_DATA(STRIP_MIN_ALIVE,
stripData.stripIndex), relativeIndexInStrip);\n\t\t\t\tInterlockedMax(STRIP_DATA(STRIP_MAX_ALIVE,
stripData.stripIndex), relativeIndexInStrip);\n#endif\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tattributeBuffer.Store((index
* 0x8 + 0x7) << 2,uint(attributes.alive));\n\t\t\t\t\n\n#if USE_DEAD_LIST &&
!VFX_USE_STRIPALIVE_CURRENT\n\t\t\t\tuint deadIndex = deadListOut.IncrementCounter();\n\t\t\t\tdeadListOut[deadIndex]
= index;\n#endif\n\t\t\t}\n\t\t}\n#if USE_DEAD_LIST && VFX_USE_STRIPALIVE_CURRENT\n
else if (attributes.stripAlive)\n {\n if (STRIP_DATA_X(attachedStripDataBuffer,
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.position
= asfloat(attributeBuffer.Load3((index * 0x8 + 0x0) << 2));\n\t\tattributes.seed
= (attributeBuffer.Load((index * 0x1 + 0xC3600) << 2));\n\t\tattributes.velocity
= asfloat(attributeBuffer.Load3((index * 0x8 + 0x4) << 2));\n\t\tattributes.mass
= asfloat(attributeBuffer.Load((index * 0x1 + 0x2C43C0) << 2));\n\t\tattributes.lifetime
= asfloat(attributeBuffer.Load((index * 0x1 + 0x2DCA80) << 2));\n\t\tattributes.age
= asfloat(attributeBuffer.Load((index * 0x8 + 0x3) << 2));\n\t\tattributes.alive
= (attributeBuffer.Load((index * 0x8 + 0x7) << 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 float tmp_be = attributes.age
/ attributes.lifetime;\n\t\t float tmp_bf = (float)1 - tmp_be;\n\t\t
float tmp_bg = attributes.position[1];\n\t\t float tmp_bi = max(tmp_bg,
(float)0.200000003);\n\t\t float tmp_bk = min(tmp_bi, (float)0.800000012);\n\t\t
float tmp_bl = tmp_bk - (float)0.200000003;\n\t\t float tmp_bn = tmp_bl
/ (float)0.600000024;\n\t\t float tmp_bp = tmp_bn * (float)20;\n\t\t
float tmp_bq = tmp_bf * tmp_bp;\n\t\t Turbulence_18D(attributes.position,
the particle \n {\n uint deadIndex = deadListOut.IncrementCounter();\n\t\t\t\tdeadListOut[deadIndex]
= index;\n attributes.stripAlive = false;\n \n
} \n }\n#endif\n#else\n\t\tattributes.position = asfloat(attributeBuffer.Load3((index
* 0x8 + 0x0) << 2));\n\t\tattributes.seed = (attributeBuffer.Load((index *
0x1 + 0xC3600) << 2));\n\t\tattributes.velocity = asfloat(attributeBuffer.Load3((index
* 0x8 + 0x4) << 2));\n\t\tattributes.mass = asfloat(attributeBuffer.Load((index
* 0x1 + 0x2C43C0) << 2));\n\t\tattributes.lifetime = asfloat(attributeBuffer.Load((index
* 0x1 + 0x2DCA80) << 2));\n\t\tattributes.age = asfloat(attributeBuffer.Load((index
* 0x8 + 0x3) << 2));\n\t\tattributes.alive = (attributeBuffer.Load((index *
0x8 + 0x7) << 2));\n\t\t\n\n\t\t\n#if VFX_USE_OLDPOSITION_CURRENT\n\t\tattributes.oldPosition
= attributes.position;\n#endif\n#if HAS_STRIPS\n const StripData stripData
= GetStripDataFromParticleIndex(index, PARTICLE_PER_STRIP_COUNT);\n
InitStripAttributes(index, attributes, stripData);\n#endif\n\t\t\n\t\t{\n\t\t
float tmp_be = attributes.age / attributes.lifetime;\n\t\t float tmp_bf
= (float)1 - tmp_be;\n\t\t float tmp_bg = attributes.position[1];\n\t\t
float tmp_bi = max(tmp_bg, (float)0.200000003);\n\t\t float tmp_bk = min(tmp_bi,
(float)0.800000012);\n\t\t float tmp_bl = tmp_bk - (float)0.200000003;\n\t\t
float tmp_bn = tmp_bl / (float)0.600000024;\n\t\t float tmp_bp = tmp_bn
* (float)20;\n\t\t float tmp_bq = tmp_bf * tmp_bp;\n\t\t Turbulence_18D(attributes.position,
/*inout */attributes.velocity, attributes.mass, InvFieldTransform_a, FieldTransform_a,
tmp_bq, (float)1, (float)1.5, (float)0.5, (float)2, (int)2, deltaTime_a);\n\t\t}\n\t\t{\n\t\t
float tmp_be = attributes.position[1];\n\t\t bool tmp_bg = tmp_be > (float)0.0199999996;\n\t\t

(float)0.100000001, (float)0, (float)0, deltaTime_a, (float)1, (float)0);\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 + 0x0) << 2,asuint(attributes.position));\n\t\tattributeBuffer.Store((index
/*inout */attributes.alive);\n\t\t\n\n\t\tattributeBuffer.Store3((index * 0x8
+ 0x0) << 2,asuint(attributes.position));\n\t\tattributeBuffer.Store((index
* 0x8 + 0x7) << 2,uint(attributes.alive));\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"
* 0x8 + 0x7) << 2,uint(attributes.alive));\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"
source: "Shader \"Hidden/VFX/Portal/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\"
source: "Shader \"Hidden/VFX/Portal/System 1/Output Particle Quad\"\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\t\n\t\t\n\t\t\n\t\t\n\t\tBlend
SrcAlpha One \n\t\tBlend 1 SrcAlpha OneMinusSrcAlpha\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\n\t\t#define NB_THREADS_PER_GROUP

to always use a valid instanceID\n\t\t#if defined(UNITY_STEREO_INSTANCING_ENABLED)\n\t\t\t#define
VFX_DECLARE_INSTANCE_ID UNITY_VERTEX_INPUT_INSTANCE_ID\n\t\t\t#define VFX_GET_INSTANCE_ID(i)
unity_InstanceID\n\t\t#else\n\t\t\t#define VFX_DECLARE_INSTANCE_ID uint
instanceID : SV_InstanceID;\n\t\t\t#define VFX_GET_INSTANCE_ID(i) i.instanceID\n\t\t#endif\n\t\t\n\t\tENDHLSL\n\t\t\n\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
instanceID : SV_InstanceID;\n\t\t\t#define VFX_GET_INSTANCE_ID(i) i.instanceID\n\t\t#endif\n\t\t\n\t\tENDHLSL\n\t\t\n\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"SceneSelectionPass\" }\n\t\t\n\t\t\tZWrite On\n\t\t\tBlend
Off\n\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#define VFX_PASSDEPTH VFX_PASSDEPTH_SELECTION\n\t\t\t#pragma
target 4.5\n\t\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

0.5f, encodedMotionVector);\n\t\t\t\t\t\t\t\n\t\t\t\t\treturn encodedMotionVector;\n\t\t\t\t#elif
VFX_PASSDEPTH == VFX_PASSDEPTH_SELECTION\n\t\t\t\t\treturn float4(_ObjectId,
_PassValue, 1.0, 1.0);\n\t\t\t\t#elif VFX_PASSDEPTH == VFX_PASSDEPTH_ACTUAL\n\t\t\t\t\treturn
(float4)0;\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH undefined \n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\t\r\n\t\t\r\n\t\t//
(float4)0;\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH undefined \n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\t\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#pragma multi_compile
_ DEBUG_DISPLAY\n\t\t\n\t\t\tstruct ps_input\n\t\t\t{\n\t\t\t\tfloat4 pos :

encodedMotionVector = 0.0f;\n\t\t\t\t\t\tVFXEncodeMotionVector(velocity * 0.5f,
encodedMotionVector);\n\t\t\t\t\t\t\n\t\t\t\to.outMotionVector = encodedMotionVector;\n\t\t
o.outMotionVector.a = o.color.a < i.VFX_VARYING_ALPHATHRESHOLD ? 0.0f : 1.0f;
//Independant clipping for motion vector pass\n\t\t#endif\n\t\t\t\treturn o;\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\t\r\n\t}\r\n}\r\n"
//Independant clipping for motion vector pass\n\t\t#endif\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"
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\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_COLOR_CURRENT
1\n#define VFX_USE_VELOCITY_CURRENT 1\n#define VFX_USE_LIFETIME_CURRENT 1\n#define

VFX_USE_PIVOTX_CURRENT 1\n#define VFX_USE_PIVOTY_CURRENT 1\n#define VFX_USE_PIVOTZ_CURRENT
1\n#define VFX_USE_SIZE_CURRENT 1\n#define VFX_USE_SCALEX_CURRENT 1\n#define
VFX_USE_SCALEY_CURRENT 1\n#define VFX_USE_SCALEZ_CURRENT 1\n#define VFX_WORLD_SPACE
1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\r\nCBUFFER_START(parameters)\n
1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\nCBUFFER_START(parameters)\n
float4 Scale_b;\n float4 Alpha_d;\n float Alpha_e;\n float gradient_f;\n
float currentFrameIndex;\n uint PADDING_0;\nCBUFFER_END\n\nstruct Attributes\n{\n
float3 position;\n float3 color;\n float3 velocity;\n float lifetime;\n

pivotZ;\n float size;\n float scaleX;\n float scaleY;\n float scaleZ;\n};\n\nstruct
SourceAttributes\n{\n};\n\nTexture2D mainTexture;\nSamplerState samplermainTexture;\nfloat4
mainTexture_TexelSize;\n\n\r\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXCommon.hlsl\"\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\r\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\r\n\r\nByteAddressBuffer
attributeBuffer;\r\nRWByteAddressBuffer elementToVFXBuffer;\r\n#if VFX_USE_ALIVE_CURRENT\r\nStructuredBuffer<uint>
deadListOut;\r\n#endif\r\n\r\n#if VFX_HAS_INDIRECT_DRAW\r\nStructuredBuffer<uint>
indirectBuffer;\r\n#endif\r\n\r\nCBUFFER_START(updateParams)\r\n\tuint nbMax;\r\n\tuint
dispatchWidth;\r\n\tuint systemSeed;\r\nCBUFFER_END\r\n\r\nvoid SetAttribute_D5151644(inout
mainTexture_TexelSize;\n\n\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXCommon.hlsl\"\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nByteAddressBuffer
attributeBuffer;\nRWByteAddressBuffer elementToVFXBuffer;\n#if VFX_USE_ALIVE_CURRENT\nStructuredBuffer<uint>
deadListOut;\n#endif\n\n#if VFX_HAS_INDIRECT_DRAW\nStructuredBuffer<uint> indirectBuffer;\n#endif\n\nCBUFFER_START(updateParams)\n\tuint
nbMax;\n\tuint dispatchWidth;\n\tuint systemSeed;\nCBUFFER_END\n\nvoid SetAttribute_D5151644(inout
float scaleX, float Scale) /*attribute:scale Composition:Overwrite Source:Slot
Random:Off channels:X */\n{\n scaleX = Scale.x;\n}\nvoid AttributeFromCurve_57216CF6(inout
float scaleY, float3 velocity, float4 Scale, float2 SpeedRange) /*attribute:scale

// max size in one pixel\n float2 clampedSize = max(localSize,minSize);\n
float fade = (localSize.x * localSize.y) / (clampedSize.x * clampedSize.y);\n
alpha *= fade;\n localSize = clampedSize;\n scaleX = localSize.x / size;\n
scaleY = localSize.y / size;\n}\n\n\r\n\r\n[numthreads(NB_THREADS_PER_GROUP,1,1)]\r\nvoid
CSMain(uint3 groupId\t\t: SV_GroupID,\r\n\t\t\tuint3 groupThreadId\t: SV_GroupThreadID)\r\n{\r\n\tuint
scaleY = localSize.y / size;\n}\n\n\n\n[numthreads(NB_THREADS_PER_GROUP,1,1)]\nvoid
CSMain(uint3 groupId\t\t: SV_GroupID,\n\t\t\tuint3 groupThreadId\t: SV_GroupThreadID)\n{\n\tuint
* NB_THREADS_PER_GROUP;\r\n\tuint index = id;\r\n\tif (id < nbMax)\r\n\t{\r\n\t\tAttributes
attributes = (Attributes)0;\r\n\t\tSourceAttributes sourceAttributes = (SourceAttributes)0;\r\n\t\t\r\n\t\tattributes.alive
= (attributeBuffer.Load((index * 0x8 + 0x7) << 2));\n\n\r\n\t\tif (attributes.alive)\r\n\t\t{\r\n\t\t\tattributes.position
* NB_THREADS_PER_GROUP;\n\tuint index = id;\n\tif (id < nbMax)\n\t{\n\t\tAttributes
attributes = (Attributes)0;\n\t\tSourceAttributes sourceAttributes = (SourceAttributes)0;\n\t\t\n\t\tattributes.alive
= (attributeBuffer.Load((index * 0x8 + 0x7) << 2));\n\n\n\t\tif (attributes.alive)\n\t\t{\n\t\t\tattributes.position
= asfloat(attributeBuffer.Load3((index * 0x8 + 0x0) << 2));\nattributes.color
= asfloat(attributeBuffer.Load3((index * 0x14 + 0xDBCC0) << 2));\nattributes.velocity
= asfloat(attributeBuffer.Load3((index * 0x8 + 0x4) << 2));\nattributes.lifetime

= asfloat(attributeBuffer.Load((index * 0x14 + 0xDBCCF) << 2));\nattributes.size
= (float)0.100000001;\nattributes.scaleX = asfloat(attributeBuffer.Load((index
* 0x14 + 0xDBCD0) << 2));\nattributes.scaleY = asfloat(attributeBuffer.Load((index
* 0x14 + 0xDBCD1) << 2));\nattributes.scaleZ = (float)1;\n\n\r\n\t\t\t{\n\t\t\t
* 0x14 + 0xDBCD1) << 2));\nattributes.scaleZ = (float)1;\n\n\n\t\t\t{\n\t\t\t
SetAttribute_D5151644( /*inout */attributes.scaleX, (float)0.00999999978);\n\t\t\t}\n\t\t\t{\n\t\t\t
AttributeFromCurve_57216CF6( /*inout */attributes.scaleY, attributes.velocity,
Scale_b, float2(0, 0.25));\n\t\t\t}\n\t\t\tOrient_94A( /*inout */attributes.axisX,

gradient_f);\n\t\t\t{\n\t\t\t SetAttribute_65DEC940( /*inout */attributes.pivotX,
/*inout */attributes.pivotY, /*inout */attributes.pivotZ, float3(0, 0.579999983,
0));\n\t\t\t}\n\t\t\tSubpixelAA(attributes.position, /*inout */attributes.alpha,
attributes.size, /*inout */attributes.scaleX, /*inout */attributes.scaleY);\n\t\t\t\n\r\n\t\t\t\r\n\t\t\t\n\t\t\tfloat3
attributes.size, /*inout */attributes.scaleX, /*inout */attributes.scaleY);\n\t\t\t\n\n\t\t\t\n\t\t\t\n\t\t\tfloat3
VFX_USE_SCALEZ_CURRENT\n\t\t\tsize3.z *= attributes.scaleZ;\n\t\t\t#endif\n\t\t\t\r\n\t\t\tfloat4x4
elementToVFX = GetElementToVFXMatrix(\r\n\t\t\t\tattributes.axisX,\r\n\t\t\t\tattributes.axisY,\r\n\t\t\t\tattributes.axisZ,\r\n\t\t\t\tfloat3(attributes.angleX,attributes.angleY,attributes.angleZ),\r\n\t\t\t\tfloat3(attributes.pivotX,attributes.pivotY,attributes.pivotZ),\r\n\t\t\t\tsize3,\r\n\t\t\t\tattributes.position);\r\n\t\t\r\n\t\t\tUNITY_UNROLL\r\n\t\t\tfor
(int itIndexMatrixRow = 0; itIndexMatrixRow < 3; ++itIndexMatrixRow)\r\n\t\t\t{\r\n\t\t\t\tUNITY_UNROLL\r\n\t\t\t\tfor
(int itIndexMatrixCol = 0; itIndexMatrixCol < 4; ++itIndexMatrixCol)\r\n\t\t\t\t{\r\n\t\t\t\t\tuint
itIndexMatrix = itIndexMatrixCol * 4 + itIndexMatrixRow;\r\n\t\t\t\t\tfloat
value = elementToVFX[itIndexMatrixRow][itIndexMatrixCol];\r\n\t\t\t\t\telementToVFXBuffer.Store((index
* 16 + itIndexMatrix) << 2, asuint(value));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n
VFX_USE_SCALEZ_CURRENT\n\t\t\tsize3.z *= attributes.scaleZ;\n\t\t\t#endif\n\t\t\t\n\t\t\tfloat4x4
elementToVFX = GetElementToVFXMatrix(\n\t\t\t\tattributes.axisX,\n\t\t\t\tattributes.axisY,\n\t\t\t\tattributes.axisZ,\n\t\t\t\tfloat3(attributes.angleX,attributes.angleY,attributes.angleZ),\n\t\t\t\tfloat3(attributes.pivotX,attributes.pivotY,attributes.pivotZ),\n\t\t\t\tsize3,\n\t\t\t\tattributes.position);\n\t\t\n\t\t\tUNITY_UNROLL\n\t\t\tfor
(int itIndexMatrixRow = 0; itIndexMatrixRow < 3; ++itIndexMatrixRow)\n\t\t\t{\n\t\t\t\tUNITY_UNROLL\n\t\t\t\tfor
(int itIndexMatrixCol = 0; itIndexMatrixCol < 4; ++itIndexMatrixCol)\n\t\t\t\t{\n\t\t\t\t\tuint
itIndexMatrix = itIndexMatrixCol * 4 + itIndexMatrixRow;\n\t\t\t\t\tfloat value
= elementToVFX[itIndexMatrixRow][itIndexMatrixCol];\n\t\t\t\t\telementToVFXBuffer.Store((index
* 16 + itIndexMatrix) << 2, asuint(value));\n\t\t\t\t}\n\t\t\t}\n\n
: 0u);\r\n\t\t}\t\t\r\n\t}\r\n}\r\n"
: 0u);\n\t\t}\t\t\n\t}\n}\n"
m_Infos:
m_Expressions:
m_Expressions:

470
Assets/Samples/RibbonPack/RibbonPack.vfx


m_ShaderSources:
- compute: 1
name: '[System 1]Initialize Particle'
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\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_SEED_CURRENT
1\n#define VFX_USE_DIRECTION_CURRENT 1\n#define VFX_USE_LIFETIME_CURRENT 1\n#define

1\n#define VFX_USE_STRIPALIVE_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
\"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\nCBUFFER_START(parameters)\n
bool alive;\n bool stripAlive;\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\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<uint>
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<uint> eventList;\r\nByteAddressBuffer
inputAdditional;\r\n#endif\r\n\r\n#if HAS_STRIPS\r\nRWBuffer<uint> 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
bool alive;\n bool stripAlive;\n};\n\nstruct SourceAttributes\n{\n};\n\n\n\n\n#define
USE_DEAD_LIST (VFX_USE_ALIVE_CURRENT && !HAS_STRIPS)\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 USE_DEAD_LIST\nRWStructuredBuffer<uint> 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<uint>
eventList;\nByteAddressBuffer inputAdditional;\n#endif\n\n#if HAS_STRIPS\nRWBuffer<uint>
stripDataBuffer;\n#endif\n\n#include \"Packages/com.unity.visualeffectgraph/Shaders/Common/VFXCommonCompute.hlsl\"\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\n\nvoid
PositionSphere_0(inout float3 position, inout uint seed, inout float3 direction,
float3 ArcSphere_sphere_center, float ArcSphere_sphere_radius, float ArcSphere_arc,
float volumeFactor) /*positionMode:Surface spawnMode:Random */\n{\n float

Composition:Overwrite AlphaComposition:Overwrite SampleMode:RandomConstantPerParticle
Mode:PerComponent ColorMode:ColorAndAlpha channels:XYZ */\n{\n float t =
FIXED_RAND(Seed);\n float4 value = 0.0f;\n value = SampleGradient(Color,
t);\n color = value.rgb;\n alpha = value.a;\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
t);\n color = value.rgb;\n alpha = value.a;\n}\n\n\n\n#if HAS_STRIPS\nbool
GetParticleIndex(inout uint particleIndex, uint stripIndex)\n{\n\tuint relativeIndex;\n\tInterlockedAdd(STRIP_DATA(STRIP_NEXT_INDEX,
stripIndex), 1, relativeIndex);\n\tif (relativeIndex >= PARTICLE_PER_STRIP_COUNT)
// strip is full\n\t{\n\t\tInterlockedAdd(STRIP_DATA(STRIP_NEXT_INDEX, stripIndex),
-1); // Remove previous increment\n\t\treturn false;\n\t}\n\n\tparticleIndex
+ 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
+ relativeIndex) % PARTICLE_PER_STRIP_COUNT);\n return true;\n}\n#endif\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 USE_DEAD_LIST\n maxThreadId
= min(maxThreadId, deadListCount.Load(0x0));\n#elif VFX_USE_SPAWNER_FROM_GPU\n
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\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
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\t\tuint particleIndex = id + currentSpawnIndex;\n\t\t\n#if
!VFX_USE_SPAWNER_FROM_GPU\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\n\t\tAttributes
attributes = (Attributes)0;\n\t\tSourceAttributes sourceAttributes = (SourceAttributes)0;\n\t\t\n
attributes.position = float3(0, 0, 0);\n attributes.seed = (uint)0;\n
attributes.direction = float3(0, 0, 1);\n attributes.lifetime = (float)1;\n
attributes.velocity = float3(0, 0, 0);\n attributes.color = float3(1,

= (bool)true;\n attributes.stripAlive = (bool)true;\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 PositionSphere_0(
= (bool)true;\n attributes.stripAlive = (bool)true;\n \n\n#if
VFX_USE_PARTICLEID_CURRENT\n attributes.particleId = particleIndex;\n#endif\n#if
VFX_USE_SEED_CURRENT\n attributes.seed = WangHash(particleIndex ^ systemSeed);\n#endif\n#if
VFX_USE_SPAWNINDEX_CURRENT\n attributes.spawnIndex = id;\n#endif\n#if
HAS_STRIPS\n#if !VFX_USE_SPAWNER_FROM_GPU\n\t\t\n#else\n uint stripIndex
= sourceIndex;\n#endif\n\t\tstripIndex = min(stripIndex, STRIP_COUNT);\n\n
if (!GetParticleIndex(particleIndex, stripIndex))\n return;\n\n
const StripData stripData = GetStripDataFromStripIndex(stripIndex, PARTICLE_PER_STRIP_COUNT);\n\t\tInitStripAttributes(particleIndex,
attributes, stripData);\n\t\t// TODO Change seed to be sure we're deterministic
on random with strip\n#endif\n \n {\n PositionSphere_0(
/*inout */attributes.position, /*inout */attributes.seed, /*inout */attributes.direction,
float3(0, 0, 0), (float)0.200000003, (float)6.28318548, (float)1);\n
}\n {\n SetAttribute_F01429A3( /*inout */attributes.lifetime,

/*inout */attributes.velocity, /*inout */attributes.direction, float3(0, 0,
1), tmp_x, (float)0);\n }\n {\n AttributeFromCurve_4C67E886(
/*inout */attributes.color, /*inout */attributes.alpha, attributes.particleId,
Color_d, (uint)0);\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.Store3((index * 0xC + 0x0) << 2,asuint(attributes.position));\n
attributeBuffer.Store((index * 0x1 + 0x9600) << 2,asuint(attributes.lifetime));\n
attributeBuffer.Store3((index * 0xC + 0x4) << 2,asuint(attributes.velocity));\n
attributeBuffer.Store3((index * 0x8 + 0xA280) << 2,asuint(attributes.color));\n
attributeBuffer.Store((index * 0x8 + 0xA284) << 2,asuint(attributes.size));\n
attributeBuffer.Store((index * 0xC + 0x3) << 2,asuint(attributes.age));\n
attributeBuffer.Store((index * 0xC + 0x7) << 2,asuint(attributes.rateCount_c));\n
attributeBuffer.Store((index * 0xC + 0x8) << 2,uint(attributes.alive));\n
attributeBuffer.Store((index * 0xC + 0x9) << 2,uint(attributes.stripAlive));\n
\n\r\n }\r\n }\r\n}\r\n"
Color_d, (uint)0);\n }\n \n\n\t\t\n#if VFX_USE_ALIVE_CURRENT\n
if (attributes.alive)\n#endif \n {\n#if USE_DEAD_LIST\n\t
uint deadIndex = deadListIn.DecrementCounter();\n uint index = deadListIn[deadIndex];\n#else\n
uint index = particleIndex;\n#endif\n attributeBuffer.Store3((index
* 0xC + 0x0) << 2,asuint(attributes.position));\n attributeBuffer.Store((index
* 0x1 + 0x9600) << 2,asuint(attributes.lifetime));\n attributeBuffer.Store3((index
* 0xC + 0x4) << 2,asuint(attributes.velocity));\n attributeBuffer.Store3((index
* 0x8 + 0xA280) << 2,asuint(attributes.color));\n attributeBuffer.Store((index
* 0x8 + 0xA284) << 2,asuint(attributes.size));\n attributeBuffer.Store((index
* 0xC + 0x3) << 2,asuint(attributes.age));\n attributeBuffer.Store((index
* 0xC + 0x7) << 2,asuint(attributes.rateCount_c));\n attributeBuffer.Store((index
* 0xC + 0x8) << 2,uint(attributes.alive));\n attributeBuffer.Store((index
* 0xC + 0x9) << 2,uint(attributes.stripAlive));\n \n\n }\n
}\n}\n"
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
VFX_USE_STRIPALIVE_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
VFX_USE_STRIPALIVE_CURRENT 1\n#define VFX_LOCAL_SPACE 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\nCBUFFER_START(parameters)\n
eventListOut_a;\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<uint>
deadListOut;\r\n#endif\r\n\r\n#if VFX_HAS_INDIRECT_DRAW\r\nRWStructuredBuffer<uint>
indirectBuffer;\r\n#endif\r\n\r\n#if HAS_STRIPS\r\nRWBuffer<uint> stripDataBuffer;\r\n#endif\r\n\r\n#if
VFX_USE_STRIPALIVE_CURRENT\r\nBuffer<uint> 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
eventListOut_a;\n\n\n\n#define USE_DEAD_LIST (VFX_USE_ALIVE_CURRENT && !HAS_STRIPS)\n\nRWByteAddressBuffer
attributeBuffer;\n\n#if USE_DEAD_LIST\nRWStructuredBuffer<uint> deadListOut;\n#endif\n\n#if
VFX_HAS_INDIRECT_DRAW\nRWStructuredBuffer<uint> indirectBuffer;\n#endif\n\n#if
HAS_STRIPS\nRWBuffer<uint> stripDataBuffer;\n#endif\n\n#if VFX_USE_STRIPALIVE_CURRENT\nBuffer<uint>
attachedStripDataBuffer;\n#endif\n\nCBUFFER_START(updateParams)\n uint nbMax;\n\tuint
dispatchWidth;\n\tuint systemSeed;\nCBUFFER_END\n\n#include \"Packages/com.unity.visualeffectgraph/Shaders/Common/VFXCommonCompute.hlsl\"\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\n\nvoid
Turbulence_18D(float3 position, inout float3 velocity, float mass, float4x4
InvFieldTransform, float4x4 FieldTransform, float Intensity, float Drag, float
frequency, float roughness, float lacunarity, int octaves, float deltaTime)

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
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
* 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 * 0xC + 0x8) << 2));\n\t\tattributes.stripAlive
= (attributeBuffer.Load((index * 0xC + 0x9) << 2));\n\t\t\n\r\n\t\tif (attributes.alive)\r\n\t\t{\r\n\t\t\tattributes.position
* NB_THREADS_PER_GROUP;\n\tuint index = id;\n\tif (id < nbMax)\n\t{\n
Attributes attributes = (Attributes)0;\n\t\tSourceAttributes sourceAttributes
= (SourceAttributes)0;\n\n#if VFX_USE_ALIVE_CURRENT\n\t\tattributes.alive =
(attributeBuffer.Load((index * 0xC + 0x8) << 2));\n\t\tattributes.stripAlive
= (attributeBuffer.Load((index * 0xC + 0x9) << 2));\n\t\t\n\n\t\tif (attributes.alive)\n\t\t{\n\t\t\tattributes.position
= asfloat(attributeBuffer.Load3((index * 0xC + 0x0) << 2));\n\t\t\tattributes.lifetime
= asfloat(attributeBuffer.Load((index * 0x1 + 0x9600) << 2));\n\t\t\tattributes.velocity
= asfloat(attributeBuffer.Load3((index * 0xC + 0x4) << 2));\n\t\t\tattributes.mass

* 0xC + 0x7) << 2));\n\t\t\tattributes.eventCount = (uint)0;\n\t\t\tuint eventCount_a
= 0u;\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
= 0u;\n\t\t\t\n\n\n// Initialize built-in needed attributes\n#if VFX_USE_OLDPOSITION_CURRENT\n\t\t\tattributes.oldPosition
= attributes.position;\n#endif\n#if HAS_STRIPS\n const StripData
stripData = GetStripDataFromParticleIndex(index, PARTICLE_PER_STRIP_COUNT);\n
InitStripAttributes(index, attributes, stripData);\n#endif\n\t\t\t\n\t\t\t{\n\t\t\t
Turbulence_18D(attributes.position, /*inout */attributes.velocity, attributes.mass,
InvFieldTransform_a, FieldTransform_a, (float)1, (float)1, (float)1.5, (float)0.5,
(float)2, (int)3, deltaTime_a);\n\t\t\t}\n\t\t\tAttributeFromCurve_45ABB90F(

+= attributes.eventCount;\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 * 0xC
+ 0x0) << 2,asuint(attributes.position));\n\t\t\t\tattributeBuffer.Store3((index
attributes.lifetime, /*inout */attributes.alive);\n\t\t\t\n\n\n\t\t\tif (attributes.alive)\n\t\t\t{\n\t\t\t\tattributeBuffer.Store3((index
* 0xC + 0x0) << 2,asuint(attributes.position));\n\t\t\t\tattributeBuffer.Store3((index
< eventCount_a; ++i) eventListOut_a.Append(index);\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
< eventCount_a; ++i) eventListOut_a.Append(index);\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\n#if HAS_STRIPS\t\t\t\n\t\t\t\tuint relativeIndexInStrip
= GetRelativeIndex(index, stripData);\n\t\t\t\tInterlockedMin(STRIP_DATA(STRIP_MIN_ALIVE,
stripData.stripIndex), relativeIndexInStrip);\n\t\t\t\tInterlockedMax(STRIP_DATA(STRIP_MAX_ALIVE,
stripData.stripIndex), relativeIndexInStrip);\n#endif\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tattributeBuffer.Store((index
++i) eventListOut_a.Append(index);\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,
++i) eventListOut_a.Append(index);\n\t\t\t\t\n\n#if USE_DEAD_LIST && !VFX_USE_STRIPALIVE_CURRENT\n\t\t\t\tuint
deadIndex = deadListOut.IncrementCounter();\n\t\t\t\tdeadListOut[deadIndex]
= index;\n#endif\n\t\t\t}\n\t\t}\n#if USE_DEAD_LIST && VFX_USE_STRIPALIVE_CURRENT\n
else if (attributes.stripAlive)\n {\n if (STRIP_DATA_X(attachedStripDataBuffer,
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
attributeBuffer.Store((index * 0xC + 0x9) << 2,uint(attributes.stripAlive));\n
\n\r\n } \r\n }\r\n#endif\r\n#else\r\n\t\tattributes.position
= asfloat(attributeBuffer.Load3((index * 0xC + 0x0) << 2));\n\t\tattributes.lifetime
= asfloat(attributeBuffer.Load((index * 0x1 + 0x9600) << 2));\n\t\tattributes.velocity
= asfloat(attributeBuffer.Load3((index * 0xC + 0x4) << 2));\n\t\tattributes.mass
= (float)1;\n\t\tattributes.size = asfloat(attributeBuffer.Load((index * 0x8
+ 0xA284) << 2));\n\t\tattributes.age = asfloat(attributeBuffer.Load((index
* 0xC + 0x3) << 2));\n\t\tattributes.rateCount_c = asfloat(attributeBuffer.Load((index
* 0xC + 0x7) << 2));\n\t\tattributes.eventCount = (uint)0;\n\t\tuint eventCount_a
= 0u;\n\t\tattributes.alive = (attributeBuffer.Load((index * 0xC + 0x8) <<
2));\n\t\tattributes.stripAlive = (attributeBuffer.Load((index * 0xC + 0x9)
<< 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
the particle \n {\n uint deadIndex = deadListOut.IncrementCounter();\n\t\t\t\tdeadListOut[deadIndex]
= index;\n attributes.stripAlive = false;\n attributeBuffer.Store((index
* 0xC + 0x9) << 2,uint(attributes.stripAlive));\n \n\n
} \n }\n#endif\n#else\n\t\tattributes.position = asfloat(attributeBuffer.Load3((index
* 0xC + 0x0) << 2));\n\t\tattributes.lifetime = asfloat(attributeBuffer.Load((index
* 0x1 + 0x9600) << 2));\n\t\tattributes.velocity = asfloat(attributeBuffer.Load3((index
* 0xC + 0x4) << 2));\n\t\tattributes.mass = (float)1;\n\t\tattributes.size
= asfloat(attributeBuffer.Load((index * 0x8 + 0xA284) << 2));\n\t\tattributes.age
= asfloat(attributeBuffer.Load((index * 0xC + 0x3) << 2));\n\t\tattributes.rateCount_c
= asfloat(attributeBuffer.Load((index * 0xC + 0x7) << 2));\n\t\tattributes.eventCount
= (uint)0;\n\t\tuint eventCount_a = 0u;\n\t\tattributes.alive = (attributeBuffer.Load((index
* 0xC + 0x8) << 2));\n\t\tattributes.stripAlive = (attributeBuffer.Load((index
* 0xC + 0x9) << 2));\n\t\t\n\n\t\t\n#if VFX_USE_OLDPOSITION_CURRENT\n\t\tattributes.oldPosition
= attributes.position;\n#endif\n#if HAS_STRIPS\n const StripData stripData
= GetStripDataFromParticleIndex(index, PARTICLE_PER_STRIP_COUNT);\n
InitStripAttributes(index, attributes, stripData);\n#endif\n\t\t\n\t\t{\n\t\t
Turbulence_18D(attributes.position, /*inout */attributes.velocity, attributes.mass,
InvFieldTransform_a, FieldTransform_a, (float)1, (float)1, (float)1.5, (float)0.5,
(float)2, (int)3, deltaTime_a);\n\t\t}\n\t\tAttributeFromCurve_45ABB90F( /*inout

+= attributes.eventCount;\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
attributes.lifetime, /*inout */attributes.alive);\n\t\t\n\n\t\tattributeBuffer.Store3((index
* 0xC + 0x0) << 2,asuint(attributes.position));\n\t\tattributeBuffer.Store3((index
* 0xC + 0x4) << 2,asuint(attributes.velocity));\n\t\tattributeBuffer.Store((index
* 0x8 + 0xA284) << 2,asuint(attributes.size));\n\t\tattributeBuffer.Store((index

* 0xC + 0x9) << 2,uint(attributes.stripAlive));\n\t\tfor (uint i = 0; i < eventCount_a;
++i) eventListOut_a.Append(index);\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"
++i) eventListOut_a.Append(index);\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"
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\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_COLOR_CURRENT
1\n#define VFX_USE_LIFETIME_CURRENT 1\n#define VFX_USE_SIZE_CURRENT 1\n#define

1\n#define STRIP_COUNT 3200u\n#define PARTICLE_PER_STRIP_COUNT 300u\n#define
VFX_USE_SPAWNER_FROM_GPU 1\n#define HAS_STRIPS 1\n#define VFX_LOCAL_SPACE 1\n#include
\"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\r\n\nstruct
\"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\n\nstruct
color;\n float lifetime;\n float size;\n};\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<uint> 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<uint>
eventList;\r\nByteAddressBuffer inputAdditional;\r\n#endif\r\n\r\n#if HAS_STRIPS\r\nRWBuffer<uint>
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
color;\n float lifetime;\n float size;\n};\n\n\n\n\n#define USE_DEAD_LIST
(VFX_USE_ALIVE_CURRENT && !HAS_STRIPS)\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
USE_DEAD_LIST\nRWStructuredBuffer<uint> 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<uint>
eventList;\nByteAddressBuffer inputAdditional;\n#endif\n\n#if HAS_STRIPS\nRWBuffer<uint>
stripDataBuffer;\n#endif\n\n#include \"Packages/com.unity.visualeffectgraph/Shaders/Common/VFXCommonCompute.hlsl\"\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\n\nvoid
SetAttribute_CAC02F9E(inout float3 position, float3 Value) /*attribute:position
Composition:Overwrite Source:Source Random:Off channels:XYZ */\n{\n position
= Value;\n}\nvoid SetAttribute_FDCE071E(inout float3 color, float3 Value) /*attribute:color

float Value) /*attribute:size Composition:Overwrite Source:Source Random:Off
channels:XYZ */\n{\n size = Value;\n}\nvoid SetAttribute_D5151645(inout
float scaleY, float Scale) /*attribute:scale Composition:Overwrite Source:Slot
Random:Off channels:Y */\n{\n scaleY = Scale.x;\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
Random:Off channels:Y */\n{\n scaleY = Scale.x;\n}\n\n\n\n#if HAS_STRIPS\nbool
GetParticleIndex(inout uint particleIndex, uint stripIndex)\n{\n\tuint relativeIndex;\n\tInterlockedAdd(STRIP_DATA(STRIP_NEXT_INDEX,
stripIndex), 1, relativeIndex);\n\tif (relativeIndex >= PARTICLE_PER_STRIP_COUNT)
// strip is full\n\t{\n\t\tInterlockedAdd(STRIP_DATA(STRIP_NEXT_INDEX, stripIndex),
-1); // Remove previous increment\n\t\treturn false;\n\t}\n\n\tparticleIndex
+ 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
+ relativeIndex) % PARTICLE_PER_STRIP_COUNT);\n return true;\n}\n#endif\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 USE_DEAD_LIST\n maxThreadId
= min(maxThreadId, deadListCount.Load(0x0));\n#elif VFX_USE_SPAWNER_FROM_GPU\n
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 \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
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\t\tuint particleIndex = id + currentSpawnIndex;\n\t\t\n#if
!VFX_USE_SPAWNER_FROM_GPU\n \n#endif\n\n\t\tAttributes attributes =
(Attributes)0;\n\t\tSourceAttributes sourceAttributes = (SourceAttributes)0;\n\t\t\n
attributes.position = float3(0, 0, 0);\n attributes.color = float3(1,
1, 1);\n attributes.lifetime = (float)1;\n attributes.size =
(float)0.100000001;\n attributes.scaleY = (float)1;\n attributes.velocity

* 0x8 + 0xA280) << 2));\n sourceAttributes.lifetime = asfloat(sourceAttributeBuffer.Load((sourceIndex
* 0x1 + 0x9600) << 2));\n sourceAttributes.size = asfloat(sourceAttributeBuffer.Load((sourceIndex
* 0x8 + 0xA284) << 2));\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 float3 tmp_t = sourceAttributes.position;\n
SetAttribute_CAC02F9E( /*inout */attributes.position, tmp_t);\n }\n
{\n float3 tmp_t = sourceAttributes.color;\n SetAttribute_FDCE071E(
/*inout */attributes.color, tmp_t);\n }\n {\n float
tmp_t = sourceAttributes.lifetime;\n SetAttribute_F011C510( /*inout
*/attributes.lifetime, tmp_t);\n }\n {\n float tmp_t
= sourceAttributes.size;\n SetAttribute_32764A86( /*inout */attributes.size,
tmp_t);\n }\n {\n SetAttribute_D5151645( /*inout */attributes.scaleY,
(float)0.00999999978);\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
* 0x8 + 0xA284) << 2));\n \n\n#if VFX_USE_PARTICLEID_CURRENT\n
attributes.particleId = particleIndex;\n#endif\n#if VFX_USE_SEED_CURRENT\n
attributes.seed = WangHash(particleIndex ^ systemSeed);\n#endif\n#if VFX_USE_SPAWNINDEX_CURRENT\n
attributes.spawnIndex = id;\n#endif\n#if HAS_STRIPS\n#if !VFX_USE_SPAWNER_FROM_GPU\n\t\t\n#else\n
uint stripIndex = sourceIndex;\n#endif\n\t\tstripIndex = min(stripIndex, STRIP_COUNT);\n\n
if (!GetParticleIndex(particleIndex, stripIndex))\n return;\n\n
const StripData stripData = GetStripDataFromStripIndex(stripIndex, PARTICLE_PER_STRIP_COUNT);\n\t\tInitStripAttributes(particleIndex,
attributes, stripData);\n\t\t// TODO Change seed to be sure we're deterministic
on random with strip\n#endif\n \n {\n float3 tmp_t
= sourceAttributes.position;\n SetAttribute_CAC02F9E( /*inout */attributes.position,
tmp_t);\n }\n {\n float3 tmp_t = sourceAttributes.color;\n
SetAttribute_FDCE071E( /*inout */attributes.color, tmp_t);\n }\n
{\n float tmp_t = sourceAttributes.lifetime;\n SetAttribute_F011C510(
/*inout */attributes.lifetime, tmp_t);\n }\n {\n float
tmp_t = sourceAttributes.size;\n SetAttribute_32764A86( /*inout
*/attributes.size, tmp_t);\n }\n {\n SetAttribute_D5151645(
/*inout */attributes.scaleY, (float)0.00999999978);\n }\n \n\n\t\t\n#if
VFX_USE_ALIVE_CURRENT\n if (attributes.alive)\n#endif \n
{\n#if USE_DEAD_LIST\n\t uint deadIndex = deadListIn.DecrementCounter();\n
uint index = deadListIn[deadIndex];\n#else\n uint index = particleIndex;\n#endif\n
attributeBuffer.Store3((index * 0x4 + 0x0) << 2,asuint(attributes.position));\n
attributeBuffer.Store3((index * 0x8 + 0x3A9800) << 2,asuint(attributes.color));\n
attributeBuffer.Store((index * 0x1 + 0xAFC800) << 2,asuint(attributes.lifetime));\n

attributeBuffer.Store((index * 0x4 + 0x3) << 2,asuint(attributes.age));\n
attributeBuffer.Store((index * 0x4 + 0xBE6E03) << 2,uint(attributes.alive));\n
\n\r\n }\r\n }\r\n}\r\n"
\n\n }\n }\n}\n"
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
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
VFX_LOCAL_SPACE 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\nCBUFFER_START(parameters)\n
bool alive;\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<uint> deadListOut;\r\n#endif\r\n\r\n#if
VFX_HAS_INDIRECT_DRAW\r\nRWStructuredBuffer<uint> indirectBuffer;\r\n#endif\r\n\r\n#if
HAS_STRIPS\r\nRWBuffer<uint> stripDataBuffer;\r\n#endif\r\n\r\n#if VFX_USE_STRIPALIVE_CURRENT\r\nBuffer<uint>
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
bool alive;\n};\n\nstruct SourceAttributes\n{\n};\n\n\n\n\n#define USE_DEAD_LIST
(VFX_USE_ALIVE_CURRENT && !HAS_STRIPS)\n\nRWByteAddressBuffer attributeBuffer;\n\n#if
USE_DEAD_LIST\nRWStructuredBuffer<uint> deadListOut;\n#endif\n\n#if VFX_HAS_INDIRECT_DRAW\nRWStructuredBuffer<uint>
indirectBuffer;\n#endif\n\n#if HAS_STRIPS\nRWBuffer<uint> stripDataBuffer;\n#endif\n\n#if
VFX_USE_STRIPALIVE_CURRENT\nBuffer<uint> attachedStripDataBuffer;\n#endif\n\nCBUFFER_START(updateParams)\n
uint nbMax;\n\tuint dispatchWidth;\n\tuint systemSeed;\nCBUFFER_END\n\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\r\n\r\nvoid
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\n\nvoid
Turbulence_18D(float3 position, inout float3 velocity, float mass, float4x4
InvFieldTransform, float4x4 FieldTransform, float Intensity, float Drag, float
frequency, float roughness, float lacunarity, int octaves, float deltaTime)

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
}\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
* 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 * 0x4 + 0xBE6E03) << 2));\n\t\t\n\r\n\t\tif
(attributes.alive)\r\n\t\t{\r\n\t\t\tattributes.position = asfloat(attributeBuffer.Load3((index
* 0x4 + 0x0) << 2));\n\t\t\tattributes.lifetime = asfloat(attributeBuffer.Load((index
* 0x1 + 0xAFC800) << 2));\n\t\t\tattributes.velocity = asfloat(attributeBuffer.Load3((index
* 0x4 + 0xBE6E00) << 2));\n\t\t\tattributes.mass = (float)1;\n\t\t\tattributes.age
= asfloat(attributeBuffer.Load((index * 0x4 + 0x3) << 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
* NB_THREADS_PER_GROUP;\n\tuint index = id;\n\tif (id < nbMax)\n\t{\n
Attributes attributes = (Attributes)0;\n\t\tSourceAttributes sourceAttributes
= (SourceAttributes)0;\n\n#if VFX_USE_ALIVE_CURRENT\n\t\tattributes.alive =
(attributeBuffer.Load((index * 0x4 + 0xBE6E03) << 2));\n\t\t\n\n\t\tif (attributes.alive)\n\t\t{\n\t\t\tattributes.position
= asfloat(attributeBuffer.Load3((index * 0x4 + 0x0) << 2));\n\t\t\tattributes.lifetime
= asfloat(attributeBuffer.Load((index * 0x1 + 0xAFC800) << 2));\n\t\t\tattributes.velocity
= asfloat(attributeBuffer.Load3((index * 0x4 + 0xBE6E00) << 2));\n\t\t\tattributes.mass
= (float)1;\n\t\t\tattributes.age = asfloat(attributeBuffer.Load((index * 0x4
+ 0x3) << 2));\n\t\t\t\n\n\n// Initialize built-in needed attributes\n#if VFX_USE_OLDPOSITION_CURRENT\n\t\t\tattributes.oldPosition
= attributes.position;\n#endif\n#if HAS_STRIPS\n const StripData
stripData = GetStripDataFromParticleIndex(index, PARTICLE_PER_STRIP_COUNT);\n
InitStripAttributes(index, attributes, stripData);\n#endif\n\t\t\t\n\t\t\t{\n\t\t\t
/*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
/*inout */attributes.alive);\n\t\t\t\n\n\n\t\t\tif (attributes.alive)\n\t\t\t{\n\t\t\t\tattributeBuffer.Store3((index
* 0x4 + 0x3) << 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
* 0x4 + 0xBE6E03) << 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,
* 0x4 + 0x3) << 2,asuint(attributes.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\n#if HAS_STRIPS\t\t\t\n\t\t\t\tuint relativeIndexInStrip
= GetRelativeIndex(index, stripData);\n\t\t\t\tInterlockedMin(STRIP_DATA(STRIP_MIN_ALIVE,
stripData.stripIndex), relativeIndexInStrip);\n\t\t\t\tInterlockedMax(STRIP_DATA(STRIP_MAX_ALIVE,
stripData.stripIndex), relativeIndexInStrip);\n#endif\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tattributeBuffer.Store((index
* 0x4 + 0xBE6E03) << 2,uint(attributes.alive));\n\t\t\t\t\n\n#if USE_DEAD_LIST
&& !VFX_USE_STRIPALIVE_CURRENT\n\t\t\t\tuint deadIndex = deadListOut.IncrementCounter();\n\t\t\t\tdeadListOut[deadIndex]
= index;\n#endif\n\t\t\t}\n\t\t}\n#if USE_DEAD_LIST && VFX_USE_STRIPALIVE_CURRENT\n
else if (attributes.stripAlive)\n {\n if (STRIP_DATA_X(attachedStripDataBuffer,
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.position
= asfloat(attributeBuffer.Load3((index * 0x4 + 0x0) << 2));\n\t\tattributes.lifetime
= asfloat(attributeBuffer.Load((index * 0x1 + 0xAFC800) << 2));\n\t\tattributes.velocity
= asfloat(attributeBuffer.Load3((index * 0x4 + 0xBE6E00) << 2));\n\t\tattributes.mass
= (float)1;\n\t\tattributes.age = asfloat(attributeBuffer.Load((index * 0x4
+ 0x3) << 2));\n\t\tattributes.alive = (attributeBuffer.Load((index * 0x4 +
0xBE6E03) << 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
Turbulence_18D(attributes.position, /*inout */attributes.velocity, attributes.mass,
InvFieldTransform_a, FieldTransform_a, (float)0.0500000007, (float)1, (float)1,
(float)0.5, (float)2, (int)3, 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 *
0x4 + 0x0) << 2,asuint(attributes.position));\n\t\tattributeBuffer.Store3((index
the particle \n {\n uint deadIndex = deadListOut.IncrementCounter();\n\t\t\t\tdeadListOut[deadIndex]
= index;\n attributes.stripAlive = false;\n \n
} \n }\n#endif\n#else\n\t\tattributes.position = asfloat(attributeBuffer.Load3((index
* 0x4 + 0x0) << 2));\n\t\tattributes.lifetime = asfloat(attributeBuffer.Load((index
* 0x1 + 0xAFC800) << 2));\n\t\tattributes.velocity = asfloat(attributeBuffer.Load3((index
* 0x4 + 0xBE6E00) << 2));\n\t\tattributes.mass = (float)1;\n\t\tattributes.age
= asfloat(attributeBuffer.Load((index * 0x4 + 0x3) << 2));\n\t\tattributes.alive
= (attributeBuffer.Load((index * 0x4 + 0xBE6E03) << 2));\n\t\t\n\n\t\t\n#if
VFX_USE_OLDPOSITION_CURRENT\n\t\tattributes.oldPosition = attributes.position;\n#endif\n#if
HAS_STRIPS\n const StripData stripData = GetStripDataFromParticleIndex(index,
PARTICLE_PER_STRIP_COUNT);\n InitStripAttributes(index, attributes,
stripData);\n#endif\n\t\t\n\t\t{\n\t\t Turbulence_18D(attributes.position,
/*inout */attributes.velocity, attributes.mass, InvFieldTransform_a, FieldTransform_a,
(float)0.0500000007, (float)1, (float)1, (float)0.5, (float)2, (int)3, 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\n\t\tattributeBuffer.Store3((index * 0x4
+ 0x0) << 2,asuint(attributes.position));\n\t\tattributeBuffer.Store3((index
* 0x4 + 0xBE6E03) << 2,uint(attributes.alive));\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"
* 0x4 + 0xBE6E03) << 2,uint(attributes.alive));\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"
source: "Shader \"Hidden/VFX/RibbonPack/Trails/Output ParticleStrip Lit Quad\"\n{\r\n\tSubShader\r\n\t{\t\r\n\t\tCull
Off\r\n\t\t\r\n\t\tTags { \"Queue\"=\"Geometry+0\" \"IgnoreProjector\"=\"False\"
source: "Shader \"Hidden/VFX/RibbonPack/Trails/Output ParticleStrip Lit Quad\"\n{\n\tSubShader\n\t{\t\n\t\tCull
Off\n\t\t\n\t\tTags { \"Queue\"=\"Geometry+0\" \"IgnoreProjector\"=\"False\"
\"RenderType\"=\"Opaque\" }\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\t\n\t\t\n\t\t\n\t\t\n\t\tZTest
LEqual\n\t\tZWrite On\n\t\tCull Off\n\t\t\n\t\n\t\t\t\n\t\tHLSLINCLUDE\n\t\t\n\t\t#define
NB_THREADS_PER_GROUP 64\n\t\t#define HAS_ATTRIBUTES 1\n\t\t#define VFX_PASSDEPTH_ACTUAL

to always use a valid instanceID\n\t\t#if defined(UNITY_STEREO_INSTANCING_ENABLED)\n\t\t\t#define
VFX_DECLARE_INSTANCE_ID UNITY_VERTEX_INPUT_INSTANCE_ID\n\t\t\t#define VFX_GET_INSTANCE_ID(i)
unity_InstanceID\n\t\t#else\n\t\t\t#define VFX_DECLARE_INSTANCE_ID uint
instanceID : SV_InstanceID;\n\t\t\t#define VFX_GET_INSTANCE_ID(i) i.instanceID\n\t\t#endif\n\t\t\n\t\tENDHLSL\n\t\t\n\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
instanceID : SV_InstanceID;\n\t\t\t#define VFX_GET_INSTANCE_ID(i) i.instanceID\n\t\t#endif\n\t\t\n\t\tENDHLSL\n\t\t\n\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"SceneSelectionPass\" }\n\t\t\n\t\t\tZWrite On\n\t\t\tBlend
Off\n\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#define VFX_PASSDEPTH VFX_PASSDEPTH_SELECTION\n\t\t\t#pragma
target 4.5\n\t\t\t#define UNITY_MATERIAL_LIT\n\t\t\t#pragma multi_compile _

for scene selection in the editor, this code allow to output the outline correctly\n\t\t\t\t\toutColor
= float4(_ObjectId, _PassValue, 1.0, 1.0);\n\t\t\t\t#elif VFX_PASSDEPTH ==
VFX_PASSDEPTH_ACTUAL\n\t\t\t\t\t//void\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH
undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"DepthOnly\" }\n\t\t\n\t\t\tZWrite On\n\t\t\tBlend Off\n\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#define
VFX_PASSDEPTH VFX_PASSDEPTH_ACTUAL\n\t\t\t#pragma target 4.5\n\t\t\t#define
UNITY_MATERIAL_LIT\n\t\t\t#pragma multi_compile _ WRITE_NORMAL_BUFFER\n\t\t\t\n\t\t\t#define

for scene selection in the editor, this code allow to output the outline correctly\n\t\t\t\t\toutColor
= float4(_ObjectId, _PassValue, 1.0, 1.0);\n\t\t\t\t#elif VFX_PASSDEPTH ==
VFX_PASSDEPTH_ACTUAL\n\t\t\t\t\t//void\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH
undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\t\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\t\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"GBuffer\" }\n\t\t\t\n\t\t\tStencil\n\t\t\t{\n\t\t\t\tWriteMask
7\n\t\t\t\tRef 2\n\t\t\t\tComp Always\n\t\t\t\tPass Replace\n\t\t\t}\t\n\t\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#pragma
target 4.5\n\t\t\t\n\t\t\t#pragma multi_compile _ LIGHT_LAYERS\n\t\t\t#pragma

\n\t\t VFXSetupBuiltin(builtin,surface,builtin.emissiveColor, i);\n\t\t
ENCODE_INTO_GBUFFER(surface, builtin, i.VFX_VARYING_POSCS.xy, outGBuffer);\n\t\t
#else\n\t\t VFXComputePixelOutputToGBuffer(i,normalWS,uvData,outGBuffer);\n\t\t
#endif\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\t// Forward pass\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
#endif\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\t// Forward pass\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"Forward\"}\n\t\t\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#pragma
target 4.5\n\t\t\t\n\t\t\t#define UNITY_MATERIAL_LIT\n\t\t\t#define LIGHTLOOP_TILE_PASS\n\t\t\t#define
_ENABLE_FOG_ON_TRANSPARENT\n\t\t\t#define _DISABLE_DECALS\n\t\t\t\n\n\t\t\t#pragma

encodedMotionVector = 0.0f;\n\t\t\t\t\t\tVFXEncodeMotionVector(velocity * 0.5f,
encodedMotionVector);\n\t\t\t\t\t\t\n\t\t\t\toutMotionVector = encodedMotionVector;\n\t\t\t\toutMotionVector.a
= outColor.a < i.VFX_VARYING_ALPHATHRESHOLD ? 0.0f : 1.0f; //Independant clipping
for motion vector pass\n\t\t#endif\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
for motion vector pass\n\t\t#endif\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"ShadowCaster\" }\n\t\t\n\t\t\tZWrite On\n\t\t\tBlend Off\n\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#pragma
target 4.5\n\t\t\t#if !USE_ALPHA_TEST && IS_TRANSPARENT_PARTICLE\n\t\t\t#define
USE_ALPHA_TEST 1\n\t\t\t#endif\n\t\t\t\n\t\t\tstruct ps_input\n\t\t\t{\n\t\t\t\tfloat4

VFX_SHADERGRAPH\n\t\t\t\n\t\t\t\t\n\t\t\n\t\t\t\t\n\t\t\n\t\t\t\tfloat alpha
= OUTSG.;\n\t\t\t#else\n\t\t\t\tfloat alpha = VFXGetFragmentColor(i).a;\n\t\t\t\t#if
HDRP_USE_BASE_COLOR_MAP_ALPHA\n\t\t\t\t\t\talpha *= VFXGetTextureColor(VFX_SAMPLER(baseColorMap),i).a;\t\n\t\t\t\t#endif\n\t\t\t#endif\n\t\t\t\tVFXClipFragmentColor(alpha,i);\n\t\t\n\t\t\t\treturn
0;\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t}\r\n}\r\n"
0;\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t}\n}\n"
m_Infos:
m_Expressions:
m_Expressions:

340
Assets/Samples/SpaceshipHoloTable/VFX/ARUI-Table-PinScreen.vfx


m_ShaderSources:
- compute: 1
name: '[System 1]Initialize Particle'
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\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_TARGETPOSITION_CURRENT 1\n#define VFX_USE_COLOR_CURRENT

VFX_USE_PIVOTZ_CURRENT 1\n#define VFX_USE_SCALEX_CURRENT 1\n#define VFX_USE_SCALEY_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\n\nstruct
1\n#define VFX_LOCAL_SPACE 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\n\nstruct
attributeMap_a;\nSamplerState samplerattributeMap_a;\nfloat4 attributeMap_a_TexelSize;\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<uint>
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<uint> eventList;\r\nByteAddressBuffer
inputAdditional;\r\n#endif\r\n\r\n#if HAS_STRIPS\r\nRWBuffer<uint> 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
attributeMap_a;\nSamplerState samplerattributeMap_a;\nfloat4 attributeMap_a_TexelSize;\n\n\n\n#define
USE_DEAD_LIST (VFX_USE_ALIVE_CURRENT && !HAS_STRIPS)\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 USE_DEAD_LIST\nRWStructuredBuffer<uint> 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<uint>
eventList;\nByteAddressBuffer inputAdditional;\n#endif\n\n#if HAS_STRIPS\nRWBuffer<uint>
stripDataBuffer;\n#endif\n\n#include \"Packages/com.unity.visualeffectgraph/Shaders/Common/VFXCommonCompute.hlsl\"\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\n\nvoid
AttributeFromMap_6F6C3099(inout float3 position, uint particleId, VFXSampler2D
attributeMap, float3 valueBias, float3 valueScale) /*attribute:position Composition:Overwrite
SampleMode:Sequential channels:XYZ */\n{\n \n uint width, height;\n

value = (value + valueBias) * valueScale;\n position = value;\n}\nvoid
SetAttribute_2CF4000A(inout float3 targetPosition, float3 TargetPosition) /*attribute:targetPosition
Composition:Overwrite Source:Slot Random:Off channels:XYZ */\n{\n targetPosition
= TargetPosition;\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
= TargetPosition;\n}\n\n\n\n#if HAS_STRIPS\nbool GetParticleIndex(inout uint
particleIndex, uint stripIndex)\n{\n\tuint relativeIndex;\n\tInterlockedAdd(STRIP_DATA(STRIP_NEXT_INDEX,
stripIndex), 1, relativeIndex);\n\tif (relativeIndex >= PARTICLE_PER_STRIP_COUNT)
// strip is full\n\t{\n\t\tInterlockedAdd(STRIP_DATA(STRIP_NEXT_INDEX, stripIndex),
-1); // Remove previous increment\n\t\treturn false;\n\t}\n\n\tparticleIndex
+ 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
+ relativeIndex) % PARTICLE_PER_STRIP_COUNT);\n return true;\n}\n#endif\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 USE_DEAD_LIST\n maxThreadId
= min(maxThreadId, deadListCount.Load(0x0));\n#elif VFX_USE_SPAWNER_FROM_GPU\n
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\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
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\t\tuint particleIndex = id + currentSpawnIndex;\n\t\t\n#if
!VFX_USE_SPAWNER_FROM_GPU\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\n\t\tAttributes
attributes = (Attributes)0;\n\t\tSourceAttributes sourceAttributes = (SourceAttributes)0;\n\t\t\n
attributes.position = float3(0, 0, 0);\n attributes.particleId = (uint)0;\n
attributes.targetPosition = float3(0, 0, 0);\n attributes.color = float3(1,
1, 1);\n attributes.size = (float)0.100000001;\n attributes.seed

= (float)0;\n attributes.scaleX = (float)1;\n attributes.scaleY
= (float)1;\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_6F6C3099(
= (float)1;\n \n\n#if VFX_USE_PARTICLEID_CURRENT\n attributes.particleId
= particleIndex;\n#endif\n#if VFX_USE_SEED_CURRENT\n attributes.seed
= WangHash(particleIndex ^ systemSeed);\n#endif\n#if VFX_USE_SPAWNINDEX_CURRENT\n
attributes.spawnIndex = id;\n#endif\n#if HAS_STRIPS\n#if !VFX_USE_SPAWNER_FROM_GPU\n\t\t\n#else\n
uint stripIndex = sourceIndex;\n#endif\n\t\tstripIndex = min(stripIndex, STRIP_COUNT);\n\n
if (!GetParticleIndex(particleIndex, stripIndex))\n return;\n\n
const StripData stripData = GetStripDataFromStripIndex(stripIndex, PARTICLE_PER_STRIP_COUNT);\n\t\tInitStripAttributes(particleIndex,
attributes, stripData);\n\t\t// TODO Change seed to be sure we're deterministic
on random with strip\n#endif\n \n {\n AttributeFromMap_6F6C3099(
\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
\n\n\t\t\n#if VFX_USE_ALIVE_CURRENT\n if (attributes.alive)\n#endif
\n {\n#if USE_DEAD_LIST\n\t uint deadIndex = deadListIn.DecrementCounter();\n
uint index = deadListIn[deadIndex];\n#else\n uint index = particleIndex;\n#endif\n
attributeBuffer.Store3((index * 0x4 + 0x0) << 2,asuint(attributes.position));\n
attributeBuffer.Store((index * 0x1 + 0x40000) << 2,asuint(attributes.particleId));\n
attributeBuffer.Store3((index * 0x4 + 0x50000) << 2,asuint(attributes.targetPosition));\n

attributeBuffer.Store((index * 0x2 + 0x1B0001) << 2,asuint(attributes.pivotZ));\n
attributeBuffer.Store((index * 0xC + 0xF0007) << 2,asuint(attributes.scaleX));\n
attributeBuffer.Store((index * 0xC + 0xF000B) << 2,asuint(attributes.scaleY));\n
\n\r\n }\r\n }\r\n}\r\n"
\n\n }\n }\n}\n"
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
VFX_USE_SEED_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
VFX_USE_SEED_CURRENT 1\n#define VFX_LOCAL_SPACE 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\nCBUFFER_START(parameters)\n
float4 uniform_e;\n float4 uniform_g;\n float2 uniform_b;\n float2
uniform_c;\n float uniform_d;\n float uniform_f;\n float uniform_h;\n
float uniform_i;\n float uniform_j;\n float uniform_k;\n float Blend_a;\n

texture_b_TexelSize;\nTexture2D texture_c;\nSamplerState samplertexture_c;\nfloat4
texture_c_TexelSize;\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<uint>
deadListOut;\r\n#endif\r\n\r\n#if VFX_HAS_INDIRECT_DRAW\r\nRWStructuredBuffer<uint>
indirectBuffer;\r\n#endif\r\n\r\n#if HAS_STRIPS\r\nRWBuffer<uint> stripDataBuffer;\r\n#endif\r\n\r\n#if
VFX_USE_STRIPALIVE_CURRENT\r\nBuffer<uint> 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
texture_c_TexelSize;\n\n\n\n#define USE_DEAD_LIST (VFX_USE_ALIVE_CURRENT &&
!HAS_STRIPS)\n\nRWByteAddressBuffer attributeBuffer;\n\n#if USE_DEAD_LIST\nRWStructuredBuffer<uint>
deadListOut;\n#endif\n\n#if VFX_HAS_INDIRECT_DRAW\nRWStructuredBuffer<uint>
indirectBuffer;\n#endif\n\n#if HAS_STRIPS\nRWBuffer<uint> stripDataBuffer;\n#endif\n\n#if
VFX_USE_STRIPALIVE_CURRENT\nBuffer<uint> attachedStripDataBuffer;\n#endif\n\nCBUFFER_START(updateParams)\n
uint nbMax;\n\tuint dispatchWidth;\n\tuint systemSeed;\nCBUFFER_END\n\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\r\n\r\nvoid
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\n\nvoid
SetAttribute_CE7D5850(inout float3 position, float3 Position, float Blend)
/*attribute:position Composition:Blend Source:Slot Random:Off channels:XYZ
*/\n{\n position = lerp(position,Position,Blend);\n}\nvoid SetAttribute_FDD06EC7(inout

Random:Off channels:XYZ */\n{\n size = Size;\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\t\r\n\t\tif
(attributes.alive)\r\n\t\t{\r\n\t\t\tattributes.position = asfloat(attributeBuffer.Load3((index
Random:Off channels:XYZ */\n{\n size = Size;\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 Attributes attributes = (Attributes)0;\n\t\tSourceAttributes
sourceAttributes = (SourceAttributes)0;\n\n#if VFX_USE_ALIVE_CURRENT\n\t\t\n\t\tif
(attributes.alive)\n\t\t{\n\t\t\tattributes.position = asfloat(attributeBuffer.Load3((index
* 0x1 + 0xE0000) << 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 float tmp_bj = attributes.position[0];\n\t\t\t
* 0x1 + 0xE0000) << 2));\n\t\t\t\n\n\n// Initialize built-in needed attributes\n#if
VFX_USE_OLDPOSITION_CURRENT\n\t\t\tattributes.oldPosition = attributes.position;\n#endif\n#if
HAS_STRIPS\n const StripData stripData = GetStripDataFromParticleIndex(index,
PARTICLE_PER_STRIP_COUNT);\n InitStripAttributes(index, attributes,
stripData);\n#endif\n\t\t\t\n\t\t\t{\n\t\t\t float tmp_bj = attributes.position[0];\n\t\t\t
float tmp_bk = attributes.position[2];\n\t\t\t float2 tmp_bl = float2(tmp_bj,
tmp_bk);\n\t\t\t float2 tmp_bm = tmp_bl - uniform_b;\n\t\t\t float2 tmp_bn
= tmp_bm / uniform_c;\n\t\t\t float2 tmp_bp = tmp_bn - float2(0.5, 0.5);\n\t\t\t

float tmp_dc = tmp_db[0];\n\t\t\t float tmp_dd = tmp_db[1];\n\t\t\t float
tmp_de = tmp_db[2];\n\t\t\t float3 tmp_df = float3(tmp_dc, tmp_dd, tmp_de);\n\t\t\t
SetAttribute_FDD06EC7( /*inout */attributes.color, tmp_df);\n\t\t\t}\n\t\t\t{\n\t\t\t
SetAttribute_3278B22F( /*inout */attributes.size, (float)1);\n\t\t\t}\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 * 0x4
+ 0x0) << 2,asuint(attributes.position));\n\t\t\t\tattributeBuffer.Store3((index
SetAttribute_3278B22F( /*inout */attributes.size, (float)1);\n\t\t\t}\n\t\t\t\n\n\n\t\t\tif
(attributes.alive)\n\t\t\t{\n\t\t\t\tattributeBuffer.Store3((index * 0x4 +
0x0) << 2,asuint(attributes.position));\n\t\t\t\tattributeBuffer.Store3((index
* 0x1 + 0xE0000) << 2,asuint(attributes.seed));\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\t\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,
* 0x1 + 0xE0000) << 2,asuint(attributes.seed));\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\n#if HAS_STRIPS\t\t\t\n\t\t\t\tuint relativeIndexInStrip
= GetRelativeIndex(index, stripData);\n\t\t\t\tInterlockedMin(STRIP_DATA(STRIP_MIN_ALIVE,
stripData.stripIndex), relativeIndexInStrip);\n\t\t\t\tInterlockedMax(STRIP_DATA(STRIP_MAX_ALIVE,
stripData.stripIndex), relativeIndexInStrip);\n#endif\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t\n#if
USE_DEAD_LIST && !VFX_USE_STRIPALIVE_CURRENT\n\t\t\t\tuint deadIndex = deadListOut.IncrementCounter();\n\t\t\t\tdeadListOut[deadIndex]
= index;\n#endif\n\t\t\t}\n\t\t}\n#if USE_DEAD_LIST && VFX_USE_STRIPALIVE_CURRENT\n
else if (attributes.stripAlive)\n {\n if (STRIP_DATA_X(attachedStripDataBuffer,
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.position
= asfloat(attributeBuffer.Load3((index * 0x4 + 0x0) << 2));\n\t\tattributes.targetPosition
= asfloat(attributeBuffer.Load3((index * 0x4 + 0x50000) << 2));\n\t\tattributes.color
= asfloat(attributeBuffer.Load3((index * 0x4 + 0x90000) << 2));\n\t\tattributes.size
= asfloat(attributeBuffer.Load((index * 0x1 + 0xD0000) << 2));\n\t\tattributes.seed
= (attributeBuffer.Load((index * 0x1 + 0xE0000) << 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 float tmp_bj = attributes.position[0];\n\t\t
float tmp_bk = attributes.position[2];\n\t\t float2 tmp_bl = float2(tmp_bj,
tmp_bk);\n\t\t float2 tmp_bm = tmp_bl - uniform_b;\n\t\t float2 tmp_bn
= tmp_bm / uniform_c;\n\t\t float2 tmp_bp = tmp_bn - float2(0.5, 0.5);\n\t\t
float4 tmp_bq = SampleTexture(VFX_SAMPLER(texture_b),tmp_bp,(float)0);\n\t\t
the particle \n {\n uint deadIndex = deadListOut.IncrementCounter();\n\t\t\t\tdeadListOut[deadIndex]
= index;\n attributes.stripAlive = false;\n \n
} \n }\n#endif\n#else\n\t\tattributes.position = asfloat(attributeBuffer.Load3((index
* 0x4 + 0x0) << 2));\n\t\tattributes.targetPosition = asfloat(attributeBuffer.Load3((index
* 0x4 + 0x50000) << 2));\n\t\tattributes.color = asfloat(attributeBuffer.Load3((index
* 0x4 + 0x90000) << 2));\n\t\tattributes.size = asfloat(attributeBuffer.Load((index
* 0x1 + 0xD0000) << 2));\n\t\tattributes.seed = (attributeBuffer.Load((index
* 0x1 + 0xE0000) << 2));\n\t\t\n\n\t\t\n#if VFX_USE_OLDPOSITION_CURRENT\n\t\tattributes.oldPosition
= attributes.position;\n#endif\n#if HAS_STRIPS\n const StripData stripData
= GetStripDataFromParticleIndex(index, PARTICLE_PER_STRIP_COUNT);\n
InitStripAttributes(index, attributes, stripData);\n#endif\n\t\t\n\t\t{\n\t\t
float tmp_bj = attributes.position[0];\n\t\t float tmp_bk = attributes.position[2];\n\t\t
float2 tmp_bl = float2(tmp_bj, tmp_bk);\n\t\t float2 tmp_bm = tmp_bl - uniform_b;\n\t\t
float2 tmp_bn = tmp_bm / uniform_c;\n\t\t float2 tmp_bp = tmp_bn - float2(0.5,
0.5);\n\t\t float4 tmp_bq = SampleTexture(VFX_SAMPLER(texture_b),tmp_bp,(float)0);\n\t\t
float tmp_br = tmp_bq[1];\n\t\t float2 tmp_bs = tmp_bl * tmp_bl;\n\t\t
float tmp_bt = tmp_bs[1];\n\t\t float tmp_bu = tmp_bs[0];\n\t\t float
tmp_bv = tmp_bt + tmp_bu;\n\t\t float tmp_bx = pow(tmp_bv, (float)0.5);\n\t\t

float tmp_dc = tmp_db[0];\n\t\t float tmp_dd = tmp_db[1];\n\t\t float
tmp_de = tmp_db[2];\n\t\t float3 tmp_df = float3(tmp_dc, tmp_dd, tmp_de);\n\t\t
SetAttribute_FDD06EC7( /*inout */attributes.color, tmp_df);\n\t\t}\n\t\t{\n\t\t
SetAttribute_3278B22F( /*inout */attributes.size, (float)1);\n\t\t}\n\t\t\n\r\n\t\tattributeBuffer.Store3((index
SetAttribute_3278B22F( /*inout */attributes.size, (float)1);\n\t\t}\n\t\t\n\n\t\tattributeBuffer.Store3((index
* 0x1 + 0xE0000) << 2,asuint(attributes.seed));\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"
* 0x1 + 0xE0000) << 2,asuint(attributes.seed));\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"
source: "Shader \"Hidden/VFX/ARUI-Table-PinScreen/System 1/Pin Caps\"\n{\r\n\tSubShader\r\n\t{\t\r\n\t\tCull
Off\r\n\t\t\r\n\t\tTags { \"Queue\"=\"Geometry+450\" \"IgnoreProjector\"=\"False\"
source: "Shader \"Hidden/VFX/ARUI-Table-PinScreen/System 1/Pin Caps\"\n{\n\tSubShader\n\t{\t\n\t\tCull
Off\n\t\t\n\t\tTags { \"Queue\"=\"Geometry+450\" \"IgnoreProjector\"=\"False\"
\"RenderType\"=\"Opaque\" }\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\t\n\t\t\n\t\t\n\t\t\n\t\tZTest
LEqual\n\t\tZWrite On\n\t\tCull Off\n\t\t\n\t\n\t\t\t\n\t\tHLSLINCLUDE\n\t\t\n\t\t#define
NB_THREADS_PER_GROUP 64\n\t\t#define HAS_ATTRIBUTES 1\n\t\t#define VFX_PASSDEPTH_ACTUAL

to always use a valid instanceID\n\t\t#if defined(UNITY_STEREO_INSTANCING_ENABLED)\n\t\t\t#define
VFX_DECLARE_INSTANCE_ID UNITY_VERTEX_INPUT_INSTANCE_ID\n\t\t\t#define VFX_GET_INSTANCE_ID(i)
unity_InstanceID\n\t\t#else\n\t\t\t#define VFX_DECLARE_INSTANCE_ID uint
instanceID : SV_InstanceID;\n\t\t\t#define VFX_GET_INSTANCE_ID(i) i.instanceID\n\t\t#endif\n\t\t\n\t\tENDHLSL\n\t\t\n\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
instanceID : SV_InstanceID;\n\t\t\t#define VFX_GET_INSTANCE_ID(i) i.instanceID\n\t\t#endif\n\t\t\n\t\tENDHLSL\n\t\t\n\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"SceneSelectionPass\" }\n\t\t\n\t\t\tZWrite On\n\t\t\tBlend
Off\n\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#define VFX_PASSDEPTH VFX_PASSDEPTH_SELECTION\n\t\t\t#pragma
target 4.5\n\t\t\t#define UNITY_MATERIAL_LIT\n\t\t\t#pragma multi_compile _

for scene selection in the editor, this code allow to output the outline correctly\n\t\t\t\t\toutColor
= float4(_ObjectId, _PassValue, 1.0, 1.0);\n\t\t\t\t#elif VFX_PASSDEPTH ==
VFX_PASSDEPTH_ACTUAL\n\t\t\t\t\t//void\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH
undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"DepthOnly\" }\n\t\t\n\t\t\tZWrite On\n\t\t\tBlend Off\n\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#define
VFX_PASSDEPTH VFX_PASSDEPTH_ACTUAL\n\t\t\t#pragma target 4.5\n\t\t\t#define
UNITY_MATERIAL_LIT\n\t\t\t#pragma multi_compile _ WRITE_NORMAL_BUFFER\n\t\t\t\n\t\t\t#define

for scene selection in the editor, this code allow to output the outline correctly\n\t\t\t\t\toutColor
= float4(_ObjectId, _PassValue, 1.0, 1.0);\n\t\t\t\t#elif VFX_PASSDEPTH ==
VFX_PASSDEPTH_ACTUAL\n\t\t\t\t\t//void\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH
undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"MotionVectors\" }\n\t\t\t\n\t\t\tStencil\n\t\t\t{\n\t\t\t
WriteMask 176\n\t\t\t Ref 160\n\t\t\t Comp Always\n\t\t\t Pass Replace\n\t\t\t}\n\n\t\t\n\t\t\tZWrite
On\n\t\t\tBlend Off\n\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#define VFX_PASSDEPTH

for scene selection in the editor, this code allow to output the outline correctly\n\t\t\t\t\toutColor
= float4(_ObjectId, _PassValue, 1.0, 1.0);\n\t\t\t\t#elif VFX_PASSDEPTH ==
VFX_PASSDEPTH_ACTUAL\n\t\t\t\t\t//void\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH
undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"GBuffer\" }\n\t\t\t\n\t\t\tStencil\n\t\t\t{\n\t\t\t\tWriteMask
7\n\t\t\t\tRef 2\n\t\t\t\tComp Always\n\t\t\t\tPass Replace\n\t\t\t}\t\n\t\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#pragma
target 4.5\n\t\t\t\n\t\t\t#pragma multi_compile _ LIGHT_LAYERS\n\t\t\t#pragma

\n\t\t VFXSetupBuiltin(builtin,surface,builtin.emissiveColor, i);\n\t\t
ENCODE_INTO_GBUFFER(surface, builtin, i.VFX_VARYING_POSCS.xy, outGBuffer);\n\t\t
#else\n\t\t VFXComputePixelOutputToGBuffer(i,normalWS,uvData,outGBuffer);\n\t\t
#endif\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\t// Forward pass\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
#endif\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\t// Forward pass\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"Forward\"}\n\t\t\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#pragma
target 4.5\n\t\t\t\n\t\t\t#define UNITY_MATERIAL_LIT\n\t\t\t#define LIGHTLOOP_TILE_PASS\n\t\t\t#define
_ENABLE_FOG_ON_TRANSPARENT\n\t\t\t#define _DISABLE_DECALS\n\t\t\t\n\n\t\t\t#pragma

encodedMotionVector = 0.0f;\n\t\t\t\t\t\tVFXEncodeMotionVector(velocity * 0.5f,
encodedMotionVector);\n\t\t\t\t\t\t\n\t\t\t\toutMotionVector = encodedMotionVector;\n\t\t\t\toutMotionVector.a
= outColor.a < i.VFX_VARYING_ALPHATHRESHOLD ? 0.0f : 1.0f; //Independant clipping
for motion vector pass\n\t\t#endif\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\t\r\n\t}\r\n}\r\n"
for motion vector pass\n\t\t#endif\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\t\n\t}\n}\n"
source: "Shader \"Hidden/VFX/ARUI-Table-PinScreen/System 1/Vertical Pins\"\n{\r\n\tSubShader\r\n\t{\t\r\n\t\tCull
Off\r\n\t\t\r\n\t\tTags { \"Queue\"=\"Geometry+0\" \"IgnoreProjector\"=\"False\"
source: "Shader \"Hidden/VFX/ARUI-Table-PinScreen/System 1/Vertical Pins\"\n{\n\tSubShader\n\t{\t\n\t\tCull
Off\n\t\t\n\t\tTags { \"Queue\"=\"Geometry+0\" \"IgnoreProjector\"=\"False\"
\"RenderType\"=\"Opaque\" }\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\t\n\t\t\n\t\t\n\t\t\n\t\tZTest
LEqual\n\t\tZWrite On\n\t\tCull Off\n\t\t\n\t\n\t\t\t\n\t\tHLSLINCLUDE\n\t\t\n\t\t#define
NB_THREADS_PER_GROUP 64\n\t\t#define HAS_ATTRIBUTES 1\n\t\t#define VFX_PASSDEPTH_ACTUAL

to always use a valid instanceID\n\t\t#if defined(UNITY_STEREO_INSTANCING_ENABLED)\n\t\t\t#define
VFX_DECLARE_INSTANCE_ID UNITY_VERTEX_INPUT_INSTANCE_ID\n\t\t\t#define VFX_GET_INSTANCE_ID(i)
unity_InstanceID\n\t\t#else\n\t\t\t#define VFX_DECLARE_INSTANCE_ID uint
instanceID : SV_InstanceID;\n\t\t\t#define VFX_GET_INSTANCE_ID(i) i.instanceID\n\t\t#endif\n\t\t\n\t\tENDHLSL\n\t\t\n\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
instanceID : SV_InstanceID;\n\t\t\t#define VFX_GET_INSTANCE_ID(i) i.instanceID\n\t\t#endif\n\t\t\n\t\tENDHLSL\n\t\t\n\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"SceneSelectionPass\" }\n\t\t\n\t\t\tZWrite On\n\t\t\tBlend
Off\n\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#define VFX_PASSDEPTH VFX_PASSDEPTH_SELECTION\n\t\t\t#pragma
target 4.5\n\t\t\t#define UNITY_MATERIAL_LIT\n\t\t\t#pragma multi_compile _

for scene selection in the editor, this code allow to output the outline correctly\n\t\t\t\t\toutColor
= float4(_ObjectId, _PassValue, 1.0, 1.0);\n\t\t\t\t#elif VFX_PASSDEPTH ==
VFX_PASSDEPTH_ACTUAL\n\t\t\t\t\t//void\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH
undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"DepthOnly\" }\n\t\t\n\t\t\tZWrite On\n\t\t\tBlend Off\n\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#define
VFX_PASSDEPTH VFX_PASSDEPTH_ACTUAL\n\t\t\t#pragma target 4.5\n\t\t\t#define
UNITY_MATERIAL_LIT\n\t\t\t#pragma multi_compile _ WRITE_NORMAL_BUFFER\n\t\t\t\n\t\t\t#define

for scene selection in the editor, this code allow to output the outline correctly\n\t\t\t\t\toutColor
= float4(_ObjectId, _PassValue, 1.0, 1.0);\n\t\t\t\t#elif VFX_PASSDEPTH ==
VFX_PASSDEPTH_ACTUAL\n\t\t\t\t\t//void\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH
undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"MotionVectors\" }\n\t\t\t\n\t\t\tStencil\n\t\t\t{\n\t\t\t
WriteMask 176\n\t\t\t Ref 160\n\t\t\t Comp Always\n\t\t\t Pass Replace\n\t\t\t}\n\n\t\t\n\t\t\tZWrite
On\n\t\t\tBlend Off\n\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#define VFX_PASSDEPTH

for scene selection in the editor, this code allow to output the outline correctly\n\t\t\t\t\toutColor
= float4(_ObjectId, _PassValue, 1.0, 1.0);\n\t\t\t\t#elif VFX_PASSDEPTH ==
VFX_PASSDEPTH_ACTUAL\n\t\t\t\t\t//void\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH
undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"GBuffer\" }\n\t\t\t\n\t\t\tStencil\n\t\t\t{\n\t\t\t\tWriteMask
7\n\t\t\t\tRef 2\n\t\t\t\tComp Always\n\t\t\t\tPass Replace\n\t\t\t}\t\n\t\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#pragma
target 4.5\n\t\t\t\n\t\t\t#pragma multi_compile _ LIGHT_LAYERS\n\t\t\t#pragma

\n\t\t VFXSetupBuiltin(builtin,surface,builtin.emissiveColor, i);\n\t\t
ENCODE_INTO_GBUFFER(surface, builtin, i.VFX_VARYING_POSCS.xy, outGBuffer);\n\t\t
#else\n\t\t VFXComputePixelOutputToGBuffer(i,normalWS,uvData,outGBuffer);\n\t\t
#endif\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\t// Forward pass\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
#endif\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\t// Forward pass\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"Forward\"}\n\t\t\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#pragma
target 4.5\n\t\t\t\n\t\t\t#define UNITY_MATERIAL_LIT\n\t\t\t#define LIGHTLOOP_TILE_PASS\n\t\t\t#define
_ENABLE_FOG_ON_TRANSPARENT\n\t\t\t#define _DISABLE_DECALS\n\t\t\t\n\n\t\t\t#pragma

encodedMotionVector = 0.0f;\n\t\t\t\t\t\tVFXEncodeMotionVector(velocity * 0.5f,
encodedMotionVector);\n\t\t\t\t\t\t\n\t\t\t\toutMotionVector = encodedMotionVector;\n\t\t\t\toutMotionVector.a
= outColor.a < i.VFX_VARYING_ALPHATHRESHOLD ? 0.0f : 1.0f; //Independant clipping
for motion vector pass\n\t\t#endif\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\t\r\n\t}\r\n}\r\n"
for motion vector pass\n\t\t#endif\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\t\n\t}\n}\n"
source: "Shader \"Hidden/VFX/ARUI-Table-PinScreen/System 1/Light Rays\"\n{\r\n\tSubShader\r\n\t{\t\r\n\t\tCull
Off\r\n\t\t\r\n\t\tTags { \"Queue\"=\"Transparent+400\" \"IgnoreProjector\"=\"True\"
source: "Shader \"Hidden/VFX/ARUI-Table-PinScreen/System 1/Light Rays\"\n{\n\tSubShader\n\t{\t\n\t\tCull
Off\n\t\t\n\t\tTags { \"Queue\"=\"Transparent+400\" \"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\t\n\t\t\n\t\t\n\t\t\n\t\tBlend
SrcAlpha One , Zero 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\n\t\t#define
NB_THREADS_PER_GROUP 64\n\t\t#define HAS_ATTRIBUTES 1\n\t\t#define VFX_PASSDEPTH_ACTUAL

to always use a valid instanceID\n\t\t#if defined(UNITY_STEREO_INSTANCING_ENABLED)\n\t\t\t#define
VFX_DECLARE_INSTANCE_ID UNITY_VERTEX_INPUT_INSTANCE_ID\n\t\t\t#define VFX_GET_INSTANCE_ID(i)
unity_InstanceID\n\t\t#else\n\t\t\t#define VFX_DECLARE_INSTANCE_ID uint
instanceID : SV_InstanceID;\n\t\t\t#define VFX_GET_INSTANCE_ID(i) i.instanceID\n\t\t#endif\n\t\t\n\t\tENDHLSL\n\t\t\n\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
instanceID : SV_InstanceID;\n\t\t\t#define VFX_GET_INSTANCE_ID(i) i.instanceID\n\t\t#endif\n\t\t\n\t\tENDHLSL\n\t\t\n\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"SceneSelectionPass\" }\n\t\t\n\t\t\tZWrite On\n\t\t\tBlend
Off\n\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#define VFX_PASSDEPTH VFX_PASSDEPTH_SELECTION\n\t\t\t#pragma
target 4.5\n\t\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

0.5f, encodedMotionVector);\n\t\t\t\t\t\t\t\n\t\t\t\t\treturn encodedMotionVector;\n\t\t\t\t#elif
VFX_PASSDEPTH == VFX_PASSDEPTH_SELECTION\n\t\t\t\t\treturn float4(_ObjectId,
_PassValue, 1.0, 1.0);\n\t\t\t\t#elif VFX_PASSDEPTH == VFX_PASSDEPTH_ACTUAL\n\t\t\t\t\treturn
(float4)0;\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH undefined \n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\t\r\n\t\t\r\n\t\t//
(float4)0;\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH undefined \n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\t\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#pragma multi_compile
_ DEBUG_DISPLAY\n\t\t\n\t\t\tstruct ps_input\n\t\t\t{\n\t\t\t\tfloat4 pos :

encodedMotionVector = 0.0f;\n\t\t\t\t\t\tVFXEncodeMotionVector(velocity * 0.5f,
encodedMotionVector);\n\t\t\t\t\t\t\n\t\t\t\to.outMotionVector = encodedMotionVector;\n\t\t
o.outMotionVector.a = o.color.a < i.VFX_VARYING_ALPHATHRESHOLD ? 0.0f : 1.0f;
//Independant clipping for motion vector pass\n\t\t#endif\n\t\t\t\treturn o;\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\t\r\n\t}\r\n}\r\n"
//Independant clipping for motion vector pass\n\t\t#endif\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"
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\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_TARGETPOSITION_CURRENT
1\n#define VFX_USE_SIZE_CURRENT 1\n#define VFX_USE_ALPHA_CURRENT 1\n#define

1\n#define VFX_USE_PIVOTY_CURRENT 1\n#define VFX_USE_PIVOTZ_CURRENT 1\n#define
VFX_USE_SCALEX_CURRENT 1\n#define VFX_USE_SCALEY_CURRENT 1\n#define VFX_USE_SCALEZ_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
1\n#define VFX_LOCAL_SPACE 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\nCBUFFER_START(parameters)\n
float currentFrameIndex;\n uint3 PADDING_0;\nCBUFFER_END\n\nstruct Attributes\n{\n
float3 position;\n float3 targetPosition;\n float size;\n float alpha;\n
bool alive;\n float3 axisX;\n float3 axisY;\n float3 axisZ;\n float

samplerbaseColorMap;\nfloat4 baseColorMap_TexelSize;\nTexture2D normalMap;\nSamplerState
samplernormalMap;\nfloat4 normalMap_TexelSize;\n\n\r\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXCommon.hlsl\"\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\r\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\r\n\r\nByteAddressBuffer
attributeBuffer;\r\nRWByteAddressBuffer elementToVFXBuffer;\r\n#if VFX_USE_ALIVE_CURRENT\r\nStructuredBuffer<uint>
deadListOut;\r\n#endif\r\n\r\n#if VFX_HAS_INDIRECT_DRAW\r\nStructuredBuffer<uint>
indirectBuffer;\r\n#endif\r\n\r\nCBUFFER_START(updateParams)\r\n\tuint nbMax;\r\n\tuint
dispatchWidth;\r\n\tuint systemSeed;\r\nCBUFFER_END\r\n\r\nvoid ConnectTarget_0(inout
samplernormalMap;\nfloat4 normalMap_TexelSize;\n\n\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXCommon.hlsl\"\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nByteAddressBuffer
attributeBuffer;\nRWByteAddressBuffer elementToVFXBuffer;\n#if VFX_USE_ALIVE_CURRENT\nStructuredBuffer<uint>
deadListOut;\n#endif\n\n#if VFX_HAS_INDIRECT_DRAW\nStructuredBuffer<uint> indirectBuffer;\n#endif\n\nCBUFFER_START(updateParams)\n\tuint
nbMax;\n\tuint dispatchWidth;\n\tuint systemSeed;\nCBUFFER_END\n\nvoid ConnectTarget_0(inout
float3 axisX, inout float3 axisY, inout float3 axisZ, inout float3 position,
inout float pivotY, float size, inout float scaleY, float3 TargetPosition,
float PivotShift) /*Orientation:Camera */\n{\n \n axisY = TargetPosition-position;\n

PivotShift);\n pivotY = PivotShift - 0.5;\n \n}\nvoid SetAttribute_D5151644(inout
float scaleX, float Scale) /*attribute:scale Composition:Overwrite Source:Slot
Random:Off channels:X */\n{\n scaleX = Scale.x;\n}\n\n\r\n\r\n[numthreads(NB_THREADS_PER_GROUP,1,1)]\r\nvoid
CSMain(uint3 groupId\t\t: SV_GroupID,\r\n\t\t\tuint3 groupThreadId\t: SV_GroupThreadID)\r\n{\r\n\tuint
Random:Off channels:X */\n{\n scaleX = Scale.x;\n}\n\n\n\n[numthreads(NB_THREADS_PER_GROUP,1,1)]\nvoid
CSMain(uint3 groupId\t\t: SV_GroupID,\n\t\t\tuint3 groupThreadId\t: SV_GroupThreadID)\n{\n\tuint
* NB_THREADS_PER_GROUP;\r\n\tuint index = id;\r\n\tif (id < nbMax)\r\n\t{\r\n\t\tAttributes
attributes = (Attributes)0;\r\n\t\tSourceAttributes sourceAttributes = (SourceAttributes)0;\r\n\t\t\r\n\t\tattributes.alive
= (bool)true;\n\n\r\n\t\tif (attributes.alive)\r\n\t\t{\r\n\t\t\tattributes.position
* NB_THREADS_PER_GROUP;\n\tuint index = id;\n\tif (id < nbMax)\n\t{\n\t\tAttributes
attributes = (Attributes)0;\n\t\tSourceAttributes sourceAttributes = (SourceAttributes)0;\n\t\t\n\t\tattributes.alive
= (bool)true;\n\n\n\t\tif (attributes.alive)\n\t\t{\n\t\t\tattributes.position
= asfloat(attributeBuffer.Load3((index * 0x4 + 0x0) << 2));\nattributes.targetPosition
= asfloat(attributeBuffer.Load3((index * 0x4 + 0x50000) << 2));\nattributes.size
= asfloat(attributeBuffer.Load((index * 0x1 + 0xD0000) << 2));\nattributes.alpha

* 0xC + 0xF0003) << 2));\nattributes.pivotZ = asfloat(attributeBuffer.Load((index
* 0x2 + 0x1B0001) << 2));\nattributes.scaleX = asfloat(attributeBuffer.Load((index
* 0xC + 0xF0007) << 2));\nattributes.scaleY = asfloat(attributeBuffer.Load((index
* 0xC + 0xF000B) << 2));\nattributes.scaleZ = (float)1;\n\n\r\n\t\t\t{\n\t\t\t
* 0xC + 0xF000B) << 2));\nattributes.scaleZ = (float)1;\n\n\n\t\t\t{\n\t\t\t
SetAttribute_D5151644( /*inout */attributes.scaleX, (float)0.0120000001);\n\t\t\t}\n\t\t\t\n\r\n\t\t\t\r\n\t\t\t\n\t\t\tfloat3
SetAttribute_D5151644( /*inout */attributes.scaleX, (float)0.0120000001);\n\t\t\t}\n\t\t\t\n\n\t\t\t\n\t\t\t\n\t\t\tfloat3
VFX_USE_SCALEZ_CURRENT\n\t\t\tsize3.z *= attributes.scaleZ;\n\t\t\t#endif\n\t\t\t\r\n\t\t\tfloat4x4
elementToVFX = GetElementToVFXMatrix(\r\n\t\t\t\tattributes.axisX,\r\n\t\t\t\tattributes.axisY,\r\n\t\t\t\tattributes.axisZ,\r\n\t\t\t\tfloat3(attributes.angleX,attributes.angleY,attributes.angleZ),\r\n\t\t\t\tfloat3(attributes.pivotX,attributes.pivotY,attributes.pivotZ),\r\n\t\t\t\tsize3,\r\n\t\t\t\tattributes.position);\r\n\t\t\r\n\t\t\tUNITY_UNROLL\r\n\t\t\tfor
(int itIndexMatrixRow = 0; itIndexMatrixRow < 3; ++itIndexMatrixRow)\r\n\t\t\t{\r\n\t\t\t\tUNITY_UNROLL\r\n\t\t\t\tfor
(int itIndexMatrixCol = 0; itIndexMatrixCol < 4; ++itIndexMatrixCol)\r\n\t\t\t\t{\r\n\t\t\t\t\tuint
itIndexMatrix = itIndexMatrixCol * 4 + itIndexMatrixRow;\r\n\t\t\t\t\tfloat
value = elementToVFX[itIndexMatrixRow][itIndexMatrixCol];\r\n\t\t\t\t\telementToVFXBuffer.Store((index
* 16 + itIndexMatrix) << 2, asuint(value));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n
VFX_USE_SCALEZ_CURRENT\n\t\t\tsize3.z *= attributes.scaleZ;\n\t\t\t#endif\n\t\t\t\n\t\t\tfloat4x4
elementToVFX = GetElementToVFXMatrix(\n\t\t\t\tattributes.axisX,\n\t\t\t\tattributes.axisY,\n\t\t\t\tattributes.axisZ,\n\t\t\t\tfloat3(attributes.angleX,attributes.angleY,attributes.angleZ),\n\t\t\t\tfloat3(attributes.pivotX,attributes.pivotY,attributes.pivotZ),\n\t\t\t\tsize3,\n\t\t\t\tattributes.position);\n\t\t\n\t\t\tUNITY_UNROLL\n\t\t\tfor
(int itIndexMatrixRow = 0; itIndexMatrixRow < 3; ++itIndexMatrixRow)\n\t\t\t{\n\t\t\t\tUNITY_UNROLL\n\t\t\t\tfor
(int itIndexMatrixCol = 0; itIndexMatrixCol < 4; ++itIndexMatrixCol)\n\t\t\t\t{\n\t\t\t\t\tuint
itIndexMatrix = itIndexMatrixCol * 4 + itIndexMatrixRow;\n\t\t\t\t\tfloat value
= elementToVFX[itIndexMatrixRow][itIndexMatrixCol];\n\t\t\t\t\telementToVFXBuffer.Store((index
* 16 + itIndexMatrix) << 2, asuint(value));\n\t\t\t\t}\n\t\t\t}\n\n
: 0u);\r\n\t\t}\t\t\r\n\t}\r\n}\r\n"
: 0u);\n\t\t}\t\t\n\t}\n}\n"
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\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_SIZE_CURRENT
1\n#define VFX_USE_ALPHA_CURRENT 1\n#define VFX_USE_ALIVE_CURRENT 1\n#define

1\n#define VFX_USE_PIVOTZ_CURRENT 1\n#define VFX_USE_SCALEX_CURRENT 1\n#define
VFX_USE_SCALEY_CURRENT 1\n#define VFX_USE_SCALEZ_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
1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\nCBUFFER_START(parameters)\n
float currentFrameIndex;\n uint3 PADDING_0;\nCBUFFER_END\n\nstruct Attributes\n{\n
float3 position;\n float size;\n float alpha;\n bool alive;\n float3
axisX;\n float3 axisY;\n float3 axisZ;\n float angleX;\n float

baseColorMap_TexelSize;\n\n\r\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXCommon.hlsl\"\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\r\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\r\n\r\nByteAddressBuffer
attributeBuffer;\r\nRWByteAddressBuffer elementToVFXBuffer;\r\n#if VFX_USE_ALIVE_CURRENT\r\nStructuredBuffer<uint>
deadListOut;\r\n#endif\r\n\r\n#if VFX_HAS_INDIRECT_DRAW\r\nStructuredBuffer<uint>
indirectBuffer;\r\n#endif\r\n\r\nCBUFFER_START(updateParams)\r\n\tuint nbMax;\r\n\tuint
dispatchWidth;\r\n\tuint systemSeed;\r\nCBUFFER_END\r\n\r\nvoid Orient_630(inout
baseColorMap_TexelSize;\n\n\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXCommon.hlsl\"\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nByteAddressBuffer
attributeBuffer;\nRWByteAddressBuffer elementToVFXBuffer;\n#if VFX_USE_ALIVE_CURRENT\nStructuredBuffer<uint>
deadListOut;\n#endif\n\n#if VFX_HAS_INDIRECT_DRAW\nStructuredBuffer<uint> indirectBuffer;\n#endif\n\nCBUFFER_START(updateParams)\n\tuint
nbMax;\n\tuint dispatchWidth;\n\tuint systemSeed;\nCBUFFER_END\n\nvoid Orient_630(inout
float3 axisX, inout float3 axisY, inout float3 axisZ, float3 AxisZ, float3
AxisY) /*mode:Advanced axes:ZY */\n{\n \n axisZ = normalize(AxisZ);\n
axisX = normalize(cross(AxisY, AxisZ));\n axisY = cross(axisZ, axisX);\n

pivotZ = Pivot.z;\n}\nvoid SetAttribute_D5151647(inout float scaleX, inout
float scaleY, float2 Scale) /*attribute:scale Composition:Overwrite Source:Slot
Random:Off channels:XY */\n{\n scaleX = Scale.x;\n scaleY = Scale.y;\n}\n\n\r\n\r\n[numthreads(NB_THREADS_PER_GROUP,1,1)]\r\nvoid
CSMain(uint3 groupId\t\t: SV_GroupID,\r\n\t\t\tuint3 groupThreadId\t: SV_GroupThreadID)\r\n{\r\n\tuint
Random:Off channels:XY */\n{\n scaleX = Scale.x;\n scaleY = Scale.y;\n}\n\n\n\n[numthreads(NB_THREADS_PER_GROUP,1,1)]\nvoid
CSMain(uint3 groupId\t\t: SV_GroupID,\n\t\t\tuint3 groupThreadId\t: SV_GroupThreadID)\n{\n\tuint
* NB_THREADS_PER_GROUP;\r\n\tuint index = id;\r\n\tif (id < nbMax)\r\n\t{\r\n\t\tAttributes
attributes = (Attributes)0;\r\n\t\tSourceAttributes sourceAttributes = (SourceAttributes)0;\r\n\t\t\r\n\t\tattributes.alive
= (bool)true;\n\n\r\n\t\tif (attributes.alive)\r\n\t\t{\r\n\t\t\tattributes.position
* NB_THREADS_PER_GROUP;\n\tuint index = id;\n\tif (id < nbMax)\n\t{\n\t\tAttributes
attributes = (Attributes)0;\n\t\tSourceAttributes sourceAttributes = (SourceAttributes)0;\n\t\t\n\t\tattributes.alive
= (bool)true;\n\n\n\t\tif (attributes.alive)\n\t\t{\n\t\t\tattributes.position
= asfloat(attributeBuffer.Load3((index * 0x4 + 0x0) << 2));\nattributes.size
= asfloat(attributeBuffer.Load((index * 0x1 + 0xD0000) << 2));\nattributes.alpha
= (float)1;\nattributes.axisX = asfloat(attributeBuffer.Load3((index * 0xC

* 0xC + 0xF0003) << 2));\nattributes.pivotZ = asfloat(attributeBuffer.Load((index
* 0x2 + 0x1B0001) << 2));\nattributes.scaleX = asfloat(attributeBuffer.Load((index
* 0xC + 0xF0007) << 2));\nattributes.scaleY = asfloat(attributeBuffer.Load((index
* 0xC + 0xF000B) << 2));\nattributes.scaleZ = (float)1;\n\n\r\n\t\t\t{\n\t\t\t
* 0xC + 0xF000B) << 2));\nattributes.scaleZ = (float)1;\n\n\n\t\t\t{\n\t\t\t
float2(0.0149999997, 0.0149999997));\n\t\t\t}\n\t\t\t\n\r\n\t\t\t\r\n\t\t\t\n\t\t\tfloat3
float2(0.0149999997, 0.0149999997));\n\t\t\t}\n\t\t\t\n\n\t\t\t\n\t\t\t\n\t\t\tfloat3
VFX_USE_SCALEZ_CURRENT\n\t\t\tsize3.z *= attributes.scaleZ;\n\t\t\t#endif\n\t\t\t\r\n\t\t\tfloat4x4
elementToVFX = GetElementToVFXMatrix(\r\n\t\t\t\tattributes.axisX,\r\n\t\t\t\tattributes.axisY,\r\n\t\t\t\tattributes.axisZ,\r\n\t\t\t\tfloat3(attributes.angleX,attributes.angleY,attributes.angleZ),\r\n\t\t\t\tfloat3(attributes.pivotX,attributes.pivotY,attributes.pivotZ),\r\n\t\t\t\tsize3,\r\n\t\t\t\tattributes.position);\r\n\t\t\r\n\t\t\tUNITY_UNROLL\r\n\t\t\tfor
(int itIndexMatrixRow = 0; itIndexMatrixRow < 3; ++itIndexMatrixRow)\r\n\t\t\t{\r\n\t\t\t\tUNITY_UNROLL\r\n\t\t\t\tfor
(int itIndexMatrixCol = 0; itIndexMatrixCol < 4; ++itIndexMatrixCol)\r\n\t\t\t\t{\r\n\t\t\t\t\tuint
itIndexMatrix = itIndexMatrixCol * 4 + itIndexMatrixRow;\r\n\t\t\t\t\tfloat
value = elementToVFX[itIndexMatrixRow][itIndexMatrixCol];\r\n\t\t\t\t\telementToVFXBuffer.Store((index
* 16 + itIndexMatrix) << 2, asuint(value));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n
VFX_USE_SCALEZ_CURRENT\n\t\t\tsize3.z *= attributes.scaleZ;\n\t\t\t#endif\n\t\t\t\n\t\t\tfloat4x4
elementToVFX = GetElementToVFXMatrix(\n\t\t\t\tattributes.axisX,\n\t\t\t\tattributes.axisY,\n\t\t\t\tattributes.axisZ,\n\t\t\t\tfloat3(attributes.angleX,attributes.angleY,attributes.angleZ),\n\t\t\t\tfloat3(attributes.pivotX,attributes.pivotY,attributes.pivotZ),\n\t\t\t\tsize3,\n\t\t\t\tattributes.position);\n\t\t\n\t\t\tUNITY_UNROLL\n\t\t\tfor
(int itIndexMatrixRow = 0; itIndexMatrixRow < 3; ++itIndexMatrixRow)\n\t\t\t{\n\t\t\t\tUNITY_UNROLL\n\t\t\t\tfor
(int itIndexMatrixCol = 0; itIndexMatrixCol < 4; ++itIndexMatrixCol)\n\t\t\t\t{\n\t\t\t\t\tuint
itIndexMatrix = itIndexMatrixCol * 4 + itIndexMatrixRow;\n\t\t\t\t\tfloat value
= elementToVFX[itIndexMatrixRow][itIndexMatrixCol];\n\t\t\t\t\telementToVFXBuffer.Store((index
* 16 + itIndexMatrix) << 2, asuint(value));\n\t\t\t\t}\n\t\t\t}\n\n
: 0u);\r\n\t\t}\t\t\r\n\t}\r\n}\r\n"
: 0u);\n\t\t}\t\t\n\t}\n}\n"
m_Infos:
m_Expressions:
m_Expressions:

318
Assets/Samples/UnityLogo/UnityLogo.vfx


m_ShaderSources:
- compute: 1
name: '[System 1]Initialize Particle'
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\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_SEED_CURRENT
1\n#define VFX_USE_COLOR_CURRENT 1\n#define VFX_USE_POSITION_CURRENT 1\n#define

VFX_USE_AXISY_CURRENT 1\n#define VFX_USE_AXISZ_CURRENT 1\n#define VFX_USE_SCALEX_CURRENT
1\n#define VFX_USE_SCALEY_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
1\n#define VFX_USE_SCALEY_CURRENT 1\n#define VFX_LOCAL_SPACE 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\nCBUFFER_START(parameters)\n
float3 Color_b;\n float uniform_c;\n float3 uniform_f;\n float uniform_d;\n
float3 uniform_g;\n float uniform_e;\n float uniform_h;\n float uniform_i;\n
uint2 PADDING_0;\nCBUFFER_END\n\nstruct Attributes\n{\n float lifetime;\n

scaleX;\n float scaleY;\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\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<uint>
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<uint> eventList;\r\nByteAddressBuffer
inputAdditional;\r\n#endif\r\n\r\n#if HAS_STRIPS\r\nRWBuffer<uint> 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
scaleX;\n float scaleY;\n};\n\nstruct SourceAttributes\n{\n};\n\n\n\n\n#define
USE_DEAD_LIST (VFX_USE_ALIVE_CURRENT && !HAS_STRIPS)\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 USE_DEAD_LIST\nRWStructuredBuffer<uint> 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<uint>
eventList;\nByteAddressBuffer inputAdditional;\n#endif\n\n#if HAS_STRIPS\nRWBuffer<uint>
stripDataBuffer;\n#endif\n\n#include \"Packages/com.unity.visualeffectgraph/Shaders/Common/VFXCommonCompute.hlsl\"\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\n\nvoid
SetAttribute_F01429A3(inout float lifetime, inout uint seed, float A, float
B) /*attribute:lifetime Composition:Overwrite Source:Slot Random:Uniform channels:XYZ
*/\n{\n lifetime = lerp(A,B,RAND);\n}\nvoid SetAttribute_FDD06EC7(inout

* RAND, 1.0f / 3.0f);\n \n float2 sincosTheta;\n sincos(theta, sincosTheta.x,
sincosTheta.y);\n sincosTheta *= sqrt(1.0f - cosPhi * cosPhi);\n \n
direction = float3(sincosTheta, cosPhi);\n position += direction * (rNorm
* ArcSphere_sphere_radius) + ArcSphere_sphere_center;\n \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
* ArcSphere_sphere_radius) + ArcSphere_sphere_center;\n \n}\n\n\n\n#if HAS_STRIPS\nbool
GetParticleIndex(inout uint particleIndex, uint stripIndex)\n{\n\tuint relativeIndex;\n\tInterlockedAdd(STRIP_DATA(STRIP_NEXT_INDEX,
stripIndex), 1, relativeIndex);\n\tif (relativeIndex >= PARTICLE_PER_STRIP_COUNT)
// strip is full\n\t{\n\t\tInterlockedAdd(STRIP_DATA(STRIP_NEXT_INDEX, stripIndex),
-1); // Remove previous increment\n\t\treturn false;\n\t}\n\n\tparticleIndex
+ 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
+ relativeIndex) % PARTICLE_PER_STRIP_COUNT);\n return true;\n}\n#endif\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 USE_DEAD_LIST\n maxThreadId
= min(maxThreadId, deadListCount.Load(0x0));\n#elif VFX_USE_SPAWNER_FROM_GPU\n
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\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
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\t\tuint particleIndex = id + currentSpawnIndex;\n\t\t\n#if
!VFX_USE_SPAWNER_FROM_GPU\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\n\t\tAttributes
attributes = (Attributes)0;\n\t\tSourceAttributes sourceAttributes = (SourceAttributes)0;\n\t\t\n
attributes.lifetime = (float)1;\n attributes.seed = (uint)0;\n
attributes.color = float3(1, 1, 1);\n attributes.position = float3(0,
0, 0);\n attributes.direction = float3(0, 0, 1);\n attributes.particleId

= float3(0, 1, 0);\n attributes.axisZ = float3(0, 0, 1);\n attributes.scaleX
= (float)1;\n attributes.scaleY = (float)1;\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 SetAttribute_F01429A3(
= (float)1;\n attributes.scaleY = (float)1;\n \n\n#if VFX_USE_PARTICLEID_CURRENT\n
attributes.particleId = particleIndex;\n#endif\n#if VFX_USE_SEED_CURRENT\n
attributes.seed = WangHash(particleIndex ^ systemSeed);\n#endif\n#if VFX_USE_SPAWNINDEX_CURRENT\n
attributes.spawnIndex = id;\n#endif\n#if HAS_STRIPS\n#if !VFX_USE_SPAWNER_FROM_GPU\n\t\t\n#else\n
uint stripIndex = sourceIndex;\n#endif\n\t\tstripIndex = min(stripIndex, STRIP_COUNT);\n\n
if (!GetParticleIndex(particleIndex, stripIndex))\n return;\n\n
const StripData stripData = GetStripDataFromStripIndex(stripIndex, PARTICLE_PER_STRIP_COUNT);\n\t\tInitStripAttributes(particleIndex,
attributes, stripData);\n\t\t// TODO Change seed to be sure we're deterministic
on random with strip\n#endif\n \n {\n SetAttribute_F01429A3(
/*inout */attributes.lifetime, /*inout */attributes.seed, (float)2.5, (float)3.5);\n
}\n SetAttribute_FDD06EC7( /*inout */attributes.color, Color_b);\n
{\n uint tmp_bg = attributes.particleId ^ asuint(uniform_e);\n

float tmp_bx = tmp_bw * uniform_i;\n float tmp_by = uniform_h +
tmp_bx;\n PositionSphere_18D( /*inout */attributes.position, /*inout
*/attributes.seed, /*inout */attributes.direction, tmp_bs, tmp_by, (float)6.28318548,
(float)0);\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 * 0x2 + 0x0) << 2,asuint(attributes.lifetime));\n
attributeBuffer.Store3((index * 0x10 + 0x16E380) << 2,asuint(attributes.color));\n
attributeBuffer.Store3((index * 0x8 + 0xCDFF80) << 2,asuint(attributes.position));\n
attributeBuffer.Store((index * 0x2 + 0x1) << 2,asuint(attributes.particleId));\n
attributeBuffer.Store3((index * 0x8 + 0xCDFF84) << 2,asuint(attributes.velocity));\n
attributeBuffer.Store((index * 0x8 + 0xCDFF83) << 2,asuint(attributes.age));\n
attributeBuffer.Store((index * 0x10 + 0x16E383) << 2,asuint(attributes.alpha));\n
attributeBuffer.Store((index * 0x8 + 0xCDFF87) << 2,uint(attributes.alive));\n
attributeBuffer.Store3((index * 0x10 + 0x16E384) << 2,asuint(attributes.axisX));\n
attributeBuffer.Store3((index * 0x10 + 0x16E388) << 2,asuint(attributes.axisY));\n
attributeBuffer.Store3((index * 0x10 + 0x16E38C) << 2,asuint(attributes.axisZ));\n
attributeBuffer.Store((index * 0x10 + 0x16E387) << 2,asuint(attributes.scaleX));\n
attributeBuffer.Store((index * 0x10 + 0x16E38B) << 2,asuint(attributes.scaleY));\n
\n\r\n }\r\n }\r\n}\r\n"
(float)0);\n }\n \n\n\t\t\n#if VFX_USE_ALIVE_CURRENT\n
if (attributes.alive)\n#endif \n {\n#if USE_DEAD_LIST\n\t
uint deadIndex = deadListIn.DecrementCounter();\n uint index = deadListIn[deadIndex];\n#else\n
uint index = particleIndex;\n#endif\n attributeBuffer.Store((index
* 0x2 + 0x0) << 2,asuint(attributes.lifetime));\n attributeBuffer.Store3((index
* 0x10 + 0x16E380) << 2,asuint(attributes.color));\n attributeBuffer.Store3((index
* 0x8 + 0xCDFF80) << 2,asuint(attributes.position));\n attributeBuffer.Store((index
* 0x2 + 0x1) << 2,asuint(attributes.particleId));\n attributeBuffer.Store3((index
* 0x8 + 0xCDFF84) << 2,asuint(attributes.velocity));\n attributeBuffer.Store((index
* 0x8 + 0xCDFF83) << 2,asuint(attributes.age));\n attributeBuffer.Store((index
* 0x10 + 0x16E383) << 2,asuint(attributes.alpha));\n attributeBuffer.Store((index
* 0x8 + 0xCDFF87) << 2,uint(attributes.alive));\n attributeBuffer.Store3((index
* 0x10 + 0x16E384) << 2,asuint(attributes.axisX));\n attributeBuffer.Store3((index
* 0x10 + 0x16E388) << 2,asuint(attributes.axisY));\n attributeBuffer.Store3((index
* 0x10 + 0x16E38C) << 2,asuint(attributes.axisZ));\n attributeBuffer.Store((index
* 0x10 + 0x16E387) << 2,asuint(attributes.scaleX));\n attributeBuffer.Store((index
* 0x10 + 0x16E38B) << 2,asuint(attributes.scaleY));\n \n\n
}\n }\n}\n"
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
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
1\n#define VFX_LOCAL_SPACE 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\nCBUFFER_START(parameters)\n
float4x4 InvFieldTransform_b;\n float4x4 FieldTransform_b;\n float4x4
InvFieldTransform_c;\n float4x4 FieldTransform_c;\n float3 uniform_e;\n
float uniform_b;\n float3 uniform_f;\n float uniform_c;\n float uniform_d;\n

SourceAttributes\n{\n};\n\nTexture3D VectorField_b;\nSamplerState samplerVectorField_b;\nfloat4
VectorField_b_TexelSize;\nTexture3D VectorField_c;\nSamplerState samplerVectorField_c;\nfloat4
VectorField_c_TexelSize;\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<uint>
deadListOut;\r\n#endif\r\n\r\n#if VFX_HAS_INDIRECT_DRAW\r\nRWStructuredBuffer<uint>
indirectBuffer;\r\n#endif\r\n\r\n#if HAS_STRIPS\r\nRWBuffer<uint> stripDataBuffer;\r\n#endif\r\n\r\n#if
VFX_USE_STRIPALIVE_CURRENT\r\nBuffer<uint> 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
VectorField_c_TexelSize;\n\n\n\n#define USE_DEAD_LIST (VFX_USE_ALIVE_CURRENT
&& !HAS_STRIPS)\n\nRWByteAddressBuffer attributeBuffer;\n\n#if USE_DEAD_LIST\nRWStructuredBuffer<uint>
deadListOut;\n#endif\n\n#if VFX_HAS_INDIRECT_DRAW\nRWStructuredBuffer<uint>
indirectBuffer;\n#endif\n\n#if HAS_STRIPS\nRWBuffer<uint> stripDataBuffer;\n#endif\n\n#if
VFX_USE_STRIPALIVE_CURRENT\nBuffer<uint> attachedStripDataBuffer;\n#endif\n\nCBUFFER_START(updateParams)\n
uint nbMax;\n\tuint dispatchWidth;\n\tuint systemSeed;\nCBUFFER_END\n\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\r\n\r\nvoid
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\n\nvoid
CollisionSphere_0(inout float3 position, inout float3 velocity, inout float
age, float lifetime, float3 Sphere_center, float Sphere_radius, float Bounce,
float Friction, float LifetimeLoss, float deltaTime, float colliderSign, 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 + 0xCDFF87) << 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
* 0x2 + 0x0) << 2));\n\t\t\tattributes.position = asfloat(attributeBuffer.Load3((index
* 0x8 + 0xCDFF80) << 2));\n\t\t\tattributes.particleId = (attributeBuffer.Load((index
* 0x2 + 0x1) << 2));\n\t\t\tattributes.velocity = asfloat(attributeBuffer.Load3((index
* 0x8 + 0xCDFF84) << 2));\n\t\t\tattributes.age = asfloat(attributeBuffer.Load((index
* 0x8 + 0xCDFF83) << 2));\n\t\t\tattributes.mass = (float)1;\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
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 Attributes attributes = (Attributes)0;\n\t\tSourceAttributes
sourceAttributes = (SourceAttributes)0;\n\n#if VFX_USE_ALIVE_CURRENT\n\t\tattributes.alive
= (attributeBuffer.Load((index * 0x8 + 0xCDFF87) << 2));\n\t\t\n\n\t\tif (attributes.alive)\n\t\t{\n\t\t\tattributes.lifetime
= asfloat(attributeBuffer.Load((index * 0x2 + 0x0) << 2));\n\t\t\tattributes.position
= asfloat(attributeBuffer.Load3((index * 0x8 + 0xCDFF80) << 2));\n\t\t\tattributes.particleId
= (attributeBuffer.Load((index * 0x2 + 0x1) << 2));\n\t\t\tattributes.velocity
= asfloat(attributeBuffer.Load3((index * 0x8 + 0xCDFF84) << 2));\n\t\t\tattributes.age
= asfloat(attributeBuffer.Load((index * 0x8 + 0xCDFF83) << 2));\n\t\t\tattributes.mass
= (float)1;\n\t\t\t\n\n\n// Initialize built-in needed attributes\n#if VFX_USE_OLDPOSITION_CURRENT\n\t\t\tattributes.oldPosition
= attributes.position;\n#endif\n#if HAS_STRIPS\n const StripData
stripData = GetStripDataFromParticleIndex(index, PARTICLE_PER_STRIP_COUNT);\n
InitStripAttributes(index, attributes, stripData);\n#endif\n\t\t\t\n\t\t\t{\n\t\t\t
uint tmp_bl = attributes.particleId ^ asuint(uniform_d);\n\t\t\t float tmp_bm
= FixedRand(tmp_bl);\n\t\t\t float tmp_bn = uniform_c * tmp_bm;\n\t\t\t
float tmp_bo = uniform_b + tmp_bn;\n\t\t\t float3 tmp_bp = float3(tmp_bo,

samplerVectorField_c), InvFieldTransform_c, FieldTransform_c, (float)1, (float)4,
uniform_c);\n\t\t\t}\n\t\t\tEulerIntegration( /*inout */attributes.position,
attributes.velocity, uniform_c);\n\t\t\tAge( /*inout */attributes.age, uniform_c);\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
+ 0xCDFF80) << 2,asuint(attributes.position));\n\t\t\t\tattributeBuffer.Store3((index
attributes.lifetime, /*inout */attributes.alive);\n\t\t\t\n\n\n\t\t\tif (attributes.alive)\n\t\t\t{\n\t\t\t\tattributeBuffer.Store3((index
* 0x8 + 0xCDFF80) << 2,asuint(attributes.position));\n\t\t\t\tattributeBuffer.Store3((index
* 0x8 + 0xCDFF83) << 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 + 0xCDFF87) << 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,
* 0x8 + 0xCDFF83) << 2,asuint(attributes.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\n#if HAS_STRIPS\t\t\t\n\t\t\t\tuint relativeIndexInStrip
= GetRelativeIndex(index, stripData);\n\t\t\t\tInterlockedMin(STRIP_DATA(STRIP_MIN_ALIVE,
stripData.stripIndex), relativeIndexInStrip);\n\t\t\t\tInterlockedMax(STRIP_DATA(STRIP_MAX_ALIVE,
stripData.stripIndex), relativeIndexInStrip);\n#endif\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tattributeBuffer.Store((index
* 0x8 + 0xCDFF87) << 2,uint(attributes.alive));\n\t\t\t\t\n\n#if USE_DEAD_LIST
&& !VFX_USE_STRIPALIVE_CURRENT\n\t\t\t\tuint deadIndex = deadListOut.IncrementCounter();\n\t\t\t\tdeadListOut[deadIndex]
= index;\n#endif\n\t\t\t}\n\t\t}\n#if USE_DEAD_LIST && VFX_USE_STRIPALIVE_CURRENT\n
else if (attributes.stripAlive)\n {\n if (STRIP_DATA_X(attachedStripDataBuffer,
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 * 0x2 + 0x0) << 2));\n\t\tattributes.position
= asfloat(attributeBuffer.Load3((index * 0x8 + 0xCDFF80) << 2));\n\t\tattributes.particleId
= (attributeBuffer.Load((index * 0x2 + 0x1) << 2));\n\t\tattributes.velocity
= asfloat(attributeBuffer.Load3((index * 0x8 + 0xCDFF84) << 2));\n\t\tattributes.age
= asfloat(attributeBuffer.Load((index * 0x8 + 0xCDFF83) << 2));\n\t\tattributes.mass
= (float)1;\n\t\tattributes.alive = (attributeBuffer.Load((index * 0x8 + 0xCDFF87)
<< 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
uint tmp_bl = attributes.particleId ^ asuint(uniform_d);\n\t\t float tmp_bm
= FixedRand(tmp_bl);\n\t\t float tmp_bn = uniform_c * tmp_bm;\n\t\t float
tmp_bo = uniform_b + tmp_bn;\n\t\t float3 tmp_bp = float3(tmp_bo, tmp_bo,
tmp_bo);\n\t\t float3 tmp_bq = tmp_bp * uniform_e;\n\t\t float3 tmp_br
= sin(tmp_bq);\n\t\t float tmp_bs = tmp_br[1];\n\t\t float3 tmp_bt =
cos(tmp_bq);\n\t\t float tmp_bu = tmp_bt[0];\n\t\t float tmp_bv = tmp_bt[2];\n\t\t
float3 tmp_bw = float3(tmp_bs, tmp_bu, tmp_bv);\n\t\t float3 tmp_bx = tmp_bw
* uniform_f;\n\t\t float2 tmp_ca = GenerateValueNoise(tmp_bo, float3(7,
0.5, 2).x, (int)2, float3(7, 0.5, 2).y, float3(7, 0.5, 2).z);\n\t\t float
tmp_cb = tmp_ca[0];\n\t\t float tmp_cc = tmp_cb * uniform_h;\n\t\t float
tmp_cd = uniform_g + tmp_cc;\n\t\t CollisionSphere_0( /*inout */attributes.position,
the particle \n {\n uint deadIndex = deadListOut.IncrementCounter();\n\t\t\t\tdeadListOut[deadIndex]
= index;\n attributes.stripAlive = false;\n \n
} \n }\n#endif\n#else\n\t\tattributes.lifetime = asfloat(attributeBuffer.Load((index
* 0x2 + 0x0) << 2));\n\t\tattributes.position = asfloat(attributeBuffer.Load3((index
* 0x8 + 0xCDFF80) << 2));\n\t\tattributes.particleId = (attributeBuffer.Load((index
* 0x2 + 0x1) << 2));\n\t\tattributes.velocity = asfloat(attributeBuffer.Load3((index
* 0x8 + 0xCDFF84) << 2));\n\t\tattributes.age = asfloat(attributeBuffer.Load((index
* 0x8 + 0xCDFF83) << 2));\n\t\tattributes.mass = (float)1;\n\t\tattributes.alive
= (attributeBuffer.Load((index * 0x8 + 0xCDFF87) << 2));\n\t\t\n\n\t\t\n#if
VFX_USE_OLDPOSITION_CURRENT\n\t\tattributes.oldPosition = attributes.position;\n#endif\n#if
HAS_STRIPS\n const StripData stripData = GetStripDataFromParticleIndex(index,
PARTICLE_PER_STRIP_COUNT);\n InitStripAttributes(index, attributes,
stripData);\n#endif\n\t\t\n\t\t{\n\t\t uint tmp_bl = attributes.particleId
^ asuint(uniform_d);\n\t\t float tmp_bm = FixedRand(tmp_bl);\n\t\t float
tmp_bn = uniform_c * tmp_bm;\n\t\t float tmp_bo = uniform_b + tmp_bn;\n\t\t
float3 tmp_bp = float3(tmp_bo, tmp_bo, tmp_bo);\n\t\t float3 tmp_bq = tmp_bp
* uniform_e;\n\t\t float3 tmp_br = sin(tmp_bq);\n\t\t float tmp_bs =
tmp_br[1];\n\t\t float3 tmp_bt = cos(tmp_bq);\n\t\t float tmp_bu = tmp_bt[0];\n\t\t
float tmp_bv = tmp_bt[2];\n\t\t float3 tmp_bw = float3(tmp_bs, tmp_bu, tmp_bv);\n\t\t
float3 tmp_bx = tmp_bw * uniform_f;\n\t\t float2 tmp_ca = GenerateValueNoise(tmp_bo,
float3(7, 0.5, 2).x, (int)2, float3(7, 0.5, 2).y, float3(7, 0.5, 2).z);\n\t\t
float tmp_cb = tmp_ca[0];\n\t\t float tmp_cc = tmp_cb * uniform_h;\n\t\t
float tmp_cd = uniform_g + tmp_cc;\n\t\t CollisionSphere_0( /*inout */attributes.position,
/*inout */attributes.velocity, /*inout */attributes.age, attributes.lifetime,
tmp_bx, tmp_cd, (float)1.89999998, (float)0, (float)0, uniform_c, (float)1,
(float)0);\n\t\t}\n\t\t{\n\t\t VectorFieldForce_3B8596C( /*inout */attributes.velocity,

GetVFXSampler(VectorField_c, samplerVectorField_c), InvFieldTransform_c, FieldTransform_c,
(float)1, (float)4, uniform_c);\n\t\t}\n\t\tEulerIntegration( /*inout */attributes.position,
attributes.velocity, uniform_c);\n\t\tAge( /*inout */attributes.age, uniform_c);\n\t\tReap(attributes.age,
attributes.lifetime, /*inout */attributes.alive);\n\t\t\n\r\n\t\tattributeBuffer.Store3((index
attributes.lifetime, /*inout */attributes.alive);\n\t\t\n\n\t\tattributeBuffer.Store3((index
* 0x8 + 0xCDFF87) << 2,uint(attributes.alive));\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"
* 0x8 + 0xCDFF87) << 2,uint(attributes.alive));\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"
source: "Shader \"Hidden/VFX/UnityLogo/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\"
source: "Shader \"Hidden/VFX/UnityLogo/System 1/Output Particle Quad\"\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\t\n\t\t\n\t\t\n\t\t\n\t\tBlend
SrcAlpha One \n\t\tBlend 1 SrcAlpha OneMinusSrcAlpha\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\n\t\t#define NB_THREADS_PER_GROUP

to always use a valid instanceID\n\t\t#if defined(UNITY_STEREO_INSTANCING_ENABLED)\n\t\t\t#define
VFX_DECLARE_INSTANCE_ID UNITY_VERTEX_INPUT_INSTANCE_ID\n\t\t\t#define VFX_GET_INSTANCE_ID(i)
unity_InstanceID\n\t\t#else\n\t\t\t#define VFX_DECLARE_INSTANCE_ID uint
instanceID : SV_InstanceID;\n\t\t\t#define VFX_GET_INSTANCE_ID(i) i.instanceID\n\t\t#endif\n\t\t\n\t\tENDHLSL\n\t\t\n\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
instanceID : SV_InstanceID;\n\t\t\t#define VFX_GET_INSTANCE_ID(i) i.instanceID\n\t\t#endif\n\t\t\n\t\tENDHLSL\n\t\t\n\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"SceneSelectionPass\" }\n\t\t\n\t\t\tZWrite On\n\t\t\tBlend
Off\n\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#define VFX_PASSDEPTH VFX_PASSDEPTH_SELECTION\n\t\t\t#pragma
target 4.5\n\t\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

0.5f, encodedMotionVector);\n\t\t\t\t\t\t\t\n\t\t\t\t\treturn encodedMotionVector;\n\t\t\t\t#elif
VFX_PASSDEPTH == VFX_PASSDEPTH_SELECTION\n\t\t\t\t\treturn float4(_ObjectId,
_PassValue, 1.0, 1.0);\n\t\t\t\t#elif VFX_PASSDEPTH == VFX_PASSDEPTH_ACTUAL\n\t\t\t\t\treturn
(float4)0;\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH undefined \n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\t\r\n\t\t\r\n\t\t//
(float4)0;\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH undefined \n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\t\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#pragma multi_compile
_ DEBUG_DISPLAY\n\t\t\n\t\t\tstruct ps_input\n\t\t\t{\n\t\t\t\tfloat4 pos :

encodedMotionVector = 0.0f;\n\t\t\t\t\t\tVFXEncodeMotionVector(velocity * 0.5f,
encodedMotionVector);\n\t\t\t\t\t\t\n\t\t\t\to.outMotionVector = encodedMotionVector;\n\t\t
o.outMotionVector.a = o.color.a < i.VFX_VARYING_ALPHATHRESHOLD ? 0.0f : 1.0f;
//Independant clipping for motion vector pass\n\t\t#endif\n\t\t\t\treturn o;\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\t\r\n\t}\r\n}\r\n"
//Independant clipping for motion vector pass\n\t\t#endif\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"
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\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_COLOR_CURRENT
1\n#define VFX_USE_POSITION_CURRENT 1\n#define VFX_USE_PARTICLEID_CURRENT 1\n#define

VFX_USE_PIVOTX_CURRENT 1\n#define VFX_USE_PIVOTY_CURRENT 1\n#define VFX_USE_PIVOTZ_CURRENT
1\n#define VFX_USE_SIZE_CURRENT 1\n#define VFX_USE_SCALEX_CURRENT 1\n#define
VFX_USE_SCALEY_CURRENT 1\n#define VFX_USE_SCALEZ_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
1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\nCBUFFER_START(parameters)\n
float4 uniform_c;\n float3 uniform_g;\n float Color_c;\n float3 uniform_h;\n
float uniform_d;\n float uniform_e;\n float uniform_f;\n float uniform_i;\n
float uniform_j;\n float currentFrameIndex;\n uint3 PADDING_0;\nCBUFFER_END\n\nstruct

angleX;\n float angleY;\n float angleZ;\n float pivotX;\n float
pivotY;\n float pivotZ;\n float size;\n float scaleX;\n float scaleY;\n
float scaleZ;\n};\n\nstruct SourceAttributes\n{\n};\n\nTexture2D mainTexture;\nSamplerState
samplermainTexture;\nfloat4 mainTexture_TexelSize;\n\n\r\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXCommon.hlsl\"\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\r\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\r\n\r\nByteAddressBuffer
attributeBuffer;\r\nRWByteAddressBuffer elementToVFXBuffer;\r\n#if VFX_USE_ALIVE_CURRENT\r\nStructuredBuffer<uint>
deadListOut;\r\n#endif\r\n\r\n#if VFX_HAS_INDIRECT_DRAW\r\nStructuredBuffer<uint>
indirectBuffer;\r\n#endif\r\n\r\nCBUFFER_START(updateParams)\r\n\tuint nbMax;\r\n\tuint
dispatchWidth;\r\n\tuint systemSeed;\r\nCBUFFER_END\r\n\r\nvoid Orient_94A(inout
samplermainTexture;\nfloat4 mainTexture_TexelSize;\n\n\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXCommon.hlsl\"\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nByteAddressBuffer
attributeBuffer;\nRWByteAddressBuffer elementToVFXBuffer;\n#if VFX_USE_ALIVE_CURRENT\nStructuredBuffer<uint>
deadListOut;\n#endif\n\n#if VFX_HAS_INDIRECT_DRAW\nStructuredBuffer<uint> indirectBuffer;\n#endif\n\nCBUFFER_START(updateParams)\n\tuint
nbMax;\n\tuint dispatchWidth;\n\tuint systemSeed;\nCBUFFER_END\n\nvoid Orient_94A(inout
float3 axisX, inout float3 axisY, inout float3 axisZ, float3 position, float3
velocity) /*mode:AlongVelocity axes:ZY */\n{\n \n axisY = normalize(velocity);\n
axisZ = position - GetViewVFXPosition();\n axisX = normalize(cross(axisY,axisZ));\n

* _ScreenParams.y)); // max size in one pixel\n float2 clampedSize = max(localSize,minSize);\n
float fade = (localSize.x * localSize.y) / (clampedSize.x * clampedSize.y);\n
alpha *= fade;\n localSize = clampedSize;\n scaleX = localSize.x / size;\n
scaleY = localSize.y / size;\n}\n\n\r\n\r\n[numthreads(NB_THREADS_PER_GROUP,1,1)]\r\nvoid
CSMain(uint3 groupId\t\t: SV_GroupID,\r\n\t\t\tuint3 groupThreadId\t: SV_GroupThreadID)\r\n{\r\n\tuint
scaleY = localSize.y / size;\n}\n\n\n\n[numthreads(NB_THREADS_PER_GROUP,1,1)]\nvoid
CSMain(uint3 groupId\t\t: SV_GroupID,\n\t\t\tuint3 groupThreadId\t: SV_GroupThreadID)\n{\n\tuint
* NB_THREADS_PER_GROUP;\r\n\tuint index = id;\r\n\tif (id < nbMax)\r\n\t{\r\n\t\tAttributes
attributes = (Attributes)0;\r\n\t\tSourceAttributes sourceAttributes = (SourceAttributes)0;\r\n\t\t\r\n\t\tattributes.alive
= (attributeBuffer.Load((index * 0x8 + 0xCDFF87) << 2));\n\n\r\n\t\tif (attributes.alive)\r\n\t\t{\r\n\t\t\tattributes.lifetime
* NB_THREADS_PER_GROUP;\n\tuint index = id;\n\tif (id < nbMax)\n\t{\n\t\tAttributes
attributes = (Attributes)0;\n\t\tSourceAttributes sourceAttributes = (SourceAttributes)0;\n\t\t\n\t\tattributes.alive
= (attributeBuffer.Load((index * 0x8 + 0xCDFF87) << 2));\n\n\n\t\tif (attributes.alive)\n\t\t{\n\t\t\tattributes.lifetime
= asfloat(attributeBuffer.Load((index * 0x2 + 0x0) << 2));\nattributes.color
= asfloat(attributeBuffer.Load3((index * 0x10 + 0x16E380) << 2));\nattributes.position
= asfloat(attributeBuffer.Load3((index * 0x8 + 0xCDFF80) << 2));\nattributes.particleId

= (float)0;\nattributes.pivotY = (float)0;\nattributes.pivotZ = (float)0;\nattributes.size
= (float)0.100000001;\nattributes.scaleX = asfloat(attributeBuffer.Load((index
* 0x10 + 0x16E387) << 2));\nattributes.scaleY = asfloat(attributeBuffer.Load((index
* 0x10 + 0x16E38B) << 2));\nattributes.scaleZ = (float)1;\n\n\r\n\t\t\tOrient_94A(
* 0x10 + 0x16E38B) << 2));\nattributes.scaleZ = (float)1;\n\n\n\t\t\tOrient_94A(
/*inout */attributes.axisX, /*inout */attributes.axisY, /*inout */attributes.axisZ,
attributes.position, attributes.velocity);\n\t\t\t{\n\t\t\t float3 tmp_bm
= attributes.velocity * attributes.velocity;\n\t\t\t float tmp_bn = tmp_bm[2];\n\t\t\t

AttributeFromCurve_9C2DDDB5( /*inout */attributes.color, /*inout */attributes.alpha,
attributes.age, attributes.lifetime, Color_c, tmp_co);\n\t\t\t}\n\t\t\tSubpixelAA(attributes.position,
/*inout */attributes.alpha, attributes.size, /*inout */attributes.scaleX,
/*inout */attributes.scaleY);\n\t\t\t\n\r\n\t\t\t\r\n\t\t\t\n\t\t\tfloat3 size3
/*inout */attributes.scaleY);\n\t\t\t\n\n\t\t\t\n\t\t\t\n\t\t\tfloat3 size3
*= attributes.scaleZ;\n\t\t\t#endif\n\t\t\t\r\n\t\t\tfloat4x4 elementToVFX
= GetElementToVFXMatrix(\r\n\t\t\t\tattributes.axisX,\r\n\t\t\t\tattributes.axisY,\r\n\t\t\t\tattributes.axisZ,\r\n\t\t\t\tfloat3(attributes.angleX,attributes.angleY,attributes.angleZ),\r\n\t\t\t\tfloat3(attributes.pivotX,attributes.pivotY,attributes.pivotZ),\r\n\t\t\t\tsize3,\r\n\t\t\t\tattributes.position);\r\n\t\t\r\n\t\t\tUNITY_UNROLL\r\n\t\t\tfor
(int itIndexMatrixRow = 0; itIndexMatrixRow < 3; ++itIndexMatrixRow)\r\n\t\t\t{\r\n\t\t\t\tUNITY_UNROLL\r\n\t\t\t\tfor
(int itIndexMatrixCol = 0; itIndexMatrixCol < 4; ++itIndexMatrixCol)\r\n\t\t\t\t{\r\n\t\t\t\t\tuint
itIndexMatrix = itIndexMatrixCol * 4 + itIndexMatrixRow;\r\n\t\t\t\t\tfloat
value = elementToVFX[itIndexMatrixRow][itIndexMatrixCol];\r\n\t\t\t\t\telementToVFXBuffer.Store((index
* 16 + itIndexMatrix) << 2, asuint(value));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n
*= attributes.scaleZ;\n\t\t\t#endif\n\t\t\t\n\t\t\tfloat4x4 elementToVFX =
GetElementToVFXMatrix(\n\t\t\t\tattributes.axisX,\n\t\t\t\tattributes.axisY,\n\t\t\t\tattributes.axisZ,\n\t\t\t\tfloat3(attributes.angleX,attributes.angleY,attributes.angleZ),\n\t\t\t\tfloat3(attributes.pivotX,attributes.pivotY,attributes.pivotZ),\n\t\t\t\tsize3,\n\t\t\t\tattributes.position);\n\t\t\n\t\t\tUNITY_UNROLL\n\t\t\tfor
(int itIndexMatrixRow = 0; itIndexMatrixRow < 3; ++itIndexMatrixRow)\n\t\t\t{\n\t\t\t\tUNITY_UNROLL\n\t\t\t\tfor
(int itIndexMatrixCol = 0; itIndexMatrixCol < 4; ++itIndexMatrixCol)\n\t\t\t\t{\n\t\t\t\t\tuint
itIndexMatrix = itIndexMatrixCol * 4 + itIndexMatrixRow;\n\t\t\t\t\tfloat value
= elementToVFX[itIndexMatrixRow][itIndexMatrixCol];\n\t\t\t\t\telementToVFXBuffer.Store((index
* 16 + itIndexMatrix) << 2, asuint(value));\n\t\t\t\t}\n\t\t\t}\n\n
: 0u);\r\n\t\t}\t\t\r\n\t}\r\n}\r\n"
: 0u);\n\t\t}\t\t\n\t}\n}\n"
m_Infos:
m_Expressions:
m_Expressions:

812
Assets/Samples/Visual Effect Graph/7.1.6/VisualEffectGraph Additions/VFX/Bonfire.vfx
文件差异内容过多而无法显示
查看文件

272
Assets/Samples/Visual Effect Graph/7.1.6/VisualEffectGraph Additions/VFX/Flames.vfx


m_ShaderSources:
- compute: 1
name: '[Flames]Initialize Particle'
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
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
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\nCBUFFER_START(parameters)\n
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\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<uint> 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<uint>
eventList;\r\nByteAddressBuffer inputAdditional;\r\n#endif\r\n\r\n#if HAS_STRIPS\r\nRWBuffer<uint>
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
SourceAttributes\n{\n};\n\n\n\n\n#define USE_DEAD_LIST (VFX_USE_ALIVE_CURRENT
&& !HAS_STRIPS)\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
USE_DEAD_LIST\nRWStructuredBuffer<uint> 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<uint>
eventList;\nByteAddressBuffer inputAdditional;\n#endif\n\n#if HAS_STRIPS\nRWBuffer<uint>
stripDataBuffer;\n#endif\n\n#include \"Packages/com.unity.visualeffectgraph/Shaders/Common/VFXCommonCompute.hlsl\"\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\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_3278B22F(inout float size, float Size) /*attribute:size

*/\n{\n lifetime = Lifetime;\n}\nvoid SetAttribute_CA10063D(inout float
texIndex, float TexIndex) /*attribute:texIndex Composition:Overwrite Source:Slot
Random:Off channels:XYZ */\n{\n texIndex = TexIndex;\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
Random:Off channels:XYZ */\n{\n texIndex = TexIndex;\n}\n\n\n\n#if HAS_STRIPS\nbool
GetParticleIndex(inout uint particleIndex, uint stripIndex)\n{\n\tuint relativeIndex;\n\tInterlockedAdd(STRIP_DATA(STRIP_NEXT_INDEX,
stripIndex), 1, relativeIndex);\n\tif (relativeIndex >= PARTICLE_PER_STRIP_COUNT)
// strip is full\n\t{\n\t\tInterlockedAdd(STRIP_DATA(STRIP_NEXT_INDEX, stripIndex),
-1); // Remove previous increment\n\t\treturn false;\n\t}\n\n\tparticleIndex
+ 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
+ relativeIndex) % PARTICLE_PER_STRIP_COUNT);\n return true;\n}\n#endif\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 USE_DEAD_LIST\n maxThreadId
= min(maxThreadId, deadListCount.Load(0x0));\n#elif VFX_USE_SPAWNER_FROM_GPU\n
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\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
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\t\tuint particleIndex = id + currentSpawnIndex;\n\t\t\n#if
!VFX_USE_SPAWNER_FROM_GPU\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\n\t\tAttributes
attributes = (Attributes)0;\n\t\tSourceAttributes sourceAttributes = (SourceAttributes)0;\n\t\t\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 SetAttribute_CAC29747( /*inout
\n\n#if VFX_USE_PARTICLEID_CURRENT\n attributes.particleId = particleIndex;\n#endif\n#if
VFX_USE_SEED_CURRENT\n attributes.seed = WangHash(particleIndex ^ systemSeed);\n#endif\n#if
VFX_USE_SPAWNINDEX_CURRENT\n attributes.spawnIndex = id;\n#endif\n#if
HAS_STRIPS\n#if !VFX_USE_SPAWNER_FROM_GPU\n\t\t\n#else\n uint stripIndex
= sourceIndex;\n#endif\n\t\tstripIndex = min(stripIndex, STRIP_COUNT);\n\n
if (!GetParticleIndex(particleIndex, stripIndex))\n return;\n\n
const StripData stripData = GetStripDataFromStripIndex(stripIndex, PARTICLE_PER_STRIP_COUNT);\n\t\tInitStripAttributes(particleIndex,
attributes, stripData);\n\t\t// TODO Change seed to be sure we're deterministic
on random with strip\n#endif\n \n SetAttribute_CAC29747( /*inout
tmp_be);\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.Store3((index * 0x4 + 0x0) << 2,asuint(attributes.position));\n
attributeBuffer.Store((index * 0x1 + 0x200) << 2,asuint(attributes.size));\n
attributeBuffer.Store((index * 0x1 + 0x280) << 2,asuint(attributes.lifetime));\n
attributeBuffer.Store((index * 0x8 + 0x303) << 2,asuint(attributes.texIndex));\n
attributeBuffer.Store3((index * 0x8 + 0x300) << 2,asuint(attributes.targetPosition));\n
attributeBuffer.Store((index * 0x8 + 0x304) << 2,uint(attributes.alive));\n
attributeBuffer.Store((index * 0x8 + 0x305) << 2,asuint(attributes.age));\n
\n\r\n }\r\n }\r\n}\r\n"
tmp_be);\n }\n \n\n\t\t\n#if VFX_USE_ALIVE_CURRENT\n if
(attributes.alive)\n#endif \n {\n#if USE_DEAD_LIST\n\t
uint deadIndex = deadListIn.DecrementCounter();\n uint index = deadListIn[deadIndex];\n#else\n
uint index = particleIndex;\n#endif\n attributeBuffer.Store3((index
* 0x4 + 0x0) << 2,asuint(attributes.position));\n attributeBuffer.Store((index
* 0x1 + 0x200) << 2,asuint(attributes.size));\n attributeBuffer.Store((index
* 0x1 + 0x280) << 2,asuint(attributes.lifetime));\n attributeBuffer.Store((index
* 0x8 + 0x303) << 2,asuint(attributes.texIndex));\n attributeBuffer.Store3((index
* 0x8 + 0x300) << 2,asuint(attributes.targetPosition));\n attributeBuffer.Store((index
* 0x8 + 0x304) << 2,uint(attributes.alive));\n attributeBuffer.Store((index
* 0x8 + 0x305) << 2,asuint(attributes.age));\n \n\n }\n
}\n}\n"
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
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
VFX_LOCAL_SPACE 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\nCBUFFER_START(parameters)\n
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<uint> deadListOut;\r\n#endif\r\n\r\n#if
VFX_HAS_INDIRECT_DRAW\r\nRWStructuredBuffer<uint> indirectBuffer;\r\n#endif\r\n\r\n#if
HAS_STRIPS\r\nRWBuffer<uint> stripDataBuffer;\r\n#endif\r\n\r\n#if VFX_USE_STRIPALIVE_CURRENT\r\nBuffer<uint>
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
alive;\n float age;\n};\n\nstruct SourceAttributes\n{\n};\n\n\n\n\n#define
USE_DEAD_LIST (VFX_USE_ALIVE_CURRENT && !HAS_STRIPS)\n\nRWByteAddressBuffer
attributeBuffer;\n\n#if USE_DEAD_LIST\nRWStructuredBuffer<uint> deadListOut;\n#endif\n\n#if
VFX_HAS_INDIRECT_DRAW\nRWStructuredBuffer<uint> indirectBuffer;\n#endif\n\n#if
HAS_STRIPS\nRWBuffer<uint> stripDataBuffer;\n#endif\n\n#if VFX_USE_STRIPALIVE_CURRENT\nBuffer<uint>
attachedStripDataBuffer;\n#endif\n\nCBUFFER_START(updateParams)\n uint nbMax;\n\tuint
dispatchWidth;\n\tuint systemSeed;\nCBUFFER_END\n\n#include \"Packages/com.unity.visualeffectgraph/Shaders/Common/VFXCommonCompute.hlsl\"\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\n\nvoid
SetAttribute_3824434D(inout float3 targetPosition, float3 TargetPosition, float
Blend) /*attribute:targetPosition Composition:Blend Source:Slot Random:Off
channels:XYZ */\n{\n targetPosition = lerp(targetPosition,TargetPosition,Blend);\n}\nvoid

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 + 0x304) << 2));\n\t\t\n\r\n\t\tif (attributes.alive)\r\n\t\t{\r\n\t\t\tattributes.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 Attributes attributes = (Attributes)0;\n\t\tSourceAttributes
sourceAttributes = (SourceAttributes)0;\n\n#if VFX_USE_ALIVE_CURRENT\n\t\tattributes.alive
= (attributeBuffer.Load((index * 0x8 + 0x304) << 2));\n\t\t\n\n\t\tif (attributes.alive)\n\t\t{\n\t\t\tattributes.lifetime
= asfloat(attributeBuffer.Load((index * 0x8 + 0x305) << 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\tSetAttribute_3824434D(
= asfloat(attributeBuffer.Load((index * 0x8 + 0x305) << 2));\n\t\t\t\n\n\n//
Initialize built-in needed attributes\n#if VFX_USE_OLDPOSITION_CURRENT\n\t\t\tattributes.oldPosition
= attributes.position;\n#endif\n#if HAS_STRIPS\n const StripData
stripData = GetStripDataFromParticleIndex(index, PARTICLE_PER_STRIP_COUNT);\n
InitStripAttributes(index, attributes, stripData);\n#endif\n\t\t\t\n\t\t\tSetAttribute_3824434D(
/*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
/*inout */attributes.alive);\n\t\t\t\n\n\n\t\t\tif (attributes.alive)\n\t\t\t{\n\t\t\t\tattributeBuffer.Store((index
* 0x8 + 0x305) << 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 + 0x304) << 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,
* 0x8 + 0x305) << 2,asuint(attributes.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\n#if HAS_STRIPS\t\t\t\n\t\t\t\tuint relativeIndexInStrip
= GetRelativeIndex(index, stripData);\n\t\t\t\tInterlockedMin(STRIP_DATA(STRIP_MIN_ALIVE,
stripData.stripIndex), relativeIndexInStrip);\n\t\t\t\tInterlockedMax(STRIP_DATA(STRIP_MAX_ALIVE,
stripData.stripIndex), relativeIndexInStrip);\n#endif\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tattributeBuffer.Store((index
* 0x8 + 0x304) << 2,uint(attributes.alive));\n\t\t\t\t\n\n#if USE_DEAD_LIST
&& !VFX_USE_STRIPALIVE_CURRENT\n\t\t\t\tuint deadIndex = deadListOut.IncrementCounter();\n\t\t\t\tdeadListOut[deadIndex]
= index;\n#endif\n\t\t\t}\n\t\t}\n#if USE_DEAD_LIST && VFX_USE_STRIPALIVE_CURRENT\n
else if (attributes.stripAlive)\n {\n if (STRIP_DATA_X(attachedStripDataBuffer,
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 + 0x280) << 2));\n\t\tattributes.texIndex
= asfloat(attributeBuffer.Load((index * 0x8 + 0x303) << 2));\n\t\tattributes.targetPosition
= asfloat(attributeBuffer.Load3((index * 0x8 + 0x300) << 2));\n\t\tattributes.alive
= (attributeBuffer.Load((index * 0x8 + 0x304) << 2));\n\t\tattributes.age =
asfloat(attributeBuffer.Load((index * 0x8 + 0x305) << 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\tSetAttribute_3824434D( /*inout */attributes.targetPosition,
TargetPosition_a, Blend_a);\n\t\tFlipbookPlay_0( /*inout */attributes.texIndex,
FrameRate_b, deltaTime_b);\n\t\tAge( /*inout */attributes.age, deltaTime_b);\n\t\tReap(attributes.age,
attributes.lifetime, /*inout */attributes.alive);\n\t\t\n\r\n\t\tattributeBuffer.Store((index
* 0x8 + 0x303) << 2,asuint(attributes.texIndex));\n\t\tattributeBuffer.Store3((index
the particle \n {\n uint deadIndex = deadListOut.IncrementCounter();\n\t\t\t\tdeadListOut[deadIndex]
= index;\n attributes.stripAlive = false;\n \n
} \n }\n#endif\n#else\n\t\tattributes.lifetime = asfloat(attributeBuffer.Load((index
* 0x1 + 0x280) << 2));\n\t\tattributes.texIndex = asfloat(attributeBuffer.Load((index
* 0x8 + 0x303) << 2));\n\t\tattributes.targetPosition = asfloat(attributeBuffer.Load3((index
* 0x8 + 0x300) << 2));\n\t\tattributes.alive = (attributeBuffer.Load((index
* 0x8 + 0x304) << 2));\n\t\tattributes.age = asfloat(attributeBuffer.Load((index
* 0x8 + 0x305) << 2));\n\t\t\n\n\t\t\n#if VFX_USE_OLDPOSITION_CURRENT\n\t\tattributes.oldPosition
= attributes.position;\n#endif\n#if HAS_STRIPS\n const StripData stripData
= GetStripDataFromParticleIndex(index, PARTICLE_PER_STRIP_COUNT);\n
InitStripAttributes(index, attributes, stripData);\n#endif\n\t\t\n\t\tSetAttribute_3824434D(
/*inout */attributes.targetPosition, TargetPosition_a, Blend_a);\n\t\tFlipbookPlay_0(
/*inout */attributes.texIndex, FrameRate_b, deltaTime_b);\n\t\tAge( /*inout
*/attributes.age, deltaTime_b);\n\t\tReap(attributes.age, attributes.lifetime,
/*inout */attributes.alive);\n\t\t\n\n\t\tattributeBuffer.Store((index * 0x8
+ 0x303) << 2,asuint(attributes.texIndex));\n\t\tattributeBuffer.Store3((index
* 0x8 + 0x305) << 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"
* 0x8 + 0x305) << 2,asuint(attributes.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"
source: "Shader \"Hidden/VFX/Flames/Flames/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\"
source: "Shader \"Hidden/VFX/Flames/Flames/Output Particle Quad\"\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\t\n\t\t\n\t\t\n\t\t\n\t\tBlend
One OneMinusSrcAlpha \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\n\t\t#define
NB_THREADS_PER_GROUP 64\n\t\t#define HAS_ATTRIBUTES 1\n\t\t#define VFX_PASSDEPTH_ACTUAL

to always use a valid instanceID\n\t\t#if defined(UNITY_STEREO_INSTANCING_ENABLED)\n\t\t\t#define
VFX_DECLARE_INSTANCE_ID UNITY_VERTEX_INPUT_INSTANCE_ID\n\t\t\t#define VFX_GET_INSTANCE_ID(i)
unity_InstanceID\n\t\t#else\n\t\t\t#define VFX_DECLARE_INSTANCE_ID uint
instanceID : SV_InstanceID;\n\t\t\t#define VFX_GET_INSTANCE_ID(i) i.instanceID\n\t\t#endif\n\t\t\n\t\tENDHLSL\n\t\t\n\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
instanceID : SV_InstanceID;\n\t\t\t#define VFX_GET_INSTANCE_ID(i) i.instanceID\n\t\t#endif\n\t\t\n\t\tENDHLSL\n\t\t\n\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"SceneSelectionPass\" }\n\t\t\n\t\t\tZWrite On\n\t\t\tBlend
Off\n\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#define VFX_PASSDEPTH VFX_PASSDEPTH_SELECTION\n\t\t\t#pragma
target 4.5\n\t\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

0.5f, encodedMotionVector);\n\t\t\t\t\t\t\t\n\t\t\t\t\treturn encodedMotionVector;\n\t\t\t\t#elif
VFX_PASSDEPTH == VFX_PASSDEPTH_SELECTION\n\t\t\t\t\treturn float4(_ObjectId,
_PassValue, 1.0, 1.0);\n\t\t\t\t#elif VFX_PASSDEPTH == VFX_PASSDEPTH_ACTUAL\n\t\t\t\t\treturn
(float4)0;\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH undefined \n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\t\r\n\t\t\r\n\t\t//
(float4)0;\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH undefined \n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\t\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#pragma multi_compile
_ DEBUG_DISPLAY\n\t\t\n\t\t\tstruct ps_input\n\t\t\t{\n\t\t\t\tfloat4 pos :

encodedMotionVector = 0.0f;\n\t\t\t\t\t\tVFXEncodeMotionVector(velocity * 0.5f,
encodedMotionVector);\n\t\t\t\t\t\t\n\t\t\t\to.outMotionVector = encodedMotionVector;\n\t\t
o.outMotionVector.a = o.color.a < i.VFX_VARYING_ALPHATHRESHOLD ? 0.0f : 1.0f;
//Independant clipping for motion vector pass\n\t\t#endif\n\t\t\t\treturn o;\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\t\r\n\t}\r\n}\r\n"
//Independant clipping for motion vector pass\n\t\t#endif\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"
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
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
1\n#define VFX_LOCAL_SPACE 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\nCBUFFER_START(parameters)\n
SourceAttributes\n{\n};\n\n\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\nCBUFFER_START(params)\r\n
uint nbMax;\r\n uint dispatchWidth;\r\nCBUFFER_END\r\n\r\nCBUFFER_START(cameraParams)\r\n
float3 cameraPosition;\r\nCBUFFER_END\r\n\r\nByteAddressBuffer attributeBuffer;\r\nStructuredBuffer<uint>
inputBuffer;\r\n\r\n#if USE_DEAD_LIST_COUNT\r\nByteAddressBuffer deadListCount;\r\n#endif\r\n\r\nstruct
Kvp\r\n{\r\n\tfloat sortKey;\r\n\tuint index;\r\n};\r\n\r\nRWStructuredBuffer<Kvp>
outputBuffer;\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
threshold = nbMax;\r\n#if USE_DEAD_LIST_COUNT\r\n\tthreshold -= deadListCount.Load(0);\r\n#endif\r\n\tuint
id = groupThreadId.x + groupId.x * NB_THREADS_PER_GROUP + groupId.y * dispatchWidth
* NB_THREADS_PER_GROUP;\r\n\tif (id < threshold)\r\n\t{\r\n\t\tuint index =
inputBuffer[id];\r\n\t\t\r\n\t\tAttributes attributes = (Attributes)0;\r\n\t\tattributes.position
= asfloat(attributeBuffer.Load3((index * 0x4 + 0x0) << 2));\n\t\t\n\r\n\t\t\r\n#if
VFX_LOCAL_SPACE\r\n\t\tfloat3 wPos = mul(localToWorld,float4(attributes.position,1.0f)).xyz;\r\n#else\r\n\t\tfloat3
wPos = attributes.position;\r\n#endif\r\n\t\tfloat3 camToPos = wPos - cameraPosition;\r\n\t\t\r\n\t\tKvp
kvp;\r\n\t\tkvp.sortKey = dot(camToPos,camToPos); // sqr distance to the camera\r\n\t\tkvp.index
= index;\r\n\r\n\t\toutputBuffer[id] = kvp;\r\n\t}\r\n}\r\n"
SourceAttributes\n{\n};\n\n\n\n#include \"Packages/com.unity.visualeffectgraph/Shaders/Common/VFXCommonCompute.hlsl\"\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\n\nCBUFFER_START(params)\n
uint nbMax;\n uint dispatchWidth;\nCBUFFER_END\n\nCBUFFER_START(cameraParams)\n
float3 cameraPosition;\nCBUFFER_END\n\nByteAddressBuffer attributeBuffer;\nStructuredBuffer<uint>
inputBuffer;\n\n#if USE_DEAD_LIST_COUNT\nByteAddressBuffer deadListCount;\n#endif\n\nstruct
Kvp\n{\n\tfloat sortKey;\n\tuint index;\n};\n\nRWStructuredBuffer<Kvp> outputBuffer;\n\n[numthreads(NB_THREADS_PER_GROUP,1,1)]\nvoid
CSMain(uint3 groupId : SV_GroupID,\n uint3 groupThreadId
: SV_GroupThreadID)\n{\n\tuint threshold = nbMax;\n#if USE_DEAD_LIST_COUNT\n\tthreshold
-= deadListCount.Load(0);\n#endif\n\tuint id = groupThreadId.x + groupId.x
* NB_THREADS_PER_GROUP + groupId.y * dispatchWidth * NB_THREADS_PER_GROUP;\n\tif
(id < threshold)\n\t{\n\t\tuint index = inputBuffer[id];\n\t\t\n\t\tAttributes
attributes = (Attributes)0;\n\t\tattributes.position = asfloat(attributeBuffer.Load3((index
* 0x4 + 0x0) << 2));\n\t\t\n\n\t\t\n#if VFX_LOCAL_SPACE\n\t\tfloat3 wPos =
mul(localToWorld,float4(attributes.position,1.0f)).xyz;\n#else\n\t\tfloat3
wPos = attributes.position;\n#endif\n\t\tfloat3 camToPos = wPos - cameraPosition;\n\t\t\n\t\tKvp
kvp;\n\t\tkvp.sortKey = dot(camToPos,camToPos); // sqr distance to the camera\n\t\tkvp.index
= index;\n\n\t\toutputBuffer[id] = kvp;\n\t}\n}\n"
m_Infos:
m_Expressions:
m_Expressions:

889
Assets/Samples/Visual Effect Graph/7.1.6/VisualEffectGraph Additions/VFX/Lightning.vfx
文件差异内容过多而无法显示
查看文件

263
Assets/Samples/Visual Effect Graph/7.1.6/VisualEffectGraph Additions/VFX/Smoke.vfx


m_ShaderSources:
- compute: 1
name: '[Smoke]Initialize Particle'
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
VFX_WORLD_SPACE 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\r\nCBUFFER_START(parameters)\n
VFX_WORLD_SPACE 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\nCBUFFER_START(parameters)\n
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\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<uint> 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<uint>
eventList;\r\nByteAddressBuffer inputAdditional;\r\n#endif\r\n\r\n#if HAS_STRIPS\r\nRWBuffer<uint>
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
age;\n};\n\nstruct SourceAttributes\n{\n};\n\n\n\n\n#define USE_DEAD_LIST (VFX_USE_ALIVE_CURRENT
&& !HAS_STRIPS)\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
USE_DEAD_LIST\nRWStructuredBuffer<uint> 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<uint>
eventList;\nByteAddressBuffer inputAdditional;\n#endif\n\n#if HAS_STRIPS\nRWBuffer<uint>
stripDataBuffer;\n#endif\n\n#include \"Packages/com.unity.visualeffectgraph/Shaders/Common/VFXCommonCompute.hlsl\"\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\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_E629755(inout float3 velocity, float3 Velocity)

Source:Slot Random:Off channels:XYZ */\n{\n texIndex = TexIndex;\n}\nvoid
SetAttribute_48A7C211(inout float angleZ, inout uint seed, float A, float B)
/*attribute:angle Composition:Overwrite Source:Slot Random:Uniform channels:Z
*/\n{\n angleZ = lerp(A.x,B.x,RAND);\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
*/\n{\n angleZ = lerp(A.x,B.x,RAND);\n}\n\n\n\n#if HAS_STRIPS\nbool GetParticleIndex(inout
uint particleIndex, uint stripIndex)\n{\n\tuint relativeIndex;\n\tInterlockedAdd(STRIP_DATA(STRIP_NEXT_INDEX,
stripIndex), 1, relativeIndex);\n\tif (relativeIndex >= PARTICLE_PER_STRIP_COUNT)
// strip is full\n\t{\n\t\tInterlockedAdd(STRIP_DATA(STRIP_NEXT_INDEX, stripIndex),
-1); // Remove previous increment\n\t\treturn false;\n\t}\n\n\tparticleIndex
+ 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
+ relativeIndex) % PARTICLE_PER_STRIP_COUNT);\n return true;\n}\n#endif\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 USE_DEAD_LIST\n maxThreadId
= min(maxThreadId, deadListCount.Load(0x0));\n#elif VFX_USE_SPAWNER_FROM_GPU\n
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\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
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\t\tuint particleIndex = id + currentSpawnIndex;\n\t\t\n#if
!VFX_USE_SPAWNER_FROM_GPU\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\n\t\tAttributes
attributes = (Attributes)0;\n\t\tSourceAttributes sourceAttributes = (SourceAttributes)0;\n\t\t\n
= (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 SetAttribute_CAC29747( /*inout
= (bool)true;\n attributes.age = (float)0;\n \n\n#if VFX_USE_PARTICLEID_CURRENT\n
attributes.particleId = particleIndex;\n#endif\n#if VFX_USE_SEED_CURRENT\n
attributes.seed = WangHash(particleIndex ^ systemSeed);\n#endif\n#if VFX_USE_SPAWNINDEX_CURRENT\n
attributes.spawnIndex = id;\n#endif\n#if HAS_STRIPS\n#if !VFX_USE_SPAWNER_FROM_GPU\n\t\t\n#else\n
uint stripIndex = sourceIndex;\n#endif\n\t\tstripIndex = min(stripIndex, STRIP_COUNT);\n\n
if (!GetParticleIndex(particleIndex, stripIndex))\n return;\n\n
const StripData stripData = GetStripDataFromStripIndex(stripIndex, PARTICLE_PER_STRIP_COUNT);\n\t\tInitStripAttributes(particleIndex,
attributes, stripData);\n\t\t// TODO Change seed to be sure we're deterministic
on random with strip\n#endif\n \n SetAttribute_CAC29747( /*inout
*/attributes.position, Position_a);\n {\n float tmp_bi =
Rand(attributes.seed);\n float tmp_bk = tmp_bi * (float)2;\n
float tmp_bl = (float)-1 + tmp_bk;\n float tmp_bm = Rand(attributes.seed);\n

tmp_bh : (float)0;\n SetAttribute_CA10063D( /*inout */attributes.texIndex,
tmp_bj);\n }\n {\n SetAttribute_48A7C211( /*inout
*/attributes.angleZ, /*inout */attributes.seed, (float)0, B_e);\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
\n\n\t\t\n#if VFX_USE_ALIVE_CURRENT\n if (attributes.alive)\n#endif
\n {\n#if USE_DEAD_LIST\n\t uint deadIndex = deadListIn.DecrementCounter();\n
uint index = deadListIn[deadIndex];\n#else\n uint index = particleIndex;\n#endif\n
attributeBuffer.Store3((index * 0x4 + 0x0) << 2,asuint(attributes.position));\n
attributeBuffer.Store3((index * 0x4 + 0x200) << 2,asuint(attributes.velocity));\n
attributeBuffer.Store((index * 0x1 + 0x400) << 2,asuint(attributes.lifetime));\n

attributeBuffer.Store((index * 0x3 + 0x482) << 2,asuint(attributes.age));\n
\n\r\n }\r\n }\r\n}\r\n"
\n\n }\n }\n}\n"
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
1\n#define VFX_HAS_INDIRECT_DRAW 1\n#define VFX_WORLD_SPACE 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\r\nCBUFFER_START(parameters)\n
1\n#define VFX_HAS_INDIRECT_DRAW 1\n#define VFX_WORLD_SPACE 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\nCBUFFER_START(parameters)\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<uint> deadListOut;\r\n#endif\r\n\r\n#if
VFX_HAS_INDIRECT_DRAW\r\nRWStructuredBuffer<uint> indirectBuffer;\r\n#endif\r\n\r\n#if
HAS_STRIPS\r\nRWBuffer<uint> stripDataBuffer;\r\n#endif\r\n\r\n#if VFX_USE_STRIPALIVE_CURRENT\r\nBuffer<uint>
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
float mass;\n bool alive;\n float age;\n};\n\nstruct SourceAttributes\n{\n};\n\n\n\n\n#define
USE_DEAD_LIST (VFX_USE_ALIVE_CURRENT && !HAS_STRIPS)\n\nRWByteAddressBuffer
attributeBuffer;\n\n#if USE_DEAD_LIST\nRWStructuredBuffer<uint> deadListOut;\n#endif\n\n#if
VFX_HAS_INDIRECT_DRAW\nRWStructuredBuffer<uint> indirectBuffer;\n#endif\n\n#if
HAS_STRIPS\nRWBuffer<uint> stripDataBuffer;\n#endif\n\n#if VFX_USE_STRIPALIVE_CURRENT\nBuffer<uint>
attachedStripDataBuffer;\n#endif\n\nCBUFFER_START(updateParams)\n uint nbMax;\n\tuint
dispatchWidth;\n\tuint systemSeed;\nCBUFFER_END\n\n#include \"Packages/com.unity.visualeffectgraph/Shaders/Common/VFXCommonCompute.hlsl\"\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\n\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

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 * 0x3 + 0x481) << 2));\n\t\t\n\r\n\t\tif (attributes.alive)\r\n\t\t{\r\n\t\t\tattributes.position
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 Attributes attributes = (Attributes)0;\n\t\tSourceAttributes
sourceAttributes = (SourceAttributes)0;\n\n#if VFX_USE_ALIVE_CURRENT\n\t\tattributes.alive
= (attributeBuffer.Load((index * 0x3 + 0x481) << 2));\n\t\t\n\n\t\tif (attributes.alive)\n\t\t{\n\t\t\tattributes.position
+ 0x482) << 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\tForce_0( /*inout */attributes.velocity,
+ 0x482) << 2));\n\t\t\t\n\n\n// Initialize built-in needed attributes\n#if
VFX_USE_OLDPOSITION_CURRENT\n\t\t\tattributes.oldPosition = attributes.position;\n#endif\n#if
HAS_STRIPS\n const StripData stripData = GetStripDataFromParticleIndex(index,
PARTICLE_PER_STRIP_COUNT);\n InitStripAttributes(index, attributes,
stripData);\n#endif\n\t\t\t\n\t\t\tForce_0( /*inout */attributes.velocity,
/*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
/*inout */attributes.alive);\n\t\t\t\n\n\n\t\t\tif (attributes.alive)\n\t\t\t{\n\t\t\t\tattributeBuffer.Store3((index
* 0x3 + 0x482) << 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
* 0x3 + 0x481) << 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,
* 0x3 + 0x482) << 2,asuint(attributes.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\n#if HAS_STRIPS\t\t\t\n\t\t\t\tuint relativeIndexInStrip
= GetRelativeIndex(index, stripData);\n\t\t\t\tInterlockedMin(STRIP_DATA(STRIP_MIN_ALIVE,
stripData.stripIndex), relativeIndexInStrip);\n\t\t\t\tInterlockedMax(STRIP_DATA(STRIP_MAX_ALIVE,
stripData.stripIndex), relativeIndexInStrip);\n#endif\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tattributeBuffer.Store((index
* 0x3 + 0x481) << 2,uint(attributes.alive));\n\t\t\t\t\n\n#if USE_DEAD_LIST
&& !VFX_USE_STRIPALIVE_CURRENT\n\t\t\t\tuint deadIndex = deadListOut.IncrementCounter();\n\t\t\t\tdeadListOut[deadIndex]
= index;\n#endif\n\t\t\t}\n\t\t}\n#if USE_DEAD_LIST && VFX_USE_STRIPALIVE_CURRENT\n
else if (attributes.stripAlive)\n {\n if (STRIP_DATA_X(attachedStripDataBuffer,
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.position
= asfloat(attributeBuffer.Load3((index * 0x4 + 0x0) << 2));\n\t\tattributes.velocity
= asfloat(attributeBuffer.Load3((index * 0x4 + 0x200) << 2));\n\t\tattributes.lifetime
= asfloat(attributeBuffer.Load((index * 0x1 + 0x400) << 2));\n\t\tattributes.texIndex
= asfloat(attributeBuffer.Load((index * 0x3 + 0x480) << 2));\n\t\tattributes.mass
= (float)1;\n\t\tattributes.alive = (attributeBuffer.Load((index * 0x3 + 0x481)
<< 2));\n\t\tattributes.age = asfloat(attributeBuffer.Load((index * 0x3 + 0x482)
<< 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\tForce_0(
/*inout */attributes.velocity, attributes.mass, Force_a, deltaTime_a);\n\t\tDrag_0(
/*inout */attributes.velocity, attributes.mass, dragCoefficient_b, deltaTime_a);\n\t\tFlipbookPlay_0(
/*inout */attributes.texIndex, FrameRate_c, deltaTime_a);\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 *
0x4 + 0x0) << 2,asuint(attributes.position));\n\t\tattributeBuffer.Store3((index
the particle \n {\n uint deadIndex = deadListOut.IncrementCounter();\n\t\t\t\tdeadListOut[deadIndex]
= index;\n attributes.stripAlive = false;\n \n
} \n }\n#endif\n#else\n\t\tattributes.position = asfloat(attributeBuffer.Load3((index
* 0x4 + 0x0) << 2));\n\t\tattributes.velocity = asfloat(attributeBuffer.Load3((index
* 0x4 + 0x200) << 2));\n\t\tattributes.lifetime = asfloat(attributeBuffer.Load((index
* 0x1 + 0x400) << 2));\n\t\tattributes.texIndex = asfloat(attributeBuffer.Load((index
* 0x3 + 0x480) << 2));\n\t\tattributes.mass = (float)1;\n\t\tattributes.alive
= (attributeBuffer.Load((index * 0x3 + 0x481) << 2));\n\t\tattributes.age =
asfloat(attributeBuffer.Load((index * 0x3 + 0x482) << 2));\n\t\t\n\n\t\t\n#if
VFX_USE_OLDPOSITION_CURRENT\n\t\tattributes.oldPosition = attributes.position;\n#endif\n#if
HAS_STRIPS\n const StripData stripData = GetStripDataFromParticleIndex(index,
PARTICLE_PER_STRIP_COUNT);\n InitStripAttributes(index, attributes,
stripData);\n#endif\n\t\t\n\t\tForce_0( /*inout */attributes.velocity, attributes.mass,
Force_a, deltaTime_a);\n\t\tDrag_0( /*inout */attributes.velocity, attributes.mass,
dragCoefficient_b, deltaTime_a);\n\t\tFlipbookPlay_0( /*inout */attributes.texIndex,
FrameRate_c, deltaTime_a);\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\n\t\tattributeBuffer.Store3((index
* 0x4 + 0x0) << 2,asuint(attributes.position));\n\t\tattributeBuffer.Store3((index
* 0x3 + 0x482) << 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"
* 0x3 + 0x482) << 2,asuint(attributes.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"
source: "Shader \"Hidden/VFX/Smoke/Smoke/Output Particle Octagon\"\n{\r\n\tSubShader\r\n\t{\t\r\n\t\tCull
Off\r\n\t\t\r\n\t\tTags { \"Queue\"=\"Transparent+400\" \"IgnoreProjector\"=\"True\"
source: "Shader \"Hidden/VFX/Smoke/Smoke/Output Particle Octagon\"\n{\n\tSubShader\n\t{\t\n\t\tCull
Off\n\t\t\n\t\tTags { \"Queue\"=\"Transparent+400\" \"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\t\n\t\t\n\t\t\n\t\t\n\t\tBlend
SrcAlpha OneMinusSrcAlpha , Zero OneMinusSrcAlpha\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\n\t\t#define NB_THREADS_PER_GROUP

to always use a valid instanceID\n\t\t#if defined(UNITY_STEREO_INSTANCING_ENABLED)\n\t\t\t#define
VFX_DECLARE_INSTANCE_ID UNITY_VERTEX_INPUT_INSTANCE_ID\n\t\t\t#define VFX_GET_INSTANCE_ID(i)
unity_InstanceID\n\t\t#else\n\t\t\t#define VFX_DECLARE_INSTANCE_ID uint
instanceID : SV_InstanceID;\n\t\t\t#define VFX_GET_INSTANCE_ID(i) i.instanceID\n\t\t#endif\n\t\t\n\t\tENDHLSL\n\t\t\n\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
instanceID : SV_InstanceID;\n\t\t\t#define VFX_GET_INSTANCE_ID(i) i.instanceID\n\t\t#endif\n\t\t\n\t\tENDHLSL\n\t\t\n\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"SceneSelectionPass\" }\n\t\t\n\t\t\tZWrite On\n\t\t\tBlend
Off\n\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#define VFX_PASSDEPTH VFX_PASSDEPTH_SELECTION\n\t\t\t#pragma
target 4.5\n\t\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

0.5f, encodedMotionVector);\n\t\t\t\t\t\t\t\n\t\t\t\t\treturn encodedMotionVector;\n\t\t\t\t#elif
VFX_PASSDEPTH == VFX_PASSDEPTH_SELECTION\n\t\t\t\t\treturn float4(_ObjectId,
_PassValue, 1.0, 1.0);\n\t\t\t\t#elif VFX_PASSDEPTH == VFX_PASSDEPTH_ACTUAL\n\t\t\t\t\treturn
(float4)0;\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH undefined \n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\t\r\n\t\t\r\n\t\t//
(float4)0;\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH undefined \n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\t\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#pragma multi_compile
_ DEBUG_DISPLAY\n\t\t\n\t\t\tstruct ps_input\n\t\t\t{\n\t\t\t\tfloat4 pos :

encodedMotionVector = 0.0f;\n\t\t\t\t\t\tVFXEncodeMotionVector(velocity * 0.5f,
encodedMotionVector);\n\t\t\t\t\t\t\n\t\t\t\to.outMotionVector = encodedMotionVector;\n\t\t
o.outMotionVector.a = o.color.a < i.VFX_VARYING_ALPHATHRESHOLD ? 0.0f : 1.0f;
//Independant clipping for motion vector pass\n\t\t#endif\n\t\t\t\treturn o;\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\t\r\n\t}\r\n}\r\n"
//Independant clipping for motion vector pass\n\t\t#endif\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"
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
1\n#define VFX_WORLD_SPACE 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\r\n\nstruct
Attributes\n{\n float3 position;\n};\n\nstruct SourceAttributes\n{\n};\n\n\n\r\n#include
1\n#define VFX_WORLD_SPACE 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\n\nstruct
Attributes\n{\n float3 position;\n};\n\nstruct SourceAttributes\n{\n};\n\n\n\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\r\n\r\nCBUFFER_START(params)\r\n
uint nbMax;\r\n uint dispatchWidth;\r\nCBUFFER_END\r\n\r\nCBUFFER_START(cameraParams)\r\n
float3 cameraPosition;\r\nCBUFFER_END\r\n\r\nByteAddressBuffer attributeBuffer;\r\nStructuredBuffer<uint>
inputBuffer;\r\n\r\n#if USE_DEAD_LIST_COUNT\r\nByteAddressBuffer deadListCount;\r\n#endif\r\n\r\nstruct
Kvp\r\n{\r\n\tfloat sortKey;\r\n\tuint index;\r\n};\r\n\r\nRWStructuredBuffer<Kvp>
outputBuffer;\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
threshold = nbMax;\r\n#if USE_DEAD_LIST_COUNT\r\n\tthreshold -= deadListCount.Load(0);\r\n#endif\r\n\tuint
id = groupThreadId.x + groupId.x * NB_THREADS_PER_GROUP + groupId.y * dispatchWidth
* NB_THREADS_PER_GROUP;\r\n\tif (id < threshold)\r\n\t{\r\n\t\tuint index =
inputBuffer[id];\r\n\t\t\r\n\t\tAttributes attributes = (Attributes)0;\r\n\t\tattributes.position
= asfloat(attributeBuffer.Load3((index * 0x4 + 0x0) << 2));\n\t\t\n\r\n\t\t\r\n#if
VFX_LOCAL_SPACE\r\n\t\tfloat3 wPos = mul(localToWorld,float4(attributes.position,1.0f)).xyz;\r\n#else\r\n\t\tfloat3
wPos = attributes.position;\r\n#endif\r\n\t\tfloat3 camToPos = wPos - cameraPosition;\r\n\t\t\r\n\t\tKvp
kvp;\r\n\t\tkvp.sortKey = dot(camToPos,camToPos); // sqr distance to the camera\r\n\t\tkvp.index
= index;\r\n\r\n\t\toutputBuffer[id] = kvp;\r\n\t}\r\n}\r\n"
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\n\nCBUFFER_START(params)\n
uint nbMax;\n uint dispatchWidth;\nCBUFFER_END\n\nCBUFFER_START(cameraParams)\n
float3 cameraPosition;\nCBUFFER_END\n\nByteAddressBuffer attributeBuffer;\nStructuredBuffer<uint>
inputBuffer;\n\n#if USE_DEAD_LIST_COUNT\nByteAddressBuffer deadListCount;\n#endif\n\nstruct
Kvp\n{\n\tfloat sortKey;\n\tuint index;\n};\n\nRWStructuredBuffer<Kvp> outputBuffer;\n\n[numthreads(NB_THREADS_PER_GROUP,1,1)]\nvoid
CSMain(uint3 groupId : SV_GroupID,\n uint3 groupThreadId
: SV_GroupThreadID)\n{\n\tuint threshold = nbMax;\n#if USE_DEAD_LIST_COUNT\n\tthreshold
-= deadListCount.Load(0);\n#endif\n\tuint id = groupThreadId.x + groupId.x
* NB_THREADS_PER_GROUP + groupId.y * dispatchWidth * NB_THREADS_PER_GROUP;\n\tif
(id < threshold)\n\t{\n\t\tuint index = inputBuffer[id];\n\t\t\n\t\tAttributes
attributes = (Attributes)0;\n\t\tattributes.position = asfloat(attributeBuffer.Load3((index
* 0x4 + 0x0) << 2));\n\t\t\n\n\t\t\n#if VFX_LOCAL_SPACE\n\t\tfloat3 wPos =
mul(localToWorld,float4(attributes.position,1.0f)).xyz;\n#else\n\t\tfloat3
wPos = attributes.position;\n#endif\n\t\tfloat3 camToPos = wPos - cameraPosition;\n\t\t\n\t\tKvp
kvp;\n\t\tkvp.sortKey = dot(camToPos,camToPos); // sqr distance to the camera\n\t\tkvp.index
= index;\n\n\t\toutputBuffer[id] = kvp;\n\t}\n}\n"
m_Infos:
m_Expressions:
m_Expressions:

214
Assets/Samples/Visual Effect Graph/7.1.6/VisualEffectGraph Additions/VFX/Sparks.vfx


m_ShaderSources:
- compute: 1
name: '[Sparks]Initialize Particle'
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\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_VELOCITY_CURRENT
1\n#define VFX_USE_SIZE_CURRENT 1\n#define VFX_USE_SEED_CURRENT 1\n#define

1\n#define VFX_WORLD_SPACE 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\r\nCBUFFER_START(parameters)\n
1\n#define VFX_WORLD_SPACE 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\nCBUFFER_START(parameters)\n
float4x4 uniform_c;\n float3 Position_a;\n float uniform_e;\n float3
uniform_d;\n float A_c;\n float3 uniform_f;\n float B_c;\n float
Density_d;\n float A_e;\n float B_e;\n uint PADDING_0;\nCBUFFER_END\n\nstruct

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\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<uint> 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<uint>
eventList;\r\nByteAddressBuffer inputAdditional;\r\n#endif\r\n\r\n#if HAS_STRIPS\r\nRWBuffer<uint>
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
age;\n};\n\nstruct SourceAttributes\n{\n};\n\n\n\n\n#define USE_DEAD_LIST (VFX_USE_ALIVE_CURRENT
&& !HAS_STRIPS)\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
USE_DEAD_LIST\nRWStructuredBuffer<uint> 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<uint>
eventList;\nByteAddressBuffer inputAdditional;\n#endif\n\n#if HAS_STRIPS\nRWBuffer<uint>
stripDataBuffer;\n#endif\n\n#include \"Packages/com.unity.visualeffectgraph/Shaders/Common/VFXCommonCompute.hlsl\"\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\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_E629755(inout float3 velocity, float3 Velocity)

0.125f;\n mass = (4.0f / 3.0f) * UNITY_PI * radiusCubed * Density;\n
\n}\nvoid SetAttribute_F01429A3(inout float lifetime, inout uint seed, float
A, float B) /*attribute:lifetime Composition:Overwrite Source:Slot Random:Uniform
channels:XYZ */\n{\n lifetime = lerp(A,B,RAND);\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
channels:XYZ */\n{\n lifetime = lerp(A,B,RAND);\n}\n\n\n\n#if HAS_STRIPS\nbool
GetParticleIndex(inout uint particleIndex, uint stripIndex)\n{\n\tuint relativeIndex;\n\tInterlockedAdd(STRIP_DATA(STRIP_NEXT_INDEX,
stripIndex), 1, relativeIndex);\n\tif (relativeIndex >= PARTICLE_PER_STRIP_COUNT)
// strip is full\n\t{\n\t\tInterlockedAdd(STRIP_DATA(STRIP_NEXT_INDEX, stripIndex),
-1); // Remove previous increment\n\t\treturn false;\n\t}\n\n\tparticleIndex
+ 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
+ relativeIndex) % PARTICLE_PER_STRIP_COUNT);\n return true;\n}\n#endif\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 USE_DEAD_LIST\n maxThreadId
= min(maxThreadId, deadListCount.Load(0x0));\n#elif VFX_USE_SPAWNER_FROM_GPU\n
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\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
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\t\tuint particleIndex = id + currentSpawnIndex;\n\t\t\n#if
!VFX_USE_SPAWNER_FROM_GPU\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\n\t\tAttributes
attributes = (Attributes)0;\n\t\tSourceAttributes sourceAttributes = (SourceAttributes)0;\n\t\t\n
attributes.position = float3(0, 0, 0);\n attributes.velocity = float3(0,
0, 0);\n attributes.size = (float)0.100000001;\n attributes.seed
= (uint)0;\n attributes.mass = (float)1;\n attributes.scaleX

= (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 SetAttribute_CAC29747( /*inout
= (float)0;\n \n\n#if VFX_USE_PARTICLEID_CURRENT\n attributes.particleId
= particleIndex;\n#endif\n#if VFX_USE_SEED_CURRENT\n attributes.seed
= WangHash(particleIndex ^ systemSeed);\n#endif\n#if VFX_USE_SPAWNINDEX_CURRENT\n
attributes.spawnIndex = id;\n#endif\n#if HAS_STRIPS\n#if !VFX_USE_SPAWNER_FROM_GPU\n\t\t\n#else\n
uint stripIndex = sourceIndex;\n#endif\n\t\tstripIndex = min(stripIndex, STRIP_COUNT);\n\n
if (!GetParticleIndex(particleIndex, stripIndex))\n return;\n\n
const StripData stripData = GetStripDataFromStripIndex(stripIndex, PARTICLE_PER_STRIP_COUNT);\n\t\tInitStripAttributes(particleIndex,
attributes, stripData);\n\t\t// TODO Change seed to be sure we're deterministic
on random with strip\n#endif\n \n SetAttribute_CAC29747( /*inout
*/attributes.position, Position_a);\n {\n uint tmp_bi = attributes.particleId
^ asuint(uniform_e);\n float tmp_bj = FixedRand(tmp_bi);\n
float tmp_bl = tmp_bj * (float)0.800000012;\n float tmp_bm = (float)0.200000003

AttributeMassFromVolume( /*inout */attributes.mass, attributes.size, attributes.scaleX,
attributes.scaleY, attributes.scaleZ, Density_d);\n SetAttribute_F01429A3(
/*inout */attributes.lifetime, /*inout */attributes.seed, A_e, B_e);\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
\n\n\t\t\n#if VFX_USE_ALIVE_CURRENT\n if (attributes.alive)\n#endif
\n {\n#if USE_DEAD_LIST\n\t uint deadIndex = deadListIn.DecrementCounter();\n
uint index = deadListIn[deadIndex];\n#else\n uint index = particleIndex;\n#endif\n
attributeBuffer.Store3((index * 0x8 + 0x0) << 2,asuint(attributes.position));\n
attributeBuffer.Store3((index * 0x8 + 0x4) << 2,asuint(attributes.velocity));\n
attributeBuffer.Store((index * 0x1 + 0xA00) << 2,asuint(attributes.size));\n

attributeBuffer.Store((index * 0x8 + 0x7) << 2,asuint(attributes.age));\n
\n\r\n }\r\n }\r\n}\r\n"
\n\n }\n }\n}\n"
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\r\nCBUFFER_START(parameters)\n
1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\nCBUFFER_START(parameters)\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<uint> deadListOut;\r\n#endif\r\n\r\n#if
VFX_HAS_INDIRECT_DRAW\r\nRWStructuredBuffer<uint> indirectBuffer;\r\n#endif\r\n\r\n#if
HAS_STRIPS\r\nRWBuffer<uint> stripDataBuffer;\r\n#endif\r\n\r\n#if VFX_USE_STRIPALIVE_CURRENT\r\nBuffer<uint>
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
bool alive;\n float age;\n};\n\nstruct SourceAttributes\n{\n};\n\n\n\n\n#define
USE_DEAD_LIST (VFX_USE_ALIVE_CURRENT && !HAS_STRIPS)\n\nRWByteAddressBuffer
attributeBuffer;\n\n#if USE_DEAD_LIST\nRWStructuredBuffer<uint> deadListOut;\n#endif\n\n#if
VFX_HAS_INDIRECT_DRAW\nRWStructuredBuffer<uint> indirectBuffer;\n#endif\n\n#if
HAS_STRIPS\nRWBuffer<uint> stripDataBuffer;\n#endif\n\n#if VFX_USE_STRIPALIVE_CURRENT\nBuffer<uint>
attachedStripDataBuffer;\n#endif\n\nCBUFFER_START(updateParams)\n uint nbMax;\n\tuint
dispatchWidth;\n\tuint systemSeed;\nCBUFFER_END\n\n#include \"Packages/com.unity.visualeffectgraph/Shaders/Common/VFXCommonCompute.hlsl\"\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\n\nvoid
Gravity(inout float3 velocity, float3 Force, float deltaTime)\n{\n velocity
+= Force * deltaTime;\n}\nvoid Force_0(inout float3 velocity, float mass, float3
Force, float deltaTime) /*Mode:Absolute */\n{\n velocity += (Force / mass)

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 + 0x3) << 2));\n\t\t\n\r\n\t\tif (attributes.alive)\r\n\t\t{\r\n\t\t\tattributes.position
{ 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
Attributes attributes = (Attributes)0;\n\t\tSourceAttributes sourceAttributes
= (SourceAttributes)0;\n\n#if VFX_USE_ALIVE_CURRENT\n\t\tattributes.alive =
(attributeBuffer.Load((index * 0x8 + 0x3) << 2));\n\t\t\n\n\t\tif (attributes.alive)\n\t\t{\n\t\t\tattributes.position
= asfloat(attributeBuffer.Load((index * 0x8 + 0x7) << 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\tGravity(
= asfloat(attributeBuffer.Load((index * 0x8 + 0x7) << 2));\n\t\t\t\n\n\n//
Initialize built-in needed attributes\n#if VFX_USE_OLDPOSITION_CURRENT\n\t\t\tattributes.oldPosition
= attributes.position;\n#endif\n#if HAS_STRIPS\n const StripData
stripData = GetStripDataFromParticleIndex(index, PARTICLE_PER_STRIP_COUNT);\n
InitStripAttributes(index, attributes, stripData);\n#endif\n\t\t\t\n\t\t\tGravity(
/*inout */attributes.velocity, Force_a, deltaTime_a);\n\t\t\t{\n\t\t\t float3
tmp_bc = attributes.position + uniform_d;\n\t\t\t float3 tmp_bf = GeneratePerlinCurlNoise(tmp_bc,
float3(5, 0.5, 2).x, (int)1, float3(5, 0.5, 2).y, float3(5, 0.5, 2).z);\n\t\t\t

/*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
/*inout */attributes.alive);\n\t\t\t\n\n\n\t\t\tif (attributes.alive)\n\t\t\t{\n\t\t\t\tattributeBuffer.Store3((index
* 0x8 + 0x7) << 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 + 0x3) << 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,
* 0x8 + 0x7) << 2,asuint(attributes.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\n#if HAS_STRIPS\t\t\t\n\t\t\t\tuint relativeIndexInStrip
= GetRelativeIndex(index, stripData);\n\t\t\t\tInterlockedMin(STRIP_DATA(STRIP_MIN_ALIVE,
stripData.stripIndex), relativeIndexInStrip);\n\t\t\t\tInterlockedMax(STRIP_DATA(STRIP_MAX_ALIVE,
stripData.stripIndex), relativeIndexInStrip);\n#endif\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tattributeBuffer.Store((index
* 0x8 + 0x3) << 2,uint(attributes.alive));\n\t\t\t\t\n\n#if USE_DEAD_LIST &&
!VFX_USE_STRIPALIVE_CURRENT\n\t\t\t\tuint deadIndex = deadListOut.IncrementCounter();\n\t\t\t\tdeadListOut[deadIndex]
= index;\n#endif\n\t\t\t}\n\t\t}\n#if USE_DEAD_LIST && VFX_USE_STRIPALIVE_CURRENT\n
else if (attributes.stripAlive)\n {\n if (STRIP_DATA_X(attachedStripDataBuffer,
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.position
= asfloat(attributeBuffer.Load3((index * 0x8 + 0x0) << 2));\n\t\tattributes.velocity
= asfloat(attributeBuffer.Load3((index * 0x8 + 0x4) << 2));\n\t\tattributes.mass
= asfloat(attributeBuffer.Load((index * 0x1 + 0xB40) << 2));\n\t\tattributes.lifetime
= asfloat(attributeBuffer.Load((index * 0x1 + 0xC80) << 2));\n\t\tattributes.alive
= (attributeBuffer.Load((index * 0x8 + 0x3) << 2));\n\t\tattributes.age = asfloat(attributeBuffer.Load((index
* 0x8 + 0x7) << 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\tGravity(
the particle \n {\n uint deadIndex = deadListOut.IncrementCounter();\n\t\t\t\tdeadListOut[deadIndex]
= index;\n attributes.stripAlive = false;\n \n
} \n }\n#endif\n#else\n\t\tattributes.position = asfloat(attributeBuffer.Load3((index
* 0x8 + 0x0) << 2));\n\t\tattributes.velocity = asfloat(attributeBuffer.Load3((index
* 0x8 + 0x4) << 2));\n\t\tattributes.mass = asfloat(attributeBuffer.Load((index
* 0x1 + 0xB40) << 2));\n\t\tattributes.lifetime = asfloat(attributeBuffer.Load((index
* 0x1 + 0xC80) << 2));\n\t\tattributes.alive = (attributeBuffer.Load((index
* 0x8 + 0x3) << 2));\n\t\tattributes.age = asfloat(attributeBuffer.Load((index
* 0x8 + 0x7) << 2));\n\t\t\n\n\t\t\n#if VFX_USE_OLDPOSITION_CURRENT\n\t\tattributes.oldPosition
= attributes.position;\n#endif\n#if HAS_STRIPS\n const StripData stripData
= GetStripDataFromParticleIndex(index, PARTICLE_PER_STRIP_COUNT);\n
InitStripAttributes(index, attributes, stripData);\n#endif\n\t\t\n\t\tGravity(
/*inout */attributes.velocity, Force_a, deltaTime_a);\n\t\t{\n\t\t float3
tmp_bc = attributes.position + uniform_d;\n\t\t float3 tmp_bf = GeneratePerlinCurlNoise(tmp_bc,
float3(5, 0.5, 2).x, (int)1, float3(5, 0.5, 2).y, float3(5, 0.5, 2).z);\n\t\t

*/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 + 0x0) << 2,asuint(attributes.position));\n\t\tattributeBuffer.Store3((index
/*inout */attributes.alive);\n\t\t\n\n\t\tattributeBuffer.Store3((index * 0x8
+ 0x0) << 2,asuint(attributes.position));\n\t\tattributeBuffer.Store3((index
* 0x8 + 0x7) << 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"
* 0x8 + 0x7) << 2,asuint(attributes.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"
source: "Shader \"Hidden/VFX/Sparks/Sparks/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\"
source: "Shader \"Hidden/VFX/Sparks/Sparks/Output Particle Quad\"\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\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\n\t\t#define
NB_THREADS_PER_GROUP 64\n\t\t#define HAS_ATTRIBUTES 1\n\t\t#define VFX_PASSDEPTH_ACTUAL

to always use a valid instanceID\n\t\t#if defined(UNITY_STEREO_INSTANCING_ENABLED)\n\t\t\t#define
VFX_DECLARE_INSTANCE_ID UNITY_VERTEX_INPUT_INSTANCE_ID\n\t\t\t#define VFX_GET_INSTANCE_ID(i)
unity_InstanceID\n\t\t#else\n\t\t\t#define VFX_DECLARE_INSTANCE_ID uint
instanceID : SV_InstanceID;\n\t\t\t#define VFX_GET_INSTANCE_ID(i) i.instanceID\n\t\t#endif\n\t\t\n\t\tENDHLSL\n\t\t\n\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
instanceID : SV_InstanceID;\n\t\t\t#define VFX_GET_INSTANCE_ID(i) i.instanceID\n\t\t#endif\n\t\t\n\t\tENDHLSL\n\t\t\n\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"SceneSelectionPass\" }\n\t\t\n\t\t\tZWrite On\n\t\t\tBlend
Off\n\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#define VFX_PASSDEPTH VFX_PASSDEPTH_SELECTION\n\t\t\t#pragma
target 4.5\n\t\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

0.5f, encodedMotionVector);\n\t\t\t\t\t\t\t\n\t\t\t\t\treturn encodedMotionVector;\n\t\t\t\t#elif
VFX_PASSDEPTH == VFX_PASSDEPTH_SELECTION\n\t\t\t\t\treturn float4(_ObjectId,
_PassValue, 1.0, 1.0);\n\t\t\t\t#elif VFX_PASSDEPTH == VFX_PASSDEPTH_ACTUAL\n\t\t\t\t\treturn
(float4)0;\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH undefined \n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\t\r\n\t\t\r\n\t\t//
(float4)0;\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH undefined \n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\t\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#pragma multi_compile
_ DEBUG_DISPLAY\n\t\t\n\t\t\tstruct ps_input\n\t\t\t{\n\t\t\t\tfloat4 pos :

encodedMotionVector = 0.0f;\n\t\t\t\t\t\tVFXEncodeMotionVector(velocity * 0.5f,
encodedMotionVector);\n\t\t\t\t\t\t\n\t\t\t\to.outMotionVector = encodedMotionVector;\n\t\t
o.outMotionVector.a = o.color.a < i.VFX_VARYING_ALPHATHRESHOLD ? 0.0f : 1.0f;
//Independant clipping for motion vector pass\n\t\t#endif\n\t\t\t\treturn o;\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\t\r\n\t}\r\n}\r\n"
//Independant clipping for motion vector pass\n\t\t#endif\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"
m_Infos:
m_Expressions:
m_Expressions:

286
Assets/Samples/Volumetric/Volumetric.vfx


m_ShaderSources:
- compute: 1
name: '[System 1]Initialize Particle'
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\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_SIZE_CURRENT 1\n#define VFX_USE_POSITION_CURRENT
1\n#define VFX_USE_SEED_CURRENT 1\n#define VFX_USE_DIRECTION_CURRENT 1\n#define

1\n#define VFX_USE_AXISY_CURRENT 1\n#define VFX_USE_AXISZ_CURRENT 1\n#define
VFX_USE_SCALEX_CURRENT 1\n#define VFX_USE_SCALEY_CURRENT 1\n#define VFX_USE_SCALEZ_CURRENT
1\n#define VFX_USE_COLOR_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
1\n#define VFX_USE_COLOR_CURRENT 1\n#define VFX_LOCAL_SPACE 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\nCBUFFER_START(parameters)\n
scaleY;\n float scaleZ;\n float3 color;\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\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<uint>
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<uint> eventList;\r\nByteAddressBuffer
inputAdditional;\r\n#endif\r\n\r\n#if HAS_STRIPS\r\nRWBuffer<uint> 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
scaleY;\n float scaleZ;\n float3 color;\n};\n\nstruct SourceAttributes\n{\n};\n\n\n\n\n#define
USE_DEAD_LIST (VFX_USE_ALIVE_CURRENT && !HAS_STRIPS)\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 USE_DEAD_LIST\nRWStructuredBuffer<uint> 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<uint>
eventList;\nByteAddressBuffer inputAdditional;\n#endif\n\n#if HAS_STRIPS\nRWBuffer<uint>
stripDataBuffer;\n#endif\n\n#include \"Packages/com.unity.visualeffectgraph/Shaders/Common/VFXCommonCompute.hlsl\"\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\n\nvoid
SetAttribute_3278B22F(inout float size, float Size) /*attribute:size Composition:Overwrite
Source:Slot Random:Off channels:XYZ */\n{\n size = Size;\n}\nvoid PositionSphere_18D(inout
float3 position, inout uint seed, inout float3 direction, float3 ArcSphere_sphere_center,

Source:Slot Random:Uniform channels:XYZ */\n{\n lifetime = lerp(A,B,RAND);\n}\nvoid
SetAttribute_CA100327(inout float texIndex, inout uint seed, float A, float
B) /*attribute:texIndex Composition:Overwrite Source:Slot Random:Uniform channels:XYZ
*/\n{\n texIndex = lerp(A,B,RAND);\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
*/\n{\n texIndex = lerp(A,B,RAND);\n}\n\n\n\n#if HAS_STRIPS\nbool GetParticleIndex(inout
uint particleIndex, uint stripIndex)\n{\n\tuint relativeIndex;\n\tInterlockedAdd(STRIP_DATA(STRIP_NEXT_INDEX,
stripIndex), 1, relativeIndex);\n\tif (relativeIndex >= PARTICLE_PER_STRIP_COUNT)
// strip is full\n\t{\n\t\tInterlockedAdd(STRIP_DATA(STRIP_NEXT_INDEX, stripIndex),
-1); // Remove previous increment\n\t\treturn false;\n\t}\n\n\tparticleIndex
+ 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
+ relativeIndex) % PARTICLE_PER_STRIP_COUNT);\n return true;\n}\n#endif\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 USE_DEAD_LIST\n maxThreadId
= min(maxThreadId, deadListCount.Load(0x0));\n#elif VFX_USE_SPAWNER_FROM_GPU\n
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\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
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\t\tuint particleIndex = id + currentSpawnIndex;\n\t\t\n#if
!VFX_USE_SPAWNER_FROM_GPU\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\n\t\tAttributes
attributes = (Attributes)0;\n\t\tSourceAttributes sourceAttributes = (SourceAttributes)0;\n\t\t\n
attributes.size = (float)0.100000001;\n attributes.position = float3(0,
0, 0);\n attributes.seed = (uint)0;\n attributes.direction =
float3(0, 0, 1);\n attributes.lifetime = (float)1;\n attributes.texIndex

= float3(1, 0, 0);\n attributes.axisY = float3(0, 1, 0);\n attributes.axisZ
= float3(0, 0, 1);\n attributes.scaleX = (float)1;\n attributes.scaleY
= (float)1;\n attributes.scaleZ = (float)1;\n attributes.color
= float3(1, 1, 1);\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 SetAttribute_3278B22F(
= float3(1, 1, 1);\n \n\n#if VFX_USE_PARTICLEID_CURRENT\n attributes.particleId
= particleIndex;\n#endif\n#if VFX_USE_SEED_CURRENT\n attributes.seed
= WangHash(particleIndex ^ systemSeed);\n#endif\n#if VFX_USE_SPAWNINDEX_CURRENT\n
attributes.spawnIndex = id;\n#endif\n#if HAS_STRIPS\n#if !VFX_USE_SPAWNER_FROM_GPU\n\t\t\n#else\n
uint stripIndex = sourceIndex;\n#endif\n\t\tstripIndex = min(stripIndex, STRIP_COUNT);\n\n
if (!GetParticleIndex(particleIndex, stripIndex))\n return;\n\n
const StripData stripData = GetStripDataFromStripIndex(stripIndex, PARTICLE_PER_STRIP_COUNT);\n\t\tInitStripAttributes(particleIndex,
attributes, stripData);\n\t\t// TODO Change seed to be sure we're deterministic
on random with strip\n#endif\n \n {\n SetAttribute_3278B22F(
/*inout */attributes.size, (float)0.200000003);\n }\n {\n
uint tmp_bc = attributes.particleId ^ asuint(uniform_d);\n float
tmp_bd = FixedRand(tmp_bc);\n float tmp_be = uniform_c * tmp_bd;\n

SetAttribute_F01429A3( /*inout */attributes.lifetime, /*inout */attributes.seed,
(float)3, (float)7);\n }\n {\n SetAttribute_CA100327(
/*inout */attributes.texIndex, /*inout */attributes.seed, (float)0, (float)8);\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
}\n \n\n\t\t\n#if VFX_USE_ALIVE_CURRENT\n if (attributes.alive)\n#endif
\n {\n#if USE_DEAD_LIST\n\t uint deadIndex = deadListIn.DecrementCounter();\n
uint index = deadListIn[deadIndex];\n#else\n uint index = particleIndex;\n#endif\n
attributeBuffer.Store((index * 0x10 + 0x3) << 2,asuint(attributes.size));\n
attributeBuffer.Store3((index * 0x8 + 0x186C00) << 2,asuint(attributes.position));\n
attributeBuffer.Store((index * 0x1 + 0x24A200) << 2,asuint(attributes.lifetime));\n

attributeBuffer.Store((index * 0x10 + 0xC) << 2,asuint(attributes.scaleY));\n
attributeBuffer.Store((index * 0x10 + 0xD) << 2,asuint(attributes.scaleZ));\n
attributeBuffer.Store3((index * 0x4 + 0x293640) << 2,asuint(attributes.color));\n
\n\r\n }\r\n }\r\n}\r\n"
\n\n }\n }\n}\n"
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\r\nCBUFFER_START(parameters)\n
1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\nCBUFFER_START(parameters)\n
float mass;\n float age;\n bool alive;\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<uint> deadListOut;\r\n#endif\r\n\r\n#if
VFX_HAS_INDIRECT_DRAW\r\nRWStructuredBuffer<uint> indirectBuffer;\r\n#endif\r\n\r\n#if
HAS_STRIPS\r\nRWBuffer<uint> stripDataBuffer;\r\n#endif\r\n\r\n#if VFX_USE_STRIPALIVE_CURRENT\r\nBuffer<uint>
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
float mass;\n float age;\n bool alive;\n};\n\nstruct SourceAttributes\n{\n};\n\n\n\n\n#define
USE_DEAD_LIST (VFX_USE_ALIVE_CURRENT && !HAS_STRIPS)\n\nRWByteAddressBuffer
attributeBuffer;\n\n#if USE_DEAD_LIST\nRWStructuredBuffer<uint> deadListOut;\n#endif\n\n#if
VFX_HAS_INDIRECT_DRAW\nRWStructuredBuffer<uint> indirectBuffer;\n#endif\n\n#if
HAS_STRIPS\nRWBuffer<uint> stripDataBuffer;\n#endif\n\n#if VFX_USE_STRIPALIVE_CURRENT\nBuffer<uint>
attachedStripDataBuffer;\n#endif\n\nCBUFFER_START(updateParams)\n uint nbMax;\n\tuint
dispatchWidth;\n\tuint systemSeed;\nCBUFFER_END\n\n#include \"Packages/com.unity.visualeffectgraph/Shaders/Common/VFXCommonCompute.hlsl\"\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\n\nvoid
Force_1(inout float3 velocity, float mass, float3 Velocity, float Drag, float
deltaTime) /*Mode:Relative */\n{\n velocity += (Velocity - velocity) * min(1.0f,Drag
* deltaTime / mass);\n}\nvoid EulerIntegration(inout float3 position, float3

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
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
* 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 + 0x27AF80) << 2));\n\t\t\n\r\n\t\tif
(attributes.alive)\r\n\t\t{\r\n\t\t\tattributes.position = asfloat(attributeBuffer.Load3((index
* 0x8 + 0x186C00) << 2));\n\t\t\tattributes.lifetime = asfloat(attributeBuffer.Load((index
* 0x1 + 0x24A200) << 2));\n\t\t\tattributes.velocity = asfloat(attributeBuffer.Load3((index
* 0x8 + 0x186C04) << 2));\n\t\t\tattributes.mass = (float)1;\n\t\t\tattributes.age
= asfloat(attributeBuffer.Load((index * 0x8 + 0x186C03) << 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
float tmp_bf = SampleCurve(uniform_b,attributes.age);\n\t\t\t float tmp_bh
= max(tmp_bf, (float)0);\n\t\t\t float tmp_bj = min(tmp_bh, (float)1);\n\t\t\t
float3 tmp_bl = float3((float)0.5, tmp_bj, (float)2);\n\t\t\t float3 tmp_bn
= GeneratePerlinCurlNoise(attributes.position, tmp_bl.x, (int)3, tmp_bl.y,
tmp_bl.z);\n\t\t\t float tmp_bo = SampleCurve(uniform_c,attributes.age);\n\t\t\t
* NB_THREADS_PER_GROUP;\n\tuint index = id;\n\tif (id < nbMax)\n\t{\n
Attributes attributes = (Attributes)0;\n\t\tSourceAttributes sourceAttributes
= (SourceAttributes)0;\n\n#if VFX_USE_ALIVE_CURRENT\n\t\tattributes.alive =
(attributeBuffer.Load((index * 0x1 + 0x27AF80) << 2));\n\t\t\n\n\t\tif (attributes.alive)\n\t\t{\n\t\t\tattributes.position
= asfloat(attributeBuffer.Load3((index * 0x8 + 0x186C00) << 2));\n\t\t\tattributes.lifetime
= asfloat(attributeBuffer.Load((index * 0x1 + 0x24A200) << 2));\n\t\t\tattributes.velocity
= asfloat(attributeBuffer.Load3((index * 0x8 + 0x186C04) << 2));\n\t\t\tattributes.mass
= (float)1;\n\t\t\tattributes.age = asfloat(attributeBuffer.Load((index * 0x8
+ 0x186C03) << 2));\n\t\t\t\n\n\n// Initialize built-in needed attributes\n#if
VFX_USE_OLDPOSITION_CURRENT\n\t\t\tattributes.oldPosition = attributes.position;\n#endif\n#if
HAS_STRIPS\n const StripData stripData = GetStripDataFromParticleIndex(index,
PARTICLE_PER_STRIP_COUNT);\n InitStripAttributes(index, attributes,
stripData);\n#endif\n\t\t\t\n\t\t\t{\n\t\t\t float tmp_bf = SampleCurve(uniform_b,attributes.age);\n\t\t\t
float tmp_bh = max(tmp_bf, (float)0);\n\t\t\t float tmp_bj = min(tmp_bh,
(float)1);\n\t\t\t float3 tmp_bl = float3((float)0.5, tmp_bj, (float)2);\n\t\t\t
float3 tmp_bn = GeneratePerlinCurlNoise(attributes.position, tmp_bl.x, (int)3,
tmp_bl.y, tmp_bl.z);\n\t\t\t float tmp_bo = SampleCurve(uniform_c,attributes.age);\n\t\t\t
float3 tmp_bp = float3(tmp_bo, tmp_bo, tmp_bo);\n\t\t\t float3 tmp_bq =
tmp_bn * tmp_bp;\n\t\t\t float3 tmp_br = uniform_d - attributes.position;\n\t\t\t
float3 tmp_bs = tmp_br * tmp_br;\n\t\t\t float tmp_bt = tmp_bs[2];\n\t\t\t

attributes.mass, tmp_cd, (float)3, 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
/*inout */attributes.alive);\n\t\t\t\n\n\n\t\t\tif (attributes.alive)\n\t\t\t{\n\t\t\t\tattributeBuffer.Store3((index
* 0x8 + 0x186C03) << 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 + 0x27AF80) << 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,
* 0x8 + 0x186C03) << 2,asuint(attributes.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\n#if HAS_STRIPS\t\t\t\n\t\t\t\tuint relativeIndexInStrip
= GetRelativeIndex(index, stripData);\n\t\t\t\tInterlockedMin(STRIP_DATA(STRIP_MIN_ALIVE,
stripData.stripIndex), relativeIndexInStrip);\n\t\t\t\tInterlockedMax(STRIP_DATA(STRIP_MAX_ALIVE,
stripData.stripIndex), relativeIndexInStrip);\n#endif\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tattributeBuffer.Store((index
* 0x1 + 0x27AF80) << 2,uint(attributes.alive));\n\t\t\t\t\n\n#if USE_DEAD_LIST
&& !VFX_USE_STRIPALIVE_CURRENT\n\t\t\t\tuint deadIndex = deadListOut.IncrementCounter();\n\t\t\t\tdeadListOut[deadIndex]
= index;\n#endif\n\t\t\t}\n\t\t}\n#if USE_DEAD_LIST && VFX_USE_STRIPALIVE_CURRENT\n
else if (attributes.stripAlive)\n {\n if (STRIP_DATA_X(attachedStripDataBuffer,
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.position
= asfloat(attributeBuffer.Load3((index * 0x8 + 0x186C00) << 2));\n\t\tattributes.lifetime
= asfloat(attributeBuffer.Load((index * 0x1 + 0x24A200) << 2));\n\t\tattributes.velocity
= asfloat(attributeBuffer.Load3((index * 0x8 + 0x186C04) << 2));\n\t\tattributes.mass
= (float)1;\n\t\tattributes.age = asfloat(attributeBuffer.Load((index * 0x8
+ 0x186C03) << 2));\n\t\tattributes.alive = (attributeBuffer.Load((index *
0x1 + 0x27AF80) << 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
float tmp_bf = SampleCurve(uniform_b,attributes.age);\n\t\t float tmp_bh
= max(tmp_bf, (float)0);\n\t\t float tmp_bj = min(tmp_bh, (float)1);\n\t\t
the particle \n {\n uint deadIndex = deadListOut.IncrementCounter();\n\t\t\t\tdeadListOut[deadIndex]
= index;\n attributes.stripAlive = false;\n \n
} \n }\n#endif\n#else\n\t\tattributes.position = asfloat(attributeBuffer.Load3((index
* 0x8 + 0x186C00) << 2));\n\t\tattributes.lifetime = asfloat(attributeBuffer.Load((index
* 0x1 + 0x24A200) << 2));\n\t\tattributes.velocity = asfloat(attributeBuffer.Load3((index
* 0x8 + 0x186C04) << 2));\n\t\tattributes.mass = (float)1;\n\t\tattributes.age
= asfloat(attributeBuffer.Load((index * 0x8 + 0x186C03) << 2));\n\t\tattributes.alive
= (attributeBuffer.Load((index * 0x1 + 0x27AF80) << 2));\n\t\t\n\n\t\t\n#if
VFX_USE_OLDPOSITION_CURRENT\n\t\tattributes.oldPosition = attributes.position;\n#endif\n#if
HAS_STRIPS\n const StripData stripData = GetStripDataFromParticleIndex(index,
PARTICLE_PER_STRIP_COUNT);\n InitStripAttributes(index, attributes,
stripData);\n#endif\n\t\t\n\t\t{\n\t\t float tmp_bf = SampleCurve(uniform_b,attributes.age);\n\t\t
float tmp_bh = max(tmp_bf, (float)0);\n\t\t float tmp_bj = min(tmp_bh, (float)1);\n\t\t
float3 tmp_bl = float3((float)0.5, tmp_bj, (float)2);\n\t\t float3 tmp_bn
= GeneratePerlinCurlNoise(attributes.position, tmp_bl.x, (int)3, tmp_bl.y,
tmp_bl.z);\n\t\t float tmp_bo = SampleCurve(uniform_c,attributes.age);\n\t\t

attributes.mass, tmp_cd, (float)3, 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 + 0x186C00) << 2,asuint(attributes.position));\n\t\tattributeBuffer.Store3((index
/*inout */attributes.alive);\n\t\t\n\n\t\tattributeBuffer.Store3((index * 0x8
+ 0x186C00) << 2,asuint(attributes.position));\n\t\tattributeBuffer.Store3((index
* 0x1 + 0x27AF80) << 2,uint(attributes.alive));\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"
* 0x1 + 0x27AF80) << 2,uint(attributes.alive));\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"
source: "Shader \"Hidden/VFX/Volumetric/System 1/Output Particle Lit Quad\"\n{\r\n\tSubShader\r\n\t{\t\r\n\t\tCull
Off\r\n\t\t\r\n\t\tTags { \"Queue\"=\"Geometry+450\" \"IgnoreProjector\"=\"False\"
source: "Shader \"Hidden/VFX/Volumetric/System 1/Output Particle Lit Quad\"\n{\n\tSubShader\n\t{\t\n\t\tCull
Off\n\t\t\n\t\tTags { \"Queue\"=\"Geometry+450\" \"IgnoreProjector\"=\"False\"
\"RenderType\"=\"Opaque\" }\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\t\n\t\t\n\t\t\n\t\t\n\t\tZTest
LEqual\n\t\tZWrite On\n\t\tCull Off\n\t\t\n\t\n\t\t\t\n\t\tHLSLINCLUDE\n\t\t\n\t\t#define
NB_THREADS_PER_GROUP 64\n\t\t#define HAS_ATTRIBUTES 1\n\t\t#define VFX_PASSDEPTH_ACTUAL

to always use a valid instanceID\n\t\t#if defined(UNITY_STEREO_INSTANCING_ENABLED)\n\t\t\t#define
VFX_DECLARE_INSTANCE_ID UNITY_VERTEX_INPUT_INSTANCE_ID\n\t\t\t#define VFX_GET_INSTANCE_ID(i)
unity_InstanceID\n\t\t#else\n\t\t\t#define VFX_DECLARE_INSTANCE_ID uint
instanceID : SV_InstanceID;\n\t\t\t#define VFX_GET_INSTANCE_ID(i) i.instanceID\n\t\t#endif\n\t\t\n\t\tENDHLSL\n\t\t\n\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
instanceID : SV_InstanceID;\n\t\t\t#define VFX_GET_INSTANCE_ID(i) i.instanceID\n\t\t#endif\n\t\t\n\t\tENDHLSL\n\t\t\n\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"SceneSelectionPass\" }\n\t\t\n\t\t\tZWrite On\n\t\t\tBlend
Off\n\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#define VFX_PASSDEPTH VFX_PASSDEPTH_SELECTION\n\t\t\t#pragma
target 4.5\n\t\t\t#define UNITY_MATERIAL_LIT\n\t\t\t#pragma multi_compile _

for scene selection in the editor, this code allow to output the outline correctly\n\t\t\t\t\toutColor
= float4(_ObjectId, _PassValue, 1.0, 1.0);\n\t\t\t\t#elif VFX_PASSDEPTH ==
VFX_PASSDEPTH_ACTUAL\n\t\t\t\t\t//void\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH
undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"DepthOnly\" }\n\t\t\n\t\t\tZWrite On\n\t\t\tBlend Off\n\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#define
VFX_PASSDEPTH VFX_PASSDEPTH_ACTUAL\n\t\t\t#pragma target 4.5\n\t\t\t#define
UNITY_MATERIAL_LIT\n\t\t\t#pragma multi_compile _ WRITE_NORMAL_BUFFER\n\t\t\t\n\t\t\t#define

for scene selection in the editor, this code allow to output the outline correctly\n\t\t\t\t\toutColor
= float4(_ObjectId, _PassValue, 1.0, 1.0);\n\t\t\t\t#elif VFX_PASSDEPTH ==
VFX_PASSDEPTH_ACTUAL\n\t\t\t\t\t//void\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH
undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"MotionVectors\" }\n\t\t\t\n\t\t\tStencil\n\t\t\t{\n\t\t\t
WriteMask 176\n\t\t\t Ref 160\n\t\t\t Comp Always\n\t\t\t Pass Replace\n\t\t\t}\n\n\t\t\n\t\t\tZWrite
On\n\t\t\tBlend Off\n\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#define VFX_PASSDEPTH

for scene selection in the editor, this code allow to output the outline correctly\n\t\t\t\t\toutColor
= float4(_ObjectId, _PassValue, 1.0, 1.0);\n\t\t\t\t#elif VFX_PASSDEPTH ==
VFX_PASSDEPTH_ACTUAL\n\t\t\t\t\t//void\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH
undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"GBuffer\" }\n\t\t\t\n\t\t\tStencil\n\t\t\t{\n\t\t\t\tWriteMask
7\n\t\t\t\tRef 2\n\t\t\t\tComp Always\n\t\t\t\tPass Replace\n\t\t\t}\t\n\t\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#pragma
target 4.5\n\t\t\t\n\t\t\t#pragma multi_compile _ LIGHT_LAYERS\n\t\t\t#pragma

\n\t\t VFXSetupBuiltin(builtin,surface,builtin.emissiveColor, i);\n\t\t
ENCODE_INTO_GBUFFER(surface, builtin, i.VFX_VARYING_POSCS.xy, outGBuffer);\n\t\t
#else\n\t\t VFXComputePixelOutputToGBuffer(i,normalWS,uvData,outGBuffer);\n\t\t
#endif\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\t// Forward pass\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
#endif\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\t// Forward pass\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"Forward\"}\n\t\t\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#pragma
target 4.5\n\t\t\t\n\t\t\t#define UNITY_MATERIAL_LIT\n\t\t\t#define LIGHTLOOP_TILE_PASS\n\t\t\t#define
_ENABLE_FOG_ON_TRANSPARENT\n\t\t\t#define _DISABLE_DECALS\n\t\t\t\n\n\t\t\t#pragma

encodedMotionVector = 0.0f;\n\t\t\t\t\t\tVFXEncodeMotionVector(velocity * 0.5f,
encodedMotionVector);\n\t\t\t\t\t\t\n\t\t\t\toutMotionVector = encodedMotionVector;\n\t\t\t\toutMotionVector.a
= outColor.a < i.VFX_VARYING_ALPHATHRESHOLD ? 0.0f : 1.0f; //Independant clipping
for motion vector pass\n\t\t#endif\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
for motion vector pass\n\t\t#endif\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"ShadowCaster\" }\n\t\t\n\t\t\tZWrite On\n\t\t\tBlend Off\n\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#pragma
target 4.5\n\t\t\t#if !USE_ALPHA_TEST && IS_TRANSPARENT_PARTICLE\n\t\t\t#define
USE_ALPHA_TEST 1\n\t\t\t#endif\n\t\t\t\n\t\t\tstruct ps_input\n\t\t\t{\n\t\t\t\tfloat4

VFX_SHADERGRAPH\n\t\t\t\n\t\t\t\t\n\t\t\n\t\t\t\t\n\t\t\n\t\t\t\tfloat alpha
= OUTSG.;\n\t\t\t#else\n\t\t\t\tfloat alpha = VFXGetFragmentColor(i).a;\n\t\t\t\t#if
HDRP_USE_BASE_COLOR_MAP_ALPHA\n\t\t\t\t\t\talpha *= VFXGetTextureColor(VFX_SAMPLER(baseColorMap),i).a;\t\n\t\t\t\t#endif\n\t\t\t#endif\n\t\t\t\tVFXClipFragmentColor(alpha,i);\n\t\t\n\t\t\t\treturn
0;\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t}\r\n}\r\n"
0;\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t}\n}\n"
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\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_SIZE_CURRENT 1\n#define VFX_USE_POSITION_CURRENT
1\n#define VFX_USE_LIFETIME_CURRENT 1\n#define VFX_USE_VELOCITY_CURRENT 1\n#define

1\n#define VFX_USE_ANGLEZ_CURRENT 1\n#define VFX_USE_PIVOTX_CURRENT 1\n#define
VFX_USE_PIVOTY_CURRENT 1\n#define VFX_USE_PIVOTZ_CURRENT 1\n#define VFX_USE_SCALEX_CURRENT
1\n#define VFX_USE_SCALEY_CURRENT 1\n#define VFX_USE_SCALEZ_CURRENT 1\n#define
VFX_USE_COLOR_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
VFX_USE_COLOR_CURRENT 1\n#define VFX_LOCAL_SPACE 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\nCBUFFER_START(parameters)\n
float4 uniform_b;\n float currentFrameIndex;\n uint3 PADDING_0;\nCBUFFER_END\n\nstruct
Attributes\n{\n float size;\n float3 position;\n float lifetime;\n
float3 velocity;\n float age;\n float alpha;\n bool alive;\n float3

color;\n};\n\nstruct SourceAttributes\n{\n};\n\nTexture2D baseColorMap;\nSamplerState
samplerbaseColorMap;\nfloat4 baseColorMap_TexelSize;\nTexture2D normalMap;\nSamplerState
samplernormalMap;\nfloat4 normalMap_TexelSize;\n\n\r\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXCommon.hlsl\"\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\r\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\r\n\r\nByteAddressBuffer
attributeBuffer;\r\nRWByteAddressBuffer elementToVFXBuffer;\r\n#if VFX_USE_ALIVE_CURRENT\r\nStructuredBuffer<uint>
deadListOut;\r\n#endif\r\n\r\n#if VFX_HAS_INDIRECT_DRAW\r\nStructuredBuffer<uint>
indirectBuffer;\r\n#endif\r\n\r\nCBUFFER_START(updateParams)\r\n\tuint nbMax;\r\n\tuint
dispatchWidth;\r\n\tuint systemSeed;\r\nCBUFFER_END\r\n\r\nvoid Orient_94A(inout
samplernormalMap;\nfloat4 normalMap_TexelSize;\n\n\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXCommon.hlsl\"\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nByteAddressBuffer
attributeBuffer;\nRWByteAddressBuffer elementToVFXBuffer;\n#if VFX_USE_ALIVE_CURRENT\nStructuredBuffer<uint>
deadListOut;\n#endif\n\n#if VFX_HAS_INDIRECT_DRAW\nStructuredBuffer<uint> indirectBuffer;\n#endif\n\nCBUFFER_START(updateParams)\n\tuint
nbMax;\n\tuint dispatchWidth;\n\tuint systemSeed;\nCBUFFER_END\n\nvoid Orient_94A(inout
float3 axisX, inout float3 axisY, inout float3 axisZ, float3 position, float3
velocity) /*mode:AlongVelocity axes:ZY */\n{\n \n axisY = normalize(velocity);\n
axisZ = position - GetViewVFXPosition();\n axisX = normalize(cross(axisY,axisZ));\n

position, inout float alpha, inout bool alive, float FadedDistance, float InvFadeDistance)
/*cullWhenFaded:True fadeMode:Alpha */\n{\n \n float clipPosW = TransformPositionVFXToClip(position).w;\n
float fade = saturate((clipPosW - FadedDistance) * InvFadeDistance);\n alpha
*= fade;\n if(fade == 0.0) alive=false;\n}\n\n\r\n\r\n[numthreads(NB_THREADS_PER_GROUP,1,1)]\r\nvoid
CSMain(uint3 groupId\t\t: SV_GroupID,\r\n\t\t\tuint3 groupThreadId\t: SV_GroupThreadID)\r\n{\r\n\tuint
*= fade;\n if(fade == 0.0) alive=false;\n}\n\n\n\n[numthreads(NB_THREADS_PER_GROUP,1,1)]\nvoid
CSMain(uint3 groupId\t\t: SV_GroupID,\n\t\t\tuint3 groupThreadId\t: SV_GroupThreadID)\n{\n\tuint
* NB_THREADS_PER_GROUP;\r\n\tuint index = id;\r\n\tif (id < nbMax)\r\n\t{\r\n\t\tAttributes
attributes = (Attributes)0;\r\n\t\tSourceAttributes sourceAttributes = (SourceAttributes)0;\r\n\t\t\r\n\t\tattributes.alive
= (attributeBuffer.Load((index * 0x1 + 0x27AF80) << 2));\n\n\r\n\t\tif (attributes.alive)\r\n\t\t{\r\n\t\t\tattributes.size
* NB_THREADS_PER_GROUP;\n\tuint index = id;\n\tif (id < nbMax)\n\t{\n\t\tAttributes
attributes = (Attributes)0;\n\t\tSourceAttributes sourceAttributes = (SourceAttributes)0;\n\t\t\n\t\tattributes.alive
= (attributeBuffer.Load((index * 0x1 + 0x27AF80) << 2));\n\n\n\t\tif (attributes.alive)\n\t\t{\n\t\t\tattributes.size
= asfloat(attributeBuffer.Load((index * 0x10 + 0x3) << 2));\nattributes.position
= asfloat(attributeBuffer.Load3((index * 0x8 + 0x186C00) << 2));\nattributes.lifetime
= asfloat(attributeBuffer.Load((index * 0x1 + 0x24A200) << 2));\nattributes.velocity

= asfloat(attributeBuffer.Load((index * 0x10 + 0xB) << 2));\nattributes.scaleY
= asfloat(attributeBuffer.Load((index * 0x10 + 0xC) << 2));\nattributes.scaleZ
= asfloat(attributeBuffer.Load((index * 0x10 + 0xD) << 2));\nattributes.color
= asfloat(attributeBuffer.Load3((index * 0x4 + 0x293640) << 2));\n\n\r\n\t\t\tOrient_94A(
= asfloat(attributeBuffer.Load3((index * 0x4 + 0x293640) << 2));\n\n\n\t\t\tOrient_94A(
/*inout */attributes.axisX, /*inout */attributes.axisY, /*inout */attributes.axisZ,
attributes.position, attributes.velocity);\n\t\t\t{\n\t\t\t SetAttribute_D5151642(
/*inout */attributes.scaleX, /*inout */attributes.scaleY, /*inout */attributes.scaleZ,

= SampleCurve(uniform_b,tmp_bf);\n\t\t\t float tmp_bi = tmp_bg * (float)0.400000006;\n\t\t\t
SetAttribute_3278B22F( /*inout */attributes.size, tmp_bi);\n\t\t\t}\n\t\t\t{\n\t\t\t
CameraFade_18F(attributes.position, /*inout */attributes.alpha, /*inout */attributes.alive,
(float)0.5, (float)0.666666687);\n\t\t\t}\n\t\t\t\n\r\n\t\t\t\r\n\t\t\t\n\t\t\tfloat3
(float)0.5, (float)0.666666687);\n\t\t\t}\n\t\t\t\n\n\t\t\t\n\t\t\t\n\t\t\tfloat3
VFX_USE_SCALEZ_CURRENT\n\t\t\tsize3.z *= attributes.scaleZ;\n\t\t\t#endif\n\t\t\t\r\n\t\t\tfloat4x4
elementToVFX = GetElementToVFXMatrix(\r\n\t\t\t\tattributes.axisX,\r\n\t\t\t\tattributes.axisY,\r\n\t\t\t\tattributes.axisZ,\r\n\t\t\t\tfloat3(attributes.angleX,attributes.angleY,attributes.angleZ),\r\n\t\t\t\tfloat3(attributes.pivotX,attributes.pivotY,attributes.pivotZ),\r\n\t\t\t\tsize3,\r\n\t\t\t\tattributes.position);\r\n\t\t\r\n\t\t\tUNITY_UNROLL\r\n\t\t\tfor
(int itIndexMatrixRow = 0; itIndexMatrixRow < 3; ++itIndexMatrixRow)\r\n\t\t\t{\r\n\t\t\t\tUNITY_UNROLL\r\n\t\t\t\tfor
(int itIndexMatrixCol = 0; itIndexMatrixCol < 4; ++itIndexMatrixCol)\r\n\t\t\t\t{\r\n\t\t\t\t\tuint
itIndexMatrix = itIndexMatrixCol * 4 + itIndexMatrixRow;\r\n\t\t\t\t\tfloat
value = elementToVFX[itIndexMatrixRow][itIndexMatrixCol];\r\n\t\t\t\t\telementToVFXBuffer.Store((index
* 16 + itIndexMatrix) << 2, asuint(value));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n
VFX_USE_SCALEZ_CURRENT\n\t\t\tsize3.z *= attributes.scaleZ;\n\t\t\t#endif\n\t\t\t\n\t\t\tfloat4x4
elementToVFX = GetElementToVFXMatrix(\n\t\t\t\tattributes.axisX,\n\t\t\t\tattributes.axisY,\n\t\t\t\tattributes.axisZ,\n\t\t\t\tfloat3(attributes.angleX,attributes.angleY,attributes.angleZ),\n\t\t\t\tfloat3(attributes.pivotX,attributes.pivotY,attributes.pivotZ),\n\t\t\t\tsize3,\n\t\t\t\tattributes.position);\n\t\t\n\t\t\tUNITY_UNROLL\n\t\t\tfor
(int itIndexMatrixRow = 0; itIndexMatrixRow < 3; ++itIndexMatrixRow)\n\t\t\t{\n\t\t\t\tUNITY_UNROLL\n\t\t\t\tfor
(int itIndexMatrixCol = 0; itIndexMatrixCol < 4; ++itIndexMatrixCol)\n\t\t\t\t{\n\t\t\t\t\tuint
itIndexMatrix = itIndexMatrixCol * 4 + itIndexMatrixRow;\n\t\t\t\t\tfloat value
= elementToVFX[itIndexMatrixRow][itIndexMatrixCol];\n\t\t\t\t\telementToVFXBuffer.Store((index
* 16 + itIndexMatrix) << 2, asuint(value));\n\t\t\t\t}\n\t\t\t}\n\n
: 0u);\r\n\t\t}\t\t\r\n\t}\r\n}\r\n"
: 0u);\n\t\t}\t\t\n\t}\n}\n"
m_Infos:
m_Expressions:
m_Expressions:

267
Assets/Samples/VoxelizedTerrain/VoxelizedTerrain.vfx


m_ShaderSources:
- compute: 1
name: '[System 1]Initialize Particle'
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\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_PARTICLEID_CURRENT 1\n#define
VFX_USE_POSITION_CURRENT 1\n#define VFX_USE_SCALEY_CURRENT 1\n#define VFX_USE_ALPHA_CURRENT

VFX_USE_SMOOTHNESS_CURRENT 1\n#define VFX_WORLD_SPACE 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\r\nCBUFFER_START(parameters)\n
VFX_USE_SMOOTHNESS_CURRENT 1\n#define VFX_WORLD_SPACE 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\nCBUFFER_START(parameters)\n
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\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<uint> 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<uint>
eventList;\r\nByteAddressBuffer inputAdditional;\r\n#endif\r\n\r\n#if HAS_STRIPS\r\nRWBuffer<uint>
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
SourceAttributes\n{\n};\n\n\n\n\n#define USE_DEAD_LIST (VFX_USE_ALIVE_CURRENT
&& !HAS_STRIPS)\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
USE_DEAD_LIST\nRWStructuredBuffer<uint> 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<uint>
eventList;\nByteAddressBuffer inputAdditional;\n#endif\n\n#if HAS_STRIPS\nRWBuffer<uint>
stripDataBuffer;\n#endif\n\n#include \"Packages/com.unity.visualeffectgraph/Shaders/Common/VFXCommonCompute.hlsl\"\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\n\nvoid
Scale.x;\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
Scale.x;\n}\n\n\n\n#if HAS_STRIPS\nbool GetParticleIndex(inout uint particleIndex,
uint stripIndex)\n{\n\tuint relativeIndex;\n\tInterlockedAdd(STRIP_DATA(STRIP_NEXT_INDEX,
stripIndex), 1, relativeIndex);\n\tif (relativeIndex >= PARTICLE_PER_STRIP_COUNT)
// strip is full\n\t{\n\t\tInterlockedAdd(STRIP_DATA(STRIP_NEXT_INDEX, stripIndex),
-1); // Remove previous increment\n\t\treturn false;\n\t}\n\n\tparticleIndex
+ 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
+ relativeIndex) % PARTICLE_PER_STRIP_COUNT);\n return true;\n}\n#endif\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 USE_DEAD_LIST\n maxThreadId
= min(maxThreadId, deadListCount.Load(0x0));\n#elif VFX_USE_SPAWNER_FROM_GPU\n
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\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
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\t\tuint particleIndex = id + currentSpawnIndex;\n\t\t\n#if
!VFX_USE_SPAWNER_FROM_GPU\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\n\t\tAttributes
attributes = (Attributes)0;\n\t\tSourceAttributes sourceAttributes = (SourceAttributes)0;\n\t\t\n
attributes.particleId = (uint)0;\n attributes.position = float3(0, 0,
0);\n attributes.scaleY = (float)1;\n attributes.alpha = (float)1;\n
attributes.pivotX = (float)0;\n attributes.pivotY = (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_x = attributes.particleId
/ (uint)65536;\n uint tmp_y = tmp_x * (uint)65536;\n
\n\n#if VFX_USE_PARTICLEID_CURRENT\n attributes.particleId = particleIndex;\n#endif\n#if
VFX_USE_SEED_CURRENT\n attributes.seed = WangHash(particleIndex ^ systemSeed);\n#endif\n#if
VFX_USE_SPAWNINDEX_CURRENT\n attributes.spawnIndex = id;\n#endif\n#if
HAS_STRIPS\n#if !VFX_USE_SPAWNER_FROM_GPU\n\t\t\n#else\n uint stripIndex
= sourceIndex;\n#endif\n\t\tstripIndex = min(stripIndex, STRIP_COUNT);\n\n
if (!GetParticleIndex(particleIndex, stripIndex))\n return;\n\n
const StripData stripData = GetStripDataFromStripIndex(stripIndex, PARTICLE_PER_STRIP_COUNT);\n\t\tInitStripAttributes(particleIndex,
attributes, stripData);\n\t\t// TODO Change seed to be sure we're deterministic
on random with strip\n#endif\n \n {\n uint tmp_x =
attributes.particleId / (uint)65536;\n uint tmp_y = tmp_x * (uint)65536;\n
uint tmp_z = attributes.particleId - tmp_y;\n uint tmp_bb = tmp_z
/ (uint)256;\n float tmp_bc = (float)tmp_bb;\n uint tmp_bd
= tmp_bb - tmp_bb;\n float tmp_be = (float)tmp_bd;\n

tmp_bw = tmp_bs + tmp_bv;\n PositionSequential_913D42CB(attributes.particleId,
/*inout */attributes.position, tmp_bw);\n }\n {\n
SetAttribute_D5151645( /*inout */attributes.scaleY, (float)0);\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
\n\n\t\t\n#if VFX_USE_ALIVE_CURRENT\n if (attributes.alive)\n#endif
\n {\n#if USE_DEAD_LIST\n\t uint deadIndex = deadListIn.DecrementCounter();\n
uint index = deadListIn[deadIndex];\n#else\n uint index = particleIndex;\n#endif\n
attributeBuffer.Store3((index * 0x4 + 0x0) << 2,asuint(attributes.position));\n
attributeBuffer.Store((index * 0x1 + 0x40000) << 2,asuint(attributes.scaleY));\n
attributeBuffer.Store((index * 0x8 + 0x50000) << 2,asuint(attributes.alpha));\n

attributeBuffer.Store((index * 0x8 + 0x50006) << 2,asuint(attributes.scaleZ));\n
attributeBuffer.Store3((index * 0x4 + 0xD0000) << 2,asuint(attributes.color));\n
attributeBuffer.Store((index * 0x8 + 0x50007) << 2,asuint(attributes.Smoothness));\n
\n\r\n }\r\n }\r\n}\r\n"
\n\n }\n }\n}\n"
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
1\n#define VFX_WORLD_SPACE 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\r\nCBUFFER_START(parameters)\n
1\n#define VFX_WORLD_SPACE 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\nCBUFFER_START(parameters)\n
samplertexture_b;\nfloat4 texture_b_TexelSize;\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<uint> deadListOut;\r\n#endif\r\n\r\n#if
VFX_HAS_INDIRECT_DRAW\r\nRWStructuredBuffer<uint> indirectBuffer;\r\n#endif\r\n\r\n#if
HAS_STRIPS\r\nRWBuffer<uint> stripDataBuffer;\r\n#endif\r\n\r\n#if VFX_USE_STRIPALIVE_CURRENT\r\nBuffer<uint>
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
samplertexture_b;\nfloat4 texture_b_TexelSize;\n\n\n\n#define USE_DEAD_LIST
(VFX_USE_ALIVE_CURRENT && !HAS_STRIPS)\n\nRWByteAddressBuffer attributeBuffer;\n\n#if
USE_DEAD_LIST\nRWStructuredBuffer<uint> deadListOut;\n#endif\n\n#if VFX_HAS_INDIRECT_DRAW\nRWStructuredBuffer<uint>
indirectBuffer;\n#endif\n\n#if HAS_STRIPS\nRWBuffer<uint> stripDataBuffer;\n#endif\n\n#if
VFX_USE_STRIPALIVE_CURRENT\nBuffer<uint> attachedStripDataBuffer;\n#endif\n\nCBUFFER_START(updateParams)\n
uint nbMax;\n\tuint dispatchWidth;\n\tuint systemSeed;\nCBUFFER_END\n\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\r\n\r\nvoid
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\n\nvoid
Composition:Blend Source:Slot Random:Off channels:Y */\n{\n scaleY = lerp(scaleY,Scale.x,Blend);\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\t\r\n\t\tif
(attributes.alive)\r\n\t\t{\r\n\t\t\tattributes.position = asfloat(attributeBuffer.Load3((index
Composition:Blend Source:Slot Random:Off channels:Y */\n{\n scaleY = lerp(scaleY,Scale.x,Blend);\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 Attributes attributes = (Attributes)0;\n\t\tSourceAttributes
sourceAttributes = (SourceAttributes)0;\n\n#if VFX_USE_ALIVE_CURRENT\n\t\t\n\t\tif
(attributes.alive)\n\t\t{\n\t\t\tattributes.position = asfloat(attributeBuffer.Load3((index
* 0x1 + 0x40000) << 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 float tmp_y = attributes.position[0];\n\t\t\t
* 0x1 + 0x40000) << 2));\n\t\t\t\n\n\n// Initialize built-in needed attributes\n#if
VFX_USE_OLDPOSITION_CURRENT\n\t\t\tattributes.oldPosition = attributes.position;\n#endif\n#if
HAS_STRIPS\n const StripData stripData = GetStripDataFromParticleIndex(index,
PARTICLE_PER_STRIP_COUNT);\n InitStripAttributes(index, attributes,
stripData);\n#endif\n\t\t\t\n\t\t\t{\n\t\t\t float tmp_y = attributes.position[0];\n\t\t\t
float tmp_z = attributes.position[2];\n\t\t\t float2 tmp_ba = float2(tmp_y,
tmp_z);\n\t\t\t float2 tmp_bb = tmp_ba / uniform_b;\n\t\t\t float2 tmp_bc
= tmp_bb - uniform_c;\n\t\t\t float2 tmp_be = tmp_bc - float2(-1, -1);\n\t\t\t

*/attributes.scaleY, tmp_bl, Blend_a);\n\t\t\t}\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 + 0x40000) << 2,asuint(attributes.scaleY));\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\t\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,
*/attributes.scaleY, tmp_bl, Blend_a);\n\t\t\t}\n\t\t\t\n\n\n\t\t\tif (attributes.alive)\n\t\t\t{\n\t\t\t\tattributeBuffer.Store((index
* 0x1 + 0x40000) << 2,asuint(attributes.scaleY));\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\n#if HAS_STRIPS\t\t\t\n\t\t\t\tuint relativeIndexInStrip
= GetRelativeIndex(index, stripData);\n\t\t\t\tInterlockedMin(STRIP_DATA(STRIP_MIN_ALIVE,
stripData.stripIndex), relativeIndexInStrip);\n\t\t\t\tInterlockedMax(STRIP_DATA(STRIP_MAX_ALIVE,
stripData.stripIndex), relativeIndexInStrip);\n#endif\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t\n#if
USE_DEAD_LIST && !VFX_USE_STRIPALIVE_CURRENT\n\t\t\t\tuint deadIndex = deadListOut.IncrementCounter();\n\t\t\t\tdeadListOut[deadIndex]
= index;\n#endif\n\t\t\t}\n\t\t}\n#if USE_DEAD_LIST && VFX_USE_STRIPALIVE_CURRENT\n
else if (attributes.stripAlive)\n {\n if (STRIP_DATA_X(attachedStripDataBuffer,
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.position
= asfloat(attributeBuffer.Load3((index * 0x4 + 0x0) << 2));\n\t\tattributes.scaleY
= asfloat(attributeBuffer.Load((index * 0x1 + 0x40000) << 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 float tmp_y = attributes.position[0];\n\t\t
float tmp_z = attributes.position[2];\n\t\t float2 tmp_ba = float2(tmp_y,
tmp_z);\n\t\t float2 tmp_bb = tmp_ba / uniform_b;\n\t\t float2 tmp_bc
= tmp_bb - uniform_c;\n\t\t float2 tmp_be = tmp_bc - float2(-1, -1);\n\t\t
float2 tmp_bg = tmp_be / float2(2, 2);\n\t\t float4 tmp_bi = SampleTexture(VFX_SAMPLER(texture_b),tmp_bg,(float)0);\n\t\t
float tmp_bj = tmp_bi[1];\n\t\t float tmp_bk = tmp_bj * uniform_d;\n\t\t
float tmp_bl = saturate(tmp_bk);\n\t\t SetAttribute_E0455982( /*inout */attributes.scaleY,
tmp_bl, Blend_a);\n\t\t}\n\t\t\n\r\n\t\tattributeBuffer.Store((index * 0x1
+ 0x40000) << 2,asuint(attributes.scaleY));\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"
the particle \n {\n uint deadIndex = deadListOut.IncrementCounter();\n\t\t\t\tdeadListOut[deadIndex]
= index;\n attributes.stripAlive = false;\n \n
} \n }\n#endif\n#else\n\t\tattributes.position = asfloat(attributeBuffer.Load3((index
* 0x4 + 0x0) << 2));\n\t\tattributes.scaleY = asfloat(attributeBuffer.Load((index
* 0x1 + 0x40000) << 2));\n\t\t\n\n\t\t\n#if VFX_USE_OLDPOSITION_CURRENT\n\t\tattributes.oldPosition
= attributes.position;\n#endif\n#if HAS_STRIPS\n const StripData stripData
= GetStripDataFromParticleIndex(index, PARTICLE_PER_STRIP_COUNT);\n
InitStripAttributes(index, attributes, stripData);\n#endif\n\t\t\n\t\t{\n\t\t
float tmp_y = attributes.position[0];\n\t\t float tmp_z = attributes.position[2];\n\t\t
float2 tmp_ba = float2(tmp_y, tmp_z);\n\t\t float2 tmp_bb = tmp_ba / uniform_b;\n\t\t
float2 tmp_bc = tmp_bb - uniform_c;\n\t\t float2 tmp_be = tmp_bc - float2(-1,
-1);\n\t\t float2 tmp_bg = tmp_be / float2(2, 2);\n\t\t float4 tmp_bi
= SampleTexture(VFX_SAMPLER(texture_b),tmp_bg,(float)0);\n\t\t float tmp_bj
= tmp_bi[1];\n\t\t float tmp_bk = tmp_bj * uniform_d;\n\t\t float tmp_bl
= saturate(tmp_bk);\n\t\t SetAttribute_E0455982( /*inout */attributes.scaleY,
tmp_bl, Blend_a);\n\t\t}\n\t\t\n\n\t\tattributeBuffer.Store((index * 0x1 +
0x40000) << 2,asuint(attributes.scaleY));\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"
source: "Shader \"Hidden/VFX/VoxelizedTerrain/System 1/Output Particle Lit Cube\"\n{\r\n\tSubShader\r\n\t{\t\r\n\t\tCull
Back\r\n\t\t\r\n\t\tTags { \"Queue\"=\"Geometry+0\" \"IgnoreProjector\"=\"False\"
source: "Shader \"Hidden/VFX/VoxelizedTerrain/System 1/Output Particle Lit Cube\"\n{\n\tSubShader\n\t{\t\n\t\tCull
Back\n\t\t\n\t\tTags { \"Queue\"=\"Geometry+0\" \"IgnoreProjector\"=\"False\"
\"RenderType\"=\"Opaque\" }\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\t\n\t\t\n\t\t\n\t\t\n\t\tZTest
LEqual\n\t\tZWrite On\n\t\tCull Off\n\t\t\n\t\n\t\t\t\n\t\tHLSLINCLUDE\n\t\t\n\t\t#define
NB_THREADS_PER_GROUP 64\n\t\t#define HAS_ATTRIBUTES 1\n\t\t#define VFX_PASSDEPTH_ACTUAL

to always use a valid instanceID\n\t\t#if defined(UNITY_STEREO_INSTANCING_ENABLED)\n\t\t\t#define
VFX_DECLARE_INSTANCE_ID UNITY_VERTEX_INPUT_INSTANCE_ID\n\t\t\t#define VFX_GET_INSTANCE_ID(i)
unity_InstanceID\n\t\t#else\n\t\t\t#define VFX_DECLARE_INSTANCE_ID uint
instanceID : SV_InstanceID;\n\t\t\t#define VFX_GET_INSTANCE_ID(i) i.instanceID\n\t\t#endif\n\t\t\n\t\tENDHLSL\n\t\t\n\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
instanceID : SV_InstanceID;\n\t\t\t#define VFX_GET_INSTANCE_ID(i) i.instanceID\n\t\t#endif\n\t\t\n\t\tENDHLSL\n\t\t\n\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"SceneSelectionPass\" }\n\t\t\n\t\t\tZWrite On\n\t\t\tBlend
Off\n\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#define VFX_PASSDEPTH VFX_PASSDEPTH_SELECTION\n\t\t\t#pragma
target 4.5\n\t\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

0.5f, encodedMotionVector);\n\t\t\t\t\t\t\t\n\t\t\t\t\treturn encodedMotionVector;\n\t\t\t\t#elif
VFX_PASSDEPTH == VFX_PASSDEPTH_SELECTION\n\t\t\t\t\treturn float4(_ObjectId,
_PassValue, 1.0, 1.0);\n\t\t\t\t#elif VFX_PASSDEPTH == VFX_PASSDEPTH_ACTUAL\n\t\t\t\t\treturn
(float4)0;\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\t//
(float4)0;\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\t//
Depth pass\n\t\tPass\n\t\t{\t\t\n\t\t\tTags { \"LightMode\"=\"DepthForwardOnly\"
}\n\t\t\n\t\t\tZWrite On\n\t\t\tBlend Off\n\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#define
VFX_PASSDEPTH VFX_PASSDEPTH_ACTUAL\n\t\t\t#pragma target 4.5\n\t\t\t\n\t\t\tstruct

0.5f, encodedMotionVector);\n\t\t\t\t\t\t\t\n\t\t\t\t\treturn encodedMotionVector;\n\t\t\t\t#elif
VFX_PASSDEPTH == VFX_PASSDEPTH_SELECTION\n\t\t\t\t\treturn float4(_ObjectId,
_PassValue, 1.0, 1.0);\n\t\t\t\t#elif VFX_PASSDEPTH == VFX_PASSDEPTH_ACTUAL\n\t\t\t\t\treturn
(float4)0;\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
(float4)0;\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
{ \"LightMode\"=\"MotionVectors\" }\n\t\t\t\n\t\t\tStencil\n\t\t\t{\n\t\t\t
WriteMask 176\n\t\t\t Ref 160\n\t\t\t Comp Always\n\t\t\t Pass Replace\n\t\t\t}\n\n\t\t\n\t\t\tZWrite
On\n\t\t\tBlend Off\n\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#define VFX_PASSDEPTH

0.5f, encodedMotionVector);\n\t\t\t\t\t\t\t\n\t\t\t\t\treturn encodedMotionVector;\n\t\t\t\t#elif
VFX_PASSDEPTH == VFX_PASSDEPTH_SELECTION\n\t\t\t\t\treturn float4(_ObjectId,
_PassValue, 1.0, 1.0);\n\t\t\t\t#elif VFX_PASSDEPTH == VFX_PASSDEPTH_ACTUAL\n\t\t\t\t\treturn
(float4)0;\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\t//
(float4)0;\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\t//
Forward pass\n\t\tPass\n\t\t{\t\t\n\t\t\tTags { \"LightMode\"=\"GBuffer\" }\n\t\t\t\n\t\t\tStencil\n\t\t\t{\n\t\t\t\tWriteMask
7\n\t\t\t\tRef 2\n\t\t\t\tComp Always\n\t\t\t\tPass Replace\n\t\t\t}\t\n\t\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#pragma
target 4.5\n\t\t\t\n\t\t\t#pragma multi_compile _ LIGHT_LAYERS\n\t\t\t#pragma

n = SampleNormalMap(VFX_SAMPLER(normalMap),uvData);\n\t\t\t\tnormalWS = VFXCubeTransformNormalTS(i,n,frontFace);\n\t\t\t\tnormalWS
= lerp(VFXCubeGetLocalNormal(i) * faceMul,normalWS,i.materialProperties.z);\n\t\t\t\t#else\n\t\t\t\tnormalWS
= VFXCubeGetLocalNormal(i) * faceMul;\n\t\t\t\t#endif\n\t\t\t\tnormalWS = VFXCubeTransformNormalWS(i,normalWS);\n\t\t\t\tnormalWS
= normalize(normalWS);\n\t\t\n\t\t\t\tVFXComputePixelOutputToGBuffer(i,normalWS,uvData,outGBuffer);\n\t\t\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\t//
= normalize(normalWS);\n\t\t\n\t\t\t\tVFXComputePixelOutputToGBuffer(i,normalWS,uvData,outGBuffer);\n\t\t\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t\t//
Shadow pass\n\t\tPass\n\t\t{\t\t\n\t\t\tTags { \"LightMode\"=\"ShadowCaster\"
}\n\t\t\n\t\t\tZWrite On\n\t\t\tBlend Off\n\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#if
!USE_ALPHA_TEST && IS_TRANSPARENT_PARTICLE\n\t\t\t#define USE_ALPHA_TEST 1\n\t\t\t#endif\n\t\t\t#pragma

fragment frag\n\t\t\tfloat frag(ps_input i) : SV_Target0\n\t\t\t{\n\t\t\t\tUNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i);\n\t\t\t\tVFXTransformPSInputs(i);\n\t\t\t\tfloat
alpha = VFXGetFragmentColor(i).a;\n\t\t#if HDRP_USE_BASE_COLOR_MAP_ALPHA\n\t\t\t\talpha
*= VFXGetTextureColorWithProceduralUV(VFX_SAMPLER(baseColorMap),i,VFXCubeGetUV(i)).a;\n\t\t#endif\n\t\t\t\tVFXClipFragmentColor(alpha,i);\n\t\t\t\treturn
0;\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t}\r\n}\r\n"
0;\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\n\t}\n}\n"
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
source: "#pragma kernel CSMain\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_SCALEY_CURRENT
1\n#define VFX_USE_ALPHA_CURRENT 1\n#define VFX_USE_ALIVE_CURRENT 1\n#define

1\n#define VFX_USE_PIVOTZ_CURRENT 1\n#define VFX_USE_SIZE_CURRENT 1\n#define
VFX_USE_SCALEX_CURRENT 1\n#define VFX_USE_SCALEZ_CURRENT 1\n#define VFX_USE_COLOR_CURRENT
1\n#define VFX_USE_SMOOTHNESS_CURRENT 1\n#define VFX_WORLD_SPACE 1\n#include
\"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\r\nCBUFFER_START(parameters)\n
\"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\nCBUFFER_START(parameters)\n
float4 uniform_e;\n float Color_d;\n float uniform_c;\n float uniform_d;\n
float uniform_f;\n float currentFrameIndex;\n uint3 PADDING_0;\nCBUFFER_END\n\nstruct
Attributes\n{\n float3 position;\n float scaleY;\n float alpha;\n

float3 color;\n float Smoothness;\n};\n\nstruct SourceAttributes\n{\n};\n\nTexture2D
baseColorMap;\nSamplerState samplerbaseColorMap;\nfloat4 baseColorMap_TexelSize;\n\n\r\n#include
baseColorMap;\nSamplerState samplerbaseColorMap;\nfloat4 baseColorMap_TexelSize;\n\n\n#include
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\r\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\r\n\r\nByteAddressBuffer
attributeBuffer;\r\nRWByteAddressBuffer elementToVFXBuffer;\r\n#if VFX_USE_ALIVE_CURRENT\r\nStructuredBuffer<uint>
deadListOut;\r\n#endif\r\n\r\n#if VFX_HAS_INDIRECT_DRAW\r\nStructuredBuffer<uint>
indirectBuffer;\r\n#endif\r\n\r\nCBUFFER_START(updateParams)\r\n\tuint nbMax;\r\n\tuint
dispatchWidth;\r\n\tuint systemSeed;\r\nCBUFFER_END\r\n\r\nvoid SetAttribute_3278B22F(inout
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nByteAddressBuffer
attributeBuffer;\nRWByteAddressBuffer elementToVFXBuffer;\n#if VFX_USE_ALIVE_CURRENT\nStructuredBuffer<uint>
deadListOut;\n#endif\n\n#if VFX_HAS_INDIRECT_DRAW\nStructuredBuffer<uint> indirectBuffer;\n#endif\n\nCBUFFER_START(updateParams)\n\tuint
nbMax;\n\tuint dispatchWidth;\n\tuint systemSeed;\nCBUFFER_END\n\nvoid SetAttribute_3278B22F(inout
float size, float Size) /*attribute:size Composition:Overwrite Source:Slot
Random:Off channels:XYZ */\n{\n size = Size;\n}\nvoid SetAttribute_65DEC940(inout
float pivotX, inout float pivotY, inout float pivotZ, float3 Pivot) /*attribute:pivot

Composition:Overwrite Random:Off AttributeType:Float */\n{\n Smoothness
= _Smoothness;\n}\nvoid SetAttribute_D5151645(inout float scaleY, float Scale)
/*attribute:scale Composition:Overwrite Source:Slot Random:Off channels:Y */\n{\n
scaleY = Scale.x;\n}\n\n\r\n\r\n[numthreads(NB_THREADS_PER_GROUP,1,1)]\r\nvoid
CSMain(uint3 groupId\t\t: SV_GroupID,\r\n\t\t\tuint3 groupThreadId\t: SV_GroupThreadID)\r\n{\r\n\tuint
scaleY = Scale.x;\n}\n\n\n\n[numthreads(NB_THREADS_PER_GROUP,1,1)]\nvoid CSMain(uint3
groupId\t\t: SV_GroupID,\n\t\t\tuint3 groupThreadId\t: SV_GroupThreadID)\n{\n\tuint
* NB_THREADS_PER_GROUP;\r\n\tuint index = id;\r\n\tif (id < nbMax)\r\n\t{\r\n\t\tAttributes
attributes = (Attributes)0;\r\n\t\tSourceAttributes sourceAttributes = (SourceAttributes)0;\r\n\t\t\r\n\t\tattributes.alive
= (bool)true;\n\n\r\n\t\tif (attributes.alive)\r\n\t\t{\r\n\t\t\tattributes.position
* NB_THREADS_PER_GROUP;\n\tuint index = id;\n\tif (id < nbMax)\n\t{\n\t\tAttributes
attributes = (Attributes)0;\n\t\tSourceAttributes sourceAttributes = (SourceAttributes)0;\n\t\t\n\t\tattributes.alive
= (bool)true;\n\n\n\t\tif (attributes.alive)\n\t\t{\n\t\t\tattributes.position
= asfloat(attributeBuffer.Load3((index * 0x4 + 0x0) << 2));\nattributes.scaleY
= asfloat(attributeBuffer.Load((index * 0x1 + 0x40000) << 2));\nattributes.alpha
= asfloat(attributeBuffer.Load((index * 0x8 + 0x50000) << 2));\nattributes.axisX

* 0x8 + 0x50005) << 2));\nattributes.scaleZ = asfloat(attributeBuffer.Load((index
* 0x8 + 0x50006) << 2));\nattributes.color = asfloat(attributeBuffer.Load3((index
* 0x4 + 0xD0000) << 2));\nattributes.Smoothness = asfloat(attributeBuffer.Load((index
* 0x8 + 0x50007) << 2));\n\n\r\n\t\t\t{\n\t\t\t SetAttribute_3278B22F( /*inout
* 0x8 + 0x50007) << 2));\n\n\n\t\t\t{\n\t\t\t SetAttribute_3278B22F( /*inout
*/attributes.size, (float)1);\n\t\t\t}\n\t\t\t{\n\t\t\t SetAttribute_65DEC940(
/*inout */attributes.pivotX, /*inout */attributes.pivotY, /*inout */attributes.pivotZ,
float3(0, -0.5, 0));\n\t\t\t}\n\t\t\t{\n\t\t\t SetAttribute_D5151640( /*inout

uniform_f * tmp_bc;\n\t\t\t SetAttribute_D5151645( /*inout */attributes.scaleY,
tmp_bd);\n\t\t\t}\n\t\t\t{\n\t\t\t float tmp_bd = attributes.scaleY / (float)0.00779999979;\n\t\t\t
float tmp_be = floor(tmp_bd);\n\t\t\t float tmp_bf = tmp_be * (float)0.00779999979;\n\t\t\t
SetAttribute_D5151645( /*inout */attributes.scaleY, tmp_bf);\n\t\t\t}\n\t\t\t\n\r\n\t\t\t\r\n\t\t\t\n\t\t\tfloat3
SetAttribute_D5151645( /*inout */attributes.scaleY, tmp_bf);\n\t\t\t}\n\t\t\t\n\n\t\t\t\n\t\t\t\n\t\t\tfloat3
VFX_USE_SCALEZ_CURRENT\n\t\t\tsize3.z *= attributes.scaleZ;\n\t\t\t#endif\n\t\t\t\r\n\t\t\tfloat4x4
elementToVFX = GetElementToVFXMatrix(\r\n\t\t\t\tattributes.axisX,\r\n\t\t\t\tattributes.axisY,\r\n\t\t\t\tattributes.axisZ,\r\n\t\t\t\tfloat3(attributes.angleX,attributes.angleY,attributes.angleZ),\r\n\t\t\t\tfloat3(attributes.pivotX,attributes.pivotY,attributes.pivotZ),\r\n\t\t\t\tsize3,\r\n\t\t\t\tattributes.position);\r\n\t\t\r\n\t\t\tUNITY_UNROLL\r\n\t\t\tfor
(int itIndexMatrixRow = 0; itIndexMatrixRow < 3; ++itIndexMatrixRow)\r\n\t\t\t{\r\n\t\t\t\tUNITY_UNROLL\r\n\t\t\t\tfor
(int itIndexMatrixCol = 0; itIndexMatrixCol < 4; ++itIndexMatrixCol)\r\n\t\t\t\t{\r\n\t\t\t\t\tuint
itIndexMatrix = itIndexMatrixCol * 4 + itIndexMatrixRow;\r\n\t\t\t\t\tfloat
value = elementToVFX[itIndexMatrixRow][itIndexMatrixCol];\r\n\t\t\t\t\telementToVFXBuffer.Store((index
* 16 + itIndexMatrix) << 2, asuint(value));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n
VFX_USE_SCALEZ_CURRENT\n\t\t\tsize3.z *= attributes.scaleZ;\n\t\t\t#endif\n\t\t\t\n\t\t\tfloat4x4
elementToVFX = GetElementToVFXMatrix(\n\t\t\t\tattributes.axisX,\n\t\t\t\tattributes.axisY,\n\t\t\t\tattributes.axisZ,\n\t\t\t\tfloat3(attributes.angleX,attributes.angleY,attributes.angleZ),\n\t\t\t\tfloat3(attributes.pivotX,attributes.pivotY,attributes.pivotZ),\n\t\t\t\tsize3,\n\t\t\t\tattributes.position);\n\t\t\n\t\t\tUNITY_UNROLL\n\t\t\tfor
(int itIndexMatrixRow = 0; itIndexMatrixRow < 3; ++itIndexMatrixRow)\n\t\t\t{\n\t\t\t\tUNITY_UNROLL\n\t\t\t\tfor
(int itIndexMatrixCol = 0; itIndexMatrixCol < 4; ++itIndexMatrixCol)\n\t\t\t\t{\n\t\t\t\t\tuint
itIndexMatrix = itIndexMatrixCol * 4 + itIndexMatrixRow;\n\t\t\t\t\tfloat value
= elementToVFX[itIndexMatrixRow][itIndexMatrixCol];\n\t\t\t\t\telementToVFXBuffer.Store((index
* 16 + itIndexMatrix) << 2, asuint(value));\n\t\t\t\t}\n\t\t\t}\n\n
: 0u);\r\n\t\t}\t\t\r\n\t}\r\n}\r\n"
: 0u);\n\t\t}\t\t\n\t}\n}\n"
m_Infos:
m_Expressions:
m_Expressions:

m_OutputSlots:
- {fileID: 8926484042661615108}
attribute: Smoothness
location: 0
AttributeType: 0
--- !u!114 &8926484042661615108
MonoBehaviour:

43
Assets/VisualEffectSamples.unity


m_Component:
- component: {fileID: 6088818471330612562}
- component: {fileID: 6088818471330612525}
- component: {fileID: 6088818471330612564}
m_Layer: 5
m_Name: Toggle
m_TagString: Untagged

m_IsActive: 1
--- !u!114 &6088818471330612564
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6088818471330612563}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3d2af8e5a631fd24991bfe567b038767, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &6168194990882596466
MonoBehaviour:
m_ObjectHideFlags: 0

m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 1338.9}
m_AnchoredPosition: {x: 0, y: -0.000030517578}
m_SizeDelta: {x: 0, y: 488.9}
m_Pivot: {x: 0, y: 1}
--- !u!1 &6700769477884228485
GameObject:

m_Father: {fileID: 6700769479621243544}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5700202}
m_AnchorMax: {x: 1, y: 0.9999999}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 20, y: 20}
m_Pivot: {x: 0.5, y: 0.5}

m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_SizeDelta: {x: -17, y: 20}
m_SizeDelta: {x: 0, y: 20}
m_Pivot: {x: 0, y: 0}
--- !u!1 &6700769478208655959
GameObject:

m_TargetGraphic: {fileID: 6700769477951473165}
m_HandleRect: {fileID: 6700769477951473162}
m_Direction: 2
m_Value: 1
m_Size: 0.42997983
m_Value: 0
m_Size: 0.15077294
m_NumberOfSteps: 0
m_OnValueChanged:
m_PersistentCalls:

m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchorMax: {x: 1, y: 0}
m_SizeDelta: {x: 20, y: -17}
m_SizeDelta: {x: 20, y: 0}
m_Pivot: {x: 1, y: 1}
--- !u!222 &6700769478717006668
CanvasRenderer:

m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
m_IsActive: 1
--- !u!222 &6700769479311210132
CanvasRenderer:
m_ObjectHideFlags: 0

m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0.9999999, y: 1}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 20, y: 20}
m_Pivot: {x: 0.5, y: 0.5}

m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchorMax: {x: 0, y: 0}
m_SizeDelta: {x: -17, y: -17}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 1}
--- !u!222 &6700769479651261318
CanvasRenderer:

m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: Target Framerate (frames per second)
m_Text: Target Framerate (fps)
--- !u!1001 &7953774777476301330
PrefabInstance:
m_ObjectHideFlags: 0

2
Packages/manifest.json


"com.unity.cinemachine": "2.3.5-preview.3",
"com.unity.render-pipelines.high-definition": "7.1.7",
"com.unity.textmeshpro": "2.0.1",
"com.unity.timeline": "1.2.6",
"com.unity.timeline": "1.2.9",
"com.unity.ugui": "1.0.0",
"com.unity.modules.ai": "1.0.0",
"com.unity.modules.androidjni": "1.0.0",

7
Packages/net.peeweek.game-options/Runtime/GameOptions.cs


namespace GameOptionsUtility
{
public static class GameOptions
{
public class Preferences

public static AudioOptions audio;
static GameOptions()
{
Initialize();
}
[RuntimeInitializeOnLoadMethod]
static void Initialize()
{
graphics = GraphicOptions.Load();
graphics.Apply();

2
Packages/net.peeweek.game-options/Runtime/GraphicOptions.cs


public void Apply()
{
Screen.SetResolution(width, height, fullScreenMode, refreshRate);
Screen.SetResolution(width, height, fullScreenMode, refreshRate);
}
}
}

4
ProjectSettings/ProjectVersion.txt


m_EditorVersion: 2019.3.0f3
m_EditorVersionWithRevision: 2019.3.0f3 (6c9e2bfd6f81)
m_EditorVersion: 2019.3.0f5
m_EditorVersionWithRevision: 2019.3.0f5 (44796c9d3c2c)
正在加载...
取消
保存