CTexturemapExporterAlphamap alphaMapExporter;
alphaMapExporter.SetParameter("PatchSize", 128);
alphaMapExporter.SetParameter("SmoothFactor", 0);
alphaMapExporter.SetParameter("FileFormat", string("PNG"));
alphaMapExporter.SetParameter("NoBlackFiles", true);
alphaMapExporter.SetParameter("FlipY", false);
alphaMapExporter.SetParameter("PowerOfTwo", true);
alphaMapExporter.SetParameter("MaxNumChannels", 4);
alphaMapExporter.SetParameter("BorderPixel", 2);
alphaMapExporter.SetParameter("ScaleFactor", 1);
alphaMapExporter.SetParameter("ExportMaterialFiles", true);
alphaMapExporter.SetParameter("GaussSmoothMax", false);
Which gives this border artifact:
http://img21.imageshack.us/img21/3238/borderqx.pngMy splatting pixel shader basically does this;
float2 alphaCoord = texCoord*(127.0/128.0)+(0.5/128.0);
surfaceColor = tex2D (texDiffuse1, texCoord);
surfaceColor *= tex2D (texAlpha1, alphaCoord).x;
float4 tempColor = tex2D (texDiffuse2, texCoord);
tempColor *= tex2D (texAlpha1, alphaCoord).y;
surfaceColor += tempColor;
tempColor = tex2D (texDiffuse3, texCoord);
tempColor *= tex2D (texAlpha1, alphaCoord).z;
surfaceColor += tempColor;
tempColor = tex2D (texDiffuse4, texCoord);
tempColor *= tex2D (texAlpha1, alphaCoord).w;
surfaceColor += tempColor;
tempColor = tex2D (texDiffuse5, texCoord);
tempColor *= tex2D (texAlpha2, alphaCoord).x;
surfaceColor += tempColor;
etc. if more textures are needed, pretty simple.