|
|
|
|
|
|
m_Type: |
|
|
|
m_SerializableType: UnityEngine.Texture2D, UnityEngine.CoreModule, Version=0.0.0.0, |
|
|
|
Culture=neutral, PublicKeyToken=null |
|
|
|
m_SerializableObject: '{"obj":{"fileID":2800000,"guid":"1e9553b1996a59f4e83ecadeda958a49","type":3}}' |
|
|
|
m_SerializableObject: '{"obj":{"fileID":2800000,"guid":"49cb5aa34272b034d8b754c65d9cdbfa","type":3}}' |
|
|
|
m_Space: 2147483647 |
|
|
|
m_Property: |
|
|
|
name: mainTexture |
|
|
|
|
|
|
m_Type: |
|
|
|
m_SerializableType: UnityEngine.Texture3D, UnityEngine.CoreModule, Version=0.0.0.0, |
|
|
|
Culture=neutral, PublicKeyToken=null |
|
|
|
m_SerializableObject: |
|
|
|
m_SerializableObject: '{"obj":{"fileID":11700000,"guid":"500adb08ae2ef274c9095ec1e41fde84","type":2}}' |
|
|
|
min: -Infinity |
|
|
|
max: Infinity |
|
|
|
descendantCount: 0 |
|
|
|
|
|
|
- name: Sphere |
|
|
|
collapsed: 1 |
|
|
|
- name: Vector Field |
|
|
|
collapsed: 0 |
|
|
|
- name: Color |
|
|
|
- name: Color |
|
|
|
collapsed: 0 |
|
|
|
y: 300 |
|
|
|
width: 5706 |
|
|
|
height: 3181 |
|
|
|
y: -0 |
|
|
|
width: 5891 |
|
|
|
height: 3545 |
|
|
|
--- !u!114 &114761303450105272 |
|
|
|
MonoBehaviour: |
|
|
|
m_ObjectHideFlags: 1 |
|
|
|
|
|
|
m_ShaderSources: |
|
|
|
- compute: 1 |
|
|
|
name: '[System 1]Initialize' |
|
|
|
source: "#pragma kernel CSMain\r\n#include \"HLSLSupport.cginc\"\n#define NB_THREADS_PER_GROUP |
|
|
|
source: "#pragma kernel CSMain\n#include \"HLSLSupport.cginc\"\n#define NB_THREADS_PER_GROUP |
|
|
|
1\n\n\r\nCBUFFER_START(parameters)\n float3 Color_b;\n float uniform_c;\n |
|
|
|
1\n\n\nCBUFFER_START(parameters)\n float3 Color_b;\n float uniform_c;\n |
|
|
|
uniform_e;\n float uniform_h;\n float uniform_i;\n uint2 PADDING_0;\nCBUFFER_END\n\n\r\n#include |
|
|
|
uniform_e;\n float uniform_h;\n float uniform_i;\n uint2 PADDING_0;\nCBUFFER_END\n\n\n#include |
|
|
|
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.cginc\"\n\n\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 VFX_USE_ALIVE_CURRENT\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\nvoid SetAttribute_F01429A3(inout float lifetime, |
|
|
|
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.cginc\"\n\n\n\nRWByteAddressBuffer |
|
|
|
attributeBuffer;\nByteAddressBuffer sourceAttributeBuffer;\n\nCBUFFER_START(initParams)\n#if |
|
|
|
!VFX_USE_SPAWNER_FROM_GPU\n uint nbSpawned;\t\t\t\t\t// Numbers of particle |
|
|
|
spawned\n uint spawnIndex;\t\t\t\t// Index of the first particle spawned\n |
|
|
|
\ uint dispatchWidth;\n#else\n uint offsetInAdditionalOutput;\n\tuint nbMax;\n#endif\n\tuint |
|
|
|
systemSeed;\nCBUFFER_END\n\n#if VFX_USE_ALIVE_CURRENT\nRWStructuredBuffer<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\nvoid SetAttribute_F01429A3(inout float lifetime, |
|
|
|
inout uint seed, float Min, float Max) /*attribute:lifetime Composition:Overwrite |
|
|
|
Source:Slot Random:Uniform channels:XYZ */\n{\n lifetime = lerp(Min,Max,RAND);\n}\nvoid |
|
|
|
SetAttribute_FDD06EC7(inout float3 color, float3 Color) /*attribute:color Composition:Overwrite |
|
|
|
|
|
|
* RAND, 1.0f / 3.0f);\n \n float2 sincosTheta;\n sincos(theta, sincosTheta.x, |
|
|
|
sincosTheta.y);\n sincosTheta *= sqrt(1.0f - cosPhi * cosPhi);\n \n direction |
|
|
|
= float3(sincosTheta, cosPhi);\n position += direction * (rNorm * ArcSphere_sphere_radius) |
|
|
|
+ ArcSphere_sphere_center;\n \n}\n\n\r\n\r\n[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 VFX_USE_ALIVE_CURRENT\r\n |
|
|
|
\ maxThreadId = min(maxThreadId, deadListCount.Load(0x0));\r\n#elif VFX_USE_SPAWNER_FROM_GPU\r\n |
|
|
|
+ ArcSphere_sphere_center;\n \n}\n\n\n\n[numthreads(NB_THREADS_PER_GROUP,1,1)]\nvoid |
|
|
|
CSMain(uint3 groupId : SV_GroupID,\n uint3 groupThreadId |
|
|
|
\ : SV_GroupThreadID)\n{\n uint id = groupThreadId.x + groupId.x * NB_THREADS_PER_GROUP;\n#if |
|
|
|
!VFX_USE_SPAWNER_FROM_GPU\n id += groupId.y * dispatchWidth * NB_THREADS_PER_GROUP;\n#endif\n\n#if |
|
|
|
VFX_USE_SPAWNER_FROM_GPU\n uint maxThreadId = inputAdditional.Load((offsetInAdditionalOutput |
|
|
|
* 2 + 0) << 2);\n uint currentSpawnIndex = inputAdditional.Load((offsetInAdditionalOutput |
|
|
|
* 2 + 1) << 2) - maxThreadId;\n#else\n uint maxThreadId = nbSpawned;\n uint |
|
|
|
currentSpawnIndex = spawnIndex;\n#endif\n\n#if VFX_USE_ALIVE_CURRENT\n maxThreadId |
|
|
|
= min(maxThreadId, deadListCount.Load(0x0));\n#elif VFX_USE_SPAWNER_FROM_GPU\n |
|
|
|
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 uint particleIndex |
|
|
|
= id + currentSpawnIndex;\r\n\t\t\r\n#if !VFX_USE_SPAWNER_FROM_GPU\r\n int |
|
|
|
on CPU\n#endif\n\n if (id < maxThreadId)\n {\n#if VFX_USE_SPAWNER_FROM_GPU\n |
|
|
|
\ int sourceIndex = eventList[id];\n#endif\n uint particleIndex |
|
|
|
= id + currentSpawnIndex;\n\t\t\n#if !VFX_USE_SPAWNER_FROM_GPU\n int |
|
|
|
\ }\n }\n */\n \n\r\n#endif\r\n float |
|
|
|
lifetime = (float)0;\n uint seed = (uint)0;\n float3 color = float3(1,1,1);\n |
|
|
|
\ }\n }\n */\n \n\n#endif\n float lifetime |
|
|
|
= (float)0;\n uint seed = (uint)0;\n float3 color = float3(1,1,1);\n |
|
|
|
\ float age = (float)0;\n bool alive = (bool)true;\n \n\r\n#if |
|
|
|
VFX_USE_PARTICLEID_CURRENT\r\n particleId = particleIndex;\r\n#endif\r\n#if |
|
|
|
VFX_USE_SEED_CURRENT\r\n seed = WangHash(particleIndex ^ systemSeed);\r\n#endif\r\n |
|
|
|
\ \r\n {\n SetAttribute_F01429A3( /*inout */lifetime, |
|
|
|
\ float age = (float)0;\n bool alive = (bool)true;\n \n\n#if |
|
|
|
VFX_USE_PARTICLEID_CURRENT\n particleId = particleIndex;\n#endif\n#if |
|
|
|
VFX_USE_SEED_CURRENT\n seed = WangHash(particleIndex ^ systemSeed);\n#endif\n |
|
|
|
\ \n {\n SetAttribute_F01429A3( /*inout */lifetime, |
|
|
|
\ /*inout */seed, (float)2.5, (float)3.5);\n }\n SetAttribute_FDD06EC7( |
|
|
|
/*inout */color, Color_b);\n {\n float tmp_bg = FixedRand(particleId |
|
|
|
^ asuint(uniform_e));\n float tmp_bh = uniform_d * tmp_bg;\n float |
|
|
|
|
|
|
\ float tmp_bv = tmp_bu[0];\n float tmp_bw = tmp_bv * uniform_i;\n |
|
|
|
\ float tmp_bx = uniform_h + tmp_bw;\n PositionSphere_18D( |
|
|
|
/*inout */position, /*inout */seed, /*inout */direction, tmp_br, tmp_bx, (float)6.283185, |
|
|
|
(float)0);\n }\n \n\r\n\r\n#if VFX_USE_ALIVE_CURRENT\r\n if |
|
|
|
(alive)\r\n {\r\n\t\t\tuint deadIndex = deadListIn.DecrementCounter();\r\n |
|
|
|
\ uint index = deadListIn[deadIndex];\r\n attributeBuffer.Store((index |
|
|
|
* 0x2 + 0x0) << 2,asuint(lifetime));\n attributeBuffer.Store3((index |
|
|
|
* 0x4 + 0x16E380) << 2,asuint(color));\n attributeBuffer.Store3((index |
|
|
|
(float)0);\n }\n \n\n\n#if VFX_USE_ALIVE_CURRENT\n if (alive)\n |
|
|
|
\ {\n\t\t\tuint deadIndex = deadListIn.DecrementCounter();\n uint |
|
|
|
index = deadListIn[deadIndex];\n attributeBuffer.Store((index * 0x2 |
|
|
|
+ 0x0) << 2,asuint(lifetime));\n attributeBuffer.Store3((index * |
|
|
|
0x4 + 0x16E380) << 2,asuint(color));\n attributeBuffer.Store3((index |
|
|
|
* 0x8 + 0x44AA87) << 2,uint(alive));\n \n\r\n }\r\n#else\r\n |
|
|
|
\ uint index = particleIndex;\r\n attributeBuffer.Store((index |
|
|
|
* 0x2 + 0x0) << 2,asuint(lifetime));\n attributeBuffer.Store3((index |
|
|
|
* 0x4 + 0x16E380) << 2,asuint(color));\n attributeBuffer.Store3((index |
|
|
|
* 0x8 + 0x44AA80) << 2,asuint(position));\n attributeBuffer.Store((index |
|
|
|
* 0x2 + 0x1) << 2,asuint(particleId));\n attributeBuffer.Store3((index |
|
|
|
* 0x8 + 0x44AA84) << 2,asuint(velocity));\n attributeBuffer.Store((index |
|
|
|
* 0x8 + 0x44AA83) << 2,asuint(age));\n attributeBuffer.Store((index * |
|
|
|
0x8 + 0x44AA87) << 2,uint(alive));\n \n\r\n#endif\r\n }\r\n}\r\n" |
|
|
|
* 0x8 + 0x44AA87) << 2,uint(alive));\n \n\n }\n#else\n uint |
|
|
|
index = particleIndex;\n attributeBuffer.Store((index * 0x2 + 0x0) << |
|
|
|
2,asuint(lifetime));\n attributeBuffer.Store3((index * 0x4 + 0x16E380) |
|
|
|
<< 2,asuint(color));\n attributeBuffer.Store3((index * 0x8 + 0x44AA80) |
|
|
|
<< 2,asuint(position));\n attributeBuffer.Store((index * 0x2 + 0x1) << |
|
|
|
2,asuint(particleId));\n attributeBuffer.Store3((index * 0x8 + 0x44AA84) |
|
|
|
<< 2,asuint(velocity));\n attributeBuffer.Store((index * 0x8 + 0x44AA83) |
|
|
|
<< 2,asuint(age));\n attributeBuffer.Store((index * 0x8 + 0x44AA87) << |
|
|
|
2,uint(alive));\n \n\n#endif\n }\n}\n" |
|
|
|
source: "#pragma kernel CSMain\r\n#include \"HLSLSupport.cginc\"\n#define NB_THREADS_PER_GROUP |
|
|
|
source: "#pragma kernel CSMain\n#include \"HLSLSupport.cginc\"\n#define NB_THREADS_PER_GROUP |
|
|
|
VFX_LOCAL_SPACE 1\n\n\r\nCBUFFER_START(parameters)\n float4x4 InvFieldTransform_b;\n |
|
|
|
VFX_LOCAL_SPACE 1\n\n\nCBUFFER_START(parameters)\n float4x4 InvFieldTransform_b;\n |
|
|
|
samplerVectorField_b;\nTexture3D VectorField_c;\nSamplerState samplerVectorField_c;\n\n\r\n#include |
|
|
|
samplerVectorField_b;\nTexture3D VectorField_c;\nSamplerState samplerVectorField_c;\n\n\n#include |
|
|
|
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.cginc\"\n\n\r\n\r\nRWByteAddressBuffer |
|
|
|
attributeBuffer;\r\n\r\n#if VFX_USE_ALIVE_CURRENT\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\nCBUFFER_START(updateParams)\r\n uint nbMax;\r\n\tuint |
|
|
|
dispatchWidth;\r\n\tuint systemSeed;\r\nCBUFFER_END\r\n\r\nvoid CollisionSphere_0(inout |
|
|
|
float3 position, inout float3 velocity, inout float age, float lifetime, float3 |
|
|
|
Sphere_center, float Sphere_radius, float Elasticity, float Friction, float |
|
|
|
LifetimeLoss, float deltaTime, float colliderSign, float radius) /*mode:Solid |
|
|
|
radiusMode:None roughSurface:False */\n{\n \n float3 nextPos = position |
|
|
|
+ velocity * deltaTime;\n float3 dir = nextPos - Sphere_center;\n float |
|
|
|
sqrLength = dot(dir, dir);\n float totalRadius = Sphere_radius + colliderSign |
|
|
|
* radius;\n if (colliderSign * sqrLength <= colliderSign * totalRadius * |
|
|
|
totalRadius)\n {\n float dist = sqrt(sqrLength);\n float3 n |
|
|
|
= colliderSign * dir / dist;\n position -= n * (dist - totalRadius) * |
|
|
|
colliderSign;\n \n float projVelocity = dot(n, velocity);\n \n |
|
|
|
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.cginc\"\n\n\n\nRWByteAddressBuffer |
|
|
|
attributeBuffer;\n\n#if VFX_USE_ALIVE_CURRENT\nRWStructuredBuffer<uint> deadListOut;\n#endif\n\n#if |
|
|
|
VFX_HAS_INDIRECT_DRAW\nRWStructuredBuffer<uint> indirectBuffer;\n#endif\n\nCBUFFER_START(updateParams)\n |
|
|
|
\ uint nbMax;\n\tuint dispatchWidth;\n\tuint systemSeed;\nCBUFFER_END\n\nvoid |
|
|
|
CollisionSphere_0(inout float3 position, inout float3 velocity, inout float |
|
|
|
age, float lifetime, float3 Sphere_center, float Sphere_radius, float Elasticity, |
|
|
|
float Friction, float LifetimeLoss, float deltaTime, float colliderSign, float |
|
|
|
radius) /*mode:Solid radiusMode:None roughSurface:False */\n{\n \n float3 |
|
|
|
nextPos = position + velocity * deltaTime;\n float3 dir = nextPos - Sphere_center;\n |
|
|
|
\ float sqrLength = dot(dir, dir);\n float totalRadius = Sphere_radius |
|
|
|
+ colliderSign * radius;\n if (colliderSign * sqrLength <= colliderSign * |
|
|
|
totalRadius * totalRadius)\n {\n float dist = sqrt(sqrLength);\n float3 |
|
|
|
n = colliderSign * dir / dist;\n position -= n * (dist - totalRadius) |
|
|
|
* colliderSign;\n \n float projVelocity = dot(n, velocity);\n \n |
|
|
|
\ float3 normalVelocity = projVelocity * n;\n float3 tangentVelocity |
|
|
|
= velocity - normalVelocity;\n \n if (projVelocity < 0)\n velocity |
|
|
|
-= ((1 + Elasticity) * projVelocity) * n;\n velocity -= Friction * tangentVelocity;\n |
|
|
|
|
|
|
float3 position, float3 velocity, float deltaTime)\n{\n position += velocity |
|
|
|
* deltaTime;\n}\nvoid Age(inout float age, float deltaTime)\n{\n age += deltaTime;\n}\nvoid |
|
|
|
Reap(float age, float lifetime, inout bool alive)\n{\n if(age > lifetime) |
|
|
|
{ alive = false; }\n}\n\n\r\n\r\n[numthreads(NB_THREADS_PER_GROUP,1,1)]\r\nvoid |
|
|
|
CSMain(uint3 groupId : SV_GroupID,\r\n uint3 groupThreadId |
|
|
|
\ : SV_GroupThreadID)\r\n{\r\n\tuint id = groupThreadId.x + groupId.x * NB_THREADS_PER_GROUP |
|
|
|
+ groupId.y * dispatchWidth * NB_THREADS_PER_GROUP;\r\n\tuint index = id;\r\n\tif |
|
|
|
(id < nbMax)\r\n\t{\r\n#if VFX_USE_ALIVE_CURRENT\r\n\t\tbool alive = (attributeBuffer.Load((index |
|
|
|
* 0x8 + 0x44AA87) << 2));\n\t\t\n\r\n\t\tif (alive)\r\n\t\t{\r\n\t\t\tfloat |
|
|
|
lifetime = asfloat(attributeBuffer.Load((index * 0x2 + 0x0) << 2));\n\t\t\tfloat3 |
|
|
|
position = asfloat(attributeBuffer.Load3((index * 0x8 + 0x44AA80) << 2));\n\t\t\tuint |
|
|
|
particleId = (attributeBuffer.Load((index * 0x2 + 0x1) << 2));\n\t\t\tfloat3 |
|
|
|
velocity = asfloat(attributeBuffer.Load3((index * 0x8 + 0x44AA84) << 2));\n\t\t\tfloat |
|
|
|
age = asfloat(attributeBuffer.Load((index * 0x8 + 0x44AA83) << 2));\n\t\t\tfloat |
|
|
|
mass = (float)1;\n\t\t\t\n\r\n\t\t\t\r\n#if VFX_USE_OLDPOSITION_CURRENT\r\n\t\t\toldPosition |
|
|
|
= position;\r\n#endif\r\n\t\t\t\r\n\t\t\t{\n\t\t\t float tmp_bl = FixedRand(particleId |
|
|
|
^ asuint(uniform_d));\n\t\t\t float tmp_bm = uniform_c * tmp_bl;\n\t\t\t |
|
|
|
\ float tmp_bn = uniform_b + tmp_bm;\n\t\t\t float3 tmp_bo = float3(tmp_bn, |
|
|
|
tmp_bn, tmp_bn);\n\t\t\t float3 tmp_bp = tmp_bo * uniform_e;\n\t\t\t float3 |
|
|
|
tmp_bq = sin(tmp_bp);\n\t\t\t float tmp_br = tmp_bq[1];\n\t\t\t float3 |
|
|
|
tmp_bs = cos(tmp_bp);\n\t\t\t float tmp_bt = tmp_bs[0];\n\t\t\t float |
|
|
|
tmp_bu = tmp_bs[2];\n\t\t\t float3 tmp_bv = float3(tmp_br, tmp_bt, tmp_bu);\n\t\t\t |
|
|
|
\ float3 tmp_bw = tmp_bv * uniform_f;\n\t\t\t float2 tmp_bz = GenerateValueNoise(tmp_bn, |
|
|
|
float3(1,0.5,2).x, (int)1, float3(1,0.5,2).y, float3(1,0.5,2).z);\n\t\t\t float |
|
|
|
tmp_ca = tmp_bz[0];\n\t\t\t float tmp_cb = tmp_ca * uniform_h;\n\t\t\t float |
|
|
|
tmp_cc = uniform_g + tmp_cb;\n\t\t\t CollisionSphere_0( /*inout */position, |
|
|
|
\ /*inout */velocity, /*inout */age, lifetime, tmp_bw, tmp_cc, (float)1.9, |
|
|
|
(float)0, (float)0, uniform_c, (float)1, (float)0);\n\t\t\t}\n\t\t\t{\n\t\t\t |
|
|
|
\ VectorFieldForce_3B8596C( /*inout */velocity, mass, position, GetVFXSampler(VectorField_b, |
|
|
|
samplerVectorField_b), InvFieldTransform_b, FieldTransform_b, (float)8, (float)1, |
|
|
|
uniform_c);\n\t\t\t}\n\t\t\t{\n\t\t\t VectorFieldForce_267A9( /*inout */velocity, |
|
|
|
mass, position, GetVFXSampler(VectorField_c, samplerVectorField_c), InvFieldTransform_c, |
|
|
|
FieldTransform_c, (float)1, (float)4, uniform_c);\n\t\t\t}\n\t\t\tEulerIntegration( |
|
|
|
/*inout */position, velocity, uniform_c);\n\t\t\tAge( /*inout */age, uniform_c);\n\t\t\tReap(age, |
|
|
|
lifetime, /*inout */alive);\n\t\t\t\n\r\n\t\t\tif (alive)\r\n\t\t\t{\r\n\t\t\t\tattributeBuffer.Store3((index |
|
|
|
{ alive = false; }\n}\n\n\n\n[numthreads(NB_THREADS_PER_GROUP,1,1)]\nvoid CSMain(uint3 |
|
|
|
groupId : SV_GroupID,\n uint3 groupThreadId : SV_GroupThreadID)\n{\n\tuint |
|
|
|
id = groupThreadId.x + groupId.x * NB_THREADS_PER_GROUP + groupId.y * dispatchWidth |
|
|
|
* NB_THREADS_PER_GROUP;\n\tuint index = id;\n\tif (id < nbMax)\n\t{\n#if VFX_USE_ALIVE_CURRENT\n\t\tbool |
|
|
|
alive = (attributeBuffer.Load((index * 0x8 + 0x44AA87) << 2));\n\t\t\n\n\t\tif |
|
|
|
(alive)\n\t\t{\n\t\t\tfloat lifetime = asfloat(attributeBuffer.Load((index * |
|
|
|
0x2 + 0x0) << 2));\n\t\t\tfloat3 position = asfloat(attributeBuffer.Load3((index |
|
|
|
* 0x8 + 0x44AA80) << 2));\n\t\t\tuint particleId = (attributeBuffer.Load((index |
|
|
|
* 0x2 + 0x1) << 2));\n\t\t\tfloat3 velocity = asfloat(attributeBuffer.Load3((index |
|
|
|
* 0x8 + 0x44AA84) << 2));\n\t\t\tfloat age = asfloat(attributeBuffer.Load((index |
|
|
|
* 0x8 + 0x44AA83) << 2));\n\t\t\tfloat mass = (float)1;\n\t\t\t\n\n\t\t\t\n#if |
|
|
|
VFX_USE_OLDPOSITION_CURRENT\n\t\t\toldPosition = position;\n#endif\n\t\t\t\n\t\t\t{\n\t\t\t |
|
|
|
\ float tmp_bl = FixedRand(particleId ^ asuint(uniform_d));\n\t\t\t float |
|
|
|
tmp_bm = uniform_c * tmp_bl;\n\t\t\t float tmp_bn = uniform_b + tmp_bm;\n\t\t\t |
|
|
|
\ float3 tmp_bo = float3(tmp_bn, tmp_bn, tmp_bn);\n\t\t\t float3 tmp_bp |
|
|
|
= tmp_bo * uniform_e;\n\t\t\t float3 tmp_bq = sin(tmp_bp);\n\t\t\t float |
|
|
|
tmp_br = tmp_bq[1];\n\t\t\t float3 tmp_bs = cos(tmp_bp);\n\t\t\t float |
|
|
|
tmp_bt = tmp_bs[0];\n\t\t\t float tmp_bu = tmp_bs[2];\n\t\t\t float3 tmp_bv |
|
|
|
= float3(tmp_br, tmp_bt, tmp_bu);\n\t\t\t float3 tmp_bw = tmp_bv * uniform_f;\n\t\t\t |
|
|
|
\ float2 tmp_bz = GenerateValueNoise(tmp_bn, float3(1,0.5,2).x, (int)1, float3(1,0.5,2).y, |
|
|
|
float3(1,0.5,2).z);\n\t\t\t float tmp_ca = tmp_bz[0];\n\t\t\t float tmp_cb |
|
|
|
= tmp_ca * uniform_h;\n\t\t\t float tmp_cc = uniform_g + tmp_cb;\n\t\t\t |
|
|
|
\ CollisionSphere_0( /*inout */position, /*inout */velocity, /*inout */age, |
|
|
|
lifetime, tmp_bw, tmp_cc, (float)1.9, (float)0, (float)0, uniform_c, (float)1, |
|
|
|
(float)0);\n\t\t\t}\n\t\t\t{\n\t\t\t VectorFieldForce_3B8596C( /*inout */velocity, |
|
|
|
mass, position, GetVFXSampler(VectorField_b, samplerVectorField_b), InvFieldTransform_b, |
|
|
|
FieldTransform_b, (float)8, (float)1, uniform_c);\n\t\t\t}\n\t\t\t{\n\t\t\t |
|
|
|
\ VectorFieldForce_267A9( /*inout */velocity, mass, position, GetVFXSampler(VectorField_c, |
|
|
|
samplerVectorField_c), InvFieldTransform_c, FieldTransform_c, (float)1, (float)4, |
|
|
|
uniform_c);\n\t\t\t}\n\t\t\tEulerIntegration( /*inout */position, velocity, |
|
|
|
uniform_c);\n\t\t\tAge( /*inout */age, uniform_c);\n\t\t\tReap(age, lifetime, |
|
|
|
\ /*inout */alive);\n\t\t\t\n\n\t\t\tif (alive)\n\t\t\t{\n\t\t\t\tattributeBuffer.Store3((index |
|
|
|
* 0x8 + 0x44AA83) << 2,asuint(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\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tattributeBuffer.Store((index |
|
|
|
* 0x8 + 0x44AA87) << 2,uint(alive));\n\t\t\t\t\n\r\n\t\t\t\tuint deadIndex = |
|
|
|
deadListOut.IncrementCounter();\r\n\t\t\t\tdeadListOut[deadIndex] = index;\r\n\t\t\t}\r\n\t\t}\r\n#else\r\n\t\tfloat |
|
|
|
lifetime = asfloat(attributeBuffer.Load((index * 0x2 + 0x0) << 2));\n\t\tfloat3 |
|
|
|
position = asfloat(attributeBuffer.Load3((index * 0x8 + 0x44AA80) << 2));\n\t\tuint |
|
|
|
particleId = (attributeBuffer.Load((index * 0x2 + 0x1) << 2));\n\t\tfloat3 velocity |
|
|
|
= asfloat(attributeBuffer.Load3((index * 0x8 + 0x44AA84) << 2));\n\t\tfloat |
|
|
|
age = asfloat(attributeBuffer.Load((index * 0x8 + 0x44AA83) << 2));\n\t\tfloat |
|
|
|
mass = (float)1;\n\t\tbool alive = (attributeBuffer.Load((index * 0x8 + 0x44AA87) |
|
|
|
<< 2));\n\t\t\n\r\n\t\t\r\n#if VFX_USE_OLDPOSITION_CURRENT\r\n\t\toldPosition |
|
|
|
= position;\r\n#endif\r\n\t\t\r\n\t\t{\n\t\t float tmp_bl = FixedRand(particleId |
|
|
|
* 0x8 + 0x44AA83) << 2,asuint(age));\n\t\t\t\t\n\n#if VFX_HAS_INDIRECT_DRAW\n |
|
|
|
\ uint indirectIndex = indirectBuffer.IncrementCounter();\n\t\t\t\tindirectBuffer[indirectIndex] |
|
|
|
= index;\n#endif\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tattributeBuffer.Store((index |
|
|
|
* 0x8 + 0x44AA87) << 2,uint(alive));\n\t\t\t\t\n\n\t\t\t\tuint deadIndex = deadListOut.IncrementCounter();\n\t\t\t\tdeadListOut[deadIndex] |
|
|
|
= index;\n\t\t\t}\n\t\t}\n#else\n\t\tfloat lifetime = asfloat(attributeBuffer.Load((index |
|
|
|
* 0x2 + 0x0) << 2));\n\t\tfloat3 position = asfloat(attributeBuffer.Load3((index |
|
|
|
* 0x8 + 0x44AA80) << 2));\n\t\tuint particleId = (attributeBuffer.Load((index |
|
|
|
* 0x2 + 0x1) << 2));\n\t\tfloat3 velocity = asfloat(attributeBuffer.Load3((index |
|
|
|
* 0x8 + 0x44AA84) << 2));\n\t\tfloat age = asfloat(attributeBuffer.Load((index |
|
|
|
* 0x8 + 0x44AA83) << 2));\n\t\tfloat mass = (float)1;\n\t\tbool alive = (attributeBuffer.Load((index |
|
|
|
* 0x8 + 0x44AA87) << 2));\n\t\t\n\n\t\t\n#if VFX_USE_OLDPOSITION_CURRENT\n\t\toldPosition |
|
|
|
= position;\n#endif\n\t\t\n\t\t{\n\t\t float tmp_bl = FixedRand(particleId |
|
|
|
^ asuint(uniform_d));\n\t\t float tmp_bm = uniform_c * tmp_bl;\n\t\t float |
|
|
|
tmp_bn = uniform_b + tmp_bm;\n\t\t float3 tmp_bo = float3(tmp_bn, tmp_bn, |
|
|
|
tmp_bn);\n\t\t float3 tmp_bp = tmp_bo * uniform_e;\n\t\t float3 tmp_bq |
|
|
|
|
|
|
mass, position, GetVFXSampler(VectorField_c, samplerVectorField_c), InvFieldTransform_c, |
|
|
|
FieldTransform_c, (float)1, (float)4, uniform_c);\n\t\t}\n\t\tEulerIntegration( |
|
|
|
/*inout */position, velocity, uniform_c);\n\t\tAge( /*inout */age, uniform_c);\n\t\tReap(age, |
|
|
|
lifetime, /*inout */alive);\n\t\t\n\r\n\t\tattributeBuffer.Store3((index * |
|
|
|
0x8 + 0x44AA80) << 2,asuint(position));\n\t\tattributeBuffer.Store3((index * |
|
|
|
0x8 + 0x44AA84) << 2,asuint(velocity));\n\t\tattributeBuffer.Store((index * |
|
|
|
0x8 + 0x44AA83) << 2,asuint(age));\n\t\tattributeBuffer.Store((index * 0x8 + |
|
|
|
0x44AA87) << 2,uint(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" |
|
|
|
lifetime, /*inout */alive);\n\t\t\n\n\t\tattributeBuffer.Store3((index * 0x8 |
|
|
|
+ 0x44AA80) << 2,asuint(position));\n\t\tattributeBuffer.Store3((index * 0x8 |
|
|
|
+ 0x44AA84) << 2,asuint(velocity));\n\t\tattributeBuffer.Store((index * 0x8 |
|
|
|
+ 0x44AA83) << 2,asuint(age));\n\t\tattributeBuffer.Store((index * 0x8 + 0x44AA87) |
|
|
|
<< 2,uint(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/System 1/Quad Output\"\n{\r\n\tSubShader\r\n\t{\t\r\n\t\tCull |
|
|
|
Off\r\n\t\t\r\n\t\tTags { \"Queue\"=\"Transparent\" \"IgnoreProjector\"=\"True\" |
|
|
|
source: "Shader \"Hidden/VFX/System 1/Quad Output\"\n{\n\tSubShader\n\t{\t\n\t\tCull |
|
|
|
Off\n\t\t\n\t\tTags { \"Queue\"=\"Transparent\" \"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\tBlend |
|
|
|
SrcAlpha One\n\t\tZTest LEqual\n\t\tZWrite Off\n\t\tCull Off\n\t\t\n\t\n\t\t\t\n\t\tHLSLINCLUDE\n\t\t#if |
|
|
|
!defined(VFX_WORLD_SPACE) && !defined(VFX_LOCAL_SPACE)\n\t\t#define VFX_LOCAL_SPACE |
|
|
|
|
|
|
attributeBuffer;\t\n\t\t\n\t\t#if VFX_HAS_INDIRECT_DRAW\n\t\tStructuredBuffer<uint> |
|
|
|
indirectBuffer;\t\n\t\t#endif\t\n\t\t\n\t\t#if USE_DEAD_LIST_COUNT\n\t\tByteAddressBuffer |
|
|
|
deadListCount;\n\t\t#endif\n\t\t\n\t\tCBUFFER_START(outputParams)\n\t\t\tfloat |
|
|
|
nbMax;\n\t\t\tfloat systemSeed;\n\t\tCBUFFER_END\n\t\t\n\t\tENDHLSL\n\t\t\n\r\n\t\t\r\n\t\t// |
|
|
|
nbMax;\n\t\t\tfloat systemSeed;\n\t\tCBUFFER_END\n\t\t\n\t\tENDHLSL\n\t\t\n\n\t\t\n\t\t// |
|
|
|
Forward pass\n\t\tPass\n\t\t{\t\t\n\t\t\tTags { \"LightMode\"=\"ForwardOnly\" |
|
|
|
}\n\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#pragma target 4.5\n\t\t\t\t\n\t\t\tstruct |
|
|
|
ps_input\n\t\t\t{\n\t\t\t\tfloat4 pos : SV_POSITION;\n\t\t\t\t#if USE_FLIPBOOK_INTERPOLATION\n\t\t\t\tfloat4 |
|
|
|
|
|
|
= clampedSize;\n\t\t\t scaleX = localSize.x / size;\n\t\t\t scaleY = localSize.y |
|
|
|
/ size;\n\t\t\t}\n\t\t\t\n\n\t\t\t\n\t\t\t#pragma vertex vert\n\t\t\tVFX_VARYING_PS_INPUTS |
|
|
|
vert(uint id : SV_VertexID, uint instanceID : SV_InstanceID)\n\t\t\t{\n\t\t\t\tuint |
|
|
|
index = (id >> 2) + instanceID * 2048;\n\t\t\t\tVFX_VARYING_PS_INPUTS o = (VFX_VARYING_PS_INPUTS)0;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t#if |
|
|
|
VFX_HAS_INDIRECT_DRAW\n\t\t\t\t\t\t#if USE_DEAD_LIST_COUNT\n\t\t\t\t\t\t\tif |
|
|
|
(index >= asuint(nbMax) - deadListCount.Load(0))\n\t\t\t\t\t\t\t\treturn o;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tindex |
|
|
|
= indirectBuffer[index];\n\t\t\t\t\t\t\tfloat lifetime = asfloat(attributeBuffer.Load((index |
|
|
|
* 0x2 + 0x0) << 2));\n\t\t\t\t\t\t\tfloat3 color = asfloat(attributeBuffer.Load3((index |
|
|
|
* 0x4 + 0x16E380) << 2));\n\t\t\t\t\t\t\tfloat3 position = asfloat(attributeBuffer.Load3((index |
|
|
|
* 0x8 + 0x44AA80) << 2));\n\t\t\t\t\t\t\tuint particleId = (attributeBuffer.Load((index |
|
|
|
* 0x2 + 0x1) << 2));\n\t\t\t\t\t\t\tfloat3 velocity = asfloat(attributeBuffer.Load3((index |
|
|
|
* 0x8 + 0x44AA84) << 2));\n\t\t\t\t\t\t\tfloat age = asfloat(attributeBuffer.Load((index |
|
|
|
* 0x8 + 0x44AA83) << 2));\n\t\t\t\t\t\t\tfloat alpha = (float)1;\n\t\t\t\t\t\t\tbool |
|
|
|
alive = (attributeBuffer.Load((index * 0x8 + 0x44AA87) << 2));\n\t\t\t\t\t\t\tfloat3 |
|
|
|
axisX = float3(1,0,0);\n\t\t\t\t\t\t\tfloat3 axisY = float3(0,1,0);\n\t\t\t\t\t\t\tfloat3 |
|
|
|
axisZ = float3(0,0,1);\n\t\t\t\t\t\t\tfloat angleX = (float)0;\n\t\t\t\t\t\t\tfloat |
|
|
|
angleY = (float)0;\n\t\t\t\t\t\t\tfloat angleZ = (float)0;\n\t\t\t\t\t\t\tfloat |
|
|
|
pivotX = (float)0;\n\t\t\t\t\t\t\tfloat pivotY = (float)0;\n\t\t\t\t\t\t\tfloat |
|
|
|
pivotZ = (float)0;\n\t\t\t\t\t\t\tfloat size = (float)0.1;\n\t\t\t\t\t\t\tfloat |
|
|
|
scaleX = (float)1;\n\t\t\t\t\t\t\tfloat scaleY = (float)1;\n\t\t\t\t\t\t\tfloat |
|
|
|
scaleZ = (float)1;\n\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t#else\n\t\t\t\t\t\t\tif |
|
|
|
(index >= asuint(nbMax))\n\t\t\t\t\t\t\t\treturn o;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tbool |
|
|
|
alive = (attributeBuffer.Load((index * 0x8 + 0x44AA87) << 2));\n\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\tif |
|
|
|
(!alive)\n\t\t\t\t\t\t\t\treturn o;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfloat lifetime |
|
|
|
= asfloat(attributeBuffer.Load((index * 0x2 + 0x0) << 2));\n\t\t\t\t\t\t\tfloat3 |
|
|
|
color = asfloat(attributeBuffer.Load3((index * 0x4 + 0x16E380) << 2));\n\t\t\t\t\t\t\tfloat3 |
|
|
|
position = asfloat(attributeBuffer.Load3((index * 0x8 + 0x44AA80) << 2));\n\t\t\t\t\t\t\tuint |
|
|
|
particleId = (attributeBuffer.Load((index * 0x2 + 0x1) << 2));\n\t\t\t\t\t\t\tfloat3 |
|
|
|
velocity = asfloat(attributeBuffer.Load3((index * 0x8 + 0x44AA84) << 2));\n\t\t\t\t\t\t\tfloat |
|
|
|
age = asfloat(attributeBuffer.Load((index * 0x8 + 0x44AA83) << 2));\n\t\t\t\t\t\t\tfloat |
|
|
|
alpha = (float)1;\n\t\t\t\t\t\t\tfloat3 axisX = float3(1,0,0);\n\t\t\t\t\t\t\tfloat3 |
|
|
|
axisY = float3(0,1,0);\n\t\t\t\t\t\t\tfloat3 axisZ = float3(0,0,1);\n\t\t\t\t\t\t\tfloat |
|
|
|
angleX = (float)0;\n\t\t\t\t\t\t\tfloat angleY = (float)0;\n\t\t\t\t\t\t\tfloat |
|
|
|
angleZ = (float)0;\n\t\t\t\t\t\t\tfloat pivotX = (float)0;\n\t\t\t\t\t\t\tfloat |
|
|
|
pivotY = (float)0;\n\t\t\t\t\t\t\tfloat pivotZ = (float)0;\n\t\t\t\t\t\t\tfloat |
|
|
|
size = (float)0.1;\n\t\t\t\t\t\t\tfloat scaleX = (float)1;\n\t\t\t\t\t\t\tfloat |
|
|
|
scaleY = (float)1;\n\t\t\t\t\t\t\tfloat scaleZ = (float)1;\n\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\tOrient_6( |
|
|
|
index = (id >> 2) + instanceID * 2048;\n\t\t\t\tVFX_VARYING_PS_INPUTS o = (VFX_VARYING_PS_INPUTS)0;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\tuint |
|
|
|
deadCount = 0;\n\t\t\t\t\t\t#if USE_DEAD_LIST_COUNT\n\t\t\t\t\t\tdeadCount = |
|
|
|
deadListCount.Load(0);\n\t\t\t\t\t\t#endif\t\n\t\t\t\t\t\tif (index >= asuint(nbMax) |
|
|
|
- deadCount)\n\t\t\t\t\t\t\treturn o; // cull\n\t\t\t\t\t\t\n\t\t\t\t\t\t#if |
|
|
|
VFX_HAS_INDIRECT_DRAW\n\t\t\t\t\t\tindex = indirectBuffer[index];\n\t\t\t\t\t\tfloat |
|
|
|
lifetime = asfloat(attributeBuffer.Load((index * 0x2 + 0x0) << 2));\n\t\t\t\t\t\tfloat3 |
|
|
|
color = asfloat(attributeBuffer.Load3((index * 0x4 + 0x16E380) << 2));\n\t\t\t\t\t\tfloat3 |
|
|
|
position = asfloat(attributeBuffer.Load3((index * 0x8 + 0x44AA80) << 2));\n\t\t\t\t\t\tuint |
|
|
|
particleId = (attributeBuffer.Load((index * 0x2 + 0x1) << 2));\n\t\t\t\t\t\tfloat3 |
|
|
|
velocity = asfloat(attributeBuffer.Load3((index * 0x8 + 0x44AA84) << 2));\n\t\t\t\t\t\tfloat |
|
|
|
age = asfloat(attributeBuffer.Load((index * 0x8 + 0x44AA83) << 2));\n\t\t\t\t\t\tfloat |
|
|
|
alpha = (float)1;\n\t\t\t\t\t\tbool alive = (attributeBuffer.Load((index * 0x8 |
|
|
|
+ 0x44AA87) << 2));\n\t\t\t\t\t\tfloat3 axisX = float3(1,0,0);\n\t\t\t\t\t\tfloat3 |
|
|
|
axisY = float3(0,1,0);\n\t\t\t\t\t\tfloat3 axisZ = float3(0,0,1);\n\t\t\t\t\t\tfloat |
|
|
|
angleX = (float)0;\n\t\t\t\t\t\tfloat angleY = (float)0;\n\t\t\t\t\t\tfloat |
|
|
|
angleZ = (float)0;\n\t\t\t\t\t\tfloat pivotX = (float)0;\n\t\t\t\t\t\tfloat |
|
|
|
pivotY = (float)0;\n\t\t\t\t\t\tfloat pivotZ = (float)0;\n\t\t\t\t\t\tfloat |
|
|
|
size = (float)0.1;\n\t\t\t\t\t\tfloat scaleX = (float)1;\n\t\t\t\t\t\tfloat |
|
|
|
scaleY = (float)1;\n\t\t\t\t\t\tfloat scaleZ = (float)1;\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t#else\n\t\t\t\t\t\tbool |
|
|
|
alive = (attributeBuffer.Load((index * 0x8 + 0x44AA87) << 2));\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\tif |
|
|
|
(!alive)\n\t\t\t\t\t\t\treturn o;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tfloat lifetime |
|
|
|
= asfloat(attributeBuffer.Load((index * 0x2 + 0x0) << 2));\n\t\t\t\t\t\tfloat3 |
|
|
|
color = asfloat(attributeBuffer.Load3((index * 0x4 + 0x16E380) << 2));\n\t\t\t\t\t\tfloat3 |
|
|
|
position = asfloat(attributeBuffer.Load3((index * 0x8 + 0x44AA80) << 2));\n\t\t\t\t\t\tuint |
|
|
|
particleId = (attributeBuffer.Load((index * 0x2 + 0x1) << 2));\n\t\t\t\t\t\tfloat3 |
|
|
|
velocity = asfloat(attributeBuffer.Load3((index * 0x8 + 0x44AA84) << 2));\n\t\t\t\t\t\tfloat |
|
|
|
age = asfloat(attributeBuffer.Load((index * 0x8 + 0x44AA83) << 2));\n\t\t\t\t\t\tfloat |
|
|
|
alpha = (float)1;\n\t\t\t\t\t\tfloat3 axisX = float3(1,0,0);\n\t\t\t\t\t\tfloat3 |
|
|
|
axisY = float3(0,1,0);\n\t\t\t\t\t\tfloat3 axisZ = float3(0,0,1);\n\t\t\t\t\t\tfloat |
|
|
|
angleX = (float)0;\n\t\t\t\t\t\tfloat angleY = (float)0;\n\t\t\t\t\t\tfloat |
|
|
|
angleZ = (float)0;\n\t\t\t\t\t\tfloat pivotX = (float)0;\n\t\t\t\t\t\tfloat |
|
|
|
pivotY = (float)0;\n\t\t\t\t\t\tfloat pivotZ = (float)0;\n\t\t\t\t\t\tfloat |
|
|
|
size = (float)0.1;\n\t\t\t\t\t\tfloat scaleX = (float)1;\n\t\t\t\t\t\tfloat |
|
|
|
scaleY = (float)1;\n\t\t\t\t\t\tfloat scaleZ = (float)1;\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\tOrient_6( |
|
|
|
/*inout */axisX, /*inout */axisY, /*inout */axisZ, position, velocity);\n\t\t\t\t{\n\t\t\t\t |
|
|
|
\ float3 tmp_bj = velocity * velocity;\n\t\t\t\t float tmp_bk = tmp_bj[2];\n\t\t\t\t |
|
|
|
\ float tmp_bl = tmp_bj[1];\n\t\t\t\t float tmp_bm = tmp_bk + tmp_bl;\n\t\t\t\t |
|
|
|
|
|
|
fragment frag\n\t\t\tps_output frag(ps_input i)\n\t\t\t{\n\t\t\t\tps_output |
|
|
|
o = (ps_output)0;\n\t\t\t\to.color = VFXGetFragmentColor(i);\n\t\t\t\to.color |
|
|
|
*= VFXGetTextureColor(VFX_SAMPLER(mainTexture),i);\n\t\t\t\to.color = VFXApplyFog(o.color,i);\n\t\t\t\tVFXClipFragmentColor(o.color.a,i);\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" |
|
|
|
m_Infos: |
|
|
|
m_Expressions: |
|
|
|
m_Expressions: |
|
|
|
|
|
|
- m_ExpressionIndex: 50 |
|
|
|
m_Value: {fileID: 11700000, guid: f2c068a8f27265d489fbf108c033ab44, type: 3} |
|
|
|
- m_ExpressionIndex: 56 |
|
|
|
m_Value: {fileID: 0} |
|
|
|
m_Value: {fileID: 11700000, guid: 500adb08ae2ef274c9095ec1e41fde84, type: 2} |
|
|
|
m_Value: {fileID: 0} |
|
|
|
m_Value: {fileID: 2800000, guid: 49cb5aa34272b034d8b754c65d9cdbfa, type: 3} |
|
|
|
m_Bool: |
|
|
|
m_Array: [] |
|
|
|
m_ExposedExpressions: |
|
|
|
|
|
|
m_Type: |
|
|
|
m_SerializableType: UnityEngine.Texture3D, UnityEngine.CoreModule, Version=0.0.0.0, |
|
|
|
Culture=neutral, PublicKeyToken=null |
|
|
|
m_SerializableObject: '{"obj":{"fileID":11700000,"guid":"f93fc0f95c2e2bf41bbb39e9a5dce8f8","type":2}}' |
|
|
|
m_SerializableObject: '{"obj":{"fileID":11700000,"guid":"500adb08ae2ef274c9095ec1e41fde84","type":2}}' |
|
|
|
m_Space: 2147483647 |
|
|
|
m_Property: |
|
|
|
name: o |
|
|
|
|
|
|
linkedSlots: |
|
|
|
- outputSlot: {fileID: 8926484042661615041} |
|
|
|
inputSlot: {fileID: 114155183567873668} |
|
|
|
position: {x: -139.32773, y: 2655.0557} |
|
|
|
position: {x: -139.32773, y: 2655.488} |
|
|
|
expandedSlots: [] |
|
|
|
expanded: 0 |
|
|
|
--- !u!114 &8926484042661615041 |
|
|
|
|
|
|
- {fileID: 8926484042661615051} |
|
|
|
- {fileID: 8926484042661615052} |
|
|
|
- {fileID: 8926484042661615053} |
|
|
|
- {fileID: 8926484042661615054} |
|
|
|
- {fileID: 8926484042661615069} |
|
|
|
- {fileID: 8926484042661615055} |
|
|
|
- {fileID: 8926484042661615056} |
|
|
|
m_OutputSlots: |
|
|
|
|
|
|
m_SerializableType: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, |
|
|
|
PublicKeyToken=b77a5c561934e089 |
|
|
|
attributes: |
|
|
|
- m_Type: 1 |
|
|
|
m_Min: 0 |
|
|
|
m_Max: Infinity |
|
|
|
m_Tooltip: |
|
|
|
m_Regex: |
|
|
|
m_RegexMaxLength: 0 |
|
|
|
- m_Type: 3 |
|
|
|
m_Min: -Infinity |
|
|
|
m_Max: Infinity |
|
|
|
|
|
|
m_RegexMaxLength: 0 |
|
|
|
m_Direction: 0 |
|
|
|
m_LinkedSlots: [] |
|
|
|
--- !u!114 &8926484042661615054 |
|
|
|
MonoBehaviour: |
|
|
|
m_ObjectHideFlags: 0 |
|
|
|
m_CorrespondingSourceObject: {fileID: 0} |
|
|
|
m_PrefabInstance: {fileID: 0} |
|
|
|
m_PrefabAsset: {fileID: 0} |
|
|
|
m_GameObject: {fileID: 0} |
|
|
|
m_Enabled: 1 |
|
|
|
m_EditorHideFlags: 0 |
|
|
|
m_Script: {fileID: 11500000, guid: f780aa281814f9842a7c076d436932e7, type: 3} |
|
|
|
m_Name: |
|
|
|
m_EditorClassIdentifier: |
|
|
|
m_Parent: {fileID: 0} |
|
|
|
m_Children: [] |
|
|
|
m_UIPosition: {x: 0, y: 0} |
|
|
|
m_UICollapsed: 1 |
|
|
|
m_UISuperCollapsed: 0 |
|
|
|
m_MasterSlot: {fileID: 8926484042661615054} |
|
|
|
m_MasterData: |
|
|
|
m_Owner: {fileID: 8926484042661615050} |
|
|
|
m_Value: |
|
|
|
m_Type: |
|
|
|
m_SerializableType: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, |
|
|
|
PublicKeyToken=b77a5c561934e089 |
|
|
|
m_SerializableObject: 0.5 |
|
|
|
m_Space: 2147483647 |
|
|
|
m_Property: |
|
|
|
name: persistence |
|
|
|
m_serializedType: |
|
|
|
m_SerializableType: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, |
|
|
|
PublicKeyToken=b77a5c561934e089 |
|
|
|
attributes: |
|
|
|
- m_Type: 0 |
|
|
|
m_Min: 0 |
|
|
|
m_Max: 1 |
|
|
|
m_Tooltip: |
|
|
|
m_Regex: |
|
|
|
m_RegexMaxLength: 0 |
|
|
|
- m_Type: 3 |
|
|
|
m_Min: -Infinity |
|
|
|
m_Max: Infinity |
|
|
|
m_Tooltip: The scaling factor applied to each octave. |
|
|
|
m_Regex: |
|
|
|
m_RegexMaxLength: 0 |
|
|
|
m_Direction: 0 |
|
|
|
m_LinkedSlots: [] |
|
|
|
--- !u!114 &8926484042661615055 |
|
|
|
MonoBehaviour: |
|
|
|
m_ObjectHideFlags: 0 |
|
|
|
|
|
|
m_SerializableType: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, |
|
|
|
PublicKeyToken=b77a5c561934e089 |
|
|
|
attributes: |
|
|
|
- m_Type: 1 |
|
|
|
m_Min: 0 |
|
|
|
m_Max: Infinity |
|
|
|
m_Tooltip: |
|
|
|
m_Regex: |
|
|
|
m_RegexMaxLength: 0 |
|
|
|
- m_Type: 3 |
|
|
|
m_Min: -Infinity |
|
|
|
m_Max: Infinity |
|
|
|
|
|
|
m_Direction: 0 |
|
|
|
m_LinkedSlots: |
|
|
|
- {fileID: 8926484042661614559} |
|
|
|
--- !u!114 &8926484042661615069 |
|
|
|
MonoBehaviour: |
|
|
|
m_ObjectHideFlags: 0 |
|
|
|
m_CorrespondingSourceObject: {fileID: 0} |
|
|
|
m_PrefabInstance: {fileID: 0} |
|
|
|
m_PrefabAsset: {fileID: 0} |
|
|
|
m_GameObject: {fileID: 0} |
|
|
|
m_Enabled: 1 |
|
|
|
m_EditorHideFlags: 0 |
|
|
|
m_Script: {fileID: 11500000, guid: f780aa281814f9842a7c076d436932e7, type: 3} |
|
|
|
m_Name: |
|
|
|
m_EditorClassIdentifier: |
|
|
|
m_Parent: {fileID: 0} |
|
|
|
m_Children: [] |
|
|
|
m_UIPosition: {x: 0, y: 0} |
|
|
|
m_UICollapsed: 1 |
|
|
|
m_UISuperCollapsed: 0 |
|
|
|
m_MasterSlot: {fileID: 8926484042661615069} |
|
|
|
m_MasterData: |
|
|
|
m_Owner: {fileID: 8926484042661615050} |
|
|
|
m_Value: |
|
|
|
m_Type: |
|
|
|
m_SerializableType: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, |
|
|
|
PublicKeyToken=b77a5c561934e089 |
|
|
|
m_SerializableObject: 0.5 |
|
|
|
m_Space: 2147483647 |
|
|
|
m_Property: |
|
|
|
name: roughness |
|
|
|
m_serializedType: |
|
|
|
m_SerializableType: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, |
|
|
|
PublicKeyToken=b77a5c561934e089 |
|
|
|
attributes: |
|
|
|
- m_Type: 0 |
|
|
|
m_Min: 0 |
|
|
|
m_Max: 1 |
|
|
|
m_Tooltip: |
|
|
|
m_Regex: |
|
|
|
m_RegexMaxLength: 0 |
|
|
|
- m_Type: 3 |
|
|
|
m_Min: -Infinity |
|
|
|
m_Max: Infinity |
|
|
|
m_Tooltip: The scaling factor applied to each octave. Also known as persistence. |
|
|
|
m_Regex: |
|
|
|
m_RegexMaxLength: 0 |
|
|
|
m_Direction: 0 |
|
|
|
m_LinkedSlots: [] |