Author Topic: Swizzle Processor  (Read 4661 times)

There seems to be no way to output individual components from the vector-output of a value processor. It is often necessary to generate multiple floats inside of a value processor and output them as a vector (because only one output is supported). But then there is no way to split up those values to send them to separate nodes.

We either need a swizzle node, or the ability to output more than one value from the value processor.

It is possible to create our own swizzle graphs, but we would need one for every axis of every type of vector. Something like 9 graphs, I think?
Last Edit: May 29, 2019, 03:34:24 pm

Good point..
I'm going to share with the team

Awesome, thanks! I made my own for now, but some type of built in system would definitely be an improvement.

you can try this (we'll test internally to see if it's ready to be implemented)

Thanks, that's a very intelligent way to handle it. Does all of this get inlined by the optimizer? I have a few somewhat ridiculous situations where I swizzle many nodes into instances of the same graph, such as to generate random numbers. I made something similar to this swizzle, but then ended up making direct versions out of fear that it wouldn't be optimized.

Thanks again, very useful!

In theory, it should be optimized, but I would be happy to get some feedback if you got some weird behaviors

I've been using them since you posted them and haven't noticed anything at all. My guess is they are solid. Thanks!

perfect, thanks for the feedback ;)