jit.gl.mesh and color matrix input
I'm trying to use the color matrix input on jit.gl.mesh to control the alpha (which I will happily admit, I barely understand.) In the example below, if I set a mesh using a gridshape, I can pass a matrix with a varying alpha with no problem. If I set the mesh with jit.expr (actually creating a grid), the color matrix no longer has any effect. The only obvious difference seems to me that in the second case, a 5-plane matrix is being passed to the mesh instead of a 3-plane one, but to be honest I don't really understand the arcana of the object well enough to see how that would change things. Can someone have a look at this & set me straight?
Thanks,
M
You are not banging the second color matrix, only setting its value. The one to the first gridshape is hooked up to the output of your t b b b erase, the one to the second is not. It works for me if it is hooked up, and you change your second mesh to have input geometry that is 3 planes, not 5 (not sure what that means).
Here you go:
the lack of bang was an example oversight -- sorry about that. The other two planes (apropos of our other thread) are handling the texturing of the mesh, and without them the texture does not apply itself properly across the mesh.
Solution found! use two matrices: a 3-plane for the vertex array only, and a two-plane to stick into the texcoords inlet -- basically just breaking up the 5-plane matrix in my previous post (if you're lazy, you can just unpack the one into two & send them to the different inlets).
M
Ah, makes sense about the 5 plane matrix. There ya go :) Maybe more than 3 matrices in the left most inlet precludes the use of the separate distinct matrix inlets? That would be good to know.
Well, now we know something, at least.