Vixen
02b45cc4

VfxCustomAttribute

struct Core/Vixen.Vfx/VfxAttribute.cs:99
csharp
public readonly record struct VfxCustomAttribute

A per-particle quantity a graph declares for itself.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

The graph carries the mapping, so both backends agree on it. A custom attribute is a name to the author and a slot to everything downstream: the operations reference it by position, the storage is allocated by position, and the emitted shader declares its buffers in that order. Nothing has to look a name up at run time, and the two backends cannot come to different conclusions about which array is which, because neither of them decides — Compile does, once.

Slots are assigned by declaration order, which means reordering the declarations is a different graph. That is the same rule the salts follow and for the same reason: a compiled artefact that changed meaning depending on how it was written down would not be comparable in a golden test.

Fields and properties (2)

  • public string Name

    What it is called. Has to be an identifier, because it names a binding in the emitted shader and a host looks it up by that name in the reflection.

  • public VfxAttributeType Type

    What it is made of. Float lanes only — see VfxCompiledGraph.

Methods (1)

  • public VfxCustomAttribute(string Name, VfxAttributeType Type)

    A per-particle quantity a graph declares for itself.

Used by (7)

  • ParticleBufferVixen.Vfx
  • VfxCompiledGraphVixen.Vfx
  • VfxCustomAttributeRowVixen.Rendering
  • VfxCustomAttributeTestsVixen.Vfx.Tests
  • VfxEffectContentVixen.Rendering
  • VfxShaderEmitterVixen.Vfx
  • VfxGraphBuilderVixen.Editor.VfxGraph