Effect blades (blade01; partly decoded, not drawn yet)
Element update 0x14010b140 (class
alfn_FunctionBLADE01), draw object
pdEftBlade01 (vtable 0x140479bf0:
init 0x14019e820, free 0x14019ec40, draw
0x14019ec80; seed 0x14019f2f0, extend
0x14019f450). Draw list flags 0x1c09c41.
- Object fields set once:
history length H = int(end − start) + 2 (+0xd0),
subdivisions K = int(
raw_f[1]) (+0xd4), life L =raw_f[0](+0x74), blade length −raw_m[12](+0x78). - Per tick in the window: the
remaining life is reset to L (+0x70); colors 0
and 1 as floats (bytes / 255), the curve indices
int(
raw_f[10]) (color) and int(raw_f[11]) (refraction),raw_m[8..11], the material’s two textures, and the effect matrix is pushed. - Draw, per tick: the first draw seeds every history slot with the current matrix; the history count grows by one up to H; on a tick the update ran (life still L) the geometry is rebuilt; then the life drops by one. Nothing is drawn once the life reaches 0, so the blade lingers L ticks after its window.
- Geometry: for each history matrix, a tip point at the matrix’s Z axis × the blade length plus its translation, and a root point at the translation. Tips and roots are each run through a spline helper (0x14017e120, K points per span; not read yet) and written as vertex pairs (24 bytes: position, packed 11:11:10 normal from the cross product of the quad’s two edges, BGRA color, two SNORM UVs). The init fills u = 1 at the tip and 0 at the root, v = i / N along, and alpha ramps 0 → 1 over the first K / 2 pairs and back to 0 over the last K / 2 (white RGB). One triangle strip, cull off.
- Weights: t = L − remaining
life (1 inside the window, rising to L in the
fade); the three curves are the trail’s: t / L,
t(t + 1) / (L(L + 1)), t(2L − t + 1) / (L(L +
1)). The color is color 0 + (color 1 − color 0)
× w(color curve); a push p =
raw_m[8]+ (raw_m[10]−raw_m[8]) × w(refraction curve) and a bump scale k = (raw_m[9]+ (raw_m[11]−raw_m[9]) × w) / 255 (the stage-1 bump matrix diagonal, off-diagonal 0). - Shaders (
Blade01V/Blade01P): the vertex color × the color constant; the screen UV is the projection of the position pushed back along the normal by p, mapped by (0.5, −0.5). The pixel shader reads a signed offset from the bump texture (material texture 1), scales it by k, samples the frame copy at the screen UV plus that offset, and outputs color × (frame copy + material texture 0), alpha = color alpha (alpha test as the other effects). - Blend: mode word 0x5401 through the blend setter: source alpha / inverse source alpha, add; blending is turned off after the draw.
- Spline helper 0x14017e120:
per span and axis it evaluates a degree-5
polynomial in t = j / K (j = 0..K, Horner form);
the six coefficients per span come from a set-up
call (0x14017e760, over all points) and a
per-span call (0x14017ea90): a quintic spline,
not Catmull-Rom. Not read: how those two calls
build the coefficients (end conditions), and
blade02(pdEftBlade02, draw 0x14019fa80, 40-byte vertices).