View Full Version : Texture splatting Question: packed Alphamaps

12-14-2005, 10:42 PM
Hello there!
I wanna use texture splatting for texturing the terrain on my 3dengine.
If i want to have 4 alpha maps i must have 4 grayscale textures or pack the 4 alphamaps into one RGBA texture.
Is there any way to access this 4 individual channels using OpenGL Fixed pipeline? or I should use a Pixel Shader to do that?
thanks for your time :)

Zulfiqar Malik
12-15-2005, 12:12 AM
You can easily use texture environments (TexEnv) for texture splatting.
The original article by Charles Bloom is here (http://www.cbloom.com/3d/techdocs/splatting.txt)

and here (http://www.gamedev.net/reference/articles/article2238.asp) is a tutorial written in d3d. I think Tom Nuydens has an article on delphi3d.net as well.

12-15-2005, 12:32 AM
I have read this articles. In this articles I read that if you want to access the individual channels of an RGBA alphamap you must use Pixel Shaders. I also Looked at the texture_env_combine extension reference and i don't see anywhere some way to get access to the individual channels.
so... there is not any other way? only pixel shaders?


12-15-2005, 12:59 AM
unfortunately yes you must use shaders, you cannot pick individual channel with tex_env_combine

12-15-2005, 03:04 AM
So i can't do texture splatting with 2 splats on the fixed pipeline without multipass?(since i'll need 1 texture for the base texture, 2 textures for the splats and 2 textures for the alpha maps and many gpus have only 4 texture units)

12-15-2005, 04:11 AM
you could use RGB for splat1 and A for splat2, tex_env_combine allows lerping based on RGB or Alpha just not R,G,B separated