Original Post
I''ve been struggling with this for some time now (I''m not very good at asking for help). I''m doing a terrain texture using splatting from http://www.cbloom.com/3d/techdocs/splatting.txt
I have 4 sets of textures. In each set the second texture is the terrain splat texture (i.e. grass,rocks,sand,snow, etc..) The first texture is an alpha map for the second texture.
my code looks like this (C# Managed DirectX):
device.RenderState.AlphaBlendEnable = true;
device.RenderState.SourceBlend = Blend.SourceAlpha;
device.RenderState.DestinationBlend = Blend.InvSourceAlpha;
//Then we loop through the 4 texture sets
{
device.SetTexture(0,alphaTexture);
device.SetTexture(1,splatTexture);
device.TextureState[0].ColorOperation = TextureOperation.SelectArg1;
device.TextureState[0].ColorArgument1 = TextureArgument.TextureColor;
device.TextureState[0].AlphaOperation = TextureOperation.SelectArg1;
device.TextureState[0].AlphaArgument1 = TextureArgument.TextureColor;
device.TextureState[1].ColorOperation = TextureOperation.SelectArg1;
device.TextureState[1].ColorArgument1 = TextureArgument.TextureColor;
device.TextureState[1].AlphaOperation = TextureOperation.SelectArg1;
device.TextureState[1].AlphaArgument1 = TextureArgument.Current;
}
What happens with this code is that the first texture set looks great with the right transparency etc, but I see no sign of any of the other texture sets. I can choose only to render one set (any of the sets) and it looks good so I know the other sets are good and the multiple stage texturing is working as planned. I just can only get one set to work.
Can somebody let me know if I am screwed in the head thinking I can do it this way? I am doing multi-textureing (> 1 stage) AND multiple passes, is there a problem with this?? Help!!
Thanks in advance

