How do you append Float4s?

unsure what the PPV function does or what it is returning, but emissive isn’t going to take a 16vec :stuck_out_tongue:

you would need to break things apart and do whatever maths you want and then shove an actual color there, 3vec.

4vec is a standard as Alpha was/is a thing and the multiplies, subtracts, etc will will on a pair of 1vecs, 2, 3, or 4vecs as appropriate, but that’s kind of where it fits in. kind of a hardware-software standard, unless you code it otherwise in your own shader or custom-node. Unreal will stick to the rule-of-4.

ultimately, however, what you plug it into rules, so in this case, emissive is a color, like basecolor, so alpha doesn’t apply and we can go with just 3vec.

for efficiency and other things, like bundling values to ensure they correlate over maths, using an append-vec makes sense, but still, at the end, what you plug it into will only take that Xvec value. for example: I pack 4 height-textures into a single texture so when I generate UVs I can reduce samples/samplers (overhead). when i need to height-blend them, however, I need to break them out and do it sequentially, so sometimes it only carries you so far.

1 Like