A straight beam: one quad per particle, stretched between two endpoints that belong to
the system rather than to the particle.
Endpoints. Both ends are computed from the running system every frame:
- Source: the system's current world position, plus
mLocalSpaceSourceOffset
rotated into the system's orientation
- Target: the target position of the effect instance, plus
mLocalSpaceTargetOffset rotated the same way
The offsets are documented on
VfxBeamBaseDefinitionData.
The particle's position does not place either end, so every particle of the emitter draws
the same segment. Particles differ only in width, color and texture tiling, and they draw
stacked on each other. More particles add more coincident quads, not a longer or a
divided beam.
Width. scale.x is the full width. Which way it points is set by mBeam.mMode:
facing the camera, or lying flat along the world's horizontal plane. See
VfxBeamDefinitionData.mMode.
Length. scale.y and scale.z trim the two ends, as fractions of the beam:
sourceEdge = source + (target - source) · scale.y
targetEdge = target - (target - source) · scale.z
With both at 0, or both at 1, the quad covers the whole beam. Values in between move
each edge toward the other end.
Texture. The texture's v axis lies along the beam and its u axis across it. The
emitter's UV transform is applied with its first axis along the beam, so a u scroll such
as BirthUvScrollRate.x moves the texture along the beam. The number of repeats comes from
mBeam.mBirthTilingSize: width / x across and length / y along, where a component of
0 or below gives one repeat. The length is the full distance between the endpoints even
when the quad is trimmed, so trimming shortens the quad without removing repeats.