jit.gl.material - alpha transparency possible?

pseudostereo's icon

is it possible to use load a texture with an alpha channel into jit.gl.material so that it renders transparent areas?

I assumed that it might have something to do with the shader attribute of jit.gl.material, so:

On this thread, Wesley Smith provided a link to a patch with some demo alpha channel shaders:
https://cycling74.com/forums/texture-conundrum

the shaders work in Max 6 (they generate an error, but they work) - so I would have thought that if I set the shader attribute of a jit.gl.material object to a jit.gl.shader @file mat.alpha.jxs, then objects using that material would have the same transparency - no luck.

Advice?

Wesley Smith's icon
Max Patch
Copy patch and select New From Clipboard in Max.

jit.gl.material in its current incarnation sums that alpha of the emissive, ambient, diffuse, and specular components. Arguably, it should ignore the emissive and ambient components when calculating the alpha channel, but in its current incarnation it doesn't, so you may need to explicitly set them to 0 to get alpha effects. Here's an example:

The shader attribute of jit.gl.material has no effect. jit.gl.material generates a shader internally.

diablodale's icon

Thank you Wesley. I have been oh so much wanting transparency support like this with textures when in 5.x it just didn't work well in Windows on videoplanes.

I've immediately started using it in my current project.