Vixen
02b45cc4
csharp
public readonly record struct VfxOperation

One operation, as the compiled graph stores it.

Read the guide page for this →

Remarks

Two float4s and no more, on purpose. The parameter block is a fixed size because that is what lets a compiled graph be an array rather than a graph of objects — which is what lets it be uploaded to a constant buffer verbatim, serialised without a visitor, and compared for equality in a golden test. An operation that genuinely needs more parameters than this is one that should be two operations.

Nothing here is a pointer or a delegate. Slot is an index, and it is the one thing that had to be added when attributes stopped being a closed set — but it indexes the graph's own declaration list, which travels with the operations and is fixed when they are. It is not a parameter, which is why the two-float4 rule above is untouched by it: nothing about a slot is a number the effect computes with.

Fields and properties (5)

  • public VfxOpcode Opcode

    What it does.

  • public uint Salt

    Which randomness it draws on. Distinct per operation, so two random values on one particle are unrelated — see FirstSalt.

  • public Vector4 A

    The first four parameters. What they mean depends on the opcode.

  • public Vector4 B

    The next four.

  • public int Slot

    Which custom attribute the operation targets, for the opcodes that target one. Zero and ignored for every other opcode.

Methods (3)

  • public VfxOperation(VfxOpcode Opcode, uint Salt, Vector4 A, Vector4 B, int Slot = 0)

    One operation, as the compiled graph stores it.

  • public VfxOperation(VfxOpcode opcode, uint salt = 0)

    An operation with no parameters.

  • public VfxOperation(VfxOpcode opcode, Vector4 a, uint salt = 0)

    An operation with one parameter vector.

Used by (27)

  • SweepBenchmarksVixen.Benchmarks.Vfx
  • ParticleRenderFeatureTestsVixen.Rendering.Tests
  • SweepVixen.Vfx
  • VfxAgreementTestsVixen.Vfx.Gpu.Tests
  • VfxCollisionTestsVixen.Vfx.Tests
  • VfxCompiledGraphVixen.Vfx
  • VfxCompiledGraphTestsVixen.Vfx.Tests
  • VfxCustomAttributeTestsVixen.Vfx.Tests
  • VfxEffectContentVixen.Rendering
  • VfxEffectContentTestsVixen.Rendering.Tests
  • VfxForceTestsVixen.Vfx.Tests
  • VfxGeometryTestsVixen.Vfx.Tests
  • VfxOperationRowVixen.Rendering
  • VfxParallelTestsVixen.Vfx.Tests
  • VfxReapTestsVixen.Vfx.Gpu.Tests
  • VfxShaderEmitterVixen.Vfx
  • VfxShaderEmitterTestsVixen.Vfx.Tests
  • VfxSimulationVixen.Vfx
  • VfxSortTestsVixen.Vfx.Gpu.Tests
  • VfxSystemTestsVixen.Vfx.Tests
  • AttractNodeVixen.Editor.VfxGraph
  • CollidePlaneNodeVixen.Editor.VfxGraph
  • ColourOverLifeNodeVixen.Editor.VfxGraph
  • PositionInBoxNodeVixen.Editor.VfxGraph
  • TurbulenceNodeVixen.Editor.VfxGraph
  • VfxGraphBuilderVixen.Editor.VfxGraph
  • VfxGraphCompilerTestsVixen.Editor.VfxGraph.Tests