Vixen
02b45cc4
csharp
public enum VfxOpcode

What one node of a compiled graph does.

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

Remarks

Deliberately a small, closed set of coarse operations rather than a general expression language. A node graph could be lowered to add/multiply/select and a register file, and then both backends would need a register allocator; lowering to "apply gravity" instead means the CPU backend is a loop and the GPU backend is a line of shader source. The cost is that a genuinely novel node needs an opcode here — which is the right cost to pay while the node library is small enough to enumerate.

Fields and properties (25)

  • SetPosition

    Position is a fixed point. A.xyz is the point.

  • PositionInSphere

    Position is uniform inside a sphere. A.xyz is the centre, A.w the radius.

  • PositionInBox

    Position is uniform inside a box. A.xyz is the minimum, B.xyz the maximum.

  • SetVelocity

    Velocity is a fixed vector. A.xyz is it.

  • VelocityRandomDirection

    Velocity is a random direction at a random speed. A.x and A.y are the speed range.

  • VelocityInCone

    Velocity is inside a cone. A.xyz is the axis, A.w the half-angle in radians, B.x and B.y the speed range.

  • SetLifetime

    Lifetime is uniform in a range. A.x and A.y are it.

  • SetSize

    Size is uniform in a range. A.x and A.y are it.

  • SetColour

    Colour is fixed. A is it, linear RGBA.

  • SetRotation

    Roll is uniform in a range. A.x and A.y are it, in radians.

  • SetAngularVelocity

    Angular velocity is uniform in a range. A.x and A.y are it.

  • Integrate

    Position moves by velocity. No parameters.

  • Gravity

    Velocity gains an acceleration. A.xyz is it, per second squared.

  • Drag

    Velocity decays. A.x is the coefficient, per second.

  • Rotate

    Roll advances by angular velocity. No parameters.

  • SizeOverLife

    Size follows age. A.x is the size at birth, A.y at death.

  • ColourOverLife

    Colour follows age. A is the colour at birth, B at death.

  • Attract

    Velocity is pulled towards a point, or pushed from it. A.xyz is the point, A.w the acceleration at the centre — negative repels — and B.x the radius beyond which it does nothing. A radius of zero or less reaches everywhere and does not fall off.

  • Vortex

    Velocity is turned about an axis. A.xyz is a point on the axis, A.w the acceleration, B.xyz the axis, and B.w the radius beyond which it does nothing.

  • Turbulence

    Velocity is pushed by curl noise. A.xyz is the frequency, A.w the acceleration, B.x how fast the field drifts, and B.y how many octaves.

  • CollidePlane

    Particles are kept on the front side of a plane. A.xyz is the unit normal, A.w the plane's distance along it from the origin, B.x how much of the approach speed survives the bounce, and B.y how much of the sliding speed is lost to friction.

  • CollideSphere

    Particles are kept outside a sphere. A.xyz is the centre, A.w the radius, B.x the bounce and B.y the friction.

  • SetCustom

    A custom attribute is a fixed value. Slot says which, and A is the value — as many lanes as the slot was declared with.

  • RandomCustom

    A custom attribute is uniform between two values, lane by lane. A is the low end and B the high one.

  • CustomOverLife

    A custom attribute follows age. A is the value at birth, B at death.

Used by (43, showing 40)

  • SweepBenchmarksVixen.Benchmarks.Vfx
  • ParticleLightTestsVixen.Rendering.Tests
  • ParticleRenderFeatureTestsVixen.Rendering.Tests
  • ParticleSpriteDeviceTestsVixen.Graphics.Golden.Tests
  • SourceVixen.Rendering.Tests
  • TypeRegistrationVixen.Rendering
  • VfxAgreementTestsVixen.Vfx.Gpu.Tests
  • VfxCollisionTestsVixen.Vfx.Tests
  • VfxCompiledGraphTestsVixen.Vfx.Tests
  • VfxCustomAttributeTestsVixen.Vfx.Tests
  • VfxEffectContentTestsVixen.Rendering.Tests
  • VfxForceTestsVixen.Vfx.Tests
  • VfxGeometryTestsVixen.Vfx.Tests
  • VfxOpcodesVixen.Vfx
  • VfxOperationVixen.Vfx
  • VfxOperationRowVixen.Rendering
  • VfxParallelTestsVixen.Vfx.Tests
  • VfxReapTestsVixen.Vfx.Gpu.Tests
  • VfxRibbonTestsVixen.Vfx.Tests
  • VfxShaderEmitterVixen.Vfx
  • VfxShaderEmitterTestsVixen.Vfx.Tests
  • VfxShaderUniformTestsVixen.Vfx.Tests
  • VfxSimulationVixen.Vfx
  • VfxSortTestsVixen.Vfx.Gpu.Tests
  • VfxSubEmitterTestsVixen.Vfx.Tests
  • VfxSystemTestsVixen.Vfx.Tests
  • Vixen_Rendering_Vfx_VfxOperationRowSerializerVixen.Rendering
  • AttractNodeVixen.Editor.VfxGraph
  • CollidePlaneNodeVixen.Editor.VfxGraph
  • ColourNodeVixen.Editor.VfxGraph
  • ColourOverLifeNodeVixen.Editor.VfxGraph
  • DragNodeVixen.Editor.VfxGraph
  • GravityNodeVixen.Editor.VfxGraph
  • IntegrateNodeVixen.Editor.VfxGraph
  • LifetimeNodeVixen.Editor.VfxGraph
  • PositionInBoxNodeVixen.Editor.VfxGraph
  • PositionInSphereNodeVixen.Editor.VfxGraph
  • RandomVelocityNodeVixen.Editor.VfxGraph
  • SetVelocityNodeVixen.Editor.VfxGraph
  • SizeNodeVixen.Editor.VfxGraph