您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
12574 行
465 KiB
12574 行
465 KiB
%YAML 1.1
|
|
%TAG !u! tag:unity3d.com,2011:
|
|
--- !u!114 &114340500867371532
|
|
MonoBehaviour:
|
|
m_ObjectHideFlags: 1
|
|
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: d01270efd3285ea4a9d6c555cb0a8027, type: 3}
|
|
m_Name: VFXUI
|
|
m_EditorClassIdentifier:
|
|
groupInfos: []
|
|
stickyNoteInfos: []
|
|
systemInfos:
|
|
- title: Dust
|
|
position:
|
|
serializedVersion: 2
|
|
x: 0
|
|
y: 0
|
|
width: 0
|
|
height: 0
|
|
contexts:
|
|
- {fileID: 0}
|
|
- {fileID: 0}
|
|
- {fileID: 0}
|
|
- title: Leaves
|
|
position:
|
|
serializedVersion: 2
|
|
x: 0
|
|
y: 0
|
|
width: 0
|
|
height: 0
|
|
contexts:
|
|
- {fileID: 8926484042661614748}
|
|
- {fileID: 8926484042661614771}
|
|
- {fileID: 8926484042661614930}
|
|
categories:
|
|
- name: Wind
|
|
collapsed: 0
|
|
- name: Leaves
|
|
collapsed: 0
|
|
uiBounds:
|
|
serializedVersion: 2
|
|
x: 1176
|
|
y: -523
|
|
width: 1554
|
|
height: 2868
|
|
--- !u!114 &114350483966674976
|
|
MonoBehaviour:
|
|
m_ObjectHideFlags: 1
|
|
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: 7d4c867f6b72b714dbb5fd1780afe208, type: 3}
|
|
m_Name: WorldAmbient_Leaves
|
|
m_EditorClassIdentifier:
|
|
m_Parent: {fileID: 0}
|
|
m_Children:
|
|
- {fileID: 8926484042661614660}
|
|
- {fileID: 8926484042661614686}
|
|
- {fileID: 8926484042661614745}
|
|
- {fileID: 8926484042661614748}
|
|
- {fileID: 8926484042661614771}
|
|
- {fileID: 8926484042661614930}
|
|
- {fileID: 8926484042661614976}
|
|
- {fileID: 8926484042661614981}
|
|
- {fileID: 8926484042661615041}
|
|
- {fileID: 8926484042661615051}
|
|
- {fileID: 8926484042661615056}
|
|
- {fileID: 8926484042661615078}
|
|
- {fileID: 8926484042661615109}
|
|
- {fileID: 8926484042661615120}
|
|
- {fileID: 8926484042661615134}
|
|
- {fileID: 8926484042661615154}
|
|
- {fileID: 8926484042661615164}
|
|
- {fileID: 8926484042661615188}
|
|
- {fileID: 8926484042661615199}
|
|
- {fileID: 8926484042661615203}
|
|
- {fileID: 8926484042661615210}
|
|
m_UIPosition: {x: 0, y: 0}
|
|
m_UICollapsed: 1
|
|
m_UISuperCollapsed: 0
|
|
m_UIInfos: {fileID: 114340500867371532}
|
|
m_ParameterInfo:
|
|
- name: Wind
|
|
path:
|
|
tooltip:
|
|
sheetType:
|
|
realType:
|
|
defaultValue:
|
|
m_Type:
|
|
m_SerializableType:
|
|
m_SerializableObject:
|
|
min: -Infinity
|
|
max: Infinity
|
|
descendantCount: 0
|
|
- name: WindDirection
|
|
path:
|
|
tooltip:
|
|
sheetType:
|
|
realType: DirectionType
|
|
defaultValue:
|
|
m_Type:
|
|
m_SerializableType:
|
|
m_SerializableObject:
|
|
min: -Infinity
|
|
max: Infinity
|
|
descendantCount: 1
|
|
- name: direction
|
|
path: WindDirection_direction
|
|
tooltip: The normalized direction.
|
|
sheetType: m_Vector3f
|
|
realType: Vector3
|
|
defaultValue:
|
|
m_Type:
|
|
m_SerializableType: UnityEngine.Vector3, UnityEngine.CoreModule, Version=0.0.0.0,
|
|
Culture=neutral, PublicKeyToken=null
|
|
m_SerializableObject: '{"x":1.0,"y":0.10000000149011612,"z":0.0}'
|
|
min: -Infinity
|
|
max: Infinity
|
|
descendantCount: 0
|
|
- name: WindStrength
|
|
path: WindStrength
|
|
tooltip:
|
|
sheetType: m_Float
|
|
realType: Single
|
|
defaultValue:
|
|
m_Type:
|
|
m_SerializableType: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral,
|
|
PublicKeyToken=b77a5c561934e089
|
|
m_SerializableObject: 3
|
|
min: -Infinity
|
|
max: Infinity
|
|
descendantCount: 0
|
|
- name: Leaves
|
|
path:
|
|
tooltip:
|
|
sheetType:
|
|
realType:
|
|
defaultValue:
|
|
m_Type:
|
|
m_SerializableType:
|
|
m_SerializableObject:
|
|
min: -Infinity
|
|
max: Infinity
|
|
descendantCount: 0
|
|
- name: SpawnRate
|
|
path: SpawnRate
|
|
tooltip:
|
|
sheetType: m_Float
|
|
realType: Single
|
|
defaultValue:
|
|
m_Type:
|
|
m_SerializableType: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral,
|
|
PublicKeyToken=b77a5c561934e089
|
|
m_SerializableObject: 40
|
|
min: 0
|
|
max: 100
|
|
descendantCount: 0
|
|
- name: SpawnRate Over Distance
|
|
path: SpawnRate Over Distance
|
|
tooltip:
|
|
sheetType: m_AnimationCurve
|
|
realType: AnimationCurve
|
|
defaultValue:
|
|
m_Type:
|
|
m_SerializableType: UnityEngine.AnimationCurve, UnityEngine.CoreModule, Version=0.0.0.0,
|
|
Culture=neutral, PublicKeyToken=null
|
|
m_SerializableObject: '{"frames":[{"time":-0.06402587890625,"value":1.0041499137878419,"inTangent":-0.00040687411092221737,"outTangent":-0.00040687411092221737,"tangentMode":0,"leftTangentMode":1,"rightTangentMode":1,"broken":false},{"time":10.135477066040039,"value":1.0,"inTangent":-0.0015432414365932346,"outTangent":-0.0015432414365932346,"tangentMode":0,"leftTangentMode":0,"rightTangentMode":0,"broken":false},{"time":29.11126136779785,"value":0.1852063089609146,"inTangent":-0.025665100663900377,"outTangent":-0.025665100663900377,"tangentMode":0,"leftTangentMode":1,"rightTangentMode":1,"broken":false},{"time":39.16333770751953,"value":0.1008533462882042,"inTangent":-0.00839159544557333,"outTangent":-0.00839159544557333,"tangentMode":0,"leftTangentMode":1,"rightTangentMode":1,"broken":false}],"preWrapMode":8,"postWrapMode":8,"version":1}'
|
|
min: -Infinity
|
|
max: Infinity
|
|
descendantCount: 0
|
|
- name: SourceRadius
|
|
path: SourceRadius
|
|
tooltip:
|
|
sheetType: m_Float
|
|
realType: Single
|
|
defaultValue:
|
|
m_Type:
|
|
m_SerializableType: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral,
|
|
PublicKeyToken=b77a5c561934e089
|
|
m_SerializableObject: 8
|
|
min: -Infinity
|
|
max: Infinity
|
|
descendantCount: 0
|
|
m_GraphVersion: 4
|
|
m_saved: 1
|
|
m_SubgraphDependencies: []
|
|
m_CategoryPath:
|
|
--- !u!2058629511 &8926484042661614527
|
|
VisualEffectResource:
|
|
m_ObjectHideFlags: 0
|
|
m_CorrespondingSourceObject: {fileID: 0}
|
|
m_PrefabInstance: {fileID: 0}
|
|
m_PrefabAsset: {fileID: 0}
|
|
m_Name: WorldAmbient_Leaves
|
|
m_Graph: {fileID: 114350483966674976}
|
|
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
|
|
1\n#define VFX_PASSDEPTH_ACTUAL (0)\n#define VFX_PASSDEPTH_MOTION_VECTOR (1)\n#define
|
|
VFX_PASSDEPTH_SELECTION (2)\n#define VFX_USE_POSITION_CURRENT 1\n#define VFX_USE_SEED_CURRENT
|
|
1\n#define VFX_USE_DIRECTION_CURRENT 1\n#define VFX_USE_VELOCITY_CURRENT 1\n#define
|
|
VFX_USE_LIFETIME_CURRENT 1\n#define VFX_USE_TEXINDEX_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_ANGULARVELOCITYX_CURRENT 1\n#define VFX_USE_ANGULARVELOCITYY_CURRENT
|
|
1\n#define VFX_USE_ANGULARVELOCITYZ_CURRENT 1\n#define VFX_USE_SIZE_CURRENT
|
|
1\n#define VFX_USE_ALIVE_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_WORLD_SPACE 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\r\nCBUFFER_START(parameters)\n
|
|
float3 ArcSphere_sphere_center_a;\n float ArcSphere_sphere_radius_a;\nCBUFFER_END\n\nstruct
|
|
Attributes\n{\n float3 position;\n uint seed;\n float3 direction;\n
|
|
float3 velocity;\n float lifetime;\n float texIndex;\n float angleX;\n
|
|
float angleY;\n float angleZ;\n float angularVelocityX;\n float angularVelocityY;\n
|
|
float angularVelocityZ;\n float size;\n bool alive;\n float scaleX;\n
|
|
float scaleY;\n float scaleZ;\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
|
|
PositionSphere_18D(inout float3 position, inout uint seed, inout float3 direction,
|
|
float3 ArcSphere_sphere_center, float ArcSphere_sphere_radius, float ArcSphere_arc,
|
|
float volumeFactor) /*positionMode:Volume spawnMode:Random */\n{\n float
|
|
cosPhi = 2.0f * RAND - 1.0f;float theta = ArcSphere_arc * RAND;\n float
|
|
rNorm = pow(volumeFactor + (1 - volumeFactor) * 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}\nvoid SetAttribute_E6295C0(inout float3 velocity, inout uint seed, float3
|
|
A, float3 B) /*attribute:velocity Composition:Overwrite Source:Slot Random:PerComponent
|
|
channels:XYZ */\n{\n velocity = lerp(A,B,RAND3);\n}\nvoid SetAttribute_F01429A3(inout
|
|
float lifetime, inout uint seed, float A, float B) /*attribute:lifetime Composition:Overwrite
|
|
Source:Slot Random:Uniform channels:XYZ */\n{\n lifetime = lerp(A,B,RAND);\n}\nvoid
|
|
SetAttribute_CA100327(inout float texIndex, inout uint seed, float A, float
|
|
B) /*attribute:texIndex Composition:Overwrite Source:Slot Random:Uniform channels:XYZ
|
|
*/\n{\n texIndex = lerp(A,B,RAND);\n}\nvoid SetAttribute_48A7BD6A(inout
|
|
float angleX, inout float angleY, inout float angleZ, inout uint seed, float3
|
|
A, float3 B) /*attribute:angle Composition:Overwrite Source:Slot Random:PerComponent
|
|
channels:XYZ */\n{\n angleX = lerp(A.x,B.x,RAND);\n angleY = lerp(A.y,B.y,RAND);\n
|
|
angleZ = lerp(A.z,B.z,RAND);\n}\nvoid SetAttribute_FA958722(inout float angularVelocityX,
|
|
inout float angularVelocityY, inout float angularVelocityZ, inout uint seed,
|
|
float3 A, float3 B) /*attribute:angularVelocity Composition:Overwrite Source:Slot
|
|
Random:PerComponent channels:XYZ */\n{\n angularVelocityX = lerp(A.x,B.x,RAND);\n
|
|
angularVelocityY = lerp(A.y,B.y,RAND);\n angularVelocityZ = lerp(A.z,B.z,RAND);\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}\n\n\r\n\r\n#if HAS_STRIPS\r\nbool GetParticleIndex(inout
|
|
uint particleIndex, uint stripIndex)\r\n{\r\n\tuint relativeIndex;\r\n\tInterlockedAdd(STRIP_DATA(STRIP_NEXT_INDEX,
|
|
stripIndex), 1, relativeIndex);\r\n\tif (relativeIndex >= PARTICLE_PER_STRIP_COUNT)
|
|
// strip is full\r\n\t{\r\n\t\tInterlockedAdd(STRIP_DATA(STRIP_NEXT_INDEX,
|
|
stripIndex), -1); // Remove previous increment\r\n\t\treturn false;\r\n\t}\r\n\r\n\tparticleIndex
|
|
= stripIndex * PARTICLE_PER_STRIP_COUNT + ((STRIP_DATA(STRIP_FIRST_INDEX, stripIndex)
|
|
+ relativeIndex) % PARTICLE_PER_STRIP_COUNT);\r\n return true;\r\n}\r\n#endif\r\n\r\n[numthreads(NB_THREADS_PER_GROUP,1,1)]\r\nvoid
|
|
CSMain(uint3 groupId : SV_GroupID,\r\n uint3 groupThreadId
|
|
: SV_GroupThreadID)\r\n{\r\n uint id = groupThreadId.x + groupId.x * NB_THREADS_PER_GROUP;\r\n#if
|
|
!VFX_USE_SPAWNER_FROM_GPU\r\n id += groupId.y * dispatchWidth * NB_THREADS_PER_GROUP;\r\n#endif\r\n\r\n#if
|
|
VFX_USE_SPAWNER_FROM_GPU\r\n uint maxThreadId = inputAdditional.Load((offsetInAdditionalOutput
|
|
* 2 + 0) << 2);\r\n uint currentSpawnIndex = inputAdditional.Load((offsetInAdditionalOutput
|
|
* 2 + 1) << 2) - maxThreadId;\r\n#else\r\n uint maxThreadId = nbSpawned;\r\n
|
|
uint currentSpawnIndex = spawnIndex;\r\n#endif\r\n\r\n#if USE_DEAD_LIST\r\n
|
|
maxThreadId = min(maxThreadId, deadListCount.Load(0x0));\r\n#elif VFX_USE_SPAWNER_FROM_GPU\r\n
|
|
maxThreadId = min(maxThreadId, nbMax); //otherwise, nbSpawned already clamped
|
|
on CPU\r\n#endif\r\n\r\n if (id < maxThreadId)\r\n {\r\n#if VFX_USE_SPAWNER_FROM_GPU\r\n
|
|
int sourceIndex = eventList[id];\r\n#endif\r\n\t\tuint particleIndex = id +
|
|
currentSpawnIndex;\r\n\t\t\r\n#if !VFX_USE_SPAWNER_FROM_GPU\r\n int
|
|
sourceIndex = 0;\n /*//Loop with 1 iteration generate a wrong IL Assembly
|
|
(and actually, useless code)\n uint currentSumSpawnCount = 0u;\n
|
|
for (sourceIndex=0; sourceIndex<1; sourceIndex++)\n {\n currentSumSpawnCount
|
|
+= uint(asfloat(sourceAttributeBuffer.Load((sourceIndex * 0x1 + 0x0) << 2)));\n
|
|
if (id < currentSumSpawnCount)\n {\n break;\n
|
|
}\n }\n */\n \n\r\n#endif\r\n\r\n\t\tAttributes attributes
|
|
= (Attributes)0;\r\n\t\tSourceAttributes sourceAttributes = (SourceAttributes)0;\r\n\t\t\r\n
|
|
attributes.position = float3(0, 0, 0);\n attributes.seed = (uint)0;\n
|
|
attributes.direction = float3(0, 0, 1);\n attributes.velocity = float3(0,
|
|
0, 0);\n attributes.lifetime = (float)1;\n attributes.texIndex
|
|
= (float)0;\n attributes.angleX = (float)0;\n attributes.angleY
|
|
= (float)0;\n attributes.angleZ = (float)0;\n attributes.angularVelocityX
|
|
= (float)0;\n attributes.angularVelocityY = (float)0;\n attributes.angularVelocityZ
|
|
= (float)0;\n attributes.size = (float)0.100000001;\n attributes.alive
|
|
= (bool)true;\n attributes.scaleX = (float)1;\n attributes.scaleY
|
|
= (float)1;\n attributes.scaleZ = (float)1;\n attributes.age
|
|
= (float)0;\n \n\r\n#if VFX_USE_PARTICLEID_CURRENT\r\n attributes.particleId
|
|
= particleIndex;\r\n#endif\r\n#if VFX_USE_SEED_CURRENT\r\n attributes.seed
|
|
= WangHash(particleIndex ^ systemSeed);\r\n#endif\r\n#if VFX_USE_SPAWNINDEX_CURRENT\r\n
|
|
attributes.spawnIndex = id;\r\n#endif\r\n#if HAS_STRIPS\r\n#if !VFX_USE_SPAWNER_FROM_GPU\r\n\t\t\r\n#else\r\n
|
|
uint stripIndex = sourceIndex;\r\n#endif\r\n\t\tstripIndex = min(stripIndex,
|
|
STRIP_COUNT);\r\n\r\n if (!GetParticleIndex(particleIndex, stripIndex))\r\n
|
|
return;\r\n\r\n const StripData stripData = GetStripDataFromStripIndex(stripIndex,
|
|
PARTICLE_PER_STRIP_COUNT);\r\n\t\tInitStripAttributes(particleIndex, attributes,
|
|
stripData);\r\n\t\t// TODO Change seed to be sure we're deterministic on random
|
|
with strip\r\n#endif\r\n \r\n {\n PositionSphere_18D(
|
|
/*inout */attributes.position, /*inout */attributes.seed, /*inout */attributes.direction,
|
|
ArcSphere_sphere_center_a, ArcSphere_sphere_radius_a, (float)6.28318548, (float)0);\n
|
|
}\n {\n SetAttribute_E6295C0( /*inout */attributes.velocity,
|
|
/*inout */attributes.seed, float3(-0.333000004, 0.200000003, -0.333000004),
|
|
float3(0.333000004, 1, 0.333000004));\n }\n {\n SetAttribute_F01429A3(
|
|
/*inout */attributes.lifetime, /*inout */attributes.seed, (float)6, (float)12);\n
|
|
}\n {\n SetAttribute_CA100327( /*inout */attributes.texIndex,
|
|
/*inout */attributes.seed, (float)0, (float)16);\n }\n {\n
|
|
SetAttribute_48A7BD6A( /*inout */attributes.angleX, /*inout */attributes.angleY,
|
|
/*inout */attributes.angleZ, /*inout */attributes.seed, float3(-30, -30, -30),
|
|
float3(30, 30, 30));\n }\n {\n SetAttribute_FA958722(
|
|
/*inout */attributes.angularVelocityX, /*inout */attributes.angularVelocityY,
|
|
/*inout */attributes.angularVelocityZ, /*inout */attributes.seed, float3(-30,
|
|
-30, -30), float3(30, 30, 30));\n }\n {\n SetAttribute_3278B545(
|
|
/*inout */attributes.size, /*inout */attributes.seed, (float)0.0450000018,
|
|
(float)0.150000006);\n }\n \n\r\n\t\t\r\n#if VFX_USE_ALIVE_CURRENT\r\n
|
|
if (attributes.alive)\r\n#endif \r\n {\r\n#if USE_DEAD_LIST\r\n\t
|
|
uint deadIndex = deadListIn.DecrementCounter();\r\n uint index =
|
|
deadListIn[deadIndex];\r\n#else\r\n uint index = particleIndex;\r\n#endif\r\n
|
|
attributeBuffer.Store3((index * 0x8 + 0x0) << 2,asuint(attributes.position));\n
|
|
attributeBuffer.Store3((index * 0x4 + 0x1E00) << 2,asuint(attributes.velocity));\n
|
|
attributeBuffer.Store((index * 0x1 + 0x2D00) << 2,asuint(attributes.lifetime));\n
|
|
attributeBuffer.Store((index * 0x1 + 0x30C0) << 2,asuint(attributes.texIndex));\n
|
|
attributeBuffer.Store((index * 0x8 + 0x3) << 2,asuint(attributes.angleX));\n
|
|
attributeBuffer.Store((index * 0x8 + 0x4) << 2,asuint(attributes.angleY));\n
|
|
attributeBuffer.Store((index * 0x8 + 0x5) << 2,asuint(attributes.angleZ));\n
|
|
attributeBuffer.Store((index * 0x3 + 0x3480) << 2,asuint(attributes.angularVelocityX));\n
|
|
attributeBuffer.Store((index * 0x3 + 0x3481) << 2,asuint(attributes.angularVelocityY));\n
|
|
attributeBuffer.Store((index * 0x3 + 0x3482) << 2,asuint(attributes.angularVelocityZ));\n
|
|
attributeBuffer.Store((index * 0x4 + 0x3FC0) << 2,asuint(attributes.size));\n
|
|
attributeBuffer.Store((index * 0x8 + 0x6) << 2,uint(attributes.alive));\n
|
|
attributeBuffer.Store((index * 0x4 + 0x3FC1) << 2,asuint(attributes.scaleX));\n
|
|
attributeBuffer.Store((index * 0x4 + 0x3FC2) << 2,asuint(attributes.scaleY));\n
|
|
attributeBuffer.Store((index * 0x4 + 0x3FC3) << 2,asuint(attributes.scaleZ));\n
|
|
attributeBuffer.Store((index * 0x8 + 0x7) << 2,asuint(attributes.age));\n
|
|
\n\r\n }\r\n }\r\n}\r\n"
|
|
- compute: 1
|
|
name: '[System 1]Update Particle'
|
|
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
|
|
1\n#define VFX_PASSDEPTH_ACTUAL (0)\n#define VFX_PASSDEPTH_MOTION_VECTOR (1)\n#define
|
|
VFX_PASSDEPTH_SELECTION (2)\n#define VFX_USE_POSITION_CURRENT 1\n#define VFX_USE_VELOCITY_CURRENT
|
|
1\n#define VFX_USE_LIFETIME_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_ANGULARVELOCITYX_CURRENT
|
|
1\n#define VFX_USE_ANGULARVELOCITYY_CURRENT 1\n#define VFX_USE_ANGULARVELOCITYZ_CURRENT
|
|
1\n#define VFX_USE_MASS_CURRENT 1\n#define VFX_USE_ALIVE_CURRENT 1\n#define
|
|
VFX_USE_AGE_CURRENT 1\n#define VFX_HAS_INDIRECT_DRAW 1\n#define VFX_WORLD_SPACE
|
|
1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\r\nCBUFFER_START(parameters)\n
|
|
float4x4 InvFieldTransform_b;\n float4x4 FieldTransform_b;\n float3 Force_a;\n
|
|
float deltaTime_a;\n float3 Velocity_c;\n uint PADDING_0;\nCBUFFER_END\n\nstruct
|
|
Attributes\n{\n float3 position;\n float3 velocity;\n float lifetime;\n
|
|
float angleX;\n float angleY;\n float angleZ;\n float angularVelocityX;\n
|
|
float angularVelocityY;\n float angularVelocityZ;\n float mass;\n
|
|
bool alive;\n float age;\n};\n\nstruct SourceAttributes\n{\n};\n\n\n\r\n\r\n#define
|
|
USE_DEAD_LIST (VFX_USE_ALIVE_CURRENT && !HAS_STRIPS)\r\n\r\nRWByteAddressBuffer
|
|
attributeBuffer;\r\n\r\n#if USE_DEAD_LIST\r\nRWStructuredBuffer<uint> deadListOut;\r\n#endif\r\n\r\n#if
|
|
VFX_HAS_INDIRECT_DRAW\r\nRWStructuredBuffer<uint> indirectBuffer;\r\n#endif\r\n\r\n#if
|
|
HAS_STRIPS\r\nRWBuffer<uint> stripDataBuffer;\r\n#endif\r\n\r\n#if VFX_USE_STRIPALIVE_CURRENT\r\nBuffer<uint>
|
|
attachedStripDataBuffer;\r\n#endif\r\n\r\nCBUFFER_START(updateParams)\r\n
|
|
uint nbMax;\r\n\tuint dispatchWidth;\r\n\tuint systemSeed;\r\nCBUFFER_END\r\n\r\n#include
|
|
\"Packages/com.unity.visualeffectgraph/Shaders/Common/VFXCommonCompute.hlsl\"\n#include
|
|
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\r\n\r\nvoid
|
|
Gravity(inout float3 velocity, float3 Force, float deltaTime)\n{\n velocity
|
|
+= Force * deltaTime;\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) /*Mode:Relative NoiseType:Value */\n{\n float3
|
|
vectorFieldCoord = mul(InvFieldTransform, float4(position,1.0f)).xyz;\n
|
|
\n float3 value = GenerateValueCurlNoise(vectorFieldCoord + 0.5f, frequency,
|
|
octaves, roughness, lacunarity);\n value = mul(FieldTransform,float4(value,0.0f)).xyz
|
|
* Intensity;\n \n velocity += (value - velocity) * min(1.0f,Drag * deltaTime
|
|
/ mass);\n}\nvoid Force_1(inout float3 velocity, float mass, float3 Velocity,
|
|
float Drag, float deltaTime) /*Mode:Relative */\n{\n velocity += (Velocity
|
|
- velocity) * min(1.0f,Drag * deltaTime / mass);\n}\nvoid EulerIntegration(inout
|
|
float3 position, float3 velocity, float deltaTime)\n{\n position += velocity
|
|
* deltaTime;\n}\nvoid AngularEulerIntegration(inout float angleX, float angularVelocityX,
|
|
inout float angleY, float angularVelocityY, inout float angleZ, float angularVelocityZ,
|
|
float deltaTime)\n{\n \n angleX += angularVelocityX * deltaTime;\n
|
|
\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 * 0x8 + 0x6) << 2));\n\t\t\n\r\n\t\tif (attributes.alive)\r\n\t\t{\r\n\t\t\tattributes.position
|
|
= asfloat(attributeBuffer.Load3((index * 0x8 + 0x0) << 2));\n\t\t\tattributes.velocity
|
|
= asfloat(attributeBuffer.Load3((index * 0x4 + 0x1E00) << 2));\n\t\t\tattributes.lifetime
|
|
= asfloat(attributeBuffer.Load((index * 0x1 + 0x2D00) << 2));\n\t\t\tattributes.angleX
|
|
= asfloat(attributeBuffer.Load((index * 0x8 + 0x3) << 2));\n\t\t\tattributes.angleY
|
|
= asfloat(attributeBuffer.Load((index * 0x8 + 0x4) << 2));\n\t\t\tattributes.angleZ
|
|
= asfloat(attributeBuffer.Load((index * 0x8 + 0x5) << 2));\n\t\t\tattributes.angularVelocityX
|
|
= asfloat(attributeBuffer.Load((index * 0x3 + 0x3480) << 2));\n\t\t\tattributes.angularVelocityY
|
|
= asfloat(attributeBuffer.Load((index * 0x3 + 0x3481) << 2));\n\t\t\tattributes.angularVelocityZ
|
|
= asfloat(attributeBuffer.Load((index * 0x3 + 0x3482) << 2));\n\t\t\tattributes.mass
|
|
= (float)1;\n\t\t\tattributes.age = asfloat(attributeBuffer.Load((index * 0x8
|
|
+ 0x7) << 2));\n\t\t\t\n\r\n\r\n// Initialize built-in needed attributes\r\n#if
|
|
VFX_USE_OLDPOSITION_CURRENT\r\n\t\t\tattributes.oldPosition = attributes.position;\r\n#endif\r\n#if
|
|
HAS_STRIPS\r\n const StripData stripData = GetStripDataFromParticleIndex(index,
|
|
PARTICLE_PER_STRIP_COUNT);\r\n InitStripAttributes(index, attributes,
|
|
stripData);\r\n#endif\r\n\t\t\t\r\n\t\t\tGravity( /*inout */attributes.velocity,
|
|
Force_a, deltaTime_a);\n\t\t\t{\n\t\t\t Turbulence_18D(attributes.position,
|
|
/*inout */attributes.velocity, attributes.mass, InvFieldTransform_b, FieldTransform_b,
|
|
(float)1.15999997, (float)8, (float)1.5, (float)0.682196319, (float)2, (int)3,
|
|
deltaTime_a);\n\t\t\t}\n\t\t\t{\n\t\t\t Force_1( /*inout */attributes.velocity,
|
|
attributes.mass, Velocity_c, (float)1, deltaTime_a);\n\t\t\t}\n\t\t\tEulerIntegration(
|
|
/*inout */attributes.position, attributes.velocity, deltaTime_a);\n\t\t\tAngularEulerIntegration(
|
|
/*inout */attributes.angleX, attributes.angularVelocityX, /*inout */attributes.angleY,
|
|
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 * 0x8
|
|
+ 0x0) << 2,asuint(attributes.position));\n\t\t\t\tattributeBuffer.Store3((index
|
|
* 0x4 + 0x1E00) << 2,asuint(attributes.velocity));\n\t\t\t\tattributeBuffer.Store((index
|
|
* 0x8 + 0x3) << 2,asuint(attributes.angleX));\n\t\t\t\tattributeBuffer.Store((index
|
|
* 0x8 + 0x4) << 2,asuint(attributes.angleY));\n\t\t\t\tattributeBuffer.Store((index
|
|
* 0x8 + 0x5) << 2,asuint(attributes.angleZ));\n\t\t\t\tattributeBuffer.Store((index
|
|
* 0x8 + 0x7) << 2,asuint(attributes.age));\n\t\t\t\t\n\r\n#if VFX_HAS_INDIRECT_DRAW\r\n
|
|
uint indirectIndex = indirectBuffer.IncrementCounter();\r\n\t\t\t\tindirectBuffer[indirectIndex]
|
|
= index;\r\n#endif\r\n\r\n#if HAS_STRIPS\t\t\t\r\n\t\t\t\tuint relativeIndexInStrip
|
|
= GetRelativeIndex(index, stripData);\r\n\t\t\t\tInterlockedMin(STRIP_DATA(STRIP_MIN_ALIVE,
|
|
stripData.stripIndex), relativeIndexInStrip);\r\n\t\t\t\tInterlockedMax(STRIP_DATA(STRIP_MAX_ALIVE,
|
|
stripData.stripIndex), relativeIndexInStrip);\r\n#endif\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tattributeBuffer.Store((index
|
|
* 0x8 + 0x6) << 2,uint(attributes.alive));\n\t\t\t\t\n\r\n#if USE_DEAD_LIST
|
|
&& !VFX_USE_STRIPALIVE_CURRENT\r\n\t\t\t\tuint deadIndex = deadListOut.IncrementCounter();\r\n\t\t\t\tdeadListOut[deadIndex]
|
|
= index;\r\n#endif\r\n\t\t\t}\r\n\t\t}\r\n#if USE_DEAD_LIST && VFX_USE_STRIPALIVE_CURRENT\r\n
|
|
else if (attributes.stripAlive)\r\n {\r\n if (STRIP_DATA_X(attachedStripDataBuffer,
|
|
STRIP_MIN_ALIVE, index) == ~1) // Attached strip is no longer alive, recycle
|
|
the particle \r\n {\r\n uint deadIndex = deadListOut.IncrementCounter();\r\n\t\t\t\tdeadListOut[deadIndex]
|
|
= index;\r\n attributes.stripAlive = false;\r\n
|
|
\r\n } \r\n }\r\n#endif\r\n#else\r\n\t\tattributes.position
|
|
= asfloat(attributeBuffer.Load3((index * 0x8 + 0x0) << 2));\n\t\tattributes.velocity
|
|
= asfloat(attributeBuffer.Load3((index * 0x4 + 0x1E00) << 2));\n\t\tattributes.lifetime
|
|
= asfloat(attributeBuffer.Load((index * 0x1 + 0x2D00) << 2));\n\t\tattributes.angleX
|
|
= asfloat(attributeBuffer.Load((index * 0x8 + 0x3) << 2));\n\t\tattributes.angleY
|
|
= asfloat(attributeBuffer.Load((index * 0x8 + 0x4) << 2));\n\t\tattributes.angleZ
|
|
= asfloat(attributeBuffer.Load((index * 0x8 + 0x5) << 2));\n\t\tattributes.angularVelocityX
|
|
= asfloat(attributeBuffer.Load((index * 0x3 + 0x3480) << 2));\n\t\tattributes.angularVelocityY
|
|
= asfloat(attributeBuffer.Load((index * 0x3 + 0x3481) << 2));\n\t\tattributes.angularVelocityZ
|
|
= asfloat(attributeBuffer.Load((index * 0x3 + 0x3482) << 2));\n\t\tattributes.mass
|
|
= (float)1;\n\t\tattributes.alive = (attributeBuffer.Load((index * 0x8 + 0x6)
|
|
<< 2));\n\t\tattributes.age = asfloat(attributeBuffer.Load((index * 0x8 + 0x7)
|
|
<< 2));\n\t\t\n\r\n\t\t\r\n#if VFX_USE_OLDPOSITION_CURRENT\r\n\t\tattributes.oldPosition
|
|
= attributes.position;\r\n#endif\r\n#if HAS_STRIPS\r\n const StripData
|
|
stripData = GetStripDataFromParticleIndex(index, PARTICLE_PER_STRIP_COUNT);\r\n
|
|
InitStripAttributes(index, attributes, stripData);\r\n#endif\r\n\t\t\r\n\t\tGravity(
|
|
/*inout */attributes.velocity, Force_a, deltaTime_a);\n\t\t{\n\t\t Turbulence_18D(attributes.position,
|
|
/*inout */attributes.velocity, attributes.mass, InvFieldTransform_b, FieldTransform_b,
|
|
(float)1.15999997, (float)8, (float)1.5, (float)0.682196319, (float)2, (int)3,
|
|
deltaTime_a);\n\t\t}\n\t\t{\n\t\t Force_1( /*inout */attributes.velocity,
|
|
attributes.mass, Velocity_c, (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
|
|
* 0x8 + 0x0) << 2,asuint(attributes.position));\n\t\tattributeBuffer.Store3((index
|
|
* 0x4 + 0x1E00) << 2,asuint(attributes.velocity));\n\t\tattributeBuffer.Store((index
|
|
* 0x8 + 0x3) << 2,asuint(attributes.angleX));\n\t\tattributeBuffer.Store((index
|
|
* 0x8 + 0x4) << 2,asuint(attributes.angleY));\n\t\tattributeBuffer.Store((index
|
|
* 0x8 + 0x5) << 2,asuint(attributes.angleZ));\n\t\tattributeBuffer.Store((index
|
|
* 0x8 + 0x6) << 2,uint(attributes.alive));\n\t\tattributeBuffer.Store((index
|
|
* 0x8 + 0x7) << 2,asuint(attributes.age));\n\t\t\n\r\n#if VFX_HAS_INDIRECT_DRAW\r\n
|
|
uint indirectIndex = indirectBuffer.IncrementCounter();\r\n\t\tindirectBuffer[indirectIndex]
|
|
= index;\r\n#endif\r\n#endif\r\n\t}\r\n}\r\n"
|
|
- compute: 0
|
|
name: '[System 1]Output Particle Lit Mesh'
|
|
source: "Shader \"Hidden/VFX/WorldAmbient_Leaves/System 1/Output Particle Lit
|
|
Mesh\"\n{\r\n\tSubShader\r\n\t{\t\r\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
|
|
(0)\n\t\t#define VFX_PASSDEPTH_MOTION_VECTOR (1)\n\t\t#define VFX_PASSDEPTH_SELECTION
|
|
(2)\n\t\t#define VFX_USE_POSITION_CURRENT 1\n\t\t#define VFX_USE_LIFETIME_CURRENT
|
|
1\n\t\t#define VFX_USE_TEXINDEX_CURRENT 1\n\t\t#define VFX_USE_ANGLEX_CURRENT
|
|
1\n\t\t#define VFX_USE_ANGLEY_CURRENT 1\n\t\t#define VFX_USE_ANGLEZ_CURRENT
|
|
1\n\t\t#define VFX_USE_SIZE_CURRENT 1\n\t\t#define VFX_USE_ALPHA_CURRENT 1\n\t\t#define
|
|
VFX_USE_ALIVE_CURRENT 1\n\t\t#define VFX_USE_AXISX_CURRENT 1\n\t\t#define VFX_USE_AXISY_CURRENT
|
|
1\n\t\t#define VFX_USE_AXISZ_CURRENT 1\n\t\t#define VFX_USE_PIVOTX_CURRENT
|
|
1\n\t\t#define VFX_USE_PIVOTY_CURRENT 1\n\t\t#define VFX_USE_PIVOTZ_CURRENT
|
|
1\n\t\t#define VFX_USE_SCALEX_CURRENT 1\n\t\t#define VFX_USE_SCALEY_CURRENT
|
|
1\n\t\t#define VFX_USE_SCALEZ_CURRENT 1\n\t\t#define VFX_USE_AGE_CURRENT 1\n\t\t#define
|
|
VFX_USE_COLOR_CURRENT 1\n\t\t#define VFX_COLORMAPPING_DEFAULT 1\n\t\t#define
|
|
IS_OPAQUE_PARTICLE 1\n\t\t#define USE_ALPHA_TEST 1\n\t\t#define USE_MOTION_VECTORS_PASS
|
|
1\n\t\t#define VFX_HAS_INDIRECT_DRAW 1\n\t\t#define USE_FLIPBOOK 1\n\t\t#define
|
|
HDRP_LIT 1\n\t\t#define HDRP_MATERIAL_TYPE_TRANSLUCENT 1\n\t\t#define HDRP_USE_BASE_COLOR_MAP
|
|
1\n\t\t#define HDRP_USE_BASE_COLOR_MAP_COLOR 1\n\t\t#define HDRP_USE_BASE_COLOR_MAP_ALPHA
|
|
1\n\t\t#define HDRP_USE_MASK_MAP 1\n\t\t#define USE_NORMAL_MAP 1\n\t\t#define
|
|
HDRP_USE_BASE_COLOR 1\n\t\t#define USE_DOUBLE_SIDED 1\n\t\t#define IS_OPAQUE_NOT_SIMPLE_LIT_PARTICLE
|
|
1\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t#define
|
|
VFX_WORLD_SPACE 1\n\t\t#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\t\t\n\n\t\tCBUFFER_START(parameters)\n\t\t
|
|
float4 Scale_x_a;\n\t\t float4 Scale_y_a;\n\t\t float4 Scale_z_a;\n\t\t
|
|
float4 uniform_e;\n\t\t float4 Size_c;\n\t\t float3 uniform_f;\n\t\t
|
|
float currentFrameIndex;\n\t\tCBUFFER_END\n\t\t\n\t\tstruct Attributes\n\t\t{\n\t\t
|
|
float3 position;\n\t\t float lifetime;\n\t\t float texIndex;\n\t\t
|
|
float angleX;\n\t\t float angleY;\n\t\t float angleZ;\n\t\t float
|
|
size;\n\t\t float alpha;\n\t\t bool alive;\n\t\t float3 axisX;\n\t\t
|
|
float3 axisY;\n\t\t float3 axisZ;\n\t\t float pivotX;\n\t\t float
|
|
pivotY;\n\t\t float pivotZ;\n\t\t float scaleX;\n\t\t float scaleY;\n\t\t
|
|
float scaleZ;\n\t\t float age;\n\t\t float3 color;\n\t\t};\n\t\t\n\t\tstruct
|
|
SourceAttributes\n\t\t{\n\t\t};\n\t\t\n\t\tTexture2D baseColorMap;\n\t\tSamplerState
|
|
samplerbaseColorMap;\n\t\tfloat4 baseColorMap_TexelSize;\n\t\tTexture2D maskMap;\n\t\tSamplerState
|
|
samplermaskMap;\n\t\tfloat4 maskMap_TexelSize;\n\t\tTexture2D normalMap;\n\t\tSamplerState
|
|
samplernormalMap;\n\t\tfloat4 normalMap_TexelSize;\n\t\t\n\n\t\t\n\t\t#define
|
|
VFX_NEEDS_COLOR_INTERPOLATOR (VFX_USE_COLOR_CURRENT || VFX_USE_ALPHA_CURRENT)\n\t\t#if
|
|
HAS_STRIPS\n\t\t#define VFX_OPTIONAL_INTERPOLATION \n\t\t#else\n\t\t#define
|
|
VFX_OPTIONAL_INTERPOLATION nointerpolation\n\t\t#endif\n\t\t\n\t\tByteAddressBuffer
|
|
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\t#if HAS_STRIPS\n\t\tBuffer<uint> stripDataBuffer;\n\t\t#endif\n\t\t\n\t\t#if
|
|
WRITE_MOTION_VECTOR_IN_FORWARD || USE_MOTION_VECTORS_PASS\n\t\tByteAddressBuffer
|
|
elementToVFXBufferPrevious;\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\t// Helper macros
|
|
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
|
|
{ \"LightMode\"=\"SceneSelectionPass\" }\n\t\t\n\t\t\tZWrite On\n\t\t\tBlend
|
|
Off\n\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#define VFX_PASSDEPTH VFX_PASSDEPTH_SELECTION\n\t\t\t\n\t\t\t#pragma
|
|
target 4.5\n\t\t\t#define UNITY_MATERIAL_LIT\n\t\t\t#pragma multi_compile _
|
|
WRITE_NORMAL_BUFFER\n\t\t\t\n\t\t\tstruct ps_input\n\t\t\t{\t\t\n\t\t\t\tfloat4
|
|
pos : SV_POSITION;\n\t\t\t\tfloat2 uv : TEXCOORD0;\t\n\t\t\t #if VFX_SHADERGRAPH_HAS_UV1\n\t\t\t
|
|
float4 uv1 : COLOR2;\n\t\t\t #endif\n\t\t\t #if VFX_SHADERGRAPH_HAS_UV2\n\t\t\t
|
|
float4 uv2 : COLOR3;\n\t\t\t #endif\n\t\t\t #if VFX_SHADERGRAPH_HAS_UV3\n\t\t\t
|
|
float4 uv3 : COLOR4;\n\t\t\t #endif\n\t\t\t #if VFX_SHADERGRAPH_HAS_COLOR\n\t\t\t
|
|
float4 vertexColor : COLOR1;\n\t\t\t #endif\n\t\t\t\t#if USE_ALPHA_TEST
|
|
|| USE_FLIPBOOK_INTERPOLATION || VFX_USE_ALPHA_CURRENT\n\t\t\t\t// x: alpha
|
|
threshold\n\t\t\t\t// y: frame blending factor\n\t\t\t\t// z: alpha\n\t\t\t\t//
|
|
w: smoothness\n\t\t\t\tnointerpolation float4 builtInInterpolants : TEXCOORD1;\n\t\t\t\t#endif\n\t\t\t\t#if
|
|
USE_FLIPBOOK_MOTIONVECTORS\n\t\t\t\t// x: motion vector scale u\n\t\t\t\t//
|
|
y: motion vector scale v\n\t\t\t\tnointerpolation float2 builtInInterpolants2
|
|
: TEXCOORD3;\n\t\t\t\t#endif\n\t\t\t\t#if defined(WRITE_NORMAL_BUFFER) || SHADERGRAPH_NEEDS_NORMAL_DEPTHONLY\n\t\t\t\tfloat3
|
|
normal : TEXCOORD4;\n\t\t\t\t#if SHADERGRAPH_NEEDS_TANGENT_DEPTHONLY\n\t\t\t\tfloat4
|
|
tangent : TEXCOORD5;\n\t\t\t\t#endif\n\t\t\t\t#endif\n\t\t\t\t\n\t\t\t\t#if
|
|
VFX_PASSDEPTH == VFX_PASSDEPTH_MOTION_VECTOR\n\t\t\t\tfloat4 cPosPrevious :
|
|
TEXCOORD6;\n\t\t\t\tfloat4 cPosNonJiterred : TEXCOORD7;\n\t\t\t\t#endif\n\t\t\t
|
|
\n\t\t\t\t\n\t\t\t\tUNITY_VERTEX_OUTPUT_STEREO\n\t\t\t};\n\t\t\t\n\t\t\t#define
|
|
VFX_VARYING_PS_INPUTS ps_input\n\t\t\t#define VFX_VARYING_POSCS pos\n\t\t\t#define
|
|
VFX_VARYING_ALPHA builtInInterpolants.z\n\t\t\t#define VFX_VARYING_ALPHATHRESHOLD
|
|
builtInInterpolants.x\n\t\t\t#define VFX_VARYING_FRAMEBLEND builtInInterpolants.y\n\t\t\t#define
|
|
VFX_VARYING_MOTIONVECTORSCALE builtInInterpolants2.xy\n\t\t\t#define VFX_VARYING_UV
|
|
uv\n\t\t\t\n\t\t\t#if VFX_PASSDEPTH == VFX_PASSDEPTH_MOTION_VECTOR\n\t\t\t#define
|
|
VFX_VARYING_VELOCITY_CPOS cPosNonJiterred\n\t\t\t#define VFX_VARYING_VELOCITY_CPOS_PREVIOUS
|
|
cPosPrevious\n\t\t\t#endif\n\t\t\t\n\t\t\t#if defined(WRITE_NORMAL_BUFFER)
|
|
|| SHADERGRAPH_NEEDS_NORMAL_DEPTHONLY\n\t\t\t#define VFX_VARYING_NORMAL normal\n\t\t\t#endif\n\t\t\t#ifdef
|
|
WRITE_NORMAL_BUFFER\n\t\t\t#define VFX_VARYING_SMOOTHNESS builtInInterpolants.w\n\t\t\t#endif\n\t\t\t#if
|
|
SHADERGRAPH_NEEDS_TANGENT_DEPTHONLY\n\t\t\t#define VFX_VARYING_TANGENT tangent\n\t\t\t#endif\n\t\t\t\t\t\n\t\t\t\n\t\t\t\t\t\n\t\t\t#if
|
|
!(defined(VFX_VARYING_PS_INPUTS) && defined(VFX_VARYING_POSCS))\n\t\t\t#error
|
|
VFX_VARYING_PS_INPUTS, VFX_VARYING_POSCS and VFX_VARYING_UV must be defined.\n\t\t\t#endif\n\t\t\t\n\t\t\t#include
|
|
\"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXCommon.hlsl\"\n\t\t\t#include
|
|
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\t\t\t\n\n\t\t\tvoid
|
|
AttributeFromCurve_536B781C(inout float scaleX, inout float scaleY, inout float
|
|
scaleZ, float age, float lifetime, float4 Scale_x, float4 Scale_y, float4 Scale_z)
|
|
/*attribute:scale Composition:Overwrite AlphaComposition:Overwrite SampleMode:OverLife
|
|
Mode:PerComponent ColorMode:ColorAndAlpha channels:XYZ */\n\t\t\t{\n\t\t\t
|
|
float t = age / lifetime;\n\t\t\t float3 value = 0.0f;\n\t\t\t value[0]
|
|
= SampleCurve(Scale_x, t);\n\t\t\t value[1] = SampleCurve(Scale_y, t);\n\t\t\t
|
|
value[2] = SampleCurve(Scale_z, t);\n\t\t\t scaleX = value.x;\n\t\t\t
|
|
scaleY = value.y;\n\t\t\t scaleZ = value.z;\n\t\t\t}\n\t\t\tvoid SetAttribute_39EE3455(inout
|
|
float size, float Size) /*attribute:size Composition:Multiply Source:Slot Random:Off
|
|
channels:XYZ */\n\t\t\t{\n\t\t\t size *= Size;\n\t\t\t}\n\t\t\tvoid AttributeFromCurve_7DF18693(inout
|
|
float size, float age, float lifetime, float4 Size) /*attribute:size Composition:Multiply
|
|
AlphaComposition:Overwrite SampleMode:OverLife Mode:PerComponent ColorMode:ColorAndAlpha
|
|
channels:XYZ */\n\t\t\t{\n\t\t\t float t = age / lifetime;\n\t\t\t float
|
|
value = 0.0f;\n\t\t\t value = SampleCurve(Size, t);\n\t\t\t size *= value;\n\t\t\t}\n\t\t\t\n\n\t\t\t\n\t\t\tstruct
|
|
vs_input\n\t\t\t{\n\t\t\t\tfloat3 pos : POSITION;\n\t\t\t\tfloat2 uv : TEXCOORD0;\n\t\t\t
|
|
#if VFX_SHADERGRAPH_HAS_UV1\n\t\t\t float4 uv1 : TEXCOORD1;\n\t\t\t #endif\n\t\t\t
|
|
#if VFX_SHADERGRAPH_HAS_UV2\n\t\t\t float4 uv2 : TEXCOORD2;\n\t\t\t #endif\n\t\t\t
|
|
#if VFX_SHADERGRAPH_HAS_UV3\n\t\t\t float4 uv3 : TEXCOORD3;\n\t\t\t #endif\n\t\t\t
|
|
#if VFX_SHADERGRAPH_HAS_COLOR\n\t\t\t float4 vertexColor : COLOR;\n\t\t\t
|
|
#endif\n\t\t\t\tfloat3 normal : NORMAL;\n\t\t\t\t#if defined(VFX_VARYING_TANGENT)
|
|
|| SHADERGRAPH_HAS_NORMAL\n\t\t\t\tfloat4 tangent : TANGENT;\n\t\t\t\t#endif\n\t\t\t\tVFX_DECLARE_INSTANCE_ID\n\t\t\t};\n\t\t\t\n\t\t\t#pragma
|
|
vertex vert\n\t\t\tVFX_VARYING_PS_INPUTS vert(vs_input i)\n\t\t\t{\n\t\t\t
|
|
VFX_VARYING_PS_INPUTS o = (VFX_VARYING_PS_INPUTS)0;\n\t\t\t\n\t\t\t\tUNITY_SETUP_INSTANCE_ID(i);\n\t\t\t\tUNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);\n\t\t\t\n\t\t\t\tuint
|
|
index = VFX_GET_INSTANCE_ID(i);\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\tuint deadCount
|
|
= 0;\n\t\t\t\t\t\t#if USE_DEAD_LIST_COUNT\n\t\t\t\t\t\tdeadCount = deadListCount.Load(0);\n\t\t\t\t\t\t#endif\t\n\t\t\t\t\t\tif
|
|
(index >= asuint(nbMax) - deadCount)\n\t\t\t\t\t\t#if USE_GEOMETRY_SHADER\n\t\t\t\t\t\t\treturn;
|
|
// cull\n\t\t\t\t\t\t#else\n\t\t\t\t\t\t\treturn o; // cull\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\t\tAttributes
|
|
attributes = (Attributes)0;\n\t\t\t\t\t\tSourceAttributes sourceAttributes
|
|
= (SourceAttributes)0;\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\tattributes.position = asfloat(attributeBuffer.Load3((index
|
|
* 0x8 + 0x0) << 2));\n\t\t\t\t\t\tattributes.lifetime = asfloat(attributeBuffer.Load((index
|
|
* 0x1 + 0x2D00) << 2));\n\t\t\t\t\t\tattributes.texIndex = asfloat(attributeBuffer.Load((index
|
|
* 0x1 + 0x30C0) << 2));\n\t\t\t\t\t\tattributes.angleX = asfloat(attributeBuffer.Load((index
|
|
* 0x8 + 0x3) << 2));\n\t\t\t\t\t\tattributes.angleY = asfloat(attributeBuffer.Load((index
|
|
* 0x8 + 0x4) << 2));\n\t\t\t\t\t\tattributes.angleZ = asfloat(attributeBuffer.Load((index
|
|
* 0x8 + 0x5) << 2));\n\t\t\t\t\t\tattributes.size = asfloat(attributeBuffer.Load((index
|
|
* 0x4 + 0x3FC0) << 2));\n\t\t\t\t\t\tattributes.alpha = (float)1;\n\t\t\t\t\t\tattributes.alive
|
|
= (attributeBuffer.Load((index * 0x8 + 0x6) << 2));\n\t\t\t\t\t\tattributes.axisX
|
|
= float3(1, 0, 0);\n\t\t\t\t\t\tattributes.axisY = float3(0, 1, 0);\n\t\t\t\t\t\tattributes.axisZ
|
|
= float3(0, 0, 1);\n\t\t\t\t\t\tattributes.pivotX = (float)0;\n\t\t\t\t\t\tattributes.pivotY
|
|
= (float)0;\n\t\t\t\t\t\tattributes.pivotZ = (float)0;\n\t\t\t\t\t\tattributes.scaleX
|
|
= asfloat(attributeBuffer.Load((index * 0x4 + 0x3FC1) << 2));\n\t\t\t\t\t\tattributes.scaleY
|
|
= asfloat(attributeBuffer.Load((index * 0x4 + 0x3FC2) << 2));\n\t\t\t\t\t\tattributes.scaleZ
|
|
= asfloat(attributeBuffer.Load((index * 0x4 + 0x3FC3) << 2));\n\t\t\t\t\t\tattributes.age
|
|
= asfloat(attributeBuffer.Load((index * 0x8 + 0x7) << 2));\n\t\t\t\t\t\tattributes.color
|
|
= float3(1, 1, 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\tattributes.alive
|
|
= (attributeBuffer.Load((index * 0x8 + 0x6) << 2));\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t#if
|
|
!HAS_STRIPS\n\t\t\t\t\t\tif (!attributes.alive)\n\t\t\t\t\t\t\treturn o;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tattributes.position
|
|
= asfloat(attributeBuffer.Load3((index * 0x8 + 0x0) << 2));\n\t\t\t\t\t\tattributes.lifetime
|
|
= asfloat(attributeBuffer.Load((index * 0x1 + 0x2D00) << 2));\n\t\t\t\t\t\tattributes.texIndex
|
|
= asfloat(attributeBuffer.Load((index * 0x1 + 0x30C0) << 2));\n\t\t\t\t\t\tattributes.angleX
|
|
= asfloat(attributeBuffer.Load((index * 0x8 + 0x3) << 2));\n\t\t\t\t\t\tattributes.angleY
|
|
= asfloat(attributeBuffer.Load((index * 0x8 + 0x4) << 2));\n\t\t\t\t\t\tattributes.angleZ
|
|
= asfloat(attributeBuffer.Load((index * 0x8 + 0x5) << 2));\n\t\t\t\t\t\tattributes.size
|
|
= asfloat(attributeBuffer.Load((index * 0x4 + 0x3FC0) << 2));\n\t\t\t\t\t\tattributes.alpha
|
|
= (float)1;\n\t\t\t\t\t\tattributes.axisX = float3(1, 0, 0);\n\t\t\t\t\t\tattributes.axisY
|
|
= float3(0, 1, 0);\n\t\t\t\t\t\tattributes.axisZ = float3(0, 0, 1);\n\t\t\t\t\t\tattributes.pivotX
|
|
= (float)0;\n\t\t\t\t\t\tattributes.pivotY = (float)0;\n\t\t\t\t\t\tattributes.pivotZ
|
|
= (float)0;\n\t\t\t\t\t\tattributes.scaleX = asfloat(attributeBuffer.Load((index
|
|
* 0x4 + 0x3FC1) << 2));\n\t\t\t\t\t\tattributes.scaleY = asfloat(attributeBuffer.Load((index
|
|
* 0x4 + 0x3FC2) << 2));\n\t\t\t\t\t\tattributes.scaleZ = asfloat(attributeBuffer.Load((index
|
|
* 0x4 + 0x3FC3) << 2));\n\t\t\t\t\t\tattributes.age = asfloat(attributeBuffer.Load((index
|
|
* 0x8 + 0x7) << 2));\n\t\t\t\t\t\tattributes.color = float3(1, 1, 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\t\t\t//
|
|
Initialize built-in needed attributes\n\t\t\t\t\t\t#if HAS_STRIPS\n\t\t\t\t\t\tInitStripAttributes(index,
|
|
attributes, stripData);\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\tAttributeFromCurve_536B781C(
|
|
/*inout */attributes.scaleX, /*inout */attributes.scaleY, /*inout */attributes.scaleZ,
|
|
attributes.age, attributes.lifetime, Scale_x_a, Scale_y_a, Scale_z_a);\n\t\t\t\t{\n\t\t\t\t
|
|
float3 tmp_bl = attributes.position - uniform_f;\n\t\t\t\t float3 tmp_bm
|
|
= tmp_bl * tmp_bl;\n\t\t\t\t float tmp_bn = tmp_bm[2];\n\t\t\t\t float
|
|
tmp_bo = tmp_bm[1];\n\t\t\t\t float tmp_bp = tmp_bn + tmp_bo;\n\t\t\t\t
|
|
float tmp_bq = tmp_bm[0];\n\t\t\t\t float tmp_br = tmp_bp + tmp_bq;\n\t\t\t\t
|
|
float tmp_bt = pow(tmp_br, (float)0.5);\n\t\t\t\t float tmp_bu = SampleCurve(uniform_e,tmp_bt);\n\t\t\t\t
|
|
SetAttribute_39EE3455( /*inout */attributes.size, tmp_bu);\n\t\t\t\t}\n\t\t\t\tAttributeFromCurve_7DF18693(
|
|
/*inout */attributes.size, attributes.age, attributes.lifetime, Size_c);\n\t\t\t\t\n\n\t\t\t\t\t\t\n\t\t\t\tif
|
|
(!attributes.alive)\n\t\t\t\t\treturn o;\n\t\t\t\t\n\t\t\t\to.VFX_VARYING_UV.xy
|
|
= i.uv;\n\t\t\t \n\t\t\t #if VFX_SHADERGRAPH_HAS_UV1\n\t\t\t o.uv1
|
|
= i.uv1;\n\t\t\t #endif\n\t\t\t #if VFX_SHADERGRAPH_HAS_UV2\n\t\t\t
|
|
o.uv2 = i.uv2;\n\t\t\t #endif\n\t\t\t #if VFX_SHADERGRAPH_HAS_UV3\n\t\t\t
|
|
o.uv3 = i.uv3;\n\t\t\t #endif\n\t\t\t #if VFX_SHADERGRAPH_HAS_COLOR\n\t\t\t
|
|
o.vertexColor = i.vertexColor;\n\t\t\t #endif\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\tfloat3
|
|
size3 = float3(attributes.size,attributes.size,attributes.size);\n\t\t\t\t\t\t#if
|
|
VFX_USE_SCALEX_CURRENT\n\t\t\t\t\t\tsize3.x *= attributes.scaleX;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t#if
|
|
VFX_USE_SCALEY_CURRENT\n\t\t\t\t\t\tsize3.y *= attributes.scaleY;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t#if
|
|
VFX_USE_SCALEZ_CURRENT\n\t\t\t\t\t\tsize3.z *= attributes.scaleZ;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\tfloat3
|
|
inputVertexPosition = i.pos;\n\t\t\t\tfloat4x4 elementToVFX = GetElementToVFXMatrix(\n\t\t\t\t\tattributes.axisX,\n\t\t\t\t\tattributes.axisY,\n\t\t\t\t\tattributes.axisZ,\n\t\t\t\t\tfloat3(attributes.angleX,attributes.angleY,attributes.angleZ),\n\t\t\t\t\tfloat3(attributes.pivotX,attributes.pivotY,attributes.pivotZ),\n\t\t\t\t\tsize3,\n\t\t\t\t\tattributes.position);\n\t\t\t\t\t\n\t\t\t\tfloat3
|
|
vPos = mul(elementToVFX,float4(inputVertexPosition,1.0f)).xyz;\n\t\t\t\tfloat4
|
|
csPos = TransformPositionVFXToClip(vPos);\n\t\t\t\to.VFX_VARYING_POSCS = csPos;\n\t\t\t\t\n\t\t\t\tfloat3
|
|
normalWS = normalize(TransformDirectionVFXToWorld(mul((float3x3)elementToVFX,
|
|
i.normal)));\n\t\t\t\t#ifdef VFX_VARYING_NORMAL // TODO Should use inverse
|
|
transpose\n\t\t\t\to.VFX_VARYING_NORMAL = normalWS;\n\t\t\t\t#endif\n\t\t\t\t#ifdef
|
|
VFX_VARYING_TANGENT\n\t\t\t\to.VFX_VARYING_TANGENT = float4(normalize(TransformDirectionVFXToWorld(mul((float3x3)elementToVFX,i.tangent.xyz))),i.tangent.w);\n\t\t\t\t#endif\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t#if
|
|
defined(VFX_VARYING_VELOCITY_CPOS) && defined(VFX_VARYING_VELOCITY_CPOS_PREVIOUS)\n\t\t\t\t\t\tfloat4x4
|
|
previousElementToVFX = (float4x4)0;\n\t\t\t\t\t\tpreviousElementToVFX[3] =
|
|
float4(0,0,0,1);\n\t\t\t\t\t\t\n\t\t\t\t\t\tUNITY_UNROLL\n\t\t\t\t\t\tfor (int
|
|
itIndexMatrixRow = 0; itIndexMatrixRow < 3; ++itIndexMatrixRow)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tUNITY_UNROLL\n\t\t\t\t\t\t\tfor
|
|
(int itIndexMatrixCol = 0; itIndexMatrixCol < 4; ++itIndexMatrixCol)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tuint
|
|
itIndexMatrix = itIndexMatrixCol * 4 + itIndexMatrixRow;\n\t\t\t\t\t\t\t\tuint
|
|
read = elementToVFXBufferPrevious.Load((index * 16 + itIndexMatrix) << 2);\n\t\t\t\t\t\t\t\tpreviousElementToVFX[itIndexMatrixRow][itIndexMatrixCol]
|
|
= asfloat(read);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tuint
|
|
previousFrameIndex = elementToVFXBufferPrevious.Load((index * 16 + 15) << 2);\n\t\t\t\t\t\to.VFX_VARYING_VELOCITY_CPOS
|
|
= o.VFX_VARYING_VELOCITY_CPOS_PREVIOUS = float4(0.0f, 0.0f, 0.0f, 1.0f);\n\t\t\t\t\t\tif
|
|
(asuint(currentFrameIndex) - previousFrameIndex == 1u)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfloat3
|
|
oldvPos = mul(previousElementToVFX,float4(inputVertexPosition, 1.0f)).xyz;\n\t\t\t\t\t\t\to.VFX_VARYING_VELOCITY_CPOS_PREVIOUS
|
|
= TransformPositionVFXToPreviousClip(oldvPos);\n\t\t\t\t\t\t\to.VFX_VARYING_VELOCITY_CPOS
|
|
= TransformPositionVFXToNonJitteredClip(vPos);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t#if
|
|
VFX_USE_COLOR_CURRENT && defined(VFX_VARYING_COLOR)\n\t\t\t\t\t\to.VFX_VARYING_COLOR
|
|
= attributes.color;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t#if VFX_USE_ALPHA_CURRENT
|
|
&& defined(VFX_VARYING_ALPHA) \n\t\t\t\t\t\to.VFX_VARYING_ALPHA = attributes.alpha;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\t\t#ifdef
|
|
VFX_VARYING_EXPOSUREWEIGHT\n\t\t\t\t\t\t\n\t\t\t\t\t\to.VFX_VARYING_EXPOSUREWEIGHT
|
|
= exposureWeight;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\t\t#if USE_SOFT_PARTICLE
|
|
&& defined(VFX_VARYING_INVSOFTPARTICLEFADEDISTANCE)\n\t\t\t\t\t\t\n\t\t\t\t\t\to.VFX_VARYING_INVSOFTPARTICLEFADEDISTANCE
|
|
= invSoftParticlesFadeDistance;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\t\t#if
|
|
(USE_ALPHA_TEST || WRITE_MOTION_VECTOR_IN_FORWARD) && (!VFX_SHADERGRAPH ||
|
|
!HAS_SHADERGRAPH_PARAM_ALPHATHRESHOLD) && defined(VFX_VARYING_ALPHATHRESHOLD)\n\t\t\t\t\t\tfloat
|
|
alphaThreshold = (float)0;\n\t\t\t\t\t\t{\n\t\t\t\t\t\t \n\t\t\t\t\t\t
|
|
alphaThreshold = (float)0.200000003;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\to.VFX_VARYING_ALPHATHRESHOLD
|
|
= alphaThreshold;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\t\t#if USE_UV_SCALE_BIAS\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t#if
|
|
defined (VFX_VARYING_UV)\n\t\t\t\t\t\to.VFX_VARYING_UV.xy = o.VFX_VARYING_UV.xy
|
|
* uvScale + uvBias;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\t\t#if
|
|
defined(VFX_VARYING_POSWS)\n\t\t\t\t\t\to.VFX_VARYING_POSWS = TransformPositionVFXToWorld(vPos);\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t#if
|
|
USE_FLIPBOOK && defined(VFX_VARYING_UV)\n\t\t\t\t\t\tfloat2 flipBookSize =
|
|
(float2)0;\n\t\t\t\t\t\t{\n\t\t\t\t\t\t \n\t\t\t\t\t\t flipBookSize =
|
|
float2(4, 4);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\tfloat2 invFlipBookSize
|
|
= (float2)0;\n\t\t\t\t\t\t{\n\t\t\t\t\t\t \n\t\t\t\t\t\t invFlipBookSize
|
|
= float2(0.25, 0.25);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\tVFXUVData
|
|
uvData = GetUVData(flipBookSize, invFlipBookSize, o.VFX_VARYING_UV.xy, attributes.texIndex);\n\t\t\t\t\t\to.VFX_VARYING_UV.xy
|
|
= uvData.uvs.xy;\n\t\t\t\t\t\t#if USE_FLIPBOOK_INTERPOLATION && defined(VFX_VARYING_UV)
|
|
&& defined (VFX_VARYING_FRAMEBLEND)\n\t\t\t\t\t\to.VFX_VARYING_UV.zw = uvData.uvs.zw;\n\t\t\t\t\t\to.VFX_VARYING_FRAMEBLEND
|
|
= uvData.blend;\n\t\t\t\t\t\t#if USE_FLIPBOOK_MOTIONVECTORS && defined(VFX_VARYING_MOTIONVECTORSCALE)\n\t\t\t\t\t\t\n\t\t\t\t\t\to.VFX_VARYING_MOTIONVECTORSCALE
|
|
= motionVectorScale * invFlipBookSize;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t
|
|
\n\t\t\t \n\t\t\t\t\n\t\t\t\treturn o;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t#include
|
|
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommonOutput.hlsl\"\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t#if
|
|
VFX_PASSDEPTH == VFX_PASSDEPTH_MOTION_VECTOR\n\t\t\t#define SHADERPASS SHADERPASS_MOTION_VECTORS\n\t\t\t#else\n\t\t\t#define
|
|
SHADERPASS SHADERPASS_DEPTH_ONLY\n\t\t\t#endif\n\t\t\t#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXLit.hlsl\"\n\t\t\t\n\t\t\t#ifndef
|
|
VFX_SHADERGRAPH\n\t\t\t\n\t\t\tvoid VFXGetHDRPLitData(out SurfaceData surfaceData,
|
|
out BuiltinData builtinData, out BSDFData bsdfData, out PreLightData preLightData,
|
|
VFX_VARYING_PS_INPUTS i, float3 normalWS, const VFXUVData uvData, uint2 tileIndex)\n\t\t\t{\t\n\t\t\t\t#if
|
|
HDRP_MATERIAL_TYPE_TRANSLUCENT\n\t\t\t\tuint diffusionProfileHash = (uint)0;\n\t\t\t\t{\n\t\t\t\t
|
|
\n\t\t\t\t diffusionProfileHash = (uint)1080328534;\n\t\t\t\t}\n\t\t\t\t\n
|
|
// Loads diffusion profile\n\t\t\t\t#else\n\t\t\t\tconst uint diffusionProfileHash
|
|
= 0;\n\t\t\t\t#endif\n\t\t\t\t\n\t\t\t\tfloat3 posRWS = VFXGetPositionRWS(i);\n\t\t\t\tfloat4
|
|
posSS = i.VFX_VARYING_POSCS;\n\t\t\t\tPositionInputs posInput = GetPositionInput(posSS.xy,
|
|
_ScreenSize.zw, posSS.z, posSS.w, posRWS, tileIndex);\n\t\t\t\t\n\t\t\t\tfloat
|
|
alpha;\n\t\t\t\tsurfaceData = VFXGetSurfaceData(i,normalWS,uvData,diffusionProfileHash,alpha);\t\n\t\t\t\tbsdfData
|
|
= ConvertSurfaceDataToBSDFData(posSS.xy, surfaceData);\n\t\t\t\n\t\t\t\tpreLightData
|
|
= GetPreLightData(GetWorldSpaceNormalizeViewDir(posRWS),posInput,bsdfData);\n\t\t\t\t\n\t\t\t\tpreLightData.diffuseFGD
|
|
= 1.0f;\n\t\t\t //TODO: investigate why this is needed\n\t\t\t preLightData.coatPartLambdaV
|
|
= 0;\n\t\t\t preLightData.coatIblR = 0;\n\t\t\t preLightData.coatIblF
|
|
= 0;\n\t\t\t \n\t\t\t\tbuiltinData = VFXGetBuiltinData(i,posInput,surfaceData,uvData,alpha);\n\t\t\t}\n\t\t\t\n\t\t\tvoid
|
|
VFXGetHDRPLitData(out SurfaceData surfaceData, out BuiltinData builtinData,
|
|
VFX_VARYING_PS_INPUTS i, float3 normalWS, const VFXUVData uvData)\n\t\t\t{\n\t\t\t\tBSDFData
|
|
bsdfData = (BSDFData)0;\n\t\t\t\tPreLightData preLightData = (PreLightData)0;\n\t\t\t\tpreLightData.diffuseFGD
|
|
= 1.0f;\n\t\t\t\tVFXGetHDRPLitData(surfaceData,builtinData,bsdfData,preLightData,i,normalWS,uvData,uint2(0,0));\n\t\t\t}\n\t\t\t\n\t\t\t#endif\n\t\t\t\n\t\t\t\n\t\t\t#include
|
|
\"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXLitPixelOutput.hlsl\"\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t#if
|
|
VFX_PASSDEPTH == VFX_PASSDEPTH_SELECTION\n\t\t\tint _ObjectId;\n\t\t\tint _PassValue;\n\t\t\t#endif\n\t\t\t\n\t\t\t#pragma
|
|
fragment frag\n\t\t\tvoid frag(ps_input i\n\t\t\t#if USE_DOUBLE_SIDED\n\t\t\t\t,
|
|
bool frontFace : SV_IsFrontFace\n\t\t\t#endif\n\t\t\t\n\t\t\t#if VFX_PASSDEPTH
|
|
== VFX_PASSDEPTH_MOTION_VECTOR\n\t\t\t\t, out float4 outMotionVector : SV_Target0\n\t\t\t\t#ifdef
|
|
WRITE_NORMAL_BUFFER\n\t\t\t\t\t, out float4 outNormalBuffer : SV_Target1\n\t\t\t\t#endif\n\t\t\t#else\n\t\t\t\t#ifdef
|
|
WRITE_NORMAL_BUFFER\n\t\t\t\t\t, out float4 outNormalBuffer : SV_Target0\n\t\t\t\t#elif
|
|
VFX_PASSDEPTH == VFX_PASSDEPTH_SELECTION\n\t\t\t\t\t, out float4 outColor :
|
|
SV_Target0\n\t\t\t\t#endif\n\t\t\t#endif\n\t\t\t\t)\n\t\t\t{\n\t\t\t\tUNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i);\n\t\t\t\tVFXTransformPSInputs(i);\n\t\t\t\t\n\t\t\t\t\t\t\t#ifdef
|
|
VFX_VARYING_NORMAL\n\t\t\t\t\t\t\t#if USE_DOUBLE_SIDED\n\t\t\t\t\t\t\tconst
|
|
float faceMul = frontFace ? 1.0f : -1.0f;\n\t\t\t\t\t\t\t#else\n\t\t\t\t\t\t\tconst
|
|
float faceMul = 1.0f;\n\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfloat3
|
|
normalWS = normalize(i.VFX_VARYING_NORMAL * faceMul);\n\t\t\t\t\t\t\tconst
|
|
VFXUVData uvData = GetUVData(i);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t#ifdef VFX_VARYING_TANGENT\n\t\t\t\t\t\t\tfloat3
|
|
tangentWS = normalize(i.VFX_VARYING_TANGENT.xyz);\n\t\t\t\t\t\t\tfloat3 bitangentWS
|
|
= cross(normalWS,tangentWS) * (i.VFX_VARYING_TANGENT.w * faceMul);\n\t\t\t\t\t\t\tfloat3x3
|
|
tbn = float3x3(tangentWS,bitangentWS,normalWS);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t#if
|
|
USE_NORMAL_MAP\n\t\t\t\t\t\t\tfloat3 n = SampleNormalMap(VFX_SAMPLER(normalMap),uvData);\n\t\t\t\t\t\t\tfloat
|
|
normalScale = 1.0f;\n\t\t\t\t\t\t\t#ifdef VFX_VARYING_NORMALSCALE\n\t\t\t\t\t\t\tnormalScale
|
|
= i.VFX_VARYING_NORMALSCALE;\n\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\tnormalWS
|
|
= normalize(lerp(normalWS,mul(n,tbn),normalScale));\n\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t#ifdef
|
|
VFX_SHADERGRAPH\n\t\t\t \n\t\t\t \n\t\t\t\t\n\t\t\t float
|
|
alpha = OUTSG.;\n\t\t\t #else\n\t\t\t\tfloat alpha = VFXGetFragmentColor(i).a;\n\t\t\t\t#if
|
|
HDRP_USE_BASE_COLOR_MAP_ALPHA\n\t\t\t\t\talpha *= VFXGetTextureColor(VFX_SAMPLER(baseColorMap),i).a;\n\t\t\t\t#endif\n\t\t\t
|
|
#endif\n\t\t\t\tVFXClipFragmentColor(alpha,i);\n\t\t\t\t\n\t\t\t\t#ifdef WRITE_NORMAL_BUFFER\n\t\t\t
|
|
#ifndef VFX_SHADERGRAPH\n\t\t\t VFXComputePixelOutputToNormalBuffer(i,normalWS,uvData,outNormalBuffer);\n\t\t\t
|
|
#else\n\t\t\t #if HAS_SHADERGRAPH_PARAM_NORMAL\n\t\t\t
|
|
float3 n = OUTSG.Normal_8;\n\t\t\t normalWS = mul(n,tbn);\n\t\t\t
|
|
#endif\n\t\t\t SurfaceData surface = (SurfaceData)0;\n\t\t\t
|
|
\n\t\t\t surface.normalWS = normalWS;\n\t\t\t \n\t\t\t
|
|
EncodeIntoNormalBuffer(ConvertSurfaceDataToNormalData(surface), i.VFX_VARYING_POSCS.xy,
|
|
outNormalBuffer);\n\t\t\t #endif\n\t\t\t\t#endif\n\t\t\t\n\t\t\t\t#if
|
|
VFX_PASSDEPTH == VFX_PASSDEPTH_MOTION_VECTOR\n\t\t\t\t\t\n\t\t\t\t\t\t\tfloat2
|
|
velocity = (i.VFX_VARYING_VELOCITY_CPOS.xy/i.VFX_VARYING_VELOCITY_CPOS.w) -
|
|
(i.VFX_VARYING_VELOCITY_CPOS_PREVIOUS.xy/i.VFX_VARYING_VELOCITY_CPOS_PREVIOUS.w);\n\t\t\t\t\t\t\t#if
|
|
UNITY_UV_STARTS_AT_TOP\n\t\t\t\t\t\t\t\tvelocity.y = -velocity.y;\n\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\tfloat4
|
|
encodedMotionVector = 0.0f;\n\t\t\t\t\t\t\tVFXEncodeMotionVector(velocity *
|
|
0.5f, encodedMotionVector);\n\t\t\t\t\t\t\t\n\t\t\t\t\toutMotionVector = encodedMotionVector;\n\t\t\t\t#elif
|
|
VFX_PASSDEPTH == VFX_PASSDEPTH_SELECTION\n\t\t\t\t\t// We use depth prepass
|
|
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
|
|
{ \"LightMode\"=\"DepthOnly\" }\n\t\t\n\t\t\tZWrite On\n\t\t\tBlend Off\n\t\t\t\n\t\t\tHLSLPROGRAM\n\t\t\t#define
|
|
VFX_PASSDEPTH VFX_PASSDEPTH_ACTUAL\n\t\t\t\n\t\t\t#pragma target 4.5\n\t\t\t#define
|
|
UNITY_MATERIAL_LIT\n\t\t\t#pragma multi_compile _ WRITE_NORMAL_BUFFER\n\t\t\t\n\t\t\tstruct
|
|
ps_input\n\t\t\t{\t\t\n\t\t\t\tfloat4 pos : SV_POSITION;\n\t\t\t\tfloat2 uv
|
|
: TEXCOORD0;\t\n\t\t\t #if VFX_SHADERGRAPH_HAS_UV1\n\t\t\t float4 uv1
|
|
: COLOR2;\n\t\t\t #endif\n\t\t\t #if VFX_SHADERGRAPH_HAS_UV2\n\t\t\t
|
|
float4 uv2 : COLOR3;\n\t\t\t #endif\n\t\t\t #if VFX_SHADERGRAPH_HAS_UV3\n\t\t\t
|
|
float4 uv3 : COLOR4;\n\t\t\t #endif\n\t\t\t #if VFX_SHADERGRAPH_HAS_COLOR\n\t\t\t
|
|
float4 vertexColor : COLOR1;\n\t\t\t #endif\n\t\t\t\t#if USE_ALPHA_TEST
|
|
|| USE_FLIPBOOK_INTERPOLATION || VFX_USE_ALPHA_CURRENT\n\t\t\t\t// x: alpha
|
|
threshold\n\t\t\t\t// y: frame blending factor\n\t\t\t\t// z: alpha\n\t\t\t\t//
|
|
w: smoothness\n\t\t\t\tnointerpolation float4 builtInInterpolants : TEXCOORD1;\n\t\t\t\t#endif\n\t\t\t\t#if
|
|
USE_FLIPBOOK_MOTIONVECTORS\n\t\t\t\t// x: motion vector scale u\n\t\t\t\t//
|
|
y: motion vector scale v\n\t\t\t\tnointerpolation float2 builtInInterpolants2
|
|
: TEXCOORD3;\n\t\t\t\t#endif\n\t\t\t\t#if defined(WRITE_NORMAL_BUFFER) || SHADERGRAPH_NEEDS_NORMAL_DEPTHONLY\n\t\t\t\tfloat3
|
|
normal : TEXCOORD4;\n\t\t\t\t#if SHADERGRAPH_NEEDS_TANGENT_DEPTHONLY\n\t\t\t\tfloat4
|
|
tangent : TEXCOORD5;\n\t\t\t\t#endif\n\t\t\t\t#endif\n\t\t\t\t\n\t\t\t\t#if
|
|
VFX_PASSDEPTH == VFX_PASSDEPTH_MOTION_VECTOR\n\t\t\t\tfloat4 cPosPrevious :
|
|
TEXCOORD6;\n\t\t\t\tfloat4 cPosNonJiterred : TEXCOORD7;\n\t\t\t\t#endif\n\t\t\t
|
|
\n\t\t\t\t\n\t\t\t\tUNITY_VERTEX_OUTPUT_STEREO\n\t\t\t};\n\t\t\t\n\t\t\t#define
|
|
VFX_VARYING_PS_INPUTS ps_input\n\t\t\t#define VFX_VARYING_POSCS pos\n\t\t\t#define
|
|
VFX_VARYING_ALPHA builtInInterpolants.z\n\t\t\t#define VFX_VARYING_ALPHATHRESHOLD
|
|
builtInInterpolants.x\n\t\t\t#define VFX_VARYING_FRAMEBLEND builtInInterpolants.y\n\t\t\t#define
|
|
VFX_VARYING_MOTIONVECTORSCALE builtInInterpolants2.xy\n\t\t\t#define VFX_VARYING_UV
|
|
uv\n\t\t\t\n\t\t\t#if VFX_PASSDEPTH == VFX_PASSDEPTH_MOTION_VECTOR\n\t\t\t#define
|
|
VFX_VARYING_VELOCITY_CPOS cPosNonJiterred\n\t\t\t#define VFX_VARYING_VELOCITY_CPOS_PREVIOUS
|
|
cPosPrevious\n\t\t\t#endif\n\t\t\t\n\t\t\t#if defined(WRITE_NORMAL_BUFFER)
|
|
|| SHADERGRAPH_NEEDS_NORMAL_DEPTHONLY\n\t\t\t#define VFX_VARYING_NORMAL normal\n\t\t\t#endif\n\t\t\t#ifdef
|
|
WRITE_NORMAL_BUFFER\n\t\t\t#define VFX_VARYING_SMOOTHNESS builtInInterpolants.w\n\t\t\t#endif\n\t\t\t#if
|
|
SHADERGRAPH_NEEDS_TANGENT_DEPTHONLY\n\t\t\t#define VFX_VARYING_TANGENT tangent\n\t\t\t#endif\n\t\t\t\t\t\n\t\t\t\n\t\t\t\t\t\n\t\t\t#if
|
|
!(defined(VFX_VARYING_PS_INPUTS) && defined(VFX_VARYING_POSCS))\n\t\t\t#error
|
|
VFX_VARYING_PS_INPUTS, VFX_VARYING_POSCS and VFX_VARYING_UV must be defined.\n\t\t\t#endif\n\t\t\t\n\t\t\t#include
|
|
\"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXCommon.hlsl\"\n\t\t\t#include
|
|
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\t\t\t\n\n\t\t\tvoid
|
|
AttributeFromCurve_536B781C(inout float scaleX, inout float scaleY, inout float
|
|
scaleZ, float age, float lifetime, float4 Scale_x, float4 Scale_y, float4 Scale_z)
|
|
/*attribute:scale Composition:Overwrite AlphaComposition:Overwrite SampleMode:OverLife
|
|
Mode:PerComponent ColorMode:ColorAndAlpha channels:XYZ */\n\t\t\t{\n\t\t\t
|
|
float t = age / lifetime;\n\t\t\t float3 value = 0.0f;\n\t\t\t value[0]
|
|
= SampleCurve(Scale_x, t);\n\t\t\t value[1] = SampleCurve(Scale_y, t);\n\t\t\t
|
|
value[2] = SampleCurve(Scale_z, t);\n\t\t\t scaleX = value.x;\n\t\t\t
|
|
scaleY = value.y;\n\t\t\t scaleZ = value.z;\n\t\t\t}\n\t\t\tvoid SetAttribute_39EE3455(inout
|
|
float size, float Size) /*attribute:size Composition:Multiply Source:Slot Random:Off
|
|
channels:XYZ */\n\t\t\t{\n\t\t\t size *= Size;\n\t\t\t}\n\t\t\tvoid AttributeFromCurve_7DF18693(inout
|
|
float size, float age, float lifetime, float4 Size) /*attribute:size Composition:Multiply
|
|
AlphaComposition:Overwrite SampleMode:OverLife Mode:PerComponent ColorMode:ColorAndAlpha
|
|
channels:XYZ */\n\t\t\t{\n\t\t\t float t = age / lifetime;\n\t\t\t float
|
|
value = 0.0f;\n\t\t\t value = SampleCurve(Size, t);\n\t\t\t size *= value;\n\t\t\t}\n\t\t\t\n\n\t\t\t\n\t\t\tstruct
|
|
vs_input\n\t\t\t{\n\t\t\t\tfloat3 pos : POSITION;\n\t\t\t\tfloat2 uv : TEXCOORD0;\n\t\t\t
|
|
#if VFX_SHADERGRAPH_HAS_UV1\n\t\t\t float4 uv1 : TEXCOORD1;\n\t\t\t #endif\n\t\t\t
|
|
#if VFX_SHADERGRAPH_HAS_UV2\n\t\t\t float4 uv2 : TEXCOORD2;\n\t\t\t #endif\n\t\t\t
|
|
#if VFX_SHADERGRAPH_HAS_UV3\n\t\t\t float4 uv3 : TEXCOORD3;\n\t\t\t #endif\n\t\t\t
|
|
#if VFX_SHADERGRAPH_HAS_COLOR\n\t\t\t float4 vertexColor : COLOR;\n\t\t\t
|
|
#endif\n\t\t\t\tfloat3 normal : NORMAL;\n\t\t\t\t#if defined(VFX_VARYING_TANGENT)
|
|
|| SHADERGRAPH_HAS_NORMAL\n\t\t\t\tfloat4 tangent : TANGENT;\n\t\t\t\t#endif\n\t\t\t\tVFX_DECLARE_INSTANCE_ID\n\t\t\t};\n\t\t\t\n\t\t\t#pragma
|
|
vertex vert\n\t\t\tVFX_VARYING_PS_INPUTS vert(vs_input i)\n\t\t\t{\n\t\t\t
|
|
VFX_VARYING_PS_INPUTS o = (VFX_VARYING_PS_INPUTS)0;\n\t\t\t\n\t\t\t\tUNITY_SETUP_INSTANCE_ID(i);\n\t\t\t\tUNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);\n\t\t\t\n\t\t\t\tuint
|
|
index = VFX_GET_INSTANCE_ID(i);\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\tuint deadCount
|
|
= 0;\n\t\t\t\t\t\t#if USE_DEAD_LIST_COUNT\n\t\t\t\t\t\tdeadCount = deadListCount.Load(0);\n\t\t\t\t\t\t#endif\t\n\t\t\t\t\t\tif
|
|
(index >= asuint(nbMax) - deadCount)\n\t\t\t\t\t\t#if USE_GEOMETRY_SHADER\n\t\t\t\t\t\t\treturn;
|
|
// cull\n\t\t\t\t\t\t#else\n\t\t\t\t\t\t\treturn o; // cull\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\t\tAttributes
|
|
attributes = (Attributes)0;\n\t\t\t\t\t\tSourceAttributes sourceAttributes
|
|
= (SourceAttributes)0;\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\tattributes.position = asfloat(attributeBuffer.Load3((index
|
|
* 0x8 + 0x0) << 2));\n\t\t\t\t\t\tattributes.lifetime = asfloat(attributeBuffer.Load((index
|
|
* 0x1 + 0x2D00) << 2));\n\t\t\t\t\t\tattributes.texIndex = asfloat(attributeBuffer.Load((index
|
|
* 0x1 + 0x30C0) << 2));\n\t\t\t\t\t\tattributes.angleX = asfloat(attributeBuffer.Load((index
|
|
* 0x8 + 0x3) << 2));\n\t\t\t\t\t\tattributes.angleY = asfloat(attributeBuffer.Load((index
|
|
* 0x8 + 0x4) << 2));\n\t\t\t\t\t\tattributes.angleZ = asfloat(attributeBuffer.Load((index
|
|
* 0x8 + 0x5) << 2));\n\t\t\t\t\t\tattributes.size = asfloat(attributeBuffer.Load((index
|
|
* 0x4 + 0x3FC0) << 2));\n\t\t\t\t\t\tattributes.alpha = (float)1;\n\t\t\t\t\t\tattributes.alive
|
|
= (attributeBuffer.Load((index * 0x8 + 0x6) << 2));\n\t\t\t\t\t\tattributes.axisX
|
|
= float3(1, 0, 0);\n\t\t\t\t\t\tattributes.axisY = float3(0, 1, 0);\n\t\t\t\t\t\tattributes.axisZ
|
|
= float3(0, 0, 1);\n\t\t\t\t\t\tattributes.pivotX = (float)0;\n\t\t\t\t\t\tattributes.pivotY
|
|
= (float)0;\n\t\t\t\t\t\tattributes.pivotZ = (float)0;\n\t\t\t\t\t\tattributes.scaleX
|
|
= asfloat(attributeBuffer.Load((index * 0x4 + 0x3FC1) << 2));\n\t\t\t\t\t\tattributes.scaleY
|
|
= asfloat(attributeBuffer.Load((index * 0x4 + 0x3FC2) << 2));\n\t\t\t\t\t\tattributes.scaleZ
|
|
= asfloat(attributeBuffer.Load((index * 0x4 + 0x3FC3) << 2));\n\t\t\t\t\t\tattributes.age
|
|
= asfloat(attributeBuffer.Load((index * 0x8 + 0x7) << 2));\n\t\t\t\t\t\tattributes.color
|
|
= float3(1, 1, 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\tattributes.alive
|
|
= (attributeBuffer.Load((index * 0x8 + 0x6) << 2));\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t#if
|
|
!HAS_STRIPS\n\t\t\t\t\t\tif (!attributes.alive)\n\t\t\t\t\t\t\treturn o;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tattributes.position
|
|
= asfloat(attributeBuffer.Load3((index * 0x8 + 0x0) << 2));\n\t\t\t\t\t\tattributes.lifetime
|
|
= asfloat(attributeBuffer.Load((index * 0x1 + 0x2D00) << 2));\n\t\t\t\t\t\tattributes.texIndex
|
|
= asfloat(attributeBuffer.Load((index * 0x1 + 0x30C0) << 2));\n\t\t\t\t\t\tattributes.angleX
|
|
= asfloat(attributeBuffer.Load((index * 0x8 + 0x3) << 2));\n\t\t\t\t\t\tattributes.angleY
|
|
= asfloat(attributeBuffer.Load((index * 0x8 + 0x4) << 2));\n\t\t\t\t\t\tattributes.angleZ
|
|
= asfloat(attributeBuffer.Load((index * 0x8 + 0x5) << 2));\n\t\t\t\t\t\tattributes.size
|
|
= asfloat(attributeBuffer.Load((index * 0x4 + 0x3FC0) << 2));\n\t\t\t\t\t\tattributes.alpha
|
|
= (float)1;\n\t\t\t\t\t\tattributes.axisX = float3(1, 0, 0);\n\t\t\t\t\t\tattributes.axisY
|
|
= float3(0, 1, 0);\n\t\t\t\t\t\tattributes.axisZ = float3(0, 0, 1);\n\t\t\t\t\t\tattributes.pivotX
|
|
= (float)0;\n\t\t\t\t\t\tattributes.pivotY = (float)0;\n\t\t\t\t\t\tattributes.pivotZ
|
|
= (float)0;\n\t\t\t\t\t\tattributes.scaleX = asfloat(attributeBuffer.Load((index
|
|
* 0x4 + 0x3FC1) << 2));\n\t\t\t\t\t\tattributes.scaleY = asfloat(attributeBuffer.Load((index
|
|
* 0x4 + 0x3FC2) << 2));\n\t\t\t\t\t\tattributes.scaleZ = asfloat(attributeBuffer.Load((index
|
|
* 0x4 + 0x3FC3) << 2));\n\t\t\t\t\t\tattributes.age = asfloat(attributeBuffer.Load((index
|
|
* 0x8 + 0x7) << 2));\n\t\t\t\t\t\tattributes.color = float3(1, 1, 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\t\t\t//
|
|
Initialize built-in needed attributes\n\t\t\t\t\t\t#if HAS_STRIPS\n\t\t\t\t\t\tInitStripAttributes(index,
|
|
attributes, stripData);\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\tAttributeFromCurve_536B781C(
|
|
/*inout */attributes.scaleX, /*inout */attributes.scaleY, /*inout */attributes.scaleZ,
|
|
attributes.age, attributes.lifetime, Scale_x_a, Scale_y_a, Scale_z_a);\n\t\t\t\t{\n\t\t\t\t
|
|
float3 tmp_bl = attributes.position - uniform_f;\n\t\t\t\t float3 tmp_bm
|
|
= tmp_bl * tmp_bl;\n\t\t\t\t float tmp_bn = tmp_bm[2];\n\t\t\t\t float
|
|
tmp_bo = tmp_bm[1];\n\t\t\t\t float tmp_bp = tmp_bn + tmp_bo;\n\t\t\t\t
|
|
float tmp_bq = tmp_bm[0];\n\t\t\t\t float tmp_br = tmp_bp + tmp_bq;\n\t\t\t\t
|
|
float tmp_bt = pow(tmp_br, (float)0.5);\n\t\t\t\t float tmp_bu = SampleCurve(uniform_e,tmp_bt);\n\t\t\t\t
|
|
SetAttribute_39EE3455( /*inout */attributes.size, tmp_bu);\n\t\t\t\t}\n\t\t\t\tAttributeFromCurve_7DF18693(
|
|
/*inout */attributes.size, attributes.age, attributes.lifetime, Size_c);\n\t\t\t\t\n\n\t\t\t\t\t\t\n\t\t\t\tif
|
|
(!attributes.alive)\n\t\t\t\t\treturn o;\n\t\t\t\t\n\t\t\t\to.VFX_VARYING_UV.xy
|
|
= i.uv;\n\t\t\t \n\t\t\t #if VFX_SHADERGRAPH_HAS_UV1\n\t\t\t o.uv1
|
|
= i.uv1;\n\t\t\t #endif\n\t\t\t #if VFX_SHADERGRAPH_HAS_UV2\n\t\t\t
|
|
o.uv2 = i.uv2;\n\t\t\t #endif\n\t\t\t #if VFX_SHADERGRAPH_HAS_UV3\n\t\t\t
|
|
o.uv3 = i.uv3;\n\t\t\t #endif\n\t\t\t #if VFX_SHADERGRAPH_HAS_COLOR\n\t\t\t
|
|
o.vertexColor = i.vertexColor;\n\t\t\t #endif\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\tfloat3
|
|
size3 = float3(attributes.size,attributes.size,attributes.size);\n\t\t\t\t\t\t#if
|
|
VFX_USE_SCALEX_CURRENT\n\t\t\t\t\t\tsize3.x *= attributes.scaleX;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t#if
|
|
VFX_USE_SCALEY_CURRENT\n\t\t\t\t\t\tsize3.y *= attributes.scaleY;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t#if
|
|
VFX_USE_SCALEZ_CURRENT\n\t\t\t\t\t\tsize3.z *= attributes.scaleZ;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\tfloat3
|
|
inputVertexPosition = i.pos;\n\t\t\t\tfloat4x4 elementToVFX = GetElementToVFXMatrix(\n\t\t\t\t\tattributes.axisX,\n\t\t\t\t\tattributes.axisY,\n\t\t\t\t\tattributes.axisZ,\n\t\t\t\t\tfloat3(attributes.angleX,attributes.angleY,attributes.angleZ),\n\t\t\t\t\tfloat3(attributes.pivotX,attributes.pivotY,attributes.pivotZ),\n\t\t\t\t\tsize3,\n\t\t\t\t\tattributes.position);\n\t\t\t\t\t\n\t\t\t\tfloat3
|
|
vPos = mul(elementToVFX,float4(inputVertexPosition,1.0f)).xyz;\n\t\t\t\tfloat4
|
|
csPos = TransformPositionVFXToClip(vPos);\n\t\t\t\to.VFX_VARYING_POSCS = csPos;\n\t\t\t\t\n\t\t\t\tfloat3
|
|
normalWS = normalize(TransformDirectionVFXToWorld(mul((float3x3)elementToVFX,
|
|
i.normal)));\n\t\t\t\t#ifdef VFX_VARYING_NORMAL // TODO Should use inverse
|
|
transpose\n\t\t\t\to.VFX_VARYING_NORMAL = normalWS;\n\t\t\t\t#endif\n\t\t\t\t#ifdef
|
|
VFX_VARYING_TANGENT\n\t\t\t\to.VFX_VARYING_TANGENT = float4(normalize(TransformDirectionVFXToWorld(mul((float3x3)elementToVFX,i.tangent.xyz))),i.tangent.w);\n\t\t\t\t#endif\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t#if
|
|
defined(VFX_VARYING_VELOCITY_CPOS) && defined(VFX_VARYING_VELOCITY_CPOS_PREVIOUS)\n\t\t\t\t\t\tfloat4x4
|
|
previousElementToVFX = (float4x4)0;\n\t\t\t\t\t\tpreviousElementToVFX[3] =
|
|
float4(0,0,0,1);\n\t\t\t\t\t\t\n\t\t\t\t\t\tUNITY_UNROLL\n\t\t\t\t\t\tfor (int
|
|
itIndexMatrixRow = 0; itIndexMatrixRow < 3; ++itIndexMatrixRow)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tUNITY_UNROLL\n\t\t\t\t\t\t\tfor
|
|
(int itIndexMatrixCol = 0; itIndexMatrixCol < 4; ++itIndexMatrixCol)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tuint
|
|
itIndexMatrix = itIndexMatrixCol * 4 + itIndexMatrixRow;\n\t\t\t\t\t\t\t\tuint
|
|
read = elementToVFXBufferPrevious.Load((index * 16 + itIndexMatrix) << 2);\n\t\t\t\t\t\t\t\tpreviousElementToVFX[itIndexMatrixRow][itIndexMatrixCol]
|
|
= asfloat(read);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tuint
|
|
previousFrameIndex = elementToVFXBufferPrevious.Load((index * 16 + 15) << 2);\n\t\t\t\t\t\to.VFX_VARYING_VELOCITY_CPOS
|
|
= o.VFX_VARYING_VELOCITY_CPOS_PREVIOUS = float4(0.0f, 0.0f, 0.0f, 1.0f);\n\t\t\t\t\t\tif
|
|
(asuint(currentFrameIndex) - previousFrameIndex == 1u)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfloat3
|
|
oldvPos = mul(previousElementToVFX,float4(inputVertexPosition, 1.0f)).xyz;\n\t\t\t\t\t\t\to.VFX_VARYING_VELOCITY_CPOS_PREVIOUS
|
|
= TransformPositionVFXToPreviousClip(oldvPos);\n\t\t\t\t\t\t\to.VFX_VARYING_VELOCITY_CPOS
|
|
= TransformPositionVFXToNonJitteredClip(vPos);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t#if
|
|
VFX_USE_COLOR_CURRENT && defined(VFX_VARYING_COLOR)\n\t\t\t\t\t\to.VFX_VARYING_COLOR
|
|
= attributes.color;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t#if VFX_USE_ALPHA_CURRENT
|
|
&& defined(VFX_VARYING_ALPHA) \n\t\t\t\t\t\to.VFX_VARYING_ALPHA = attributes.alpha;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\t\t#ifdef
|
|
VFX_VARYING_EXPOSUREWEIGHT\n\t\t\t\t\t\t\n\t\t\t\t\t\to.VFX_VARYING_EXPOSUREWEIGHT
|
|
= exposureWeight;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\t\t#if USE_SOFT_PARTICLE
|
|
&& defined(VFX_VARYING_INVSOFTPARTICLEFADEDISTANCE)\n\t\t\t\t\t\t\n\t\t\t\t\t\to.VFX_VARYING_INVSOFTPARTICLEFADEDISTANCE
|
|
= invSoftParticlesFadeDistance;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\t\t#if
|
|
(USE_ALPHA_TEST || WRITE_MOTION_VECTOR_IN_FORWARD) && (!VFX_SHADERGRAPH ||
|
|
!HAS_SHADERGRAPH_PARAM_ALPHATHRESHOLD) && defined(VFX_VARYING_ALPHATHRESHOLD)\n\t\t\t\t\t\tfloat
|
|
alphaThreshold = (float)0;\n\t\t\t\t\t\t{\n\t\t\t\t\t\t \n\t\t\t\t\t\t
|
|
alphaThreshold = (float)0.200000003;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\to.VFX_VARYING_ALPHATHRESHOLD
|
|
= alphaThreshold;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\t\t#if USE_UV_SCALE_BIAS\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t#if
|
|
defined (VFX_VARYING_UV)\n\t\t\t\t\t\to.VFX_VARYING_UV.xy = o.VFX_VARYING_UV.xy
|
|
* uvScale + uvBias;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\t\t#if
|
|
defined(VFX_VARYING_POSWS)\n\t\t\t\t\t\to.VFX_VARYING_POSWS = TransformPositionVFXToWorld(vPos);\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t#if
|
|
USE_FLIPBOOK && defined(VFX_VARYING_UV)\n\t\t\t\t\t\tfloat2 flipBookSize =
|
|
(float2)0;\n\t\t\t\t\t\t{\n\t\t\t\t\t\t \n\t\t\t\t\t\t flipBookSize =
|
|
float2(4, 4);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\tfloat2 invFlipBookSize
|
|
= (float2)0;\n\t\t\t\t\t\t{\n\t\t\t\t\t\t \n\t\t\t\t\t\t invFlipBookSize
|
|
= float2(0.25, 0.25);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\tVFXUVData
|
|
uvData = GetUVData(flipBookSize, invFlipBookSize, o.VFX_VARYING_UV.xy, attributes.texIndex);\n\t\t\t\t\t\to.VFX_VARYING_UV.xy
|
|
= uvData.uvs.xy;\n\t\t\t\t\t\t#if USE_FLIPBOOK_INTERPOLATION && defined(VFX_VARYING_UV)
|
|
&& defined (VFX_VARYING_FRAMEBLEND)\n\t\t\t\t\t\to.VFX_VARYING_UV.zw = uvData.uvs.zw;\n\t\t\t\t\t\to.VFX_VARYING_FRAMEBLEND
|
|
= uvData.blend;\n\t\t\t\t\t\t#if USE_FLIPBOOK_MOTIONVECTORS && defined(VFX_VARYING_MOTIONVECTORSCALE)\n\t\t\t\t\t\t\n\t\t\t\t\t\to.VFX_VARYING_MOTIONVECTORSCALE
|
|
= motionVectorScale * invFlipBookSize;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t
|
|
\n\t\t\t \n\t\t\t\t\n\t\t\t\treturn o;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t#include
|
|
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommonOutput.hlsl\"\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t#if
|
|
VFX_PASSDEPTH == VFX_PASSDEPTH_MOTION_VECTOR\n\t\t\t#define SHADERPASS SHADERPASS_MOTION_VECTORS\n\t\t\t#else\n\t\t\t#define
|
|
SHADERPASS SHADERPASS_DEPTH_ONLY\n\t\t\t#endif\n\t\t\t#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXLit.hlsl\"\n\t\t\t\n\t\t\t#ifndef
|
|
VFX_SHADERGRAPH\n\t\t\t\n\t\t\tvoid VFXGetHDRPLitData(out SurfaceData surfaceData,
|
|
out BuiltinData builtinData, out BSDFData bsdfData, out PreLightData preLightData,
|
|
VFX_VARYING_PS_INPUTS i, float3 normalWS, const VFXUVData uvData, uint2 tileIndex)\n\t\t\t{\t\n\t\t\t\t#if
|
|
HDRP_MATERIAL_TYPE_TRANSLUCENT\n\t\t\t\tuint diffusionProfileHash = (uint)0;\n\t\t\t\t{\n\t\t\t\t
|
|
\n\t\t\t\t diffusionProfileHash = (uint)1080328534;\n\t\t\t\t}\n\t\t\t\t\n
|
|
// Loads diffusion profile\n\t\t\t\t#else\n\t\t\t\tconst uint diffusionProfileHash
|
|
= 0;\n\t\t\t\t#endif\n\t\t\t\t\n\t\t\t\tfloat3 posRWS = VFXGetPositionRWS(i);\n\t\t\t\tfloat4
|
|
posSS = i.VFX_VARYING_POSCS;\n\t\t\t\tPositionInputs posInput = GetPositionInput(posSS.xy,
|
|
_ScreenSize.zw, posSS.z, posSS.w, posRWS, tileIndex);\n\t\t\t\t\n\t\t\t\tfloat
|
|
alpha;\n\t\t\t\tsurfaceData = VFXGetSurfaceData(i,normalWS,uvData,diffusionProfileHash,alpha);\t\n\t\t\t\tbsdfData
|
|
= ConvertSurfaceDataToBSDFData(posSS.xy, surfaceData);\n\t\t\t\n\t\t\t\tpreLightData
|
|
= GetPreLightData(GetWorldSpaceNormalizeViewDir(posRWS),posInput,bsdfData);\n\t\t\t\t\n\t\t\t\tpreLightData.diffuseFGD
|
|
= 1.0f;\n\t\t\t //TODO: investigate why this is needed\n\t\t\t preLightData.coatPartLambdaV
|
|
= 0;\n\t\t\t preLightData.coatIblR = 0;\n\t\t\t preLightData.coatIblF
|
|
= 0;\n\t\t\t \n\t\t\t\tbuiltinData = VFXGetBuiltinData(i,posInput,surfaceData,uvData,alpha);\n\t\t\t}\n\t\t\t\n\t\t\tvoid
|
|
VFXGetHDRPLitData(out SurfaceData surfaceData, out BuiltinData builtinData,
|
|
VFX_VARYING_PS_INPUTS i, float3 normalWS, const VFXUVData uvData)\n\t\t\t{\n\t\t\t\tBSDFData
|
|
bsdfData = (BSDFData)0;\n\t\t\t\tPreLightData preLightData = (PreLightData)0;\n\t\t\t\tpreLightData.diffuseFGD
|
|
= 1.0f;\n\t\t\t\tVFXGetHDRPLitData(surfaceData,builtinData,bsdfData,preLightData,i,normalWS,uvData,uint2(0,0));\n\t\t\t}\n\t\t\t\n\t\t\t#endif\n\t\t\t\n\t\t\t\n\t\t\t#include
|
|
\"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXLitPixelOutput.hlsl\"\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t#if
|
|
VFX_PASSDEPTH == VFX_PASSDEPTH_SELECTION\n\t\t\tint _ObjectId;\n\t\t\tint _PassValue;\n\t\t\t#endif\n\t\t\t\n\t\t\t#pragma
|
|
fragment frag\n\t\t\tvoid frag(ps_input i\n\t\t\t#if USE_DOUBLE_SIDED\n\t\t\t\t,
|
|
bool frontFace : SV_IsFrontFace\n\t\t\t#endif\n\t\t\t\n\t\t\t#if VFX_PASSDEPTH
|
|
== VFX_PASSDEPTH_MOTION_VECTOR\n\t\t\t\t, out float4 outMotionVector : SV_Target0\n\t\t\t\t#ifdef
|
|
WRITE_NORMAL_BUFFER\n\t\t\t\t\t, out float4 outNormalBuffer : SV_Target1\n\t\t\t\t#endif\n\t\t\t#else\n\t\t\t\t#ifdef
|
|
WRITE_NORMAL_BUFFER\n\t\t\t\t\t, out float4 outNormalBuffer : SV_Target0\n\t\t\t\t#elif
|
|
VFX_PASSDEPTH == VFX_PASSDEPTH_SELECTION\n\t\t\t\t\t, out float4 outColor :
|
|
SV_Target0\n\t\t\t\t#endif\n\t\t\t#endif\n\t\t\t\t)\n\t\t\t{\n\t\t\t\tUNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i);\n\t\t\t\tVFXTransformPSInputs(i);\n\t\t\t\t\n\t\t\t\t\t\t\t#ifdef
|
|
VFX_VARYING_NORMAL\n\t\t\t\t\t\t\t#if USE_DOUBLE_SIDED\n\t\t\t\t\t\t\tconst
|
|
float faceMul = frontFace ? 1.0f : -1.0f;\n\t\t\t\t\t\t\t#else\n\t\t\t\t\t\t\tconst
|
|
float faceMul = 1.0f;\n\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfloat3
|
|
normalWS = normalize(i.VFX_VARYING_NORMAL * faceMul);\n\t\t\t\t\t\t\tconst
|
|
VFXUVData uvData = GetUVData(i);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t#ifdef VFX_VARYING_TANGENT\n\t\t\t\t\t\t\tfloat3
|
|
tangentWS = normalize(i.VFX_VARYING_TANGENT.xyz);\n\t\t\t\t\t\t\tfloat3 bitangentWS
|
|
= cross(normalWS,tangentWS) * (i.VFX_VARYING_TANGENT.w * faceMul);\n\t\t\t\t\t\t\tfloat3x3
|
|
tbn = float3x3(tangentWS,bitangentWS,normalWS);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t#if
|
|
USE_NORMAL_MAP\n\t\t\t\t\t\t\tfloat3 n = SampleNormalMap(VFX_SAMPLER(normalMap),uvData);\n\t\t\t\t\t\t\tfloat
|
|
normalScale = 1.0f;\n\t\t\t\t\t\t\t#ifdef VFX_VARYING_NORMALSCALE\n\t\t\t\t\t\t\tnormalScale
|
|
= i.VFX_VARYING_NORMALSCALE;\n\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\tnormalWS
|
|
= normalize(lerp(normalWS,mul(n,tbn),normalScale));\n\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t#ifdef
|
|
VFX_SHADERGRAPH\n\t\t\t \n\t\t\t \n\t\t\t\t\n\t\t\t float
|
|
alpha = OUTSG.;\n\t\t\t #else\n\t\t\t\tfloat alpha = VFXGetFragmentColor(i).a;\n\t\t\t\t#if
|
|
HDRP_USE_BASE_COLOR_MAP_ALPHA\n\t\t\t\t\talpha *= VFXGetTextureColor(VFX_SAMPLER(baseColorMap),i).a;\n\t\t\t\t#endif\n\t\t\t
|
|
#endif\n\t\t\t\tVFXClipFragmentColor(alpha,i);\n\t\t\t\t\n\t\t\t\t#ifdef WRITE_NORMAL_BUFFER\n\t\t\t
|
|
#ifndef VFX_SHADERGRAPH\n\t\t\t VFXComputePixelOutputToNormalBuffer(i,normalWS,uvData,outNormalBuffer);\n\t\t\t
|
|
#else\n\t\t\t #if HAS_SHADERGRAPH_PARAM_NORMAL\n\t\t\t
|
|
float3 n = OUTSG.Normal_8;\n\t\t\t normalWS = mul(n,tbn);\n\t\t\t
|
|
#endif\n\t\t\t SurfaceData surface = (SurfaceData)0;\n\t\t\t
|
|
\n\t\t\t surface.normalWS = normalWS;\n\t\t\t \n\t\t\t
|
|
EncodeIntoNormalBuffer(ConvertSurfaceDataToNormalData(surface), i.VFX_VARYING_POSCS.xy,
|
|
outNormalBuffer);\n\t\t\t #endif\n\t\t\t\t#endif\n\t\t\t\n\t\t\t\t#if
|
|
VFX_PASSDEPTH == VFX_PASSDEPTH_MOTION_VECTOR\n\t\t\t\t\t\n\t\t\t\t\t\t\tfloat2
|
|
velocity = (i.VFX_VARYING_VELOCITY_CPOS.xy/i.VFX_VARYING_VELOCITY_CPOS.w) -
|
|
(i.VFX_VARYING_VELOCITY_CPOS_PREVIOUS.xy/i.VFX_VARYING_VELOCITY_CPOS_PREVIOUS.w);\n\t\t\t\t\t\t\t#if
|
|
UNITY_UV_STARTS_AT_TOP\n\t\t\t\t\t\t\t\tvelocity.y = -velocity.y;\n\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\tfloat4
|
|
encodedMotionVector = 0.0f;\n\t\t\t\t\t\t\tVFXEncodeMotionVector(velocity *
|
|
0.5f, encodedMotionVector);\n\t\t\t\t\t\t\t\n\t\t\t\t\toutMotionVector = encodedMotionVector;\n\t\t\t\t#elif
|
|
VFX_PASSDEPTH == VFX_PASSDEPTH_SELECTION\n\t\t\t\t\t// We use depth prepass
|
|
for scene selection in the editor, this code allow to output the outline correctly\n\t\t\t\t\toutColor
|
|
= float4(_ObjectId, _PassValue, 1.0, 1.0);\n\t\t\t\t#elif VFX_PASSDEPTH ==
|
|
VFX_PASSDEPTH_ACTUAL\n\t\t\t\t\t//void\n\t\t\t\t#else\n\t\t\t\t\t#error VFX_PASSDEPTH
|
|
undefined\n\t\t\t\t#endif\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
|
|
{ \"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
|
|
VFX_PASSDEPTH_MOTION_VECTOR\n\t\t\t\n\t\t\t#pragma target 4.5\n\t\t\t#define
|
|
UNITY_MATERIAL_LIT\n\t\t\t#pragma multi_compile _ WRITE_NORMAL_BUFFER\n\t\t\t\n\t\t\tstruct
|
|
ps_input\n\t\t\t{\t\t\n\t\t\t\tfloat4 pos : SV_POSITION;\n\t\t\t\tfloat2 uv
|
|
: TEXCOORD0;\t\n\t\t\t #if VFX_SHADERGRAPH_HAS_UV1\n\t\t\t float4 uv1
|
|
: COLOR2;\n\t\t\t #endif\n\t\t\t #if VFX_SHADERGRAPH_HAS_UV2\n\t\t\t
|
|
float4 uv2 : COLOR3;\n\t\t\t #endif\n\t\t\t #if VFX_SHADERGRAPH_HAS_UV3\n\t\t\t
|
|
float4 uv3 : COLOR4;\n\t\t\t #endif\n\t\t\t #if VFX_SHADERGRAPH_HAS_COLOR\n\t\t\t
|
|
float4 vertexColor : COLOR1;\n\t\t\t #endif\n\t\t\t\t#if USE_ALPHA_TEST
|
|
|| USE_FLIPBOOK_INTERPOLATION || VFX_USE_ALPHA_CURRENT\n\t\t\t\t// x: alpha
|
|
threshold\n\t\t\t\t// y: frame blending factor\n\t\t\t\t// z: alpha\n\t\t\t\t//
|
|
w: smoothness\n\t\t\t\tnointerpolation float4 builtInInterpolants : TEXCOORD1;\n\t\t\t\t#endif\n\t\t\t\t#if
|
|
USE_FLIPBOOK_MOTIONVECTORS\n\t\t\t\t// x: motion vector scale u\n\t\t\t\t//
|
|
y: motion vector scale v\n\t\t\t\tnointerpolation float2 builtInInterpolants2
|
|
: TEXCOORD3;\n\t\t\t\t#endif\n\t\t\t\t#if defined(WRITE_NORMAL_BUFFER) || SHADERGRAPH_NEEDS_NORMAL_DEPTHONLY\n\t\t\t\tfloat3
|
|
normal : TEXCOORD4;\n\t\t\t\t#if SHADERGRAPH_NEEDS_TANGENT_DEPTHONLY\n\t\t\t\tfloat4
|
|
tangent : TEXCOORD5;\n\t\t\t\t#endif\n\t\t\t\t#endif\n\t\t\t\t\n\t\t\t\t#if
|
|
VFX_PASSDEPTH == VFX_PASSDEPTH_MOTION_VECTOR\n\t\t\t\tfloat4 cPosPrevious :
|
|
TEXCOORD6;\n\t\t\t\tfloat4 cPosNonJiterred : TEXCOORD7;\n\t\t\t\t#endif\n\t\t\t
|
|
\n\t\t\t\t\n\t\t\t\tUNITY_VERTEX_OUTPUT_STEREO\n\t\t\t};\n\t\t\t\n\t\t\t#define
|
|
VFX_VARYING_PS_INPUTS ps_input\n\t\t\t#define VFX_VARYING_POSCS pos\n\t\t\t#define
|
|
VFX_VARYING_ALPHA builtInInterpolants.z\n\t\t\t#define VFX_VARYING_ALPHATHRESHOLD
|
|
builtInInterpolants.x\n\t\t\t#define VFX_VARYING_FRAMEBLEND builtInInterpolants.y\n\t\t\t#define
|
|
VFX_VARYING_MOTIONVECTORSCALE builtInInterpolants2.xy\n\t\t\t#define VFX_VARYING_UV
|
|
uv\n\t\t\t\n\t\t\t#if VFX_PASSDEPTH == VFX_PASSDEPTH_MOTION_VECTOR\n\t\t\t#define
|
|
VFX_VARYING_VELOCITY_CPOS cPosNonJiterred\n\t\t\t#define VFX_VARYING_VELOCITY_CPOS_PREVIOUS
|
|
cPosPrevious\n\t\t\t#endif\n\t\t\t\n\t\t\t#if defined(WRITE_NORMAL_BUFFER)
|
|
|| SHADERGRAPH_NEEDS_NORMAL_DEPTHONLY\n\t\t\t#define VFX_VARYING_NORMAL normal\n\t\t\t#endif\n\t\t\t#ifdef
|
|
WRITE_NORMAL_BUFFER\n\t\t\t#define VFX_VARYING_SMOOTHNESS builtInInterpolants.w\n\t\t\t#endif\n\t\t\t#if
|
|
SHADERGRAPH_NEEDS_TANGENT_DEPTHONLY\n\t\t\t#define VFX_VARYING_TANGENT tangent\n\t\t\t#endif\n\t\t\t\t\t\n\t\t\t\n\t\t\t\t\t\n\t\t\t#if
|
|
!(defined(VFX_VARYING_PS_INPUTS) && defined(VFX_VARYING_POSCS))\n\t\t\t#error
|
|
VFX_VARYING_PS_INPUTS, VFX_VARYING_POSCS and VFX_VARYING_UV must be defined.\n\t\t\t#endif\n\t\t\t\n\t\t\t#include
|
|
\"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXCommon.hlsl\"\n\t\t\t#include
|
|
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\t\t\t\n\n\t\t\tvoid
|
|
AttributeFromCurve_536B781C(inout float scaleX, inout float scaleY, inout float
|
|
scaleZ, float age, float lifetime, float4 Scale_x, float4 Scale_y, float4 Scale_z)
|
|
/*attribute:scale Composition:Overwrite AlphaComposition:Overwrite SampleMode:OverLife
|
|
Mode:PerComponent ColorMode:ColorAndAlpha channels:XYZ */\n\t\t\t{\n\t\t\t
|
|
float t = age / lifetime;\n\t\t\t float3 value = 0.0f;\n\t\t\t value[0]
|
|
= SampleCurve(Scale_x, t);\n\t\t\t value[1] = SampleCurve(Scale_y, t);\n\t\t\t
|
|
value[2] = SampleCurve(Scale_z, t);\n\t\t\t scaleX = value.x;\n\t\t\t
|
|
scaleY = value.y;\n\t\t\t scaleZ = value.z;\n\t\t\t}\n\t\t\tvoid SetAttribute_39EE3455(inout
|
|
float size, float Size) /*attribute:size Composition:Multiply Source:Slot Random:Off
|
|
channels:XYZ */\n\t\t\t{\n\t\t\t size *= Size;\n\t\t\t}\n\t\t\tvoid AttributeFromCurve_7DF18693(inout
|
|
float size, float age, float lifetime, float4 Size) /*attribute:size Composition:Multiply
|
|
AlphaComposition:Overwrite SampleMode:OverLife Mode:PerComponent ColorMode:ColorAndAlpha
|
|
channels:XYZ */\n\t\t\t{\n\t\t\t float t = age / lifetime;\n\t\t\t float
|
|
value = 0.0f;\n\t\t\t value = SampleCurve(Size, t);\n\t\t\t size *= value;\n\t\t\t}\n\t\t\t\n\n\t\t\t\n\t\t\tstruct
|
|
vs_input\n\t\t\t{\n\t\t\t\tfloat3 pos : POSITION;\n\t\t\t\tfloat2 uv : TEXCOORD0;\n\t\t\t
|
|
#if VFX_SHADERGRAPH_HAS_UV1\n\t\t\t float4 uv1 : TEXCOORD1;\n\t\t\t #endif\n\t\t\t
|
|
#if VFX_SHADERGRAPH_HAS_UV2\n\t\t\t float4 uv2 : TEXCOORD2;\n\t\t\t #endif\n\t\t\t
|
|
#if VFX_SHADERGRAPH_HAS_UV3\n\t\t\t float4 uv3 : TEXCOORD3;\n\t\t\t #endif\n\t\t\t
|
|
#if VFX_SHADERGRAPH_HAS_COLOR\n\t\t\t float4 vertexColor : COLOR;\n\t\t\t
|
|
#endif\n\t\t\t\tfloat3 normal : NORMAL;\n\t\t\t\t#if defined(VFX_VARYING_TANGENT)
|
|
|| SHADERGRAPH_HAS_NORMAL\n\t\t\t\tfloat4 tangent : TANGENT;\n\t\t\t\t#endif\n\t\t\t\tVFX_DECLARE_INSTANCE_ID\n\t\t\t};\n\t\t\t\n\t\t\t#pragma
|
|
vertex vert\n\t\t\tVFX_VARYING_PS_INPUTS vert(vs_input i)\n\t\t\t{\n\t\t\t
|
|
VFX_VARYING_PS_INPUTS o = (VFX_VARYING_PS_INPUTS)0;\n\t\t\t\n\t\t\t\tUNITY_SETUP_INSTANCE_ID(i);\n\t\t\t\tUNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);\n\t\t\t\n\t\t\t\tuint
|
|
index = VFX_GET_INSTANCE_ID(i);\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\tuint deadCount
|
|
= 0;\n\t\t\t\t\t\t#if USE_DEAD_LIST_COUNT\n\t\t\t\t\t\tdeadCount = deadListCount.Load(0);\n\t\t\t\t\t\t#endif\t\n\t\t\t\t\t\tif
|
|
(index >= asuint(nbMax) - deadCount)\n\t\t\t\t\t\t#if USE_GEOMETRY_SHADER\n\t\t\t\t\t\t\treturn;
|
|
// cull\n\t\t\t\t\t\t#else\n\t\t\t\t\t\t\treturn o; // cull\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\t\tAttributes
|
|
attributes = (Attributes)0;\n\t\t\t\t\t\tSourceAttributes sourceAttributes
|
|
= (SourceAttributes)0;\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\tattributes.position = asfloat(attributeBuffer.Load3((index
|
|
* 0x8 + 0x0) << 2));\n\t\t\t\t\t\tattributes.lifetime = asfloat(attributeBuffer.Load((index
|
|
* 0x1 + 0x2D00) << 2));\n\t\t\t\t\t\tattributes.texIndex = asfloat(attributeBuffer.Load((index
|
|
* 0x1 + 0x30C0) << 2));\n\t\t\t\t\t\tattributes.angleX = asfloat(attributeBuffer.Load((index
|
|
* 0x8 + 0x3) << 2));\n\t\t\t\t\t\tattributes.angleY = asfloat(attributeBuffer.Load((index
|
|
* 0x8 + 0x4) << 2));\n\t\t\t\t\t\tattributes.angleZ = asfloat(attributeBuffer.Load((index
|
|
* 0x8 + 0x5) << 2));\n\t\t\t\t\t\tattributes.size = asfloat(attributeBuffer.Load((index
|
|
* 0x4 + 0x3FC0) << 2));\n\t\t\t\t\t\tattributes.alpha = (float)1;\n\t\t\t\t\t\tattributes.alive
|
|
= (attributeBuffer.Load((index * 0x8 + 0x6) << 2));\n\t\t\t\t\t\tattributes.axisX
|
|
= float3(1, 0, 0);\n\t\t\t\t\t\tattributes.axisY = float3(0, 1, 0);\n\t\t\t\t\t\tattributes.axisZ
|
|
= float3(0, 0, 1);\n\t\t\t\t\t\tattributes.pivotX = (float)0;\n\t\t\t\t\t\tattributes.pivotY
|
|
= (float)0;\n\t\t\t\t\t\tattributes.pivotZ = (float)0;\n\t\t\t\t\t\tattributes.scaleX
|
|
= asfloat(attributeBuffer.Load((index * 0x4 + 0x3FC1) << 2));\n\t\t\t\t\t\tattributes.scaleY
|
|
= asfloat(attributeBuffer.Load((index * 0x4 + 0x3FC2) << 2));\n\t\t\t\t\t\tattributes.scaleZ
|
|
= asfloat(attributeBuffer.Load((index * 0x4 + 0x3FC3) << 2));\n\t\t\t\t\t\tattributes.age
|
|
= asfloat(attributeBuffer.Load((index * 0x8 + 0x7) << 2));\n\t\t\t\t\t\tattributes.color
|
|
= float3(1, 1, 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\tattributes.alive
|
|
= (attributeBuffer.Load((index * 0x8 + 0x6) << 2));\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t#if
|
|
!HAS_STRIPS\n\t\t\t\t\t\tif (!attributes.alive)\n\t\t\t\t\t\t\treturn o;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tattributes.position
|
|
= asfloat(attributeBuffer.Load3((index * 0x8 + 0x0) << 2));\n\t\t\t\t\t\tattributes.lifetime
|
|
= asfloat(attributeBuffer.Load((index * 0x1 + 0x2D00) << 2));\n\t\t\t\t\t\tattributes.texIndex
|
|
= asfloat(attributeBuffer.Load((index * 0x1 + 0x30C0) << 2));\n\t\t\t\t\t\tattributes.angleX
|
|
= asfloat(attributeBuffer.Load((index * 0x8 + 0x3) << 2));\n\t\t\t\t\t\tattributes.angleY
|
|
= asfloat(attributeBuffer.Load((index * 0x8 + 0x4) << 2));\n\t\t\t\t\t\tattributes.angleZ
|
|
= asfloat(attributeBuffer.Load((index * 0x8 + 0x5) << 2));\n\t\t\t\t\t\tattributes.size
|
|
= asfloat(attributeBuffer.Load((index * 0x4 + 0x3FC0) << 2));\n\t\t\t\t\t\tattributes.alpha
|
|
= (float)1;\n\t\t\t\t\t\tattributes.axisX = float3(1, 0, 0);\n\t\t\t\t\t\tattributes.axisY
|
|
= float3(0, 1, 0);\n\t\t\t\t\t\tattributes.axisZ = float3(0, 0, 1);\n\t\t\t\t\t\tattributes.pivotX
|
|
= (float)0;\n\t\t\t\t\t\tattributes.pivotY = (float)0;\n\t\t\t\t\t\tattributes.pivotZ
|
|
= (float)0;\n\t\t\t\t\t\tattributes.scaleX = asfloat(attributeBuffer.Load((index
|
|
* 0x4 + 0x3FC1) << 2));\n\t\t\t\t\t\tattributes.scaleY = asfloat(attributeBuffer.Load((index
|
|
* 0x4 + 0x3FC2) << 2));\n\t\t\t\t\t\tattributes.scaleZ = asfloat(attributeBuffer.Load((index
|
|
* 0x4 + 0x3FC3) << 2));\n\t\t\t\t\t\tattributes.age = asfloat(attributeBuffer.Load((index
|
|
* 0x8 + 0x7) << 2));\n\t\t\t\t\t\tattributes.color = float3(1, 1, 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\t\t\t//
|
|
Initialize built-in needed attributes\n\t\t\t\t\t\t#if HAS_STRIPS\n\t\t\t\t\t\tInitStripAttributes(index,
|
|
attributes, stripData);\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\tAttributeFromCurve_536B781C(
|
|
/*inout */attributes.scaleX, /*inout */attributes.scaleY, /*inout */attributes.scaleZ,
|
|
attributes.age, attributes.lifetime, Scale_x_a, Scale_y_a, Scale_z_a);\n\t\t\t\t{\n\t\t\t\t
|
|
float3 tmp_bl = attributes.position - uniform_f;\n\t\t\t\t float3 tmp_bm
|
|
= tmp_bl * tmp_bl;\n\t\t\t\t float tmp_bn = tmp_bm[2];\n\t\t\t\t float
|
|
tmp_bo = tmp_bm[1];\n\t\t\t\t float tmp_bp = tmp_bn + tmp_bo;\n\t\t\t\t
|
|
float tmp_bq = tmp_bm[0];\n\t\t\t\t float tmp_br = tmp_bp + tmp_bq;\n\t\t\t\t
|
|
float tmp_bt = pow(tmp_br, (float)0.5);\n\t\t\t\t float tmp_bu = SampleCurve(uniform_e,tmp_bt);\n\t\t\t\t
|
|
SetAttribute_39EE3455( /*inout */attributes.size, tmp_bu);\n\t\t\t\t}\n\t\t\t\tAttributeFromCurve_7DF18693(
|
|
/*inout */attributes.size, attributes.age, attributes.lifetime, Size_c);\n\t\t\t\t\n\n\t\t\t\t\t\t\n\t\t\t\tif
|
|
(!attributes.alive)\n\t\t\t\t\treturn o;\n\t\t\t\t\n\t\t\t\to.VFX_VARYING_UV.xy
|
|
= i.uv;\n\t\t\t \n\t\t\t #if VFX_SHADERGRAPH_HAS_UV1\n\t\t\t o.uv1
|
|
= i.uv1;\n\t\t\t #endif\n\t\t\t #if VFX_SHADERGRAPH_HAS_UV2\n\t\t\t
|
|
o.uv2 = i.uv2;\n\t\t\t #endif\n\t\t\t #if VFX_SHADERGRAPH_HAS_UV3\n\t\t\t
|
|
o.uv3 = i.uv3;\n\t\t\t #endif\n\t\t\t #if VFX_SHADERGRAPH_HAS_COLOR\n\t\t\t
|
|
o.vertexColor = i.vertexColor;\n\t\t\t #endif\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\tfloat3
|
|
size3 = float3(attributes.size,attributes.size,attributes.size);\n\t\t\t\t\t\t#if
|
|
VFX_USE_SCALEX_CURRENT\n\t\t\t\t\t\tsize3.x *= attributes.scaleX;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t#if
|
|
VFX_USE_SCALEY_CURRENT\n\t\t\t\t\t\tsize3.y *= attributes.scaleY;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t#if
|
|
VFX_USE_SCALEZ_CURRENT\n\t\t\t\t\t\tsize3.z *= attributes.scaleZ;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\tfloat3
|
|
inputVertexPosition = i.pos;\n\t\t\t\tfloat4x4 elementToVFX = GetElementToVFXMatrix(\n\t\t\t\t\tattributes.axisX,\n\t\t\t\t\tattributes.axisY,\n\t\t\t\t\tattributes.axisZ,\n\t\t\t\t\tfloat3(attributes.angleX,attributes.angleY,attributes.angleZ),\n\t\t\t\t\tfloat3(attributes.pivotX,attributes.pivotY,attributes.pivotZ),\n\t\t\t\t\tsize3,\n\t\t\t\t\tattributes.position);\n\t\t\t\t\t\n\t\t\t\tfloat3
|
|
vPos = mul(elementToVFX,float4(inputVertexPosition,1.0f)).xyz;\n\t\t\t\tfloat4
|
|
csPos = TransformPositionVFXToClip(vPos);\n\t\t\t\to.VFX_VARYING_POSCS = csPos;\n\t\t\t\t\n\t\t\t\tfloat3
|
|
normalWS = normalize(TransformDirectionVFXToWorld(mul((float3x3)elementToVFX,
|
|
i.normal)));\n\t\t\t\t#ifdef VFX_VARYING_NORMAL // TODO Should use inverse
|
|
transpose\n\t\t\t\to.VFX_VARYING_NORMAL = normalWS;\n\t\t\t\t#endif\n\t\t\t\t#ifdef
|
|
VFX_VARYING_TANGENT\n\t\t\t\to.VFX_VARYING_TANGENT = float4(normalize(TransformDirectionVFXToWorld(mul((float3x3)elementToVFX,i.tangent.xyz))),i.tangent.w);\n\t\t\t\t#endif\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t#if
|
|
defined(VFX_VARYING_VELOCITY_CPOS) && defined(VFX_VARYING_VELOCITY_CPOS_PREVIOUS)\n\t\t\t\t\t\tfloat4x4
|
|
previousElementToVFX = (float4x4)0;\n\t\t\t\t\t\tpreviousElementToVFX[3] =
|
|
float4(0,0,0,1);\n\t\t\t\t\t\t\n\t\t\t\t\t\tUNITY_UNROLL\n\t\t\t\t\t\tfor (int
|
|
itIndexMatrixRow = 0; itIndexMatrixRow < 3; ++itIndexMatrixRow)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tUNITY_UNROLL\n\t\t\t\t\t\t\tfor
|
|
(int itIndexMatrixCol = 0; itIndexMatrixCol < 4; ++itIndexMatrixCol)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tuint
|
|
itIndexMatrix = itIndexMatrixCol * 4 + itIndexMatrixRow;\n\t\t\t\t\t\t\t\tuint
|
|
read = elementToVFXBufferPrevious.Load((index * 16 + itIndexMatrix) << 2);\n\t\t\t\t\t\t\t\tpreviousElementToVFX[itIndexMatrixRow][itIndexMatrixCol]
|
|
= asfloat(read);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tuint
|
|
previousFrameIndex = elementToVFXBufferPrevious.Load((index * 16 + 15) << 2);\n\t\t\t\t\t\to.VFX_VARYING_VELOCITY_CPOS
|
|
= o.VFX_VARYING_VELOCITY_CPOS_PREVIOUS = float4(0.0f, 0.0f, 0.0f, 1.0f);\n\t\t\t\t\t\tif
|
|
(asuint(currentFrameIndex) - previousFrameIndex == 1u)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfloat3
|
|
oldvPos = mul(previousElementToVFX,float4(inputVertexPosition, 1.0f)).xyz;\n\t\t\t\t\t\t\to.VFX_VARYING_VELOCITY_CPOS_PREVIOUS
|
|
= TransformPositionVFXToPreviousClip(oldvPos);\n\t\t\t\t\t\t\to.VFX_VARYING_VELOCITY_CPOS
|
|
= TransformPositionVFXToNonJitteredClip(vPos);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t#if
|
|
VFX_USE_COLOR_CURRENT && defined(VFX_VARYING_COLOR)\n\t\t\t\t\t\to.VFX_VARYING_COLOR
|
|
= attributes.color;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t#if VFX_USE_ALPHA_CURRENT
|
|
&& defined(VFX_VARYING_ALPHA) \n\t\t\t\t\t\to.VFX_VARYING_ALPHA = attributes.alpha;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\t\t#ifdef
|
|
VFX_VARYING_EXPOSUREWEIGHT\n\t\t\t\t\t\t\n\t\t\t\t\t\to.VFX_VARYING_EXPOSUREWEIGHT
|
|
= exposureWeight;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\t\t#if USE_SOFT_PARTICLE
|
|
&& defined(VFX_VARYING_INVSOFTPARTICLEFADEDISTANCE)\n\t\t\t\t\t\t\n\t\t\t\t\t\to.VFX_VARYING_INVSOFTPARTICLEFADEDISTANCE
|
|
= invSoftParticlesFadeDistance;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\t\t#if
|
|
(USE_ALPHA_TEST || WRITE_MOTION_VECTOR_IN_FORWARD) && (!VFX_SHADERGRAPH ||
|
|
!HAS_SHADERGRAPH_PARAM_ALPHATHRESHOLD) && defined(VFX_VARYING_ALPHATHRESHOLD)\n\t\t\t\t\t\tfloat
|
|
alphaThreshold = (float)0;\n\t\t\t\t\t\t{\n\t\t\t\t\t\t \n\t\t\t\t\t\t
|
|
alphaThreshold = (float)0.200000003;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\to.VFX_VARYING_ALPHATHRESHOLD
|
|
= alphaThreshold;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\t\t#if USE_UV_SCALE_BIAS\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t#if
|
|
defined (VFX_VARYING_UV)\n\t\t\t\t\t\to.VFX_VARYING_UV.xy = o.VFX_VARYING_UV.xy
|
|
* uvScale + uvBias;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\t\t#if
|
|
defined(VFX_VARYING_POSWS)\n\t\t\t\t\t\to.VFX_VARYING_POSWS = TransformPositionVFXToWorld(vPos);\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t#if
|
|
USE_FLIPBOOK && defined(VFX_VARYING_UV)\n\t\t\t\t\t\tfloat2 flipBookSize =
|
|
(float2)0;\n\t\t\t\t\t\t{\n\t\t\t\t\t\t \n\t\t\t\t\t\t flipBookSize =
|
|
float2(4, 4);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\tfloat2 invFlipBookSize
|
|
= (float2)0;\n\t\t\t\t\t\t{\n\t\t\t\t\t\t \n\t\t\t\t\t\t invFlipBookSize
|
|
= float2(0.25, 0.25);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\tVFXUVData
|
|
uvData = GetUVData(flipBookSize, invFlipBookSize, o.VFX_VARYING_UV.xy, attributes.texIndex);\n\t\t\t\t\t\to.VFX_VARYING_UV.xy
|
|
= uvData.uvs.xy;\n\t\t\t\t\t\t#if USE_FLIPBOOK_INTERPOLATION && defined(VFX_VARYING_UV)
|
|
&& defined (VFX_VARYING_FRAMEBLEND)\n\t\t\t\t\t\to.VFX_VARYING_UV.zw = uvData.uvs.zw;\n\t\t\t\t\t\to.VFX_VARYING_FRAMEBLEND
|
|
= uvData.blend;\n\t\t\t\t\t\t#if USE_FLIPBOOK_MOTIONVECTORS && defined(VFX_VARYING_MOTIONVECTORSCALE)\n\t\t\t\t\t\t\n\t\t\t\t\t\to.VFX_VARYING_MOTIONVECTORSCALE
|
|
= motionVectorScale * invFlipBookSize;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t
|
|
\n\t\t\t \n\t\t\t\t\n\t\t\t\treturn o;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t#include
|
|
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommonOutput.hlsl\"\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t#if
|
|
VFX_PASSDEPTH == VFX_PASSDEPTH_MOTION_VECTOR\n\t\t\t#define SHADERPASS SHADERPASS_MOTION_VECTORS\n\t\t\t#else\n\t\t\t#define
|
|
SHADERPASS SHADERPASS_DEPTH_ONLY\n\t\t\t#endif\n\t\t\t#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXLit.hlsl\"\n\t\t\t\n\t\t\t#ifndef
|
|
VFX_SHADERGRAPH\n\t\t\t\n\t\t\tvoid VFXGetHDRPLitData(out SurfaceData surfaceData,
|
|
out BuiltinData builtinData, out BSDFData bsdfData, out PreLightData preLightData,
|
|
VFX_VARYING_PS_INPUTS i, float3 normalWS, const VFXUVData uvData, uint2 tileIndex)\n\t\t\t{\t\n\t\t\t\t#if
|
|
HDRP_MATERIAL_TYPE_TRANSLUCENT\n\t\t\t\tuint diffusionProfileHash = (uint)0;\n\t\t\t\t{\n\t\t\t\t
|
|
\n\t\t\t\t diffusionProfileHash = (uint)1080328534;\n\t\t\t\t}\n\t\t\t\t\n
|
|
// Loads diffusion profile\n\t\t\t\t#else\n\t\t\t\tconst uint diffusionProfileHash
|
|
= 0;\n\t\t\t\t#endif\n\t\t\t\t\n\t\t\t\tfloat3 posRWS = VFXGetPositionRWS(i);\n\t\t\t\tfloat4
|
|
posSS = i.VFX_VARYING_POSCS;\n\t\t\t\tPositionInputs posInput = GetPositionInput(posSS.xy,
|
|
_ScreenSize.zw, posSS.z, posSS.w, posRWS, tileIndex);\n\t\t\t\t\n\t\t\t\tfloat
|
|
alpha;\n\t\t\t\tsurfaceData = VFXGetSurfaceData(i,normalWS,uvData,diffusionProfileHash,alpha);\t\n\t\t\t\tbsdfData
|
|
= ConvertSurfaceDataToBSDFData(posSS.xy, surfaceData);\n\t\t\t\n\t\t\t\tpreLightData
|
|
= GetPreLightData(GetWorldSpaceNormalizeViewDir(posRWS),posInput,bsdfData);\n\t\t\t\t\n\t\t\t\tpreLightData.diffuseFGD
|
|
= 1.0f;\n\t\t\t //TODO: investigate why this is needed\n\t\t\t preLightData.coatPartLambdaV
|
|
= 0;\n\t\t\t preLightData.coatIblR = 0;\n\t\t\t preLightData.coatIblF
|
|
= 0;\n\t\t\t \n\t\t\t\tbuiltinData = VFXGetBuiltinData(i,posInput,surfaceData,uvData,alpha);\n\t\t\t}\n\t\t\t\n\t\t\tvoid
|
|
VFXGetHDRPLitData(out SurfaceData surfaceData, out BuiltinData builtinData,
|
|
VFX_VARYING_PS_INPUTS i, float3 normalWS, const VFXUVData uvData)\n\t\t\t{\n\t\t\t\tBSDFData
|
|
bsdfData = (BSDFData)0;\n\t\t\t\tPreLightData preLightData = (PreLightData)0;\n\t\t\t\tpreLightData.diffuseFGD
|
|
= 1.0f;\n\t\t\t\tVFXGetHDRPLitData(surfaceData,builtinData,bsdfData,preLightData,i,normalWS,uvData,uint2(0,0));\n\t\t\t}\n\t\t\t\n\t\t\t#endif\n\t\t\t\n\t\t\t\n\t\t\t#include
|
|
\"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXLitPixelOutput.hlsl\"\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t#if
|
|
VFX_PASSDEPTH == VFX_PASSDEPTH_SELECTION\n\t\t\tint _ObjectId;\n\t\t\tint _PassValue;\n\t\t\t#endif\n\t\t\t\n\t\t\t#pragma
|
|
fragment frag\n\t\t\tvoid frag(ps_input i\n\t\t\t#if USE_DOUBLE_SIDED\n\t\t\t\t,
|
|
bool frontFace : SV_IsFrontFace\n\t\t\t#endif\n\t\t\t\n\t\t\t#if VFX_PASSDEPTH
|
|
== VFX_PASSDEPTH_MOTION_VECTOR\n\t\t\t\t, out float4 outMotionVector : SV_Target0\n\t\t\t\t#ifdef
|
|
WRITE_NORMAL_BUFFER\n\t\t\t\t\t, out float4 outNormalBuffer : SV_Target1\n\t\t\t\t#endif\n\t\t\t#else\n\t\t\t\t#ifdef
|
|
WRITE_NORMAL_BUFFER\n\t\t\t\t\t, out float4 outNormalBuffer : SV_Target0\n\t\t\t\t#elif
|
|
VFX_PASSDEPTH == VFX_PASSDEPTH_SELECTION\n\t\t\t\t\t, out float4 outColor :
|
|
SV_Target0\n\t\t\t\t#endif\n\t\t\t#endif\n\t\t\t\t)\n\t\t\t{\n\t\t\t\tUNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i);\n\t\t\t\tVFXTransformPSInputs(i);\n\t\t\t\t\n\t\t\t\t\t\t\t#ifdef
|
|
VFX_VARYING_NORMAL\n\t\t\t\t\t\t\t#if USE_DOUBLE_SIDED\n\t\t\t\t\t\t\tconst
|
|
float faceMul = frontFace ? 1.0f : -1.0f;\n\t\t\t\t\t\t\t#else\n\t\t\t\t\t\t\tconst
|
|
float faceMul = 1.0f;\n\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfloat3
|
|
normalWS = normalize(i.VFX_VARYING_NORMAL * faceMul);\n\t\t\t\t\t\t\tconst
|
|
VFXUVData uvData = GetUVData(i);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t#ifdef VFX_VARYING_TANGENT\n\t\t\t\t\t\t\tfloat3
|
|
tangentWS = normalize(i.VFX_VARYING_TANGENT.xyz);\n\t\t\t\t\t\t\tfloat3 bitangentWS
|
|
= cross(normalWS,tangentWS) * (i.VFX_VARYING_TANGENT.w * faceMul);\n\t\t\t\t\t\t\tfloat3x3
|
|
tbn = float3x3(tangentWS,bitangentWS,normalWS);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t#if
|
|
USE_NORMAL_MAP\n\t\t\t\t\t\t\tfloat3 n = SampleNormalMap(VFX_SAMPLER(normalMap),uvData);\n\t\t\t\t\t\t\tfloat
|
|
normalScale = 1.0f;\n\t\t\t\t\t\t\t#ifdef VFX_VARYING_NORMALSCALE\n\t\t\t\t\t\t\tnormalScale
|
|
= i.VFX_VARYING_NORMALSCALE;\n\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\tnormalWS
|
|
= normalize(lerp(normalWS,mul(n,tbn),normalScale));\n\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t#ifdef
|
|
VFX_SHADERGRAPH\n\t\t\t \n\t\t\t \n\t\t\t\t\n\t\t\t float
|
|
alpha = OUTSG.;\n\t\t\t #else\n\t\t\t\tfloat alpha = VFXGetFragmentColor(i).a;\n\t\t\t\t#if
|
|
HDRP_USE_BASE_COLOR_MAP_ALPHA\n\t\t\t\t\talpha *= VFXGetTextureColor(VFX_SAMPLER(baseColorMap),i).a;\n\t\t\t\t#endif\n\t\t\t
|
|
#endif\n\t\t\t\tVFXClipFragmentColor(alpha,i);\n\t\t\t\t\n\t\t\t\t#ifdef WRITE_NORMAL_BUFFER\n\t\t\t
|
|
#ifndef VFX_SHADERGRAPH\n\t\t\t VFXComputePixelOutputToNormalBuffer(i,normalWS,uvData,outNormalBuffer);\n\t\t\t
|
|
#else\n\t\t\t #if HAS_SHADERGRAPH_PARAM_NORMAL\n\t\t\t
|
|
float3 n = OUTSG.Normal_8;\n\t\t\t normalWS = mul(n,tbn);\n\t\t\t
|
|
#endif\n\t\t\t SurfaceData surface = (SurfaceData)0;\n\t\t\t
|
|
\n\t\t\t surface.normalWS = normalWS;\n\t\t\t \n\t\t\t
|
|
EncodeIntoNormalBuffer(ConvertSurfaceDataToNormalData(surface), i.VFX_VARYING_POSCS.xy,
|
|
outNormalBuffer);\n\t\t\t #endif\n\t\t\t\t#endif\n\t\t\t\n\t\t\t\t#if
|
|
VFX_PASSDEPTH == VFX_PASSDEPTH_MOTION_VECTOR\n\t\t\t\t\t\n\t\t\t\t\t\t\tfloat2
|
|
velocity = (i.VFX_VARYING_VELOCITY_CPOS.xy/i.VFX_VARYING_VELOCITY_CPOS.w) -
|
|
(i.VFX_VARYING_VELOCITY_CPOS_PREVIOUS.xy/i.VFX_VARYING_VELOCITY_CPOS_PREVIOUS.w);\n\t\t\t\t\t\t\t#if
|
|
UNITY_UV_STARTS_AT_TOP\n\t\t\t\t\t\t\t\tvelocity.y = -velocity.y;\n\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\tfloat4
|
|
encodedMotionVector = 0.0f;\n\t\t\t\t\t\t\tVFXEncodeMotionVector(velocity *
|
|
0.5f, encodedMotionVector);\n\t\t\t\t\t\t\t\n\t\t\t\t\toutMotionVector = encodedMotionVector;\n\t\t\t\t#elif
|
|
VFX_PASSDEPTH == VFX_PASSDEPTH_SELECTION\n\t\t\t\t\t// We use depth prepass
|
|
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
|
|
{ \"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
|
|
multi_compile _ DEBUG_DISPLAY\n\t\t\t\n\t\t\t#define UNITY_MATERIAL_LIT\n\t\t\t\n\t\t\t#define
|
|
HDRP_NEEDS_UVS (HDRP_USE_BASE_COLOR_MAP || HDRP_USE_MASK_MAP || USE_NORMAL_MAP
|
|
|| HDRP_USE_EMISSIVE_MAP)\n\t\t\t#define HDRP_USE_EMISSIVE (HDRP_USE_EMISSIVE_MAP
|
|
|| HDRP_USE_EMISSIVE_COLOR || HDRP_USE_ADDITIONAL_EMISSIVE_COLOR)\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\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\n\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t#if
|
|
(VFX_NEEDS_COLOR_INTERPOLATOR && HDRP_USE_BASE_COLOR) || HDRP_USE_ADDITIONAL_BASE_COLOR\n\t\t\t\t\t\t\tVFX_OPTIONAL_INTERPOLATION
|
|
float4 color : COLOR0;\n\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t#if HDRP_MATERIAL_TYPE_SPECULAR\n\t\t\t\t\t\t\tVFX_OPTIONAL_INTERPOLATION
|
|
float3 specularColor : COLOR1;\n\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t#if HDRP_USE_EMISSIVE\t\n\t\t\t\t\t\t\tVFX_OPTIONAL_INTERPOLATION
|
|
float4 emissiveColor : COLOR2;\n\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//
|
|
x: smoothness\n\t\t\t\t\t\t\t// y: metallic/thickness\n\t\t\t\t\t\t\t// z:
|
|
normal scale\n\t\t\t\t\t\t\t// w: emissive scale\n\t\t\t\t\t\t\tVFX_OPTIONAL_INTERPOLATION
|
|
float4 materialProperties : TEXCOORD0;\n\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t#if
|
|
USE_FLIPBOOK_INTERPOLATION\n\t\t\t\tfloat4 uv : TEXCOORD1;\n\t\t\t\t#else\n\t\t\t\tfloat2
|
|
uv : TEXCOORD1;\t\n\t\t\t\t#endif\n\t\t #if VFX_SHADERGRAPH_HAS_UV1\n\t\t
|
|
float4 uv1 : COLOR2;\n\t\t #endif\n\t\t #if VFX_SHADERGRAPH_HAS_UV2\n\t\t
|
|
float4 uv2 : COLOR3;\n\t\t #endif\n\t\t #if VFX_SHADERGRAPH_HAS_UV3\n\t\t
|
|
float4 uv3 : COLOR4;\n\t\t #endif\n\t\t #if VFX_SHADERGRAPH_HAS_COLOR\n\t\t
|
|
float4 vertexColor : COLOR1;\n\t\t #endif\n\t\t\t\tfloat3 normal : TEXCOORD2;\n\t\t\t\t#if
|
|
USE_NORMAL_MAP || SHADERGRAPH_NEEDS_TANGENT_GBUFFER\n\t\t\t\tfloat4 tangent
|
|
: TEXCOORD3;\n\t\t\t\t#endif\n\t\t\t\t#if USE_SOFT_PARTICLE || USE_ALPHA_TEST
|
|
|| USE_FLIPBOOK_INTERPOLATION\n\t\t\t\t// x: inverse soft particles fade distance\n\t\t\t\t//
|
|
y: alpha threshold\n\t\t\t\t// z: frame blending factor\n\t\t\t\tnointerpolation
|
|
float3 builtInInterpolants : TEXCOORD4;\n\t\t\t\t#endif\n\t\t\t\t#if USE_FLIPBOOK_MOTIONVECTORS\n\t\t\t\t//
|
|
x: motion vector scale u\n\t\t\t\t// y: motion vector scale v\n\t\t\t\tnointerpolation
|
|
float2 builtInInterpolants2 : TEXCOORD5;\n\t\t\t\t#endif\n\t\t \n\t\t#if
|
|
VFX_NEEDS_POSWS_INTERPOLATOR\n\t\t\t\tfloat3 posWS : TEXCOORD6;\n\t\t#endif\n\t\t\n\t\t
|
|
\n\t\t \n\t\t\t\tUNITY_VERTEX_OUTPUT_STEREO\n\t\t\t};\n\t\t\t\n\t\t\tstruct
|
|
ps_output\n\t\t\t{\n\t\t\t\tfloat4 color : SV_Target0;\n\t\t\t};\n\t\t\n\t\t\n\t\t\t\t\t#if
|
|
(VFX_NEEDS_COLOR_INTERPOLATOR && HDRP_USE_BASE_COLOR) || HDRP_USE_ADDITIONAL_BASE_COLOR\n\t\t\t\t\t#define
|
|
VFX_VARYING_COLOR color.rgb\n\t\t\t\t\t#define VFX_VARYING_ALPHA color.a\n\t\t\t\t\t#endif\n\t\t\t\t\t\n\t\t\t\t\t#define
|
|
VFX_VARYING_SMOOTHNESS materialProperties.x\n\t\t\t\t\t\n\t\t\t\t\t#if HDRP_MATERIAL_TYPE_STANDARD\n\t\t\t\t\t#define
|
|
VFX_VARYING_METALLIC materialProperties.y\n\t\t\t\t\t#elif HDRP_MATERIAL_TYPE_SPECULAR\n\t\t\t\t\t#define
|
|
VFX_VARYING_SPECULAR specularColor\n\t\t\t\t\t#elif HDRP_MATERIAL_TYPE_TRANSLUCENT\n\t\t\t\t\t#define
|
|
VFX_VARYING_THICKNESS materialProperties.y\n\t\t\t\t\t#endif\n\t\t\t\t\t\n\t\t\t\t\t#if
|
|
USE_NORMAL_MAP\n\t\t\t\t\t#define VFX_VARYING_NORMALSCALE materialProperties.z\n\t\t\t\t\t#endif\n\t\t\t\t\t\n\t\t\t\t\t#if
|
|
HDRP_USE_EMISSIVE_MAP\n\t\t\t\t\t#define VFX_VARYING_EMISSIVESCALE materialProperties.w\n\t\t\t\t\t#endif\n\t\t\t\t\t\n\t\t\t\t\t#if
|
|
HDRP_USE_EMISSIVE_COLOR || HDRP_USE_ADDITIONAL_EMISSIVE_COLOR\n\t\t\t\t\t#define
|
|
VFX_VARYING_EMISSIVE emissiveColor.rgb\n\t\t\t\t\t#endif\n\t\t\t\t\t\n\t\t\t\t\t#if
|
|
USE_EXPOSURE_WEIGHT\n\t\t\t\t\t#define VFX_VARYING_EXPOSUREWEIGHT emissiveColor.a\n\t\t\t\t\t#endif\n\t\t\t\t\t\n\t\t\t\n\t\t#define
|
|
VFX_VARYING_PS_INPUTS ps_input\n\t\t#define VFX_VARYING_POSCS pos\n\t\t#define
|
|
VFX_VARYING_UV uv\n\t\t#define VFX_VARYING_INVSOFTPARTICLEFADEDISTANCE builtInInterpolants.x\n\t\t#define
|
|
VFX_VARYING_ALPHATHRESHOLD builtInInterpolants.y\n\t\t#define VFX_VARYING_FRAMEBLEND
|
|
builtInInterpolants.z\n\t\t#define VFX_VARYING_MOTIONVECTORSCALE builtInInterpolants2.xy\n\t\t#define
|
|
VFX_VARYING_NORMAL normal\n\t\t\n\t\t#if USE_NORMAL_MAP || SHADERGRAPH_NEEDS_TANGENT_GBUFFER\n\t\t#define
|
|
VFX_VARYING_TANGENT tangent\n\t\t#endif\n\t\t#if VFX_NEEDS_POSWS_INTERPOLATOR\n\t\t#define
|
|
VFX_VARYING_POSWS posWS\n\t\t#endif\n\t\t\n\t\t\n\t\t\n\t\t\t#if !(defined(VFX_VARYING_PS_INPUTS)
|
|
&& defined(VFX_VARYING_POSCS))\n\t\t\t#error VFX_VARYING_PS_INPUTS, VFX_VARYING_POSCS
|
|
and VFX_VARYING_UV must be defined.\n\t\t\t#endif\n\t\t\t\n\t\t\t#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXCommon.hlsl\"\n\t\t\t#include
|
|
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\t\t\t\n\n\t\t\tvoid
|
|
AttributeFromCurve_536B781C(inout float scaleX, inout float scaleY, inout float
|
|
scaleZ, float age, float lifetime, float4 Scale_x, float4 Scale_y, float4 Scale_z)
|
|
/*attribute:scale Composition:Overwrite AlphaComposition:Overwrite SampleMode:OverLife
|
|
Mode:PerComponent ColorMode:ColorAndAlpha channels:XYZ */\n\t\t\t{\n\t\t\t
|
|
float t = age / lifetime;\n\t\t\t float3 value = 0.0f;\n\t\t\t value[0]
|
|
= SampleCurve(Scale_x, t);\n\t\t\t value[1] = SampleCurve(Scale_y, t);\n\t\t\t
|
|
value[2] = SampleCurve(Scale_z, t);\n\t\t\t scaleX = value.x;\n\t\t\t
|
|
scaleY = value.y;\n\t\t\t scaleZ = value.z;\n\t\t\t}\n\t\t\tvoid SetAttribute_39EE3455(inout
|
|
float size, float Size) /*attribute:size Composition:Multiply Source:Slot Random:Off
|
|
channels:XYZ */\n\t\t\t{\n\t\t\t size *= Size;\n\t\t\t}\n\t\t\tvoid AttributeFromCurve_7DF18693(inout
|
|
float size, float age, float lifetime, float4 Size) /*attribute:size Composition:Multiply
|
|
AlphaComposition:Overwrite SampleMode:OverLife Mode:PerComponent ColorMode:ColorAndAlpha
|
|
channels:XYZ */\n\t\t\t{\n\t\t\t float t = age / lifetime;\n\t\t\t float
|
|
value = 0.0f;\n\t\t\t value = SampleCurve(Size, t);\n\t\t\t size *= value;\n\t\t\t}\n\t\t\t\n\n\t\t\t\n\t\t\tstruct
|
|
vs_input\n\t\t\t{\n\t\t\t\tfloat3 pos : POSITION;\n\t\t\t\tfloat2 uv : TEXCOORD0;\n\t\t\t
|
|
#if VFX_SHADERGRAPH_HAS_UV1\n\t\t\t float4 uv1 : TEXCOORD1;\n\t\t\t #endif\n\t\t\t
|
|
#if VFX_SHADERGRAPH_HAS_UV2\n\t\t\t float4 uv2 : TEXCOORD2;\n\t\t\t #endif\n\t\t\t
|
|
#if VFX_SHADERGRAPH_HAS_UV3\n\t\t\t float4 uv3 : TEXCOORD3;\n\t\t\t #endif\n\t\t\t
|
|
#if VFX_SHADERGRAPH_HAS_COLOR\n\t\t\t float4 vertexColor : COLOR;\n\t\t\t
|
|
#endif\n\t\t\t\tfloat3 normal : NORMAL;\n\t\t\t\t#if defined(VFX_VARYING_TANGENT)
|
|
|| SHADERGRAPH_HAS_NORMAL\n\t\t\t\tfloat4 tangent : TANGENT;\n\t\t\t\t#endif\n\t\t\t\tVFX_DECLARE_INSTANCE_ID\n\t\t\t};\n\t\t\t\n\t\t\t#pragma
|
|
vertex vert\n\t\t\tVFX_VARYING_PS_INPUTS vert(vs_input i)\n\t\t\t{\n\t\t\t
|
|
VFX_VARYING_PS_INPUTS o = (VFX_VARYING_PS_INPUTS)0;\n\t\t\t\n\t\t\t\tUNITY_SETUP_INSTANCE_ID(i);\n\t\t\t\tUNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);\n\t\t\t\n\t\t\t\tuint
|
|
index = VFX_GET_INSTANCE_ID(i);\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\tuint deadCount
|
|
= 0;\n\t\t\t\t\t\t#if USE_DEAD_LIST_COUNT\n\t\t\t\t\t\tdeadCount = deadListCount.Load(0);\n\t\t\t\t\t\t#endif\t\n\t\t\t\t\t\tif
|
|
(index >= asuint(nbMax) - deadCount)\n\t\t\t\t\t\t#if USE_GEOMETRY_SHADER\n\t\t\t\t\t\t\treturn;
|
|
// cull\n\t\t\t\t\t\t#else\n\t\t\t\t\t\t\treturn o; // cull\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\t\tAttributes
|
|
attributes = (Attributes)0;\n\t\t\t\t\t\tSourceAttributes sourceAttributes
|
|
= (SourceAttributes)0;\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\tattributes.position = asfloat(attributeBuffer.Load3((index
|
|
* 0x8 + 0x0) << 2));\n\t\t\t\t\t\tattributes.lifetime = asfloat(attributeBuffer.Load((index
|
|
* 0x1 + 0x2D00) << 2));\n\t\t\t\t\t\tattributes.texIndex = asfloat(attributeBuffer.Load((index
|
|
* 0x1 + 0x30C0) << 2));\n\t\t\t\t\t\tattributes.angleX = asfloat(attributeBuffer.Load((index
|
|
* 0x8 + 0x3) << 2));\n\t\t\t\t\t\tattributes.angleY = asfloat(attributeBuffer.Load((index
|
|
* 0x8 + 0x4) << 2));\n\t\t\t\t\t\tattributes.angleZ = asfloat(attributeBuffer.Load((index
|
|
* 0x8 + 0x5) << 2));\n\t\t\t\t\t\tattributes.size = asfloat(attributeBuffer.Load((index
|
|
* 0x4 + 0x3FC0) << 2));\n\t\t\t\t\t\tattributes.alpha = (float)1;\n\t\t\t\t\t\tattributes.alive
|
|
= (attributeBuffer.Load((index * 0x8 + 0x6) << 2));\n\t\t\t\t\t\tattributes.axisX
|
|
= float3(1, 0, 0);\n\t\t\t\t\t\tattributes.axisY = float3(0, 1, 0);\n\t\t\t\t\t\tattributes.axisZ
|
|
= float3(0, 0, 1);\n\t\t\t\t\t\tattributes.pivotX = (float)0;\n\t\t\t\t\t\tattributes.pivotY
|
|
= (float)0;\n\t\t\t\t\t\tattributes.pivotZ = (float)0;\n\t\t\t\t\t\tattributes.scaleX
|
|
= asfloat(attributeBuffer.Load((index * 0x4 + 0x3FC1) << 2));\n\t\t\t\t\t\tattributes.scaleY
|
|
= asfloat(attributeBuffer.Load((index * 0x4 + 0x3FC2) << 2));\n\t\t\t\t\t\tattributes.scaleZ
|
|
= asfloat(attributeBuffer.Load((index * 0x4 + 0x3FC3) << 2));\n\t\t\t\t\t\tattributes.age
|
|
= asfloat(attributeBuffer.Load((index * 0x8 + 0x7) << 2));\n\t\t\t\t\t\tattributes.color
|
|
= float3(1, 1, 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\tattributes.alive
|
|
= (attributeBuffer.Load((index * 0x8 + 0x6) << 2));\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t#if
|
|
!HAS_STRIPS\n\t\t\t\t\t\tif (!attributes.alive)\n\t\t\t\t\t\t\treturn o;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tattributes.position
|
|
= asfloat(attributeBuffer.Load3((index * 0x8 + 0x0) << 2));\n\t\t\t\t\t\tattributes.lifetime
|
|
= asfloat(attributeBuffer.Load((index * 0x1 + 0x2D00) << 2));\n\t\t\t\t\t\tattributes.texIndex
|
|
= asfloat(attributeBuffer.Load((index * 0x1 + 0x30C0) << 2));\n\t\t\t\t\t\tattributes.angleX
|
|
= asfloat(attributeBuffer.Load((index * 0x8 + 0x3) << 2));\n\t\t\t\t\t\tattributes.angleY
|
|
= asfloat(attributeBuffer.Load((index * 0x8 + 0x4) << 2));\n\t\t\t\t\t\tattributes.angleZ
|
|
= asfloat(attributeBuffer.Load((index * 0x8 + 0x5) << 2));\n\t\t\t\t\t\tattributes.size
|
|
= asfloat(attributeBuffer.Load((index * 0x4 + 0x3FC0) << 2));\n\t\t\t\t\t\tattributes.alpha
|
|
= (float)1;\n\t\t\t\t\t\tattributes.axisX = float3(1, 0, 0);\n\t\t\t\t\t\tattributes.axisY
|
|
= float3(0, 1, 0);\n\t\t\t\t\t\tattributes.axisZ = float3(0, 0, 1);\n\t\t\t\t\t\tattributes.pivotX
|
|
= (float)0;\n\t\t\t\t\t\tattributes.pivotY = (float)0;\n\t\t\t\t\t\tattributes.pivotZ
|
|
= (float)0;\n\t\t\t\t\t\tattributes.scaleX = asfloat(attributeBuffer.Load((index
|
|
* 0x4 + 0x3FC1) << 2));\n\t\t\t\t\t\tattributes.scaleY = asfloat(attributeBuffer.Load((index
|
|
* 0x4 + 0x3FC2) << 2));\n\t\t\t\t\t\tattributes.scaleZ = asfloat(attributeBuffer.Load((index
|
|
* 0x4 + 0x3FC3) << 2));\n\t\t\t\t\t\tattributes.age = asfloat(attributeBuffer.Load((index
|
|
* 0x8 + 0x7) << 2));\n\t\t\t\t\t\tattributes.color = float3(1, 1, 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\t\t\t//
|
|
Initialize built-in needed attributes\n\t\t\t\t\t\t#if HAS_STRIPS\n\t\t\t\t\t\tInitStripAttributes(index,
|
|
attributes, stripData);\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\tAttributeFromCurve_536B781C(
|
|
/*inout */attributes.scaleX, /*inout */attributes.scaleY, /*inout */attributes.scaleZ,
|
|
attributes.age, attributes.lifetime, Scale_x_a, Scale_y_a, Scale_z_a);\n\t\t\t\t{\n\t\t\t\t
|
|
float3 tmp_bl = attributes.position - uniform_f;\n\t\t\t\t float3 tmp_bm
|
|
= tmp_bl * tmp_bl;\n\t\t\t\t float tmp_bn = tmp_bm[2];\n\t\t\t\t float
|
|
tmp_bo = tmp_bm[1];\n\t\t\t\t float tmp_bp = tmp_bn + tmp_bo;\n\t\t\t\t
|
|
float tmp_bq = tmp_bm[0];\n\t\t\t\t float tmp_br = tmp_bp + tmp_bq;\n\t\t\t\t
|
|
float tmp_bt = pow(tmp_br, (float)0.5);\n\t\t\t\t float tmp_bu = SampleCurve(uniform_e,tmp_bt);\n\t\t\t\t
|
|
SetAttribute_39EE3455( /*inout */attributes.size, tmp_bu);\n\t\t\t\t}\n\t\t\t\tAttributeFromCurve_7DF18693(
|
|
/*inout */attributes.size, attributes.age, attributes.lifetime, Size_c);\n\t\t\t\t\n\n\t\t\t\t\t\t\n\t\t\t\tif
|
|
(!attributes.alive)\n\t\t\t\t\treturn o;\n\t\t\t\t\n\t\t\t\to.VFX_VARYING_UV.xy
|
|
= i.uv;\n\t\t\t \n\t\t\t #if VFX_SHADERGRAPH_HAS_UV1\n\t\t\t o.uv1
|
|
= i.uv1;\n\t\t\t #endif\n\t\t\t #if VFX_SHADERGRAPH_HAS_UV2\n\t\t\t
|
|
o.uv2 = i.uv2;\n\t\t\t #endif\n\t\t\t #if VFX_SHADERGRAPH_HAS_UV3\n\t\t\t
|
|
o.uv3 = i.uv3;\n\t\t\t #endif\n\t\t\t #if VFX_SHADERGRAPH_HAS_COLOR\n\t\t\t
|
|
o.vertexColor = i.vertexColor;\n\t\t\t #endif\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\tfloat3
|
|
size3 = float3(attributes.size,attributes.size,attributes.size);\n\t\t\t\t\t\t#if
|
|
VFX_USE_SCALEX_CURRENT\n\t\t\t\t\t\tsize3.x *= attributes.scaleX;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t#if
|
|
VFX_USE_SCALEY_CURRENT\n\t\t\t\t\t\tsize3.y *= attributes.scaleY;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t#if
|
|
VFX_USE_SCALEZ_CURRENT\n\t\t\t\t\t\tsize3.z *= attributes.scaleZ;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\tfloat3
|
|
inputVertexPosition = i.pos;\n\t\t\t\tfloat4x4 elementToVFX = GetElementToVFXMatrix(\n\t\t\t\t\tattributes.axisX,\n\t\t\t\t\tattributes.axisY,\n\t\t\t\t\tattributes.axisZ,\n\t\t\t\t\tfloat3(attributes.angleX,attributes.angleY,attributes.angleZ),\n\t\t\t\t\tfloat3(attributes.pivotX,attributes.pivotY,attributes.pivotZ),\n\t\t\t\t\tsize3,\n\t\t\t\t\tattributes.position);\n\t\t\t\t\t\n\t\t\t\tfloat3
|
|
vPos = mul(elementToVFX,float4(inputVertexPosition,1.0f)).xyz;\n\t\t\t\tfloat4
|
|
csPos = TransformPositionVFXToClip(vPos);\n\t\t\t\to.VFX_VARYING_POSCS = csPos;\n\t\t\t\t\n\t\t\t\tfloat3
|
|
normalWS = normalize(TransformDirectionVFXToWorld(mul((float3x3)elementToVFX,
|
|
i.normal)));\n\t\t\t\t#ifdef VFX_VARYING_NORMAL // TODO Should use inverse
|
|
transpose\n\t\t\t\to.VFX_VARYING_NORMAL = normalWS;\n\t\t\t\t#endif\n\t\t\t\t#ifdef
|
|
VFX_VARYING_TANGENT\n\t\t\t\to.VFX_VARYING_TANGENT = float4(normalize(TransformDirectionVFXToWorld(mul((float3x3)elementToVFX,i.tangent.xyz))),i.tangent.w);\n\t\t\t\t#endif\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t#if
|
|
defined(VFX_VARYING_VELOCITY_CPOS) && defined(VFX_VARYING_VELOCITY_CPOS_PREVIOUS)\n\t\t\t\t\t\tfloat4x4
|
|
previousElementToVFX = (float4x4)0;\n\t\t\t\t\t\tpreviousElementToVFX[3] =
|
|
float4(0,0,0,1);\n\t\t\t\t\t\t\n\t\t\t\t\t\tUNITY_UNROLL\n\t\t\t\t\t\tfor (int
|
|
itIndexMatrixRow = 0; itIndexMatrixRow < 3; ++itIndexMatrixRow)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tUNITY_UNROLL\n\t\t\t\t\t\t\tfor
|
|
(int itIndexMatrixCol = 0; itIndexMatrixCol < 4; ++itIndexMatrixCol)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tuint
|
|
itIndexMatrix = itIndexMatrixCol * 4 + itIndexMatrixRow;\n\t\t\t\t\t\t\t\tuint
|
|
read = elementToVFXBufferPrevious.Load((index * 16 + itIndexMatrix) << 2);\n\t\t\t\t\t\t\t\tpreviousElementToVFX[itIndexMatrixRow][itIndexMatrixCol]
|
|
= asfloat(read);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tuint
|
|
previousFrameIndex = elementToVFXBufferPrevious.Load((index * 16 + 15) << 2);\n\t\t\t\t\t\to.VFX_VARYING_VELOCITY_CPOS
|
|
= o.VFX_VARYING_VELOCITY_CPOS_PREVIOUS = float4(0.0f, 0.0f, 0.0f, 1.0f);\n\t\t\t\t\t\tif
|
|
(asuint(currentFrameIndex) - previousFrameIndex == 1u)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfloat3
|
|
oldvPos = mul(previousElementToVFX,float4(inputVertexPosition, 1.0f)).xyz;\n\t\t\t\t\t\t\to.VFX_VARYING_VELOCITY_CPOS_PREVIOUS
|
|
= TransformPositionVFXToPreviousClip(oldvPos);\n\t\t\t\t\t\t\to.VFX_VARYING_VELOCITY_CPOS
|
|
= TransformPositionVFXToNonJitteredClip(vPos);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t#if
|
|
VFX_USE_COLOR_CURRENT && defined(VFX_VARYING_COLOR)\n\t\t\t\t\t\to.VFX_VARYING_COLOR
|
|
= attributes.color;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t#if VFX_USE_ALPHA_CURRENT
|
|
&& defined(VFX_VARYING_ALPHA) \n\t\t\t\t\t\to.VFX_VARYING_ALPHA = attributes.alpha;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\t\t#ifdef
|
|
VFX_VARYING_EXPOSUREWEIGHT\n\t\t\t\t\t\t\n\t\t\t\t\t\to.VFX_VARYING_EXPOSUREWEIGHT
|
|
= exposureWeight;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\t\t#if USE_SOFT_PARTICLE
|
|
&& defined(VFX_VARYING_INVSOFTPARTICLEFADEDISTANCE)\n\t\t\t\t\t\t\n\t\t\t\t\t\to.VFX_VARYING_INVSOFTPARTICLEFADEDISTANCE
|
|
= invSoftParticlesFadeDistance;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\t\t#if
|
|
(USE_ALPHA_TEST || WRITE_MOTION_VECTOR_IN_FORWARD) && (!VFX_SHADERGRAPH ||
|
|
!HAS_SHADERGRAPH_PARAM_ALPHATHRESHOLD) && defined(VFX_VARYING_ALPHATHRESHOLD)\n\t\t\t\t\t\tfloat
|
|
alphaThreshold = (float)0;\n\t\t\t\t\t\t{\n\t\t\t\t\t\t \n\t\t\t\t\t\t
|
|
alphaThreshold = (float)0.200000003;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\to.VFX_VARYING_ALPHATHRESHOLD
|
|
= alphaThreshold;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\t\t#if USE_UV_SCALE_BIAS\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t#if
|
|
defined (VFX_VARYING_UV)\n\t\t\t\t\t\to.VFX_VARYING_UV.xy = o.VFX_VARYING_UV.xy
|
|
* uvScale + uvBias;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\t\t#if
|
|
defined(VFX_VARYING_POSWS)\n\t\t\t\t\t\to.VFX_VARYING_POSWS = TransformPositionVFXToWorld(vPos);\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t#if
|
|
USE_FLIPBOOK && defined(VFX_VARYING_UV)\n\t\t\t\t\t\tfloat2 flipBookSize =
|
|
(float2)0;\n\t\t\t\t\t\t{\n\t\t\t\t\t\t \n\t\t\t\t\t\t flipBookSize =
|
|
float2(4, 4);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\tfloat2 invFlipBookSize
|
|
= (float2)0;\n\t\t\t\t\t\t{\n\t\t\t\t\t\t \n\t\t\t\t\t\t invFlipBookSize
|
|
= float2(0.25, 0.25);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\tVFXUVData
|
|
uvData = GetUVData(flipBookSize, invFlipBookSize, o.VFX_VARYING_UV.xy, attributes.texIndex);\n\t\t\t\t\t\to.VFX_VARYING_UV.xy
|
|
= uvData.uvs.xy;\n\t\t\t\t\t\t#if USE_FLIPBOOK_INTERPOLATION && defined(VFX_VARYING_UV)
|
|
&& defined (VFX_VARYING_FRAMEBLEND)\n\t\t\t\t\t\to.VFX_VARYING_UV.zw = uvData.uvs.zw;\n\t\t\t\t\t\to.VFX_VARYING_FRAMEBLEND
|
|
= uvData.blend;\n\t\t\t\t\t\t#if USE_FLIPBOOK_MOTIONVECTORS && defined(VFX_VARYING_MOTIONVECTORSCALE)\n\t\t\t\t\t\t\n\t\t\t\t\t\to.VFX_VARYING_MOTIONVECTORSCALE
|
|
= motionVectorScale * invFlipBookSize;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t#ifndef
|
|
VFX_SHADERGRAPH\n\t\t\t\t\t\t\t\t\t#ifdef VFX_VARYING_SMOOTHNESS\n\t\t\t\t\t\t\t\t\tfloat
|
|
smoothness = (float)0;\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t
|
|
smoothness = (float)0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\to.VFX_VARYING_SMOOTHNESS
|
|
= smoothness;\n\t\t\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t\t\t#if HDRP_MATERIAL_TYPE_STANDARD\n\t\t\t\t\t\t\t\t\t#ifdef
|
|
VFX_VARYING_METALLIC\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\to.VFX_VARYING_METALLIC
|
|
= metallic;\n\t\t\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t\t\t#elif HDRP_MATERIAL_TYPE_SPECULAR\n\t\t\t\t\t\t\t\t\t#ifdef
|
|
VFX_VARYING_SPECULAR\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\to.VFX_VARYING_SPECULAR
|
|
= specularColor;\n\t\t\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t\t\t#elif HDRP_MATERIAL_TYPE_TRANSLUCENT\n\t\t\t\t\t\t\t\t\t#ifdef
|
|
VFX_VARYING_THICKNESS\n\t\t\t\t\t\t\t\t\tfloat thickness = (float)0;\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t
|
|
\n\t\t\t\t\t\t\t\t\t thickness = (float)0.296420813;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\to.VFX_VARYING_THICKNESS
|
|
= thickness;\n\t\t\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t\t\t#if
|
|
USE_NORMAL_MAP\n\t\t\t\t\t\t\t\t\t#ifdef VFX_VARYING_NORMALSCALE\n\t\t\t\t\t\t\t\t\tfloat
|
|
normalScale = (float)0;\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t
|
|
normalScale = (float)1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\to.VFX_VARYING_NORMALSCALE
|
|
= normalScale;\n\t\t\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t\t\t#if
|
|
HDRP_USE_EMISSIVE_MAP\n\t\t\t\t\t\t\t\t\t#ifdef VFX_VARYING_EMISSIVESCALE\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\to.VFX_VARYING_EMISSIVESCALE
|
|
= emissiveScale;\n\t\t\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t\t\t#ifdef
|
|
VFX_VARYING_EMISSIVE\n\t\t\t\t\t\t\t\t\t#if HDRP_USE_EMISSIVE_COLOR\n\t\t\t\t\t\t\t\t\to.VFX_VARYING_EMISSIVE
|
|
= attributes.color;\n\t\t\t\t\t\t\t\t\t#elif HDRP_USE_ADDITIONAL_EMISSIVE_COLOR\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\to.VFX_VARYING_EMISSIVE
|
|
= emissiveColor;\n\t\t\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t\t\t#if
|
|
HDRP_USE_ADDITIONAL_BASE_COLOR\n\t\t\t\t\t\t\t\t\t#ifdef VFX_VARYING_COLOR\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\to.VFX_VARYING_COLOR
|
|
= baseColor;\n\t\t\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t
|
|
\n\t\t\t \n\t\t\t\t\n\t\t\t\treturn o;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t#include
|
|
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommonOutput.hlsl\"\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t#define
|
|
SHADERPASS SHADERPASS_GBUFFER\t\n\t\t\t#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXLit.hlsl\"\n\t\t\t\n\t\t\t#ifndef
|
|
VFX_SHADERGRAPH\n\t\t\t\n\t\t\tvoid VFXGetHDRPLitData(out SurfaceData surfaceData,
|
|
out BuiltinData builtinData, out BSDFData bsdfData, out PreLightData preLightData,
|
|
VFX_VARYING_PS_INPUTS i, float3 normalWS, const VFXUVData uvData, uint2 tileIndex)\n\t\t\t{\t\n\t\t\t\t#if
|
|
HDRP_MATERIAL_TYPE_TRANSLUCENT\n\t\t\t\tuint diffusionProfileHash = (uint)0;\n\t\t\t\t{\n\t\t\t\t
|
|
\n\t\t\t\t diffusionProfileHash = (uint)1080328534;\n\t\t\t\t}\n\t\t\t\t\n
|
|
// Loads diffusion profile\n\t\t\t\t#else\n\t\t\t\tconst uint diffusionProfileHash
|
|
= 0;\n\t\t\t\t#endif\n\t\t\t\t\n\t\t\t\tfloat3 posRWS = VFXGetPositionRWS(i);\n\t\t\t\tfloat4
|
|
posSS = i.VFX_VARYING_POSCS;\n\t\t\t\tPositionInputs posInput = GetPositionInput(posSS.xy,
|
|
_ScreenSize.zw, posSS.z, posSS.w, posRWS, tileIndex);\n\t\t\t\t\n\t\t\t\tfloat
|
|
alpha;\n\t\t\t\tsurfaceData = VFXGetSurfaceData(i,normalWS,uvData,diffusionProfileHash,alpha);\t\n\t\t\t\tbsdfData
|
|
= ConvertSurfaceDataToBSDFData(posSS.xy, surfaceData);\n\t\t\t\n\t\t\t\tpreLightData
|
|
= GetPreLightData(GetWorldSpaceNormalizeViewDir(posRWS),posInput,bsdfData);\n\t\t\t\t\n\t\t\t\tpreLightData.diffuseFGD
|
|
= 1.0f;\n\t\t\t //TODO: investigate why this is needed\n\t\t\t preLightData.coatPartLambdaV
|
|
= 0;\n\t\t\t preLightData.coatIblR = 0;\n\t\t\t preLightData.coatIblF
|
|
= 0;\n\t\t\t \n\t\t\t\tbuiltinData = VFXGetBuiltinData(i,posInput,surfaceData,uvData,alpha);\n\t\t\t}\n\t\t\t\n\t\t\tvoid
|
|
VFXGetHDRPLitData(out SurfaceData surfaceData, out BuiltinData builtinData,
|
|
VFX_VARYING_PS_INPUTS i, float3 normalWS, const VFXUVData uvData)\n\t\t\t{\n\t\t\t\tBSDFData
|
|
bsdfData = (BSDFData)0;\n\t\t\t\tPreLightData preLightData = (PreLightData)0;\n\t\t\t\tpreLightData.diffuseFGD
|
|
= 1.0f;\n\t\t\t\tVFXGetHDRPLitData(surfaceData,builtinData,bsdfData,preLightData,i,normalWS,uvData,uint2(0,0));\n\t\t\t}\n\t\t\t\n\t\t\t#endif\n\t\t\t\n\t\t\t\n\t\t\t#include
|
|
\"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXLitPixelOutput.hlsl\"\n\t\t\t\n\t\t\t\n\t\t\n\t\t\t\t\n\t\t\t\n\t\t
|
|
\n\t\t\t#pragma fragment frag\n\t\t\tvoid frag(ps_input i, OUTPUT_GBUFFER(outGBuffer)\n\t\t#if
|
|
USE_DOUBLE_SIDED\n\t\t\t, bool frontFace : SV_IsFrontFace\n\t\t#endif\n\t\t\t)\n\t\t\t{\n\t\t\t\tUNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i);\n\t\t\t\tVFXTransformPSInputs(i);\n\t\t\t\t\n\t\t\t\t\t\t\t#ifdef
|
|
VFX_VARYING_NORMAL\n\t\t\t\t\t\t\t#if USE_DOUBLE_SIDED\n\t\t\t\t\t\t\tconst
|
|
float faceMul = frontFace ? 1.0f : -1.0f;\n\t\t\t\t\t\t\t#else\n\t\t\t\t\t\t\tconst
|
|
float faceMul = 1.0f;\n\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfloat3
|
|
normalWS = normalize(i.VFX_VARYING_NORMAL * faceMul);\n\t\t\t\t\t\t\tconst
|
|
VFXUVData uvData = GetUVData(i);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t#ifdef VFX_VARYING_TANGENT\n\t\t\t\t\t\t\tfloat3
|
|
tangentWS = normalize(i.VFX_VARYING_TANGENT.xyz);\n\t\t\t\t\t\t\tfloat3 bitangentWS
|
|
= cross(normalWS,tangentWS) * (i.VFX_VARYING_TANGENT.w * faceMul);\n\t\t\t\t\t\t\tfloat3x3
|
|
tbn = float3x3(tangentWS,bitangentWS,normalWS);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t#if
|
|
USE_NORMAL_MAP\n\t\t\t\t\t\t\tfloat3 n = SampleNormalMap(VFX_SAMPLER(normalMap),uvData);\n\t\t\t\t\t\t\tfloat
|
|
normalScale = 1.0f;\n\t\t\t\t\t\t\t#ifdef VFX_VARYING_NORMALSCALE\n\t\t\t\t\t\t\tnormalScale
|
|
= i.VFX_VARYING_NORMALSCALE;\n\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\tnormalWS
|
|
= normalize(lerp(normalWS,mul(n,tbn),normalScale));\n\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t\n\t\t
|
|
\n\t\t #ifdef VFX_SHADERGRAPH\n\t\t \n\t\t \n\t\t\n\t\t
|
|
SurfaceData surface;\n\t\t BuiltinData builtin;\n\t\t
|
|
surface = (SurfaceData)0;\n\t\t builtin = (BuiltinData)0;\n\t\t
|
|
\n\t\t surface.materialFeatures = MATERIALFEATUREFLAGS_LIT_STANDARD;\n\t\t
|
|
surface.specularOcclusion = 1.0f;\n\t\t surface.ambientOcclusion
|
|
= 1.0f;\n\t\t surface.subsurfaceMask = 1.0f;\n\t\t \n\t\t
|
|
#if HAS_SHADERGRAPH_PARAM_ALPHA\n\t\t builtin.opacity = OUTSG.;\n\t\t
|
|
VFXClipFragmentColor(builtin.opacity,i);\n\t\t #endif\n\t\t
|
|
\n\t\t #if HAS_SHADERGRAPH_PARAM_SMOOTHNESS\n\t\t
|
|
surface.perceptualSmoothness = OUTSG.;\n\t\t #endif\n\t\t
|
|
#if HAS_SHADERGRAPH_PARAM_METALLIC\n\t\t surface.metallic =
|
|
OUTSG.;\n\t\t #endif\n\t\t #if HAS_SHADERGRAPH_PARAM_BASECOLOR\n\t\t
|
|
surface.baseColor = OUTSG.;\n\t\t #endif\n\t\t \n\t\t
|
|
#if HAS_SHADERGRAPH_PARAM_NORMAL\n\t\t float3 n = OUTSG.;\n\t\t
|
|
normalWS = mul(n,tbn);\n\t\t #endif\n\t\t \n\t\t
|
|
surface.normalWS = normalWS;\n\t\t \n\t\t #if HAS_SHADERGRAPH_PARAM_EMISSIVE\n\t\t
|
|
builtin.emissiveColor = OUTSG.;\n\t\t #endif\n\t\t\n\t\t
|
|
\n\t\t VFXSetupBuiltin(builtin,surface,builtin.emissiveColor, i);\n\t\t
|
|
ENCODE_INTO_GBUFFER(surface, builtin, i.VFX_VARYING_POSCS.xy, outGBuffer);\n\t\t
|
|
#else\n\t\t VFXComputePixelOutputToGBuffer(i,normalWS,uvData,outGBuffer);\n\t\t
|
|
#endif\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\tPass\n\t\t{\t\t\n\t\t\tTags
|
|
{ \"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
|
|
multi_compile USE_FPTL_LIGHTLIST USE_CLUSTERED_LIGHTLIST\n\t\t\t#pragma multi_compile
|
|
SHADOW_LOW SHADOW_MEDIUM SHADOW_HIGH\n\t\t\t#pragma multi_compile _ DEBUG_DISPLAY\n\t\t\t//#pragma
|
|
enable_d3d11_debug_symbols\n\t\t\t\n\t\t\t#define HDRP_NEEDS_UVS (HDRP_USE_BASE_COLOR_MAP
|
|
|| HDRP_USE_MASK_MAP || USE_NORMAL_MAP || HDRP_USE_EMISSIVE_MAP)\n\t\t\t#define
|
|
HDRP_USE_EMISSIVE (HDRP_USE_EMISSIVE_MAP || HDRP_USE_EMISSIVE_COLOR || HDRP_USE_ADDITIONAL_EMISSIVE_COLOR)\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\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\n\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t#if
|
|
(VFX_NEEDS_COLOR_INTERPOLATOR && HDRP_USE_BASE_COLOR) || HDRP_USE_ADDITIONAL_BASE_COLOR\n\t\t\t\t\t\t\tVFX_OPTIONAL_INTERPOLATION
|
|
float4 color : COLOR0;\n\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t#if HDRP_MATERIAL_TYPE_SPECULAR\n\t\t\t\t\t\t\tVFX_OPTIONAL_INTERPOLATION
|
|
float3 specularColor : COLOR1;\n\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t#if HDRP_USE_EMISSIVE\t\n\t\t\t\t\t\t\tVFX_OPTIONAL_INTERPOLATION
|
|
float4 emissiveColor : COLOR2;\n\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//
|
|
x: smoothness\n\t\t\t\t\t\t\t// y: metallic/thickness\n\t\t\t\t\t\t\t// z:
|
|
normal scale\n\t\t\t\t\t\t\t// w: emissive scale\n\t\t\t\t\t\t\tVFX_OPTIONAL_INTERPOLATION
|
|
float4 materialProperties : TEXCOORD0;\n\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t#if
|
|
USE_FLIPBOOK_INTERPOLATION\n\t\t\t\tfloat4 uv : TEXCOORD1;\n\t\t\t\t#else\n\t\t\t\tfloat2
|
|
uv : TEXCOORD1;\t\n\t\t\t\t#endif\n\t\t #if VFX_SHADERGRAPH_HAS_UV1\n\t\t
|
|
float4 uv1 : COLOR2;\n\t\t #endif\n\t\t #if VFX_SHADERGRAPH_HAS_UV2\n\t\t
|
|
float4 uv2 : COLOR3;\n\t\t #endif\n\t\t #if VFX_SHADERGRAPH_HAS_UV3\n\t\t
|
|
float4 uv3 : COLOR4;\n\t\t #endif\n\t\t #if VFX_SHADERGRAPH_HAS_COLOR\n\t\t
|
|
float4 vertexColor : COLOR1;\n\t\t #endif\n\t\t\t\tfloat3 normal : TEXCOORD2;\n\t\t\t\t#if
|
|
USE_NORMAL_MAP || SHADERGRAPH_NEEDS_TANGENT_FORWARD\n\t\t\t\tfloat4 tangent
|
|
: TEXCOORD3;\n\t\t\t\t#endif\n\t\t\t\t#if USE_SOFT_PARTICLE || USE_ALPHA_TEST
|
|
|| USE_FLIPBOOK_INTERPOLATION || WRITE_MOTION_VECTOR_IN_FORWARD\n\t\t\t\t//
|
|
x: inverse soft particles fade distance\n\t\t\t\t// y: alpha threshold\n\t\t\t\t//
|
|
z: frame blending factor\n\t\t\t\tnointerpolation float3 builtInInterpolants
|
|
: TEXCOORD4;\n\t\t\t\t#endif\n\t\t\t\t\n\t\t\t\t#if USE_FLIPBOOK_MOTIONVECTORS\n\t\t\t\t//
|
|
x: motion vector scale u\n\t\t\t\t// y: motion vector scale v\n\t\t\t\tnointerpolation
|
|
float2 builtInInterpolants2 : TEXCOORD5;\n\t\t\t\t#endif\n\t\t\t\t\n\t\t\t\t#if
|
|
WRITE_MOTION_VECTOR_IN_FORWARD\n\t\t\t\tfloat4 cPosPrevious : TEXCOORD6;\n\t\t\t\tfloat4
|
|
cPosNonJiterred : TEXCOORD7;\n\t\t\t\t#endif\n\t\t\n\t\t\t\tfloat3 posWS :
|
|
TEXCOORD8; // Needed for fog\n\t\t \n\t\t \n\t\t\t\t\n\t\t\t\tUNITY_VERTEX_OUTPUT_STEREO\n\t\t\t};\n\t\t\t\n\t\t\tstruct
|
|
ps_output\n\t\t\t{\n\t\t\t\tfloat4 color : SV_Target0;\n\t\t\t};\n\t\t\n\t\t\n\t\t\t\t\t#if
|
|
(VFX_NEEDS_COLOR_INTERPOLATOR && HDRP_USE_BASE_COLOR) || HDRP_USE_ADDITIONAL_BASE_COLOR\n\t\t\t\t\t#define
|
|
VFX_VARYING_COLOR color.rgb\n\t\t\t\t\t#define VFX_VARYING_ALPHA color.a\n\t\t\t\t\t#endif\n\t\t\t\t\t\n\t\t\t\t\t#define
|
|
VFX_VARYING_SMOOTHNESS materialProperties.x\n\t\t\t\t\t\n\t\t\t\t\t#if HDRP_MATERIAL_TYPE_STANDARD\n\t\t\t\t\t#define
|
|
VFX_VARYING_METALLIC materialProperties.y\n\t\t\t\t\t#elif HDRP_MATERIAL_TYPE_SPECULAR\n\t\t\t\t\t#define
|
|
VFX_VARYING_SPECULAR specularColor\n\t\t\t\t\t#elif HDRP_MATERIAL_TYPE_TRANSLUCENT\n\t\t\t\t\t#define
|
|
VFX_VARYING_THICKNESS materialProperties.y\n\t\t\t\t\t#endif\n\t\t\t\t\t\n\t\t\t\t\t#if
|
|
USE_NORMAL_MAP\n\t\t\t\t\t#define VFX_VARYING_NORMALSCALE materialProperties.z\n\t\t\t\t\t#endif\n\t\t\t\t\t\n\t\t\t\t\t#if
|
|
HDRP_USE_EMISSIVE_MAP\n\t\t\t\t\t#define VFX_VARYING_EMISSIVESCALE materialProperties.w\n\t\t\t\t\t#endif\n\t\t\t\t\t\n\t\t\t\t\t#if
|
|
HDRP_USE_EMISSIVE_COLOR || HDRP_USE_ADDITIONAL_EMISSIVE_COLOR\n\t\t\t\t\t#define
|
|
VFX_VARYING_EMISSIVE emissiveColor.rgb\n\t\t\t\t\t#endif\n\t\t\t\t\t\n\t\t\t\t\t#if
|
|
USE_EXPOSURE_WEIGHT\n\t\t\t\t\t#define VFX_VARYING_EXPOSUREWEIGHT emissiveColor.a\n\t\t\t\t\t#endif\n\t\t\t\t\t\n\t\t\n\t\t#define
|
|
VFX_VARYING_PS_INPUTS ps_input\n\t\t#define VFX_VARYING_POSCS pos\n\t\t#define
|
|
VFX_VARYING_UV uv\n\t\t#define VFX_VARYING_INVSOFTPARTICLEFADEDISTANCE builtInInterpolants.x\n\t\t#define
|
|
VFX_VARYING_ALPHATHRESHOLD builtInInterpolants.y\n\t\t#define VFX_VARYING_FRAMEBLEND
|
|
builtInInterpolants.z\n\t\t#define VFX_VARYING_MOTIONVECTORSCALE builtInInterpolants2.xy\n\t\t#define
|
|
VFX_VARYING_NORMAL normal\n\t\t#if USE_NORMAL_MAP || SHADERGRAPH_NEEDS_TANGENT_FORWARD\n\t\t#define
|
|
VFX_VARYING_TANGENT tangent\n\t\t#endif\n\t\t#define VFX_VARYING_POSWS posWS\n\t\t\n\t\t#if
|
|
WRITE_MOTION_VECTOR_IN_FORWARD\n\t\t#define VFX_VARYING_VELOCITY_CPOS cPosNonJiterred\n\t\t#define
|
|
VFX_VARYING_VELOCITY_CPOS_PREVIOUS cPosPrevious\n\t\t#endif\n\t\t\n\t\t\n\t\t\n\t\t\t#if
|
|
!(defined(VFX_VARYING_PS_INPUTS) && defined(VFX_VARYING_POSCS))\n\t\t\t#error
|
|
VFX_VARYING_PS_INPUTS, VFX_VARYING_POSCS and VFX_VARYING_UV must be defined.\n\t\t\t#endif\n\t\t\t\n\t\t\t#include
|
|
\"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXCommon.hlsl\"\n\t\t\t#include
|
|
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\t\t\t\n\n\t\t\tvoid
|
|
AttributeFromCurve_536B781C(inout float scaleX, inout float scaleY, inout float
|
|
scaleZ, float age, float lifetime, float4 Scale_x, float4 Scale_y, float4 Scale_z)
|
|
/*attribute:scale Composition:Overwrite AlphaComposition:Overwrite SampleMode:OverLife
|
|
Mode:PerComponent ColorMode:ColorAndAlpha channels:XYZ */\n\t\t\t{\n\t\t\t
|
|
float t = age / lifetime;\n\t\t\t float3 value = 0.0f;\n\t\t\t value[0]
|
|
= SampleCurve(Scale_x, t);\n\t\t\t value[1] = SampleCurve(Scale_y, t);\n\t\t\t
|
|
value[2] = SampleCurve(Scale_z, t);\n\t\t\t scaleX = value.x;\n\t\t\t
|
|
scaleY = value.y;\n\t\t\t scaleZ = value.z;\n\t\t\t}\n\t\t\tvoid SetAttribute_39EE3455(inout
|
|
float size, float Size) /*attribute:size Composition:Multiply Source:Slot Random:Off
|
|
channels:XYZ */\n\t\t\t{\n\t\t\t size *= Size;\n\t\t\t}\n\t\t\tvoid AttributeFromCurve_7DF18693(inout
|
|
float size, float age, float lifetime, float4 Size) /*attribute:size Composition:Multiply
|
|
AlphaComposition:Overwrite SampleMode:OverLife Mode:PerComponent ColorMode:ColorAndAlpha
|
|
channels:XYZ */\n\t\t\t{\n\t\t\t float t = age / lifetime;\n\t\t\t float
|
|
value = 0.0f;\n\t\t\t value = SampleCurve(Size, t);\n\t\t\t size *= value;\n\t\t\t}\n\t\t\t\n\n\t\t\t\n\t\t\tstruct
|
|
vs_input\n\t\t\t{\n\t\t\t\tfloat3 pos : POSITION;\n\t\t\t\tfloat2 uv : TEXCOORD0;\n\t\t\t
|
|
#if VFX_SHADERGRAPH_HAS_UV1\n\t\t\t float4 uv1 : TEXCOORD1;\n\t\t\t #endif\n\t\t\t
|
|
#if VFX_SHADERGRAPH_HAS_UV2\n\t\t\t float4 uv2 : TEXCOORD2;\n\t\t\t #endif\n\t\t\t
|
|
#if VFX_SHADERGRAPH_HAS_UV3\n\t\t\t float4 uv3 : TEXCOORD3;\n\t\t\t #endif\n\t\t\t
|
|
#if VFX_SHADERGRAPH_HAS_COLOR\n\t\t\t float4 vertexColor : COLOR;\n\t\t\t
|
|
#endif\n\t\t\t\tfloat3 normal : NORMAL;\n\t\t\t\t#if defined(VFX_VARYING_TANGENT)
|
|
|| SHADERGRAPH_HAS_NORMAL\n\t\t\t\tfloat4 tangent : TANGENT;\n\t\t\t\t#endif\n\t\t\t\tVFX_DECLARE_INSTANCE_ID\n\t\t\t};\n\t\t\t\n\t\t\t#pragma
|
|
vertex vert\n\t\t\tVFX_VARYING_PS_INPUTS vert(vs_input i)\n\t\t\t{\n\t\t\t
|
|
VFX_VARYING_PS_INPUTS o = (VFX_VARYING_PS_INPUTS)0;\n\t\t\t\n\t\t\t\tUNITY_SETUP_INSTANCE_ID(i);\n\t\t\t\tUNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);\n\t\t\t\n\t\t\t\tuint
|
|
index = VFX_GET_INSTANCE_ID(i);\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\tuint deadCount
|
|
= 0;\n\t\t\t\t\t\t#if USE_DEAD_LIST_COUNT\n\t\t\t\t\t\tdeadCount = deadListCount.Load(0);\n\t\t\t\t\t\t#endif\t\n\t\t\t\t\t\tif
|
|
(index >= asuint(nbMax) - deadCount)\n\t\t\t\t\t\t#if USE_GEOMETRY_SHADER\n\t\t\t\t\t\t\treturn;
|
|
// cull\n\t\t\t\t\t\t#else\n\t\t\t\t\t\t\treturn o; // cull\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\t\tAttributes
|
|
attributes = (Attributes)0;\n\t\t\t\t\t\tSourceAttributes sourceAttributes
|
|
= (SourceAttributes)0;\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\tattributes.position = asfloat(attributeBuffer.Load3((index
|
|
* 0x8 + 0x0) << 2));\n\t\t\t\t\t\tattributes.lifetime = asfloat(attributeBuffer.Load((index
|
|
* 0x1 + 0x2D00) << 2));\n\t\t\t\t\t\tattributes.texIndex = asfloat(attributeBuffer.Load((index
|
|
* 0x1 + 0x30C0) << 2));\n\t\t\t\t\t\tattributes.angleX = asfloat(attributeBuffer.Load((index
|
|
* 0x8 + 0x3) << 2));\n\t\t\t\t\t\tattributes.angleY = asfloat(attributeBuffer.Load((index
|
|
* 0x8 + 0x4) << 2));\n\t\t\t\t\t\tattributes.angleZ = asfloat(attributeBuffer.Load((index
|
|
* 0x8 + 0x5) << 2));\n\t\t\t\t\t\tattributes.size = asfloat(attributeBuffer.Load((index
|
|
* 0x4 + 0x3FC0) << 2));\n\t\t\t\t\t\tattributes.alpha = (float)1;\n\t\t\t\t\t\tattributes.alive
|
|
= (attributeBuffer.Load((index * 0x8 + 0x6) << 2));\n\t\t\t\t\t\tattributes.axisX
|
|
= float3(1, 0, 0);\n\t\t\t\t\t\tattributes.axisY = float3(0, 1, 0);\n\t\t\t\t\t\tattributes.axisZ
|
|
= float3(0, 0, 1);\n\t\t\t\t\t\tattributes.pivotX = (float)0;\n\t\t\t\t\t\tattributes.pivotY
|
|
= (float)0;\n\t\t\t\t\t\tattributes.pivotZ = (float)0;\n\t\t\t\t\t\tattributes.scaleX
|
|
= asfloat(attributeBuffer.Load((index * 0x4 + 0x3FC1) << 2));\n\t\t\t\t\t\tattributes.scaleY
|
|
= asfloat(attributeBuffer.Load((index * 0x4 + 0x3FC2) << 2));\n\t\t\t\t\t\tattributes.scaleZ
|
|
= asfloat(attributeBuffer.Load((index * 0x4 + 0x3FC3) << 2));\n\t\t\t\t\t\tattributes.age
|
|
= asfloat(attributeBuffer.Load((index * 0x8 + 0x7) << 2));\n\t\t\t\t\t\tattributes.color
|
|
= float3(1, 1, 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\tattributes.alive
|
|
= (attributeBuffer.Load((index * 0x8 + 0x6) << 2));\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t#if
|
|
!HAS_STRIPS\n\t\t\t\t\t\tif (!attributes.alive)\n\t\t\t\t\t\t\treturn o;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tattributes.position
|
|
= asfloat(attributeBuffer.Load3((index * 0x8 + 0x0) << 2));\n\t\t\t\t\t\tattributes.lifetime
|
|
= asfloat(attributeBuffer.Load((index * 0x1 + 0x2D00) << 2));\n\t\t\t\t\t\tattributes.texIndex
|
|
= asfloat(attributeBuffer.Load((index * 0x1 + 0x30C0) << 2));\n\t\t\t\t\t\tattributes.angleX
|
|
= asfloat(attributeBuffer.Load((index * 0x8 + 0x3) << 2));\n\t\t\t\t\t\tattributes.angleY
|
|
= asfloat(attributeBuffer.Load((index * 0x8 + 0x4) << 2));\n\t\t\t\t\t\tattributes.angleZ
|
|
= asfloat(attributeBuffer.Load((index * 0x8 + 0x5) << 2));\n\t\t\t\t\t\tattributes.size
|
|
= asfloat(attributeBuffer.Load((index * 0x4 + 0x3FC0) << 2));\n\t\t\t\t\t\tattributes.alpha
|
|
= (float)1;\n\t\t\t\t\t\tattributes.axisX = float3(1, 0, 0);\n\t\t\t\t\t\tattributes.axisY
|
|
= float3(0, 1, 0);\n\t\t\t\t\t\tattributes.axisZ = float3(0, 0, 1);\n\t\t\t\t\t\tattributes.pivotX
|
|
= (float)0;\n\t\t\t\t\t\tattributes.pivotY = (float)0;\n\t\t\t\t\t\tattributes.pivotZ
|
|
= (float)0;\n\t\t\t\t\t\tattributes.scaleX = asfloat(attributeBuffer.Load((index
|
|
* 0x4 + 0x3FC1) << 2));\n\t\t\t\t\t\tattributes.scaleY = asfloat(attributeBuffer.Load((index
|
|
* 0x4 + 0x3FC2) << 2));\n\t\t\t\t\t\tattributes.scaleZ = asfloat(attributeBuffer.Load((index
|
|
* 0x4 + 0x3FC3) << 2));\n\t\t\t\t\t\tattributes.age = asfloat(attributeBuffer.Load((index
|
|
* 0x8 + 0x7) << 2));\n\t\t\t\t\t\tattributes.color = float3(1, 1, 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\t\t\t//
|
|
Initialize built-in needed attributes\n\t\t\t\t\t\t#if HAS_STRIPS\n\t\t\t\t\t\tInitStripAttributes(index,
|
|
attributes, stripData);\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\tAttributeFromCurve_536B781C(
|
|
/*inout */attributes.scaleX, /*inout */attributes.scaleY, /*inout */attributes.scaleZ,
|
|
attributes.age, attributes.lifetime, Scale_x_a, Scale_y_a, Scale_z_a);\n\t\t\t\t{\n\t\t\t\t
|
|
float3 tmp_bl = attributes.position - uniform_f;\n\t\t\t\t float3 tmp_bm
|
|
= tmp_bl * tmp_bl;\n\t\t\t\t float tmp_bn = tmp_bm[2];\n\t\t\t\t float
|
|
tmp_bo = tmp_bm[1];\n\t\t\t\t float tmp_bp = tmp_bn + tmp_bo;\n\t\t\t\t
|
|
float tmp_bq = tmp_bm[0];\n\t\t\t\t float tmp_br = tmp_bp + tmp_bq;\n\t\t\t\t
|
|
float tmp_bt = pow(tmp_br, (float)0.5);\n\t\t\t\t float tmp_bu = SampleCurve(uniform_e,tmp_bt);\n\t\t\t\t
|
|
SetAttribute_39EE3455( /*inout */attributes.size, tmp_bu);\n\t\t\t\t}\n\t\t\t\tAttributeFromCurve_7DF18693(
|
|
/*inout */attributes.size, attributes.age, attributes.lifetime, Size_c);\n\t\t\t\t\n\n\t\t\t\t\t\t\n\t\t\t\tif
|
|
(!attributes.alive)\n\t\t\t\t\treturn o;\n\t\t\t\t\n\t\t\t\to.VFX_VARYING_UV.xy
|
|
= i.uv;\n\t\t\t \n\t\t\t #if VFX_SHADERGRAPH_HAS_UV1\n\t\t\t o.uv1
|
|
= i.uv1;\n\t\t\t #endif\n\t\t\t #if VFX_SHADERGRAPH_HAS_UV2\n\t\t\t
|
|
o.uv2 = i.uv2;\n\t\t\t #endif\n\t\t\t #if VFX_SHADERGRAPH_HAS_UV3\n\t\t\t
|
|
o.uv3 = i.uv3;\n\t\t\t #endif\n\t\t\t #if VFX_SHADERGRAPH_HAS_COLOR\n\t\t\t
|
|
o.vertexColor = i.vertexColor;\n\t\t\t #endif\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\tfloat3
|
|
size3 = float3(attributes.size,attributes.size,attributes.size);\n\t\t\t\t\t\t#if
|
|
VFX_USE_SCALEX_CURRENT\n\t\t\t\t\t\tsize3.x *= attributes.scaleX;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t#if
|
|
VFX_USE_SCALEY_CURRENT\n\t\t\t\t\t\tsize3.y *= attributes.scaleY;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t#if
|
|
VFX_USE_SCALEZ_CURRENT\n\t\t\t\t\t\tsize3.z *= attributes.scaleZ;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\tfloat3
|
|
inputVertexPosition = i.pos;\n\t\t\t\tfloat4x4 elementToVFX = GetElementToVFXMatrix(\n\t\t\t\t\tattributes.axisX,\n\t\t\t\t\tattributes.axisY,\n\t\t\t\t\tattributes.axisZ,\n\t\t\t\t\tfloat3(attributes.angleX,attributes.angleY,attributes.angleZ),\n\t\t\t\t\tfloat3(attributes.pivotX,attributes.pivotY,attributes.pivotZ),\n\t\t\t\t\tsize3,\n\t\t\t\t\tattributes.position);\n\t\t\t\t\t\n\t\t\t\tfloat3
|
|
vPos = mul(elementToVFX,float4(inputVertexPosition,1.0f)).xyz;\n\t\t\t\tfloat4
|
|
csPos = TransformPositionVFXToClip(vPos);\n\t\t\t\to.VFX_VARYING_POSCS = csPos;\n\t\t\t\t\n\t\t\t\tfloat3
|
|
normalWS = normalize(TransformDirectionVFXToWorld(mul((float3x3)elementToVFX,
|
|
i.normal)));\n\t\t\t\t#ifdef VFX_VARYING_NORMAL // TODO Should use inverse
|
|
transpose\n\t\t\t\to.VFX_VARYING_NORMAL = normalWS;\n\t\t\t\t#endif\n\t\t\t\t#ifdef
|
|
VFX_VARYING_TANGENT\n\t\t\t\to.VFX_VARYING_TANGENT = float4(normalize(TransformDirectionVFXToWorld(mul((float3x3)elementToVFX,i.tangent.xyz))),i.tangent.w);\n\t\t\t\t#endif\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t#if
|
|
defined(VFX_VARYING_VELOCITY_CPOS) && defined(VFX_VARYING_VELOCITY_CPOS_PREVIOUS)\n\t\t\t\t\t\tfloat4x4
|
|
previousElementToVFX = (float4x4)0;\n\t\t\t\t\t\tpreviousElementToVFX[3] =
|
|
float4(0,0,0,1);\n\t\t\t\t\t\t\n\t\t\t\t\t\tUNITY_UNROLL\n\t\t\t\t\t\tfor (int
|
|
itIndexMatrixRow = 0; itIndexMatrixRow < 3; ++itIndexMatrixRow)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tUNITY_UNROLL\n\t\t\t\t\t\t\tfor
|
|
(int itIndexMatrixCol = 0; itIndexMatrixCol < 4; ++itIndexMatrixCol)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tuint
|
|
itIndexMatrix = itIndexMatrixCol * 4 + itIndexMatrixRow;\n\t\t\t\t\t\t\t\tuint
|
|
read = elementToVFXBufferPrevious.Load((index * 16 + itIndexMatrix) << 2);\n\t\t\t\t\t\t\t\tpreviousElementToVFX[itIndexMatrixRow][itIndexMatrixCol]
|
|
= asfloat(read);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tuint
|
|
previousFrameIndex = elementToVFXBufferPrevious.Load((index * 16 + 15) << 2);\n\t\t\t\t\t\to.VFX_VARYING_VELOCITY_CPOS
|
|
= o.VFX_VARYING_VELOCITY_CPOS_PREVIOUS = float4(0.0f, 0.0f, 0.0f, 1.0f);\n\t\t\t\t\t\tif
|
|
(asuint(currentFrameIndex) - previousFrameIndex == 1u)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfloat3
|
|
oldvPos = mul(previousElementToVFX,float4(inputVertexPosition, 1.0f)).xyz;\n\t\t\t\t\t\t\to.VFX_VARYING_VELOCITY_CPOS_PREVIOUS
|
|
= TransformPositionVFXToPreviousClip(oldvPos);\n\t\t\t\t\t\t\to.VFX_VARYING_VELOCITY_CPOS
|
|
= TransformPositionVFXToNonJitteredClip(vPos);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t#if
|
|
VFX_USE_COLOR_CURRENT && defined(VFX_VARYING_COLOR)\n\t\t\t\t\t\to.VFX_VARYING_COLOR
|
|
= attributes.color;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t#if VFX_USE_ALPHA_CURRENT
|
|
&& defined(VFX_VARYING_ALPHA) \n\t\t\t\t\t\to.VFX_VARYING_ALPHA = attributes.alpha;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\t\t#ifdef
|
|
VFX_VARYING_EXPOSUREWEIGHT\n\t\t\t\t\t\t\n\t\t\t\t\t\to.VFX_VARYING_EXPOSUREWEIGHT
|
|
= exposureWeight;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\t\t#if USE_SOFT_PARTICLE
|
|
&& defined(VFX_VARYING_INVSOFTPARTICLEFADEDISTANCE)\n\t\t\t\t\t\t\n\t\t\t\t\t\to.VFX_VARYING_INVSOFTPARTICLEFADEDISTANCE
|
|
= invSoftParticlesFadeDistance;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\t\t#if
|
|
(USE_ALPHA_TEST || WRITE_MOTION_VECTOR_IN_FORWARD) && (!VFX_SHADERGRAPH ||
|
|
!HAS_SHADERGRAPH_PARAM_ALPHATHRESHOLD) && defined(VFX_VARYING_ALPHATHRESHOLD)\n\t\t\t\t\t\tfloat
|
|
alphaThreshold = (float)0;\n\t\t\t\t\t\t{\n\t\t\t\t\t\t \n\t\t\t\t\t\t
|
|
alphaThreshold = (float)0.200000003;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\to.VFX_VARYING_ALPHATHRESHOLD
|
|
= alphaThreshold;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\t\t#if USE_UV_SCALE_BIAS\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t#if
|
|
defined (VFX_VARYING_UV)\n\t\t\t\t\t\to.VFX_VARYING_UV.xy = o.VFX_VARYING_UV.xy
|
|
* uvScale + uvBias;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\t\t#if
|
|
defined(VFX_VARYING_POSWS)\n\t\t\t\t\t\to.VFX_VARYING_POSWS = TransformPositionVFXToWorld(vPos);\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t#if
|
|
USE_FLIPBOOK && defined(VFX_VARYING_UV)\n\t\t\t\t\t\tfloat2 flipBookSize =
|
|
(float2)0;\n\t\t\t\t\t\t{\n\t\t\t\t\t\t \n\t\t\t\t\t\t flipBookSize =
|
|
float2(4, 4);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\tfloat2 invFlipBookSize
|
|
= (float2)0;\n\t\t\t\t\t\t{\n\t\t\t\t\t\t \n\t\t\t\t\t\t invFlipBookSize
|
|
= float2(0.25, 0.25);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\tVFXUVData
|
|
uvData = GetUVData(flipBookSize, invFlipBookSize, o.VFX_VARYING_UV.xy, attributes.texIndex);\n\t\t\t\t\t\to.VFX_VARYING_UV.xy
|
|
= uvData.uvs.xy;\n\t\t\t\t\t\t#if USE_FLIPBOOK_INTERPOLATION && defined(VFX_VARYING_UV)
|
|
&& defined (VFX_VARYING_FRAMEBLEND)\n\t\t\t\t\t\to.VFX_VARYING_UV.zw = uvData.uvs.zw;\n\t\t\t\t\t\to.VFX_VARYING_FRAMEBLEND
|
|
= uvData.blend;\n\t\t\t\t\t\t#if USE_FLIPBOOK_MOTIONVECTORS && defined(VFX_VARYING_MOTIONVECTORSCALE)\n\t\t\t\t\t\t\n\t\t\t\t\t\to.VFX_VARYING_MOTIONVECTORSCALE
|
|
= motionVectorScale * invFlipBookSize;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t#ifndef
|
|
VFX_SHADERGRAPH\n\t\t\t\t\t\t\t\t\t#ifdef VFX_VARYING_SMOOTHNESS\n\t\t\t\t\t\t\t\t\tfloat
|
|
smoothness = (float)0;\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t
|
|
smoothness = (float)0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\to.VFX_VARYING_SMOOTHNESS
|
|
= smoothness;\n\t\t\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t\t\t#if HDRP_MATERIAL_TYPE_STANDARD\n\t\t\t\t\t\t\t\t\t#ifdef
|
|
VFX_VARYING_METALLIC\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\to.VFX_VARYING_METALLIC
|
|
= metallic;\n\t\t\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t\t\t#elif HDRP_MATERIAL_TYPE_SPECULAR\n\t\t\t\t\t\t\t\t\t#ifdef
|
|
VFX_VARYING_SPECULAR\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\to.VFX_VARYING_SPECULAR
|
|
= specularColor;\n\t\t\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t\t\t#elif HDRP_MATERIAL_TYPE_TRANSLUCENT\n\t\t\t\t\t\t\t\t\t#ifdef
|
|
VFX_VARYING_THICKNESS\n\t\t\t\t\t\t\t\t\tfloat thickness = (float)0;\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t
|
|
\n\t\t\t\t\t\t\t\t\t thickness = (float)0.296420813;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\to.VFX_VARYING_THICKNESS
|
|
= thickness;\n\t\t\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t\t\t#if
|
|
USE_NORMAL_MAP\n\t\t\t\t\t\t\t\t\t#ifdef VFX_VARYING_NORMALSCALE\n\t\t\t\t\t\t\t\t\tfloat
|
|
normalScale = (float)0;\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t
|
|
normalScale = (float)1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\to.VFX_VARYING_NORMALSCALE
|
|
= normalScale;\n\t\t\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t\t\t#if
|
|
HDRP_USE_EMISSIVE_MAP\n\t\t\t\t\t\t\t\t\t#ifdef VFX_VARYING_EMISSIVESCALE\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\to.VFX_VARYING_EMISSIVESCALE
|
|
= emissiveScale;\n\t\t\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t\t\t#ifdef
|
|
VFX_VARYING_EMISSIVE\n\t\t\t\t\t\t\t\t\t#if HDRP_USE_EMISSIVE_COLOR\n\t\t\t\t\t\t\t\t\to.VFX_VARYING_EMISSIVE
|
|
= attributes.color;\n\t\t\t\t\t\t\t\t\t#elif HDRP_USE_ADDITIONAL_EMISSIVE_COLOR\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\to.VFX_VARYING_EMISSIVE
|
|
= emissiveColor;\n\t\t\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t\t\t#if
|
|
HDRP_USE_ADDITIONAL_BASE_COLOR\n\t\t\t\t\t\t\t\t\t#ifdef VFX_VARYING_COLOR\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\to.VFX_VARYING_COLOR
|
|
= baseColor;\n\t\t\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t
|
|
\n\t\t\t \n\t\t\t\t\n\t\t\t\treturn o;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t#include
|
|
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommonOutput.hlsl\"\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\t#define
|
|
SHADERPASS SHADERPASS_FORWARD\n\t\t\t#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXLit.hlsl\"\n\t\t\t\n\t\t\t#ifndef
|
|
VFX_SHADERGRAPH\n\t\t\t\n\t\t\tvoid VFXGetHDRPLitData(out SurfaceData surfaceData,
|
|
out BuiltinData builtinData, out BSDFData bsdfData, out PreLightData preLightData,
|
|
VFX_VARYING_PS_INPUTS i, float3 normalWS, const VFXUVData uvData, uint2 tileIndex)\n\t\t\t{\t\n\t\t\t\t#if
|
|
HDRP_MATERIAL_TYPE_TRANSLUCENT\n\t\t\t\tuint diffusionProfileHash = (uint)0;\n\t\t\t\t{\n\t\t\t\t
|
|
\n\t\t\t\t diffusionProfileHash = (uint)1080328534;\n\t\t\t\t}\n\t\t\t\t\n
|
|
// Loads diffusion profile\n\t\t\t\t#else\n\t\t\t\tconst uint diffusionProfileHash
|
|
= 0;\n\t\t\t\t#endif\n\t\t\t\t\n\t\t\t\tfloat3 posRWS = VFXGetPositionRWS(i);\n\t\t\t\tfloat4
|
|
posSS = i.VFX_VARYING_POSCS;\n\t\t\t\tPositionInputs posInput = GetPositionInput(posSS.xy,
|
|
_ScreenSize.zw, posSS.z, posSS.w, posRWS, tileIndex);\n\t\t\t\t\n\t\t\t\tfloat
|
|
alpha;\n\t\t\t\tsurfaceData = VFXGetSurfaceData(i,normalWS,uvData,diffusionProfileHash,alpha);\t\n\t\t\t\tbsdfData
|
|
= ConvertSurfaceDataToBSDFData(posSS.xy, surfaceData);\n\t\t\t\n\t\t\t\tpreLightData
|
|
= GetPreLightData(GetWorldSpaceNormalizeViewDir(posRWS),posInput,bsdfData);\n\t\t\t\t\n\t\t\t\tpreLightData.diffuseFGD
|
|
= 1.0f;\n\t\t\t //TODO: investigate why this is needed\n\t\t\t preLightData.coatPartLambdaV
|
|
= 0;\n\t\t\t preLightData.coatIblR = 0;\n\t\t\t preLightData.coatIblF
|
|
= 0;\n\t\t\t \n\t\t\t\tbuiltinData = VFXGetBuiltinData(i,posInput,surfaceData,uvData,alpha);\n\t\t\t}\n\t\t\t\n\t\t\tvoid
|
|
VFXGetHDRPLitData(out SurfaceData surfaceData, out BuiltinData builtinData,
|
|
VFX_VARYING_PS_INPUTS i, float3 normalWS, const VFXUVData uvData)\n\t\t\t{\n\t\t\t\tBSDFData
|
|
bsdfData = (BSDFData)0;\n\t\t\t\tPreLightData preLightData = (PreLightData)0;\n\t\t\t\tpreLightData.diffuseFGD
|
|
= 1.0f;\n\t\t\t\tVFXGetHDRPLitData(surfaceData,builtinData,bsdfData,preLightData,i,normalWS,uvData,uint2(0,0));\n\t\t\t}\n\t\t\t\n\t\t\t#endif\n\t\t\t\n\t\t\t\n\t\t\t#include
|
|
\"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXLitPixelOutput.hlsl\"\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t
|
|
\n\t\t\n\t\t\t#pragma fragment frag\n\t\t\tvoid frag(ps_input i\n\t\t\t, out
|
|
float4 outColor : SV_Target0\n\t\t#if USE_DOUBLE_SIDED\n\t\t\t, bool frontFace
|
|
: SV_IsFrontFace\n\t\t#endif\n\t\t#if WRITE_MOTION_VECTOR_IN_FORWARD\n\t\t\t,
|
|
out float4 outMotionVector : SV_Target1\n\t\t#endif\n\t\t\t)\n\t\t\t{\n\t\t\t\tUNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i);\n\t\t\t\tVFXTransformPSInputs(i);\n\t\t\t\t\n\t\t\t\t\t\t\t#ifdef
|
|
VFX_VARYING_NORMAL\n\t\t\t\t\t\t\t#if USE_DOUBLE_SIDED\n\t\t\t\t\t\t\tconst
|
|
float faceMul = frontFace ? 1.0f : -1.0f;\n\t\t\t\t\t\t\t#else\n\t\t\t\t\t\t\tconst
|
|
float faceMul = 1.0f;\n\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfloat3
|
|
normalWS = normalize(i.VFX_VARYING_NORMAL * faceMul);\n\t\t\t\t\t\t\tconst
|
|
VFXUVData uvData = GetUVData(i);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t#ifdef VFX_VARYING_TANGENT\n\t\t\t\t\t\t\tfloat3
|
|
tangentWS = normalize(i.VFX_VARYING_TANGENT.xyz);\n\t\t\t\t\t\t\tfloat3 bitangentWS
|
|
= cross(normalWS,tangentWS) * (i.VFX_VARYING_TANGENT.w * faceMul);\n\t\t\t\t\t\t\tfloat3x3
|
|
tbn = float3x3(tangentWS,bitangentWS,normalWS);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t#if
|
|
USE_NORMAL_MAP\n\t\t\t\t\t\t\tfloat3 n = SampleNormalMap(VFX_SAMPLER(normalMap),uvData);\n\t\t\t\t\t\t\tfloat
|
|
normalScale = 1.0f;\n\t\t\t\t\t\t\t#ifdef VFX_VARYING_NORMALSCALE\n\t\t\t\t\t\t\tnormalScale
|
|
= i.VFX_VARYING_NORMALSCALE;\n\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\tnormalWS
|
|
= normalize(lerp(normalWS,mul(n,tbn),normalScale));\n\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\t\n\t\t
|
|
\n\t\t #ifdef VFX_SHADERGRAPH\n\t\t \n\t\t \n\t\t
|
|
\n\t\t SurfaceData surface;\n\t\t BuiltinData builtin;\n\t\t
|
|
surface = (SurfaceData)0;\n\t\t builtin = (BuiltinData)0;\n\t\t
|
|
\n\t\t surface.materialFeatures = MATERIALFEATUREFLAGS_LIT_STANDARD;\n\t\t
|
|
surface.specularOcclusion = 1.0f;\n\t\t surface.ambientOcclusion
|
|
= 1.0f;\n\t\t surface.subsurfaceMask = 1.0f;\n\t\t \n\t\t
|
|
#if HAS_SHADERGRAPH_PARAM_ALPHA\n\t\t builtin.opacity = OUTSG.;\n\t\t
|
|
VFXClipFragmentColor(builtin.opacity,i);\n\t\t #endif\n\t\t
|
|
\n\t\t #if HAS_SHADERGRAPH_PARAM_SMOOTHNESS\n\t\t
|
|
surface.perceptualSmoothness = OUTSG.;\n\t\t #endif\n\t\t
|
|
#if HAS_SHADERGRAPH_PARAM_METALLIC\n\t\t surface.metallic =
|
|
OUTSG.;\n\t\t #endif\n\t\t #if HAS_SHADERGRAPH_PARAM_BASECOLOR\n\t\t
|
|
surface.baseColor = OUTSG.;\n\t\t #endif\n\t\t \n\t\t
|
|
#if HAS_SHADERGRAPH_PARAM_NORMAL\n\t\t float3 n = OUTSG.;\n\t\t
|
|
normalWS = mul(n,tbn);\n\t\t #endif\n\t\t \n\t\t
|
|
surface.normalWS = normalWS;\n\t\t \n\t\t #if HAS_SHADERGRAPH_PARAM_EMISSIVE\n\t\t
|
|
builtin.emissiveColor = OUTSG.;\n\t\t #endif\n\t\t\n\t\t
|
|
\n\t\t outColor = VFXGetPixelOutputForwardShaderGraph(surface, builtin,i);\n\t\t
|
|
#else\n\t\t outColor = VFXGetPixelOutputForward(i,normalWS,uvData);\n\t\t
|
|
#endif\n\t\t\t\t\n\t\t\t\t#if WRITE_MOTION_VECTOR_IN_FORWARD\n\t\t\t\t\t\n\t\t\t\t\t\t\tfloat2
|
|
velocity = (i.VFX_VARYING_VELOCITY_CPOS.xy/i.VFX_VARYING_VELOCITY_CPOS.w) -
|
|
(i.VFX_VARYING_VELOCITY_CPOS_PREVIOUS.xy/i.VFX_VARYING_VELOCITY_CPOS_PREVIOUS.w);\n\t\t\t\t\t\t\t#if
|
|
UNITY_UV_STARTS_AT_TOP\n\t\t\t\t\t\t\t\tvelocity.y = -velocity.y;\n\t\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\tfloat4
|
|
encodedMotionVector = 0.0f;\n\t\t\t\t\t\t\tVFXEncodeMotionVector(velocity *
|
|
0.5f, encodedMotionVector);\n\t\t\t\t\t\t\t\n\t\t\t\t\toutMotionVector = encodedMotionVector;\n\t\t\t\t\toutMotionVector.a
|
|
= outColor.a < i.VFX_VARYING_ALPHATHRESHOLD ? 0.0f : 1.0f; //Independant clipping
|
|
for motion vector pass\n\t\t\t\t#endif\n\t\t\t}\n\t\t\tENDHLSL\n\t\t}\n\t\t\n\r\n\t\t\r\n\t}\r\n}\r\n"
|
|
- compute: 1
|
|
name: '[System 1]MotionVector'
|
|
source: "#pragma kernel CSMain\r\n#define NB_THREADS_PER_GROUP 64\n#define HAS_ATTRIBUTES
|
|
1\n#define VFX_PASSDEPTH_ACTUAL (0)\n#define VFX_PASSDEPTH_MOTION_VECTOR (1)\n#define
|
|
VFX_PASSDEPTH_SELECTION (2)\n#define VFX_USE_POSITION_CURRENT 1\n#define VFX_USE_LIFETIME_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_SIZE_CURRENT 1\n#define VFX_USE_ALPHA_CURRENT
|
|
1\n#define VFX_USE_ALIVE_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_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_WORLD_SPACE 1\n#include \"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXDefines.hlsl\"\n\n\r\nCBUFFER_START(parameters)\n
|
|
float4 Scale_x_a;\n float4 Scale_y_a;\n float4 Scale_z_a;\n float4
|
|
uniform_e;\n float4 Size_c;\n float3 uniform_f;\n float currentFrameIndex;\nCBUFFER_END\n\nstruct
|
|
Attributes\n{\n float3 position;\n float lifetime;\n float angleX;\n
|
|
float angleY;\n float angleZ;\n float size;\n float alpha;\n bool
|
|
alive;\n float3 axisX;\n float3 axisY;\n float3 axisZ;\n float
|
|
pivotX;\n float pivotY;\n float pivotZ;\n float scaleX;\n float
|
|
scaleY;\n float scaleZ;\n float age;\n};\n\nstruct SourceAttributes\n{\n};\n\nTexture2D
|
|
baseColorMap;\nSamplerState samplerbaseColorMap;\nfloat4 baseColorMap_TexelSize;\nTexture2D
|
|
maskMap;\nSamplerState samplermaskMap;\nfloat4 maskMap_TexelSize;\nTexture2D
|
|
normalMap;\nSamplerState samplernormalMap;\nfloat4 normalMap_TexelSize;\n\n\r\n#include
|
|
\"Packages/com.unity.render-pipelines.high-definition/Runtime/VFXGraph/Shaders/VFXCommon.hlsl\"\n#include
|
|
\"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.hlsl\"\n\n\r\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\r\n\r\nByteAddressBuffer
|
|
attributeBuffer;\r\nRWByteAddressBuffer elementToVFXBuffer;\r\n#if VFX_USE_ALIVE_CURRENT\r\nStructuredBuffer<uint>
|
|
deadListOut;\r\n#endif\r\n\r\n#if VFX_HAS_INDIRECT_DRAW\r\nStructuredBuffer<uint>
|
|
indirectBuffer;\r\n#endif\r\n\r\nCBUFFER_START(updateParams)\r\n\tuint nbMax;\r\n\tuint
|
|
dispatchWidth;\r\n\tuint systemSeed;\r\nCBUFFER_END\r\n\r\nvoid AttributeFromCurve_536B781C(inout
|
|
float scaleX, inout float scaleY, inout float scaleZ, float age, float lifetime,
|
|
float4 Scale_x, float4 Scale_y, float4 Scale_z) /*attribute:scale Composition:Overwrite
|
|
AlphaComposition:Overwrite SampleMode:OverLife Mode:PerComponent ColorMode:ColorAndAlpha
|
|
channels:XYZ */\n{\n float t = age / lifetime;\n float3 value = 0.0f;\n
|
|
value[0] = SampleCurve(Scale_x, t);\n value[1] = SampleCurve(Scale_y, t);\n
|
|
value[2] = SampleCurve(Scale_z, t);\n scaleX = value.x;\n scaleY = value.y;\n
|
|
scaleZ = value.z;\n}\nvoid SetAttribute_39EE3455(inout float size, float Size)
|
|
/*attribute:size Composition:Multiply Source:Slot Random:Off channels:XYZ */\n{\n
|
|
size *= Size;\n}\nvoid AttributeFromCurve_7DF18693(inout float size, float
|
|
age, float lifetime, float4 Size) /*attribute:size Composition:Multiply AlphaComposition:Overwrite
|
|
SampleMode:OverLife Mode:PerComponent ColorMode:ColorAndAlpha 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
|
|
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\t\tAttributes
|
|
attributes = (Attributes)0;\r\n\t\tSourceAttributes sourceAttributes = (SourceAttributes)0;\r\n\t\t\r\n\t\tattributes.alive
|
|
= (attributeBuffer.Load((index * 0x8 + 0x6) << 2));\n\n\r\n\t\tif (attributes.alive)\r\n\t\t{\r\n\t\t\tattributes.position
|
|
= asfloat(attributeBuffer.Load3((index * 0x8 + 0x0) << 2));\nattributes.lifetime
|
|
= asfloat(attributeBuffer.Load((index * 0x1 + 0x2D00) << 2));\nattributes.angleX
|
|
= asfloat(attributeBuffer.Load((index * 0x8 + 0x3) << 2));\nattributes.angleY
|
|
= asfloat(attributeBuffer.Load((index * 0x8 + 0x4) << 2));\nattributes.angleZ
|
|
= asfloat(attributeBuffer.Load((index * 0x8 + 0x5) << 2));\nattributes.size
|
|
= asfloat(attributeBuffer.Load((index * 0x4 + 0x3FC0) << 2));\nattributes.alpha
|
|
= (float)1;\nattributes.axisX = float3(1, 0, 0);\nattributes.axisY = float3(0,
|
|
1, 0);\nattributes.axisZ = float3(0, 0, 1);\nattributes.pivotX = (float)0;\nattributes.pivotY
|
|
= (float)0;\nattributes.pivotZ = (float)0;\nattributes.scaleX = asfloat(attributeBuffer.Load((index
|
|
* 0x4 + 0x3FC1) << 2));\nattributes.scaleY = asfloat(attributeBuffer.Load((index
|
|
* 0x4 + 0x3FC2) << 2));\nattributes.scaleZ = asfloat(attributeBuffer.Load((index
|
|
* 0x4 + 0x3FC3) << 2));\nattributes.age = asfloat(attributeBuffer.Load((index
|
|
* 0x8 + 0x7) << 2));\n\n\r\n\t\t\tAttributeFromCurve_536B781C( /*inout */attributes.scaleX,
|
|
/*inout */attributes.scaleY, /*inout */attributes.scaleZ, attributes.age,
|
|
attributes.lifetime, Scale_x_a, Scale_y_a, Scale_z_a);\n\t\t\t{\n\t\t\t
|
|
float3 tmp_bn = attributes.position - uniform_f;\n\t\t\t float3 tmp_bo =
|
|
tmp_bn * tmp_bn;\n\t\t\t float tmp_bp = tmp_bo[2];\n\t\t\t float tmp_bq
|
|
= tmp_bo[1];\n\t\t\t float tmp_br = tmp_bp + tmp_bq;\n\t\t\t float tmp_bs
|
|
= tmp_bo[0];\n\t\t\t float tmp_bt = tmp_br + tmp_bs;\n\t\t\t float tmp_bv
|
|
= pow(tmp_bt, (float)0.5);\n\t\t\t float tmp_bw = SampleCurve(uniform_e,tmp_bv);\n\t\t\t
|
|
SetAttribute_39EE3455( /*inout */attributes.size, tmp_bw);\n\t\t\t}\n\t\t\tAttributeFromCurve_7DF18693(
|
|
/*inout */attributes.size, attributes.age, attributes.lifetime, Size_c);\n\t\t\t\n\r\n\t\t\t\r\n\t\t\t\n\t\t\tfloat3
|
|
size3 = float3(attributes.size,attributes.size,attributes.size);\n\t\t\t#if
|
|
VFX_USE_SCALEX_CURRENT\n\t\t\tsize3.x *= attributes.scaleX;\n\t\t\t#endif\n\t\t\t#if
|
|
VFX_USE_SCALEY_CURRENT\n\t\t\tsize3.y *= attributes.scaleY;\n\t\t\t#endif\n\t\t\t#if
|
|
VFX_USE_SCALEZ_CURRENT\n\t\t\tsize3.z *= attributes.scaleZ;\n\t\t\t#endif\n\t\t\t\r\n\t\t\tfloat4x4
|
|
elementToVFX = GetElementToVFXMatrix(\r\n\t\t\t\tattributes.axisX,\r\n\t\t\t\tattributes.axisY,\r\n\t\t\t\tattributes.axisZ,\r\n\t\t\t\tfloat3(attributes.angleX,attributes.angleY,attributes.angleZ),\r\n\t\t\t\tfloat3(attributes.pivotX,attributes.pivotY,attributes.pivotZ),\r\n\t\t\t\tsize3,\r\n\t\t\t\tattributes.position);\r\n\t\t\r\n\t\t\tUNITY_UNROLL\r\n\t\t\tfor
|
|
(int itIndexMatrixRow = 0; itIndexMatrixRow < 3; ++itIndexMatrixRow)\r\n\t\t\t{\r\n\t\t\t\tUNITY_UNROLL\r\n\t\t\t\tfor
|
|
(int itIndexMatrixCol = 0; itIndexMatrixCol < 4; ++itIndexMatrixCol)\r\n\t\t\t\t{\r\n\t\t\t\t\tuint
|
|
itIndexMatrix = itIndexMatrixCol * 4 + itIndexMatrixRow;\r\n\t\t\t\t\tfloat
|
|
value = elementToVFX[itIndexMatrixRow][itIndexMatrixCol];\r\n\t\t\t\t\telementToVFXBuffer.Store((index
|
|
* 16 + itIndexMatrix) << 2, asuint(value));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n
|
|
elementToVFXBuffer.Store((index*16 + 15) << 2, attributes.alive ? asuint(currentFrameIndex)
|
|
: 0u);\r\n\t\t}\t\t\r\n\t}\r\n}\r\n"
|
|
m_Infos:
|
|
m_Expressions:
|
|
m_Expressions:
|
|
- op: 76
|
|
valueIndex: 0
|
|
data[0]: -1
|
|
data[1]: -1
|
|
data[2]: -1
|
|
data[3]: -1
|
|
- op: 9
|
|
valueIndex: 16
|
|
data[0]: -1
|
|
data[1]: -1
|
|
data[2]: -1
|
|
data[3]: -1
|
|
- op: 1
|
|
valueIndex: 32
|
|
data[0]: -1
|
|
data[1]: -1
|
|
data[2]: -1
|
|
data[3]: 3
|
|
- op: 42
|
|
valueIndex: 35
|
|
data[0]: 1
|
|
data[1]: 2
|
|
data[2]: -1
|
|
data[3]: -1
|
|
- op: 38
|
|
valueIndex: 38
|
|
data[0]: 0
|
|
data[1]: -1
|
|
data[2]: -1
|
|
data[3]: -1
|
|
- op: 29
|
|
valueIndex: 41
|
|
data[0]: 4
|
|
data[1]: 3
|
|
data[2]: -1
|
|
data[3]: 3
|
|
- op: 26
|
|
valueIndex: 44
|
|
data[0]: 5
|
|
data[1]: 5
|
|
data[2]: -1
|
|
data[3]: 3
|
|
- op: 5
|
|
valueIndex: 47
|
|
data[0]: 6
|
|
data[1]: -1
|
|
data[2]: 2
|
|
data[3]: 3
|
|
- op: 5
|
|
valueIndex: 48
|
|
data[0]: 6
|
|
data[1]: -1
|
|
data[2]: 1
|
|
data[3]: 3
|
|
- op: 28
|
|
valueIndex: 49
|
|
data[0]: 7
|
|
data[1]: 8
|
|
data[2]: -1
|
|
data[3]: 1
|
|
- op: 5
|
|
valueIndex: 50
|
|
data[0]: 6
|
|
data[1]: -1
|
|
data[2]: 0
|
|
data[3]: 3
|
|
- op: 1
|
|
valueIndex: 51
|
|
data[0]: -1
|
|
data[1]: -1
|
|
data[2]: -1
|
|
data[3]: 1
|
|
- op: 28
|
|
valueIndex: 52
|
|
data[0]: 9
|
|
data[1]: 10
|
|
data[2]: -1
|
|
data[3]: 1
|
|
- op: 1
|
|
valueIndex: 53
|
|
data[0]: -1
|
|
data[1]: -1
|
|
data[2]: -1
|
|
data[3]: 13
|
|
- op: 32
|
|
valueIndex: 54
|
|
data[0]: 12
|
|
data[1]: 11
|
|
data[2]: -1
|
|
data[3]: 1
|
|
- op: 1
|
|
valueIndex: 55
|
|
data[0]: -1
|
|
data[1]: -1
|
|
data[2]: -1
|
|
data[3]: 13
|
|
- op: 1
|
|
valueIndex: 56
|
|
data[0]: -1
|
|
data[1]: -1
|
|
data[2]: -1
|
|
data[3]: 1
|
|
- op: 49
|
|
valueIndex: 57
|
|
data[0]: 13
|
|
data[1]: 14
|
|
data[2]: -1
|
|
data[3]: -1
|
|
- op: 1
|
|
valueIndex: 58
|
|
data[0]: -1
|
|
data[1]: -1
|
|
data[2]: -1
|
|
data[3]: 3
|
|
- op: 1
|
|
valueIndex: 61
|
|
data[0]: -1
|
|
data[1]: -1
|
|
data[2]: -1
|
|
data[3]: 12
|
|
- op: 56
|
|
valueIndex: 77
|
|
data[0]: 15
|
|
data[1]: -1
|
|
data[2]: -1
|
|
data[3]: 0
|
|
- op: 1
|
|
valueIndex: 81
|
|
data[0]: -1
|
|
data[1]: -1
|
|
data[2]: -1
|
|
data[3]: 13
|
|
- op: 1
|
|
valueIndex: 82
|
|
data[0]: -1
|
|
data[1]: -1
|
|
data[2]: -1
|
|
data[3]: 13
|
|
- op: 1
|
|
valueIndex: 83
|
|
data[0]: -1
|
|
data[1]: -1
|
|
data[2]: -1
|
|
data[3]: 3
|
|
- op: 1
|
|
valueIndex: 86
|
|
data[0]: -1
|
|
data[1]: -1
|
|
data[2]: -1
|
|
data[3]: 3
|
|
- op: 1
|
|
valueIndex: 89
|
|
data[0]: -1
|
|
data[1]: -1
|
|
data[2]: -1
|
|
data[3]: 13
|
|
- op: 28
|
|
valueIndex: 90
|
|
data[0]: 3
|
|
data[1]: 18
|
|
data[2]: -1
|
|
data[3]: 3
|
|
- op: 10
|
|
valueIndex: 93
|
|
data[0]: -1
|
|
data[1]: -1
|
|
data[2]: -1
|
|
data[3]: -1
|
|
- op: 1
|
|
valueIndex: 109
|
|
data[0]: -1
|
|
data[1]: -1
|
|
data[2]: -1
|
|
data[3]: 1
|
|
- op: 1
|
|
valueIndex: 110
|
|
data[0]: -1
|
|
data[1]: -1
|
|
data[2]: -1
|
|
data[3]: 13
|
|
- op: 26
|
|
valueIndex: 111
|
|
data[0]: 17
|
|
data[1]: 16
|
|
data[2]: -1
|
|
data[3]: 1
|
|
- op: 41
|
|
valueIndex: 112
|
|
data[0]: 1
|
|
data[1]: 19
|
|
data[2]: -1
|
|
data[3]: -1
|
|
- op: 43
|
|
valueIndex: 128
|
|
data[0]: 1
|
|
data[1]: 24
|
|
data[2]: -1
|
|
data[3]: -1
|
|
- op: 1
|
|
valueIndex: 131
|
|
data[0]: -1
|
|
data[1]: -1
|
|
data[2]: -1
|
|
data[3]: 1
|
|
- op: 1
|
|
valueIndex: 132
|
|
data[0]: -1
|
|
data[1]: -1
|
|
data[2]: -1
|
|
data[3]: 5
|
|
- op: 56
|
|
valueIndex: 133
|
|
data[0]: 29
|
|
data[1]: -1
|
|
data[2]: -1
|
|
data[3]: 1
|
|
- op: 31
|
|
valueIndex: 137
|
|
data[0]: 30
|
|
data[1]: 28
|
|
data[2]: -1
|
|
data[3]: 1
|
|
- op: 1
|
|
valueIndex: 138
|
|
data[0]: -1
|
|
data[1]: -1
|
|
data[2]: -1
|
|
data[3]: 7
|
|
- op: 56
|
|
valueIndex: 139
|
|
data[0]: 21
|
|
data[1]: -1
|
|
data[2]: -1
|
|
data[3]: 2
|
|
- op: 56
|
|
valueIndex: 143
|
|
data[0]: 22
|
|
data[1]: -1
|
|
data[2]: -1
|
|
data[3]: 3
|
|
- op: 1
|
|
valueIndex: 147
|
|
data[0]: -1
|
|
data[1]: -1
|
|
data[2]: -1
|
|
data[3]: 1
|
|
- op: 1
|
|
valueIndex: 148
|
|
data[0]: -1
|
|
data[1]: -1
|
|
data[2]: -1
|
|
data[3]: 2
|
|
- op: 1
|
|
valueIndex: 150
|
|
data[0]: -1
|
|
data[1]: -1
|
|
data[2]: -1
|
|
data[3]: 2
|
|
- op: 1
|
|
valueIndex: 152
|
|
data[0]: -1
|
|
data[1]: -1
|
|
data[2]: -1
|
|
data[3]: 1
|
|
- op: 1
|
|
valueIndex: 153
|
|
data[0]: -1
|
|
data[1]: -1
|
|
data[2]: -1
|
|
data[3]: 6
|
|
- op: 1
|
|
valueIndex: 154
|
|
data[0]: -1
|
|
data[1]: -1
|
|
data[2]: -1
|
|
data[3]: 1
|
|
- op: 1
|
|
valueIndex: 155
|
|
data[0]: -1
|
|
data[1]: -1
|
|
data[2]: -1
|
|
data[3]: 7
|
|
- op: 56
|
|
valueIndex: 156
|
|
data[0]: 25
|
|
data[1]: -1
|
|
data[2]: -1
|
|
data[3]: 4
|
|
- op: 1
|
|
valueIndex: 160
|
|
data[0]: -1
|
|
data[1]: -1
|
|
data[2]: -1
|
|
data[3]: 1
|
|
- op: 1
|
|
valueIndex: 161
|
|
data[0]: -1
|
|
data[1]: -1
|
|
data[2]: -1
|
|
data[3]: 3
|
|
- op: 1
|
|
valueIndex: 164
|
|
data[0]: -1
|
|
data[1]: -1
|
|
data[2]: -1
|
|
data[3]: 1
|
|
- op: 42
|
|
valueIndex: 165
|
|
data[0]: 27
|
|
data[1]: 26
|
|
data[2]: -1
|
|
data[3]: -1
|
|
- op: 1
|
|
valueIndex: 168
|
|
data[0]: -1
|
|
data[1]: -1
|
|
data[2]: -1
|
|
data[3]: 3
|
|
- op: 1
|
|
valueIndex: 171
|
|
data[0]: -1
|
|
data[1]: -1
|
|
data[2]: -1
|
|
data[3]: 15
|
|
- op: 1
|
|
valueIndex: 172
|
|
data[0]: -1
|
|
data[1]: -1
|
|
data[2]: -1
|
|
data[3]: 6
|
|
- op: 1
|
|
valueIndex: 173
|
|
data[0]: -1
|
|
data[1]: -1
|
|
data[2]: -1
|
|
data[3]: 3
|
|
- op: 1
|
|
valueIndex: 176
|
|
data[0]: -1
|
|
data[1]: -1
|
|
data[2]: -1
|
|
data[3]: 1
|
|
- op: 1
|
|
valueIndex: 177
|
|
data[0]: -1
|
|
data[1]: -1
|
|
data[2]: -1
|
|
data[3]: 1
|
|
- op: 1
|
|
valueIndex: 178
|
|
data[0]: -1
|
|
data[1]: -1
|
|
data[2]: -1
|
|
data[3]: 1
|
|
- op: 1
|
|
valueIndex: 179
|
|
data[0]: -1
|
|
data[1]: -1
|
|
data[2]: -1
|
|
data[3]: 3
|
|
- op: 1
|
|
valueIndex: 182
|
|
data[0]: -1
|
|
data[1]: -1
|
|
data[2]: -1
|
|
data[3]: 3
|
|
- op: 1
|
|
valueIndex: 185
|
|
data[0]: -1
|
|
data[1]: -1
|
|
data[2]: -1
|
|
data[3]: 1
|
|
- op: 1
|
|
valueIndex: 186
|
|
data[0]: -1
|
|
data[1]: -1
|
|
data[2]: -1
|
|
data[3]: 1
|
|
- op: 1
|
|
valueIndex: 187
|
|
data[0]: -1
|
|
data[1]: -1
|
|
data[2]: -1
|
|
data[3]: 1
|
|
- op: 1
|
|
valueIndex: 188
|
|
data[0]: -1
|
|
data[1]: -1
|
|
data[2]: -1
|
|
data[3]: 7
|
|
- op: 1
|
|
valueIndex: 189
|
|
data[0]: -1
|
|
data[1]: -1
|
|
data[2]: -1
|
|
data[3]: 3
|
|
- op: 1
|
|
valueIndex: 192
|
|
data[0]: -1
|
|
data[1]: -1
|
|
data[2]: -1
|
|
data[3]: 1
|
|
- op: 1
|
|
valueIndex: 193
|
|
data[0]: -1
|
|
data[1]: -1
|
|
data[2]: -1
|
|
data[3]: 1
|
|
- op: 43
|
|
valueIndex: 194
|
|
data[0]: 1
|
|
data[1]: 23
|
|
data[2]: -1
|
|
data[3]: -1
|
|
- op: 6
|
|
valueIndex: 197
|
|
data[0]: -1
|
|
data[1]: -1
|
|
data[2]: -1
|
|
data[3]: -1
|
|
- op: 36
|
|
valueIndex: 198
|
|
data[0]: 31
|
|
data[1]: -1
|
|
data[2]: -1
|
|
data[3]: -1
|
|
- op: 1
|
|
valueIndex: 214
|
|
data[0]: -1
|
|
data[1]: -1
|
|
data[2]: -1
|
|
data[3]: 1
|
|
- op: 1
|
|
valueIndex: 215
|
|
data[0]: -1
|
|
data[1]: -1
|
|
data[2]: -1
|
|
data[3]: 1
|
|
- op: 11
|
|
valueIndex: 216
|
|
data[0]: -1
|
|
data[1]: -1
|
|
data[2]: -1
|
|
data[3]: -1
|
|
m_NeedsLocalToWorld: 1
|
|
m_NeedsWorldToLocal: 1
|
|
m_NeededMainCameraBuffers: 0
|
|
m_PropertySheet:
|
|
m_Float:
|
|
m_Array:
|
|
- m_ExpressionIndex: 11
|
|
m_Value: 0.5
|
|
- m_ExpressionIndex: 16
|
|
m_Value: 40
|
|
- m_ExpressionIndex: 28
|
|
m_Value: 0
|
|
- m_ExpressionIndex: 33
|
|
m_Value: 1
|
|
- m_ExpressionIndex: 40
|
|
m_Value: 0.2
|
|
- m_ExpressionIndex: 43
|
|
m_Value: 0.2964208
|
|
- m_ExpressionIndex: 45
|
|
m_Value: 2
|
|
- m_ExpressionIndex: 48
|
|
m_Value: 0.6821963
|
|
- m_ExpressionIndex: 50
|
|
m_Value: 8
|
|
- m_ExpressionIndex: 56
|
|
m_Value: 3
|
|
- m_ExpressionIndex: 57
|
|
m_Value: 8
|
|
- m_ExpressionIndex: 58
|
|
m_Value: 6.2831855
|
|
- m_ExpressionIndex: 61
|
|
m_Value: 6
|
|
- m_ExpressionIndex: 62
|
|
m_Value: 12
|
|
- m_ExpressionIndex: 63
|
|
m_Value: 16
|
|
- m_ExpressionIndex: 66
|
|
m_Value: 0.045
|
|
- m_ExpressionIndex: 67
|
|
m_Value: 0.15
|
|
- m_ExpressionIndex: 71
|
|
m_Value: 1.16
|
|
- m_ExpressionIndex: 72
|
|
m_Value: 1.5
|
|
m_Vector2f:
|
|
m_Array:
|
|
- m_ExpressionIndex: 41
|
|
m_Value: {x: 4, y: 4}
|
|
- m_ExpressionIndex: 42
|
|
m_Value: {x: 0.25, y: 0.25}
|
|
m_Vector3f:
|
|
m_Array:
|
|
- m_ExpressionIndex: 2
|
|
m_Value: {x: 0, y: 0, z: 0}
|
|
- m_ExpressionIndex: 18
|
|
m_Value: {x: 0, y: -10, z: 0}
|
|
- m_ExpressionIndex: 23
|
|
m_Value: {x: 0, y: -9.81, z: 0}
|
|
- m_ExpressionIndex: 24
|
|
m_Value: {x: 1, y: 0, z: 0}
|
|
- m_ExpressionIndex: 49
|
|
m_Value: {x: -30, y: -30, z: -30}
|
|
- m_ExpressionIndex: 52
|
|
m_Value: {x: 10, y: 30, z: 10}
|
|
- m_ExpressionIndex: 55
|
|
m_Value: {x: 1, y: 0.1, z: 0}
|
|
- m_ExpressionIndex: 59
|
|
m_Value: {x: -0.333, y: 0.2, z: -0.333}
|
|
- m_ExpressionIndex: 60
|
|
m_Value: {x: 0.333, y: 1, z: 0.333}
|
|
- m_ExpressionIndex: 65
|
|
m_Value: {x: 30, y: 30, z: 30}
|
|
m_Vector4f:
|
|
m_Array: []
|
|
m_Uint:
|
|
m_Array:
|
|
- m_ExpressionIndex: 44
|
|
m_Value: 1080328534
|
|
- m_ExpressionIndex: 54
|
|
m_Value: 4294967295
|
|
m_Int:
|
|
m_Array:
|
|
- m_ExpressionIndex: 34
|
|
m_Value: 3
|
|
m_Matrix4x4f:
|
|
m_Array:
|
|
- m_ExpressionIndex: 19
|
|
m_Value:
|
|
e00: 1
|
|
e01: 0
|
|
e02: 0
|
|
e03: 0
|
|
e10: 0
|
|
e11: 1
|
|
e12: 0
|
|
e13: 0
|
|
e20: 0
|
|
e21: 0
|
|
e22: 1
|
|
e23: 0
|
|
e30: 0
|
|
e31: 0
|
|
e32: 0
|
|
e33: 1
|
|
m_AnimationCurve:
|
|
m_Array:
|
|
- m_ExpressionIndex: 13
|
|
m_Value:
|
|
serializedVersion: 2
|
|
m_Curve:
|
|
- serializedVersion: 3
|
|
time: -0.06402588
|
|
value: 1.0041499
|
|
inSlope: -0.0004068741
|
|
outSlope: -0.0004068741
|
|
tangentMode: 34
|
|
weightedMode: 0
|
|
inWeight: 0
|
|
outWeight: 0
|
|
- serializedVersion: 3
|
|
time: 10.135477
|
|
value: 1
|
|
inSlope: -0.0015432414
|
|
outSlope: -0.0015432414
|
|
tangentMode: 0
|
|
weightedMode: 0
|
|
inWeight: 0
|
|
outWeight: 0
|
|
- serializedVersion: 3
|
|
time: 29.111261
|
|
value: 0.18520631
|
|
inSlope: -0.0256651
|
|
outSlope: -0.0256651
|
|
tangentMode: 34
|
|
weightedMode: 0
|
|
inWeight: 0
|
|
outWeight: 0
|
|
- serializedVersion: 3
|
|
time: 39.163338
|
|
value: 0.10085335
|
|
inSlope: -0.008391595
|
|
outSlope: -0.008391595
|
|
tangentMode: 34
|
|
weightedMode: 0
|
|
inWeight: 0
|
|
outWeight: 0
|
|
m_PreInfinity: 2
|
|
m_PostInfinity: 2
|
|
m_RotationOrder: 4
|
|
- m_ExpressionIndex: 15
|
|
m_Value:
|
|
serializedVersion: 2
|
|
m_Curve:
|
|
- serializedVersion: 3
|
|
time: 0
|
|
value: 1.2946485
|
|
inSlope: 0.016826218
|
|
outSlope: 0.016826218
|
|
tangentMode: 0
|
|
weightedMode: 0
|
|
inWeight: 0
|
|
outWeight: 0
|
|
- serializedVersion: 3
|
|
time: 49.730503
|
|
value: 3.1700578
|
|
inSlope: 0.054342326
|
|
outSlope: 0.054342326
|
|
tangentMode: 0
|
|
weightedMode: 0
|
|
inWeight: 0
|
|
outWeight: 0
|
|
m_PreInfinity: 2
|
|
m_PostInfinity: 2
|
|
m_RotationOrder: 4
|
|
- m_ExpressionIndex: 21
|
|
m_Value:
|
|
serializedVersion: 2
|
|
m_Curve:
|
|
- serializedVersion: 3
|
|
time: 0
|
|
value: 0
|
|
inSlope: 0
|
|
outSlope: 0
|
|
tangentMode: 0
|
|
weightedMode: 0
|
|
inWeight: 0
|
|
outWeight: 0
|
|
- serializedVersion: 3
|
|
time: 0.25
|
|
value: 0.25
|
|
inSlope: 0
|
|
outSlope: 0
|
|
tangentMode: 0
|
|
weightedMode: 0
|
|
inWeight: 0
|
|
outWeight: 0
|
|
- serializedVersion: 3
|
|
time: 1
|
|
value: 0
|
|
inSlope: 0
|
|
outSlope: 0
|
|
tangentMode: 0
|
|
weightedMode: 0
|
|
inWeight: 0
|
|
outWeight: 0
|
|
m_PreInfinity: 2
|
|
m_PostInfinity: 2
|
|
m_RotationOrder: 4
|
|
- m_ExpressionIndex: 22
|
|
m_Value:
|
|
serializedVersion: 2
|
|
m_Curve:
|
|
- serializedVersion: 3
|
|
time: 0
|
|
value: 0
|
|
inSlope: 0
|
|
outSlope: 10.065604
|
|
tangentMode: 69
|
|
weightedMode: 0
|
|
inWeight: 0
|
|
outWeight: 0
|
|
- serializedVersion: 3
|
|
time: 0.09954834
|
|
value: 1.0020142
|
|
inSlope: 10.065604
|
|
outSlope: -0.0027819863
|
|
tangentMode: 69
|
|
weightedMode: 0
|
|
inWeight: 0
|
|
outWeight: 0
|
|
- serializedVersion: 3
|
|
time: 0.89988714
|
|
value: 0.9997876
|
|
inSlope: -0.0027819863
|
|
outSlope: -9.986606
|
|
tangentMode: 69
|
|
weightedMode: 0
|
|
inWeight: 0
|
|
outWeight: 0
|
|
- serializedVersion: 3
|
|
time: 1
|
|
value: 0
|
|
inSlope: -9.986606
|
|
outSlope: 0
|
|
tangentMode: 69
|
|
weightedMode: 0
|
|
inWeight: 0
|
|
outWeight: 0
|
|
m_PreInfinity: 2
|
|
m_PostInfinity: 2
|
|
m_RotationOrder: 4
|
|
- m_ExpressionIndex: 25
|
|
m_Value:
|
|
serializedVersion: 2
|
|
m_Curve:
|
|
- serializedVersion: 3
|
|
time: 0
|
|
value: 0
|
|
inSlope: 0
|
|
outSlope: 0
|
|
tangentMode: 0
|
|
weightedMode: 0
|
|
inWeight: 0
|
|
outWeight: 0
|
|
- serializedVersion: 3
|
|
time: 0.6024165
|
|
value: 0.75857216
|
|
inSlope: 0
|
|
outSlope: 0
|
|
tangentMode: 0
|
|
weightedMode: 0
|
|
inWeight: 0
|
|
outWeight: 0
|
|
- serializedVersion: 3
|
|
time: 1
|
|
value: 0
|
|
inSlope: 0
|
|
outSlope: 0
|
|
tangentMode: 0
|
|
weightedMode: 0
|
|
inWeight: 0
|
|
outWeight: 0
|
|
m_PreInfinity: 2
|
|
m_PostInfinity: 2
|
|
m_RotationOrder: 4
|
|
- m_ExpressionIndex: 29
|
|
m_Value:
|
|
serializedVersion: 2
|
|
m_Curve:
|
|
- serializedVersion: 3
|
|
time: 0
|
|
value: 0
|
|
inSlope: 0
|
|
outSlope: 0
|
|
tangentMode: 0
|
|
weightedMode: 0
|
|
inWeight: 0
|
|
outWeight: 0
|
|
- serializedVersion: 3
|
|
time: 0.20706177
|
|
value: 0.66345215
|
|
inSlope: 0
|
|
outSlope: 0
|
|
tangentMode: 0
|
|
weightedMode: 0
|
|
inWeight: 0
|
|
outWeight: 0
|
|
- serializedVersion: 3
|
|
time: 1
|
|
value: 0
|
|
inSlope: 0
|
|
outSlope: 0
|
|
tangentMode: 0
|
|
weightedMode: 0
|
|
inWeight: 0
|
|
outWeight: 0
|
|
m_PreInfinity: 2
|
|
m_PostInfinity: 2
|
|
m_RotationOrder: 4
|
|
m_Gradient:
|
|
m_Array: []
|
|
m_NamedObject:
|
|
m_Array:
|
|
- m_ExpressionIndex: 37
|
|
m_Value: {fileID: 2800000, guid: c262ec3ed734b4d43a8f04237f50a13e, type: 3}
|
|
- m_ExpressionIndex: 46
|
|
m_Value: {fileID: 2800000, guid: edb204d72b6be1f44bca583e3692ea60, type: 3}
|
|
- m_ExpressionIndex: 64
|
|
m_Value: {fileID: 2800000, guid: 13d65c204ae83b24ab8627b9e7664c33, type: 3}
|
|
- m_ExpressionIndex: 53
|
|
m_Value: {fileID: 4300000, guid: 76d6e3f9e209b1b498b237e56bce73e0, type: 2}
|
|
m_Bool:
|
|
m_Array: []
|
|
m_ExposedExpressions:
|
|
- nameId: SourceRadius
|
|
index: 57
|
|
- nameId: SpawnRate
|
|
index: 16
|
|
- nameId: SpawnRate Over Distance
|
|
index: 13
|
|
- nameId: WindDirection_direction
|
|
index: 55
|
|
- nameId: WindStrength
|
|
index: 56
|
|
m_Buffers:
|
|
- type: 1
|
|
size: 20160
|
|
layout:
|
|
- name: position
|
|
type: 3
|
|
offset:
|
|
bucket: 0
|
|
structure: 8
|
|
element: 0
|
|
- name: angleX
|
|
type: 1
|
|
offset:
|
|
bucket: 0
|
|
structure: 8
|
|
element: 3
|
|
- name: angleY
|
|
type: 1
|
|
offset:
|
|
bucket: 0
|
|
structure: 8
|
|
element: 4
|
|
- name: angleZ
|
|
type: 1
|
|
offset:
|
|
bucket: 0
|
|
structure: 8
|
|
element: 5
|
|
- name: alive
|
|
type: 17
|
|
offset:
|
|
bucket: 0
|
|
structure: 8
|
|
element: 6
|
|
- name: age
|
|
type: 1
|
|
offset:
|
|
bucket: 0
|
|
structure: 8
|
|
element: 7
|
|
- name: velocity
|
|
type: 3
|
|
offset:
|
|
bucket: 7680
|
|
structure: 4
|
|
element: 0
|
|
- name: lifetime
|
|
type: 1
|
|
offset:
|
|
bucket: 11520
|
|
structure: 1
|
|
element: 0
|
|
- name: texIndex
|
|
type: 1
|
|
offset:
|
|
bucket: 12480
|
|
structure: 1
|
|
element: 0
|
|
- name: angularVelocityX
|
|
type: 1
|
|
offset:
|
|
bucket: 13440
|
|
structure: 3
|
|
element: 0
|
|
- name: angularVelocityY
|
|
type: 1
|
|
offset:
|
|
bucket: 13440
|
|
structure: 3
|
|
element: 1
|
|
- name: angularVelocityZ
|
|
type: 1
|
|
offset:
|
|
bucket: 13440
|
|
structure: 3
|
|
element: 2
|
|
- name: size
|
|
type: 1
|
|
offset:
|
|
bucket: 16320
|
|
structure: 4
|
|
element: 0
|
|
- name: scaleX
|
|
type: 1
|
|
offset:
|
|
bucket: 16320
|
|
structure: 4
|
|
element: 1
|
|
- name: scaleY
|
|
type: 1
|
|
offset:
|
|
bucket: 16320
|
|
structure: 4
|
|
element: 2
|
|
- name: scaleZ
|
|
type: 1
|
|
offset:
|
|
bucket: 16320
|
|
structure: 4
|
|
element: 3
|
|
capacity: 960
|
|
stride: 4
|
|
- type: 1
|
|
size: 1
|
|
layout:
|
|
- name: spawnCount
|
|
type: 1
|
|
offset:
|
|
bucket: 0
|
|
structure: 1
|
|
element: 0
|
|
capacity: 1
|
|
stride: 4
|
|
- type: 4
|
|
size: 900
|
|
layout: []
|
|
capacity: 0
|
|
stride: 4
|
|
- type: 1
|
|
size: 1
|
|
layout: []
|
|
capacity: 0
|
|
stride: 4
|
|
- type: 4
|
|
size: 900
|
|
layout: []
|
|
capacity: 0
|
|
stride: 4
|
|
m_TemporaryBuffers:
|
|
- desc:
|
|
type: 1
|
|
size: 57600
|
|
layout: []
|
|
capacity: 0
|
|
stride: 4
|
|
frameCount: 2
|
|
m_CPUBuffers:
|
|
- capacity: 1
|
|
stride: 1
|
|
layout:
|
|
- name: spawnCount
|
|
type: 1
|
|
offset:
|
|
bucket: 0
|
|
structure: 1
|
|
element: 0
|
|
initialData:
|
|
data: 00000000
|
|
- capacity: 1
|
|
stride: 1
|
|
layout:
|
|
- name: spawnCount
|
|
type: 1
|
|
offset:
|
|
bucket: 0
|
|
structure: 1
|
|
element: 0
|
|
initialData:
|
|
data: 00000000
|
|
m_Events:
|
|
- name: OnPlay
|
|
playSystems: 00000000
|
|
stopSystems:
|
|
- name: OnStop
|
|
playSystems:
|
|
stopSystems: 00000000
|
|
m_RuntimeVersion: 10
|
|
m_RendererSettings:
|
|
motionVectorGenerationMode: 1
|
|
shadowCastingMode: 0
|
|
receiveShadows: 0
|
|
reflectionProbeUsage: 0
|
|
lightProbeUsage: 0
|
|
m_CullingFlags: 0
|
|
m_UpdateMode: 0
|
|
m_PreWarmDeltaTime: 0.1
|
|
m_PreWarmStepCount: 100
|
|
m_InitialEventName: OnPlay
|
|
m_Systems:
|
|
- type: 0
|
|
flags: 0
|
|
capacity: 0
|
|
layer: 4294967295
|
|
buffers:
|
|
- nameId: spawner_output
|
|
index: 1
|
|
values: []
|
|
tasks:
|
|
- type: 268435456
|
|
buffers: []
|
|
temporaryBuffers: []
|
|
values:
|
|
- nameId: Rate
|
|
index: 36
|
|
params: []
|
|
processor: {fileID: 0}
|
|
shaderSourceIndex: -1
|
|
- type: 1
|
|
flags: 3
|
|
capacity: 900
|
|
layer: 4294967295
|
|
buffers:
|
|
- nameId: attributeBuffer
|
|
index: 0
|
|
- nameId: sourceAttributeBuffer
|
|
index: 1
|
|
- nameId: deadList
|
|
index: 2
|
|
- nameId: deadListCount
|
|
index: 3
|
|
- nameId: spawner_input
|
|
index: 1
|
|
- nameId: indirectBuffer
|
|
index: 4
|
|
values:
|
|
- nameId: bounds_center
|
|
index: 51
|
|
- nameId: bounds_size
|
|
index: 52
|
|
tasks:
|
|
- type: 536870912
|
|
buffers:
|
|
- nameId: attributeBuffer
|
|
index: 0
|
|
- nameId: deadListIn
|
|
index: 2
|
|
- nameId: deadListCount
|
|
index: 3
|
|
- nameId: sourceAttributeBuffer
|
|
index: 1
|
|
temporaryBuffers: []
|
|
values:
|
|
- nameId: ArcSphere_sphere_center_a
|
|
index: 3
|
|
- nameId: ArcSphere_sphere_radius_a
|
|
index: 57
|
|
params:
|
|
- nameId: bounds_center
|
|
index: 51
|
|
- nameId: bounds_size
|
|
index: 52
|
|
processor: {fileID: 0}
|
|
shaderSourceIndex: 0
|
|
- type: 805306368
|
|
buffers:
|
|
- nameId: attributeBuffer
|
|
index: 0
|
|
- nameId: deadListOut
|
|
index: 2
|
|
- nameId: indirectBuffer
|
|
index: 4
|
|
temporaryBuffers: []
|
|
values:
|
|
- nameId: Force_a
|
|
index: 68
|
|
- nameId: deltaTime_a
|
|
index: 69
|
|
- nameId: InvFieldTransform_b
|
|
index: 70
|
|
- nameId: FieldTransform_b
|
|
index: 31
|
|
- nameId: Velocity_c
|
|
index: 32
|
|
params: []
|
|
processor: {fileID: 0}
|
|
shaderSourceIndex: 1
|
|
- type: 805306368
|
|
buffers:
|
|
- nameId: attributeBuffer
|
|
index: 0
|
|
- nameId: deadListOut
|
|
index: 2
|
|
- nameId: indirectBuffer
|
|
index: 4
|
|
temporaryBuffers:
|
|
- mapping:
|
|
nameId: elementToVFXBuffer
|
|
index: 0
|
|
pastFrameIndex: 0
|
|
perCameraBuffer: 1
|
|
values:
|
|
- nameId: Scale_x_a
|
|
index: 35
|
|
- nameId: Scale_y_a
|
|
index: 47
|
|
- nameId: Scale_z_a
|
|
index: 38
|
|
- nameId: uniform_e
|
|
index: 20
|
|
- nameId: uniform_f
|
|
index: 4
|
|
- nameId: Size_c
|
|
index: 39
|
|
- nameId: currentFrameIndex
|
|
index: 73
|
|
- nameId: unity_ObjectToWorld
|
|
index: 1
|
|
- nameId: unity_WorldToObject
|
|
index: 27
|
|
- nameId: baseColorMap
|
|
index: 37
|
|
- nameId: maskMap
|
|
index: 46
|
|
- nameId: normalMap
|
|
index: 64
|
|
params:
|
|
- nameId: mesh
|
|
index: 53
|
|
- nameId: subMeshMask
|
|
index: 54
|
|
processor: {fileID: 0}
|
|
shaderSourceIndex: 3
|
|
- type: 1073741828
|
|
buffers:
|
|
- nameId: attributeBuffer
|
|
index: 0
|
|
- nameId: indirectBuffer
|
|
index: 4
|
|
temporaryBuffers:
|
|
- mapping:
|
|
nameId: elementToVFXBufferPrevious
|
|
index: 0
|
|
pastFrameIndex: 1
|
|
perCameraBuffer: 1
|
|
values:
|
|
- nameId: Scale_x_a
|
|
index: 35
|
|
- nameId: Scale_y_a
|
|
index: 47
|
|
- nameId: Scale_z_a
|
|
index: 38
|
|
- nameId: uniform_e
|
|
index: 20
|
|
- nameId: uniform_f
|
|
index: 4
|
|
- nameId: Size_c
|
|
index: 39
|
|
- nameId: currentFrameIndex
|
|
index: 73
|
|
- nameId: baseColorMap
|
|
index: 37
|
|
- nameId: maskMap
|
|
index: 46
|
|
- nameId: normalMap
|
|
index: 64
|
|
params:
|
|
- nameId: mesh
|
|
index: 53
|
|
- nameId: subMeshMask
|
|
index: 54
|
|
- nameId: sortPriority
|
|
index: 0
|
|
- nameId: indirectDraw
|
|
index: 1
|
|
processor: {fileID: 0}
|
|
shaderSourceIndex: 2
|
|
--- !u!114 &8926484042661614660
|
|
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: 330e0fca1717dde4aaa144f48232aa64, type: 3}
|
|
m_Name:
|
|
m_EditorClassIdentifier:
|
|
m_Parent: {fileID: 114350483966674976}
|
|
m_Children: []
|
|
m_UIPosition: {x: 0, y: 0}
|
|
m_UICollapsed: 0
|
|
m_UISuperCollapsed: 0
|
|
m_InputSlots: []
|
|
m_OutputSlots:
|
|
- {fileID: 8926484042661614661}
|
|
m_ExposedName: WindDirection
|
|
m_Exposed: 1
|
|
m_Order: 0
|
|
m_Category: Wind
|
|
m_Min:
|
|
m_Type:
|
|
m_SerializableType:
|
|
m_SerializableObject:
|
|
m_Max:
|
|
m_Type:
|
|
m_SerializableType:
|
|
m_SerializableObject:
|
|
m_IsOutput: 0
|
|
m_Tooltip:
|
|
m_Nodes: []
|
|
--- !u!114 &8926484042661614661
|
|
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: e8f2b4a846fd4c14a893cde576ad172b, type: 3}
|
|
m_Name:
|
|
m_EditorClassIdentifier:
|
|
m_Parent: {fileID: 0}
|
|
m_Children:
|
|
- {fileID: 8926484042661614662}
|
|
m_UIPosition: {x: 0, y: 0}
|
|
m_UICollapsed: 1
|
|
m_UISuperCollapsed: 0
|
|
m_MasterSlot: {fileID: 8926484042661614661}
|
|
m_MasterData:
|
|
m_Owner: {fileID: 8926484042661614660}
|
|
m_Value:
|
|
m_Type:
|
|
m_SerializableType: UnityEditor.VFX.DirectionType, Unity.VisualEffectGraph.Editor,
|
|
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
|
m_SerializableObject: '{"direction":{"x":1.0,"y":0.10000000149011612,"z":0.0}}'
|
|
m_Space: 0
|
|
m_Property:
|
|
name: o
|
|
m_serializedType:
|
|
m_SerializableType: UnityEditor.VFX.DirectionType, Unity.VisualEffectGraph.Editor,
|
|
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
|
attributes: []
|
|
m_Direction: 1
|
|
m_LinkedSlots: []
|
|
--- !u!114 &8926484042661614662
|
|
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: ac39bd03fca81b849929b9c966f1836a, type: 3}
|
|
m_Name:
|
|
m_EditorClassIdentifier:
|
|
m_Parent: {fileID: 8926484042661614661}
|
|
m_Children:
|
|
- {fileID: 8926484042661614663}
|
|
- {fileID: 8926484042661614664}
|
|
- {fileID: 8926484042661614665}
|
|
m_UIPosition: {x: 0, y: 0}
|
|
m_UICollapsed: 1
|
|
m_UISuperCollapsed: 0
|
|
m_MasterSlot: {fileID: 8926484042661614661}
|
|
m_MasterData:
|
|
m_Owner: {fileID: 0}
|
|
m_Value:
|
|
m_Type:
|
|
m_SerializableType:
|
|
m_SerializableObject:
|
|
m_Space: 2147483647
|
|
m_Property:
|
|
name: direction
|
|
m_serializedType:
|
|
m_SerializableType: UnityEngine.Vector3, UnityEngine.CoreModule, Version=0.0.0.0,
|
|
Culture=neutral, PublicKeyToken=null
|
|
attributes:
|
|
- m_Type: 3
|
|
m_Min: -Infinity
|
|
m_Max: Infinity
|
|
m_Tooltip: The normalized direction.
|
|
m_Regex:
|
|
m_RegexMaxLength: 0
|
|
m_Direction: 1
|
|
m_LinkedSlots: []
|
|
--- !u!114 &8926484042661614663
|
|
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: 8926484042661614662}
|
|
m_Children: []
|
|
m_UIPosition: {x: 0, y: 0}
|
|
m_UICollapsed: 1
|
|
m_UISuperCollapsed: 0
|
|
m_MasterSlot: {fileID: 8926484042661614661}
|
|
m_MasterData:
|
|
m_Owner: {fileID: 0}
|
|
m_Value:
|
|
m_Type:
|
|
m_SerializableType:
|
|
m_SerializableObject:
|
|
m_Space: 2147483647
|
|
m_Property:
|
|
name: x
|
|
m_serializedType:
|
|
m_SerializableType: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral,
|
|
PublicKeyToken=b77a5c561934e089
|
|
attributes: []
|
|
m_Direction: 1
|
|
m_LinkedSlots: []
|
|
--- !u!114 &8926484042661614664
|
|
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: 8926484042661614662}
|
|
m_Children: []
|
|
m_UIPosition: {x: 0, y: 0}
|
|
m_UICollapsed: 1
|
|
m_UISuperCollapsed: 0
|
|
m_MasterSlot: {fileID: 8926484042661614661}
|
|
m_MasterData:
|
|
m_Owner: {fileID: 0}
|
|
m_Value:
|
|
m_Type:
|
|
m_SerializableType:
|
|
m_SerializableObject:
|
|
m_Space: 2147483647
|
|
m_Property:
|
|
name: y
|
|
m_serializedType:
|
|
m_SerializableType: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral,
|
|
PublicKeyToken=b77a5c561934e089
|
|
attributes: []
|
|
m_Direction: 1
|
|
m_LinkedSlots: []
|
|
--- !u!114 &8926484042661614665
|
|
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: 8926484042661614662}
|
|
m_Children: []
|
|
m_UIPosition: {x: 0, y: 0}
|
|
m_UICollapsed: 1
|
|
m_UISuperCollapsed: 0
|
|
m_MasterSlot: {fileID: 8926484042661614661}
|
|
m_MasterData:
|
|
m_Owner: {fileID: 0}
|
|
m_Value:
|
|
m_Type:
|
|
m_SerializableType:
|
|
m_SerializableObject:
|
|
m_Space: 2147483647
|
|
m_Property:
|
|
name: z
|
|
m_serializedType:
|
|
m_SerializableType: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral,
|
|
PublicKeyToken=b77a5c561934e089
|
|
attributes: []
|
|
m_Direction: 1
|
|
m_LinkedSlots: []
|
|
--- !u!114 &8926484042661614686
|
|
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: 330e0fca1717dde4aaa144f48232aa64, type: 3}
|
|
m_Name:
|
|
m_EditorClassIdentifier:
|
|
m_Parent: {fileID: 114350483966674976}
|
|
m_Children: []
|
|
m_UIPosition: {x: 0, y: 0}
|
|
m_UICollapsed: 0
|
|
m_UISuperCollapsed: 0
|
|
m_InputSlots: []
|
|
m_OutputSlots:
|
|
- {fileID: 8926484042661614687}
|
|
m_ExposedName: WindStrength
|
|
m_Exposed: 1
|
|
m_Order: 2
|
|
m_Category: Wind
|
|
m_Min:
|
|
m_Type:
|
|
m_SerializableType:
|
|
m_SerializableObject:
|
|
m_Max:
|
|
m_Type:
|
|
m_SerializableType:
|
|
m_SerializableObject:
|
|
m_IsOutput: 0
|
|
m_Tooltip:
|
|
m_Nodes: []
|
|
--- !u!114 &8926484042661614687
|
|
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: 8926484042661614687}
|
|
m_MasterData:
|
|
m_Owner: {fileID: 8926484042661614686}
|
|
m_Value:
|
|
m_Type:
|
|
m_SerializableType: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral,
|
|
PublicKeyToken=b77a5c561934e089
|
|
m_SerializableObject: 3
|
|
m_Space: 2147483647
|
|
m_Property:
|
|
name: o
|
|
m_serializedType:
|
|
m_SerializableType: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral,
|
|
PublicKeyToken=b77a5c561934e089
|
|
attributes: []
|
|
m_Direction: 1
|
|
m_LinkedSlots: []
|
|
--- !u!114 &8926484042661614745
|
|
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: 73a13919d81fb7444849bae8b5c812a2, type: 3}
|
|
m_Name:
|
|
m_EditorClassIdentifier:
|
|
m_Parent: {fileID: 114350483966674976}
|
|
m_Children:
|
|
- {fileID: 8926484042661614746}
|
|
m_UIPosition: {x: 2354, y: -363}
|
|
m_UICollapsed: 0
|
|
m_UISuperCollapsed: 0
|
|
m_InputSlots: []
|
|
m_OutputSlots: []
|
|
m_Label:
|
|
m_Data: {fileID: 0}
|
|
m_InputFlowSlot:
|
|
- link: []
|
|
- link: []
|
|
m_OutputFlowSlot:
|
|
- link:
|
|
- context: {fileID: 8926484042661614748}
|
|
slotIndex: 0
|
|
loopDuration: 0
|
|
loopCount: 0
|
|
delayBeforeLoop: 0
|
|
delayAfterLoop: 0
|
|
--- !u!114 &8926484042661614746
|
|
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: f05c6884b705ce14d82ae720f0ec209f, type: 3}
|
|
m_Name:
|
|
m_EditorClassIdentifier:
|
|
m_Parent: {fileID: 8926484042661614745}
|
|
m_Children: []
|
|
m_UIPosition: {x: 0, y: 2}
|
|
m_UICollapsed: 0
|
|
m_UISuperCollapsed: 0
|
|
m_InputSlots:
|
|
- {fileID: 8926484042661614747}
|
|
m_OutputSlots: []
|
|
m_Disabled: 0
|
|
--- !u!114 &8926484042661614747
|
|
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: 8926484042661614747}
|
|
m_MasterData:
|
|
m_Owner: {fileID: 8926484042661614746}
|
|
m_Value:
|
|
m_Type:
|
|