a simple question about jit.gen with 2 and 3-dimensional matrices
I am experimenting with [jit.gen] to control a matrix. I understand that [snorm] will give me normalized values from -1 to 1 across all incoming dimensions. I can split these up with [swiz] and [vec], so as to alter the specific values of whichever axis I'm working with.
However, if I wanted to input a 2d matrix (like from [jit. noise], for instance) and alter the z input of [vec], based on something like pixel brightness. How would I go about deriving a single value from a 2d matrix and using it as the third element in a 3d matrix?
My apologies if this question doesn't make sense - I am struggling to understand something here, also.
You could either feed the 2d matrix into jit.rgb2luma and use that as an additional input into vec, or you could replicate the rgb2luma algorithm within jit.gen and accomplish the same thing.
The question that comes to mind is: what are you trying to do here?