Forums > Jitter

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


t
April 3, 2013 | 1:46 pm

Hi,

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?

– Pasted Max Patch, click to expand. –


t
April 3, 2013 | 1:54 pm

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…


April 3, 2013 | 3:53 pm

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
April 3, 2013 | 6:42 pm

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


Viewing 4 posts - 1 through 4 (of 4 total)