Skip to content

Commit 2a76553

Browse files
Add some comment
1 parent 0674147 commit 2a76553

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

Assets/Editor/VFXCustomOutputMesh.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ protected override IEnumerable<VFXPropertyWithValue> inputProperties
1717
{
1818
foreach (var inputProperty in base.inputProperties)
1919
yield return inputProperty;
20+
21+
//This yield return will automatically add a slot in this output.
2022
yield return new VFXPropertyWithValue(new VFXProperty(typeof(float), "customDeformation"));
2123
}
2224
}
@@ -30,6 +32,7 @@ protected override IEnumerable<VFXNamedExpression> CollectGPUExpressions(IEnumer
3032
{
3133
if (slot.name == "customDeformation")
3234
{
35+
//It makes this value readable on GPU thanks to "${VFXLoadParameter:{customDeformation}}" in template.
3336
yield return slot;
3437
break;
3538
}

Assets/Editor/VFXCustomOutputMesh.template

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
SubShader
33
{
4+
//N.B: This Assets include is only considered thanks to a hack in VFXCodeGenerator.cs(L314)
45
${VFXInclude("Assets/Editor/VFXCustomParticleHeader.template")}
56
${VFXIncludeRP("Templates/ParticleMeshesLit/PassSelection.template")}
67
${VFXIncludeRP("Templates/ParticleMeshesLit/PassDepth.template"),IS_OPAQUE_PARTICLE}

0 commit comments

Comments
 (0)