openGl alpha(blend) from luma image?

Feb 20, 2006 at 2:56am

openGl alpha(blend) from luma image?

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

#24510
Feb 20, 2006 at 3:22am

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

#70999
Feb 20, 2006 at 3:32am

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

wes

#71000
Feb 20, 2006 at 7:48am

> 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

#71001

You must be logged in to reply to this topic.