Colors not working when applying texture to jit.gl.mesh

t's icon

Hi,

Max Patch
Copy patch and select New From Clipboard in Max.

I would really need that transparency would work but it seems that none of the colors work when applying texture to a mesh? It works ok on the gridshape...what do I have to do because I need a mesh?

t's icon

PS: And sometimes colors work on mesh while sometimes just don't, even when not using texture at all. And I just can't figure out what is the case...

Rob Ramirez's icon

the jit.gl.gridshape is passing color values in it's output matrix (the last 4 planes of the 12 plane output matrix).
matrix color values will override any ob3d color values for gl.mesh.

the solution is to either set the color on the gl.gridshape, or clamp off the the last 4 planes of the output matrix by placing a [ jit.pack 1 @jump 8 ] between the gl.gridshape and gl.mesh.

more info can be found in the OpenGL Matrix Format reference page.

t's icon

Thanks a lot Rob for clearing that up for me! Now it all makes sense...