Jit.gl.texture issue

Stuart Merchant's icon

Hey everyone

I would like to know how I am able to send textures 2x movie and 2x cam feeds to a single gridshape.

I can see in the tutorial that you can have two textures working fine. When I try create a third and follow the same naming technique it does not work?

Stuart Merchant's icon

If I add t3 and t4 to the jit.gl.gridshape it does not work.

TFL's icon

Please next time post an example patch (with "Copy compressed") to illustrate your problem so we don't have to recreate it from scratch ourselves.

To me it works as expected. When more than one texture is used for a gridshape without a specific shader, the auto-generated shader (that you can see by sending a get_shader message to your [jit.gl.gridshape]) will multiply all textures together. Which means that if one of your textures is black (0 0 0 0) the result will be black too.

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

If you want your multiple textures to be applied differently, you'll probably want to make a custom shader yourself with [jit.gl.shader], or blend the textures together first with [jit.gl.pix] or the jit.fx objects and use the resulting texture onto your gridshape.