|
|
|
|
|
|
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: |
|
|
|