PDA

View Full Version : multitexturing alpha masking



floyd6
12-18-2008, 12:24 PM
I want to texture a quad so it look like this:

http://floyd6.yoyo.pl/gl/out01.jpg

http://floyd6.yoyo.pl/gl/out02.jpg

Having these 3 textures:
http://floyd6.yoyo.pl/gl/p01_mask.jpg

http://floyd6.yoyo.pl/gl/p02_rgb.jpg

http://floyd6.yoyo.pl/gl/p03_rgb.jpg

How do I combine those textures with glTexEnv? What sort of glBlend should I use?
Should these textures be rgba bitmaps or will rgb do as well?

Thanks!

V-man
12-19-2008, 08:04 AM
Use shaders and forget about glTexEnv
http://www.opengl.org/wiki/index.php/Multitexture_with_GLSL