openGl alpha(blend) from luma image?

Tilgino's icon

hi..

i have a luma image with a black and white pattern and want to map this on a opengl obj... it works so far... but i want to have the black pixels beeing transparent so the object is transparent where the texture is black...
i tried blend in openGL but i think i'm using the wrong image format with luma...
how can i get a suitable alphachannel from the black pixels of the texture for the object to use it for "blend" purposes?

thank you for your great support and help...

can't sleep :-)
peter

Joshua Kit Clayton's icon

Generate the alpha channel with jit.lumakey or jit.chromakey @mode 2.
Or any similar operation using jit.unpack->jit.op/jit.charmap-
>jit.pack, et cetera.

-Joshua

Wesley Smith's icon

You can also use jit.gl.texture @colormode lumalpha to texture your object.

wes

Pierre Alexandre Tremblay's icon

> You can also use jit.gl.texture @colormode lumalpha to texture your
> object.

Wes, you saved my life, made my date and make me cry of joy.

OpenGL is such a great very very high level programming language...
therefore, so much to learn!

pa