Forums > Jitter

openGl alpha(blend) from luma image?

February 20, 2006 | 2:56 am

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


February 20, 2006 | 3:22 am

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


February 20, 2006 | 3:32 am

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

wes


February 20, 2006 | 7:48 am

> 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


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