diffuse=(tex2D(Stex1S, input.texCoords)*diffuse.r)+(tex2D(Stex2S, input.texCoords)*diffuse.g)+(tex2D(Stex3S, input.texCoords)*diffuse.b),1;
|
так может ненароком заярчение выйти из-за сложения, т.к. ты не умножаешь на 1-альфа нижние слои.
не собирался делать работу за ТСа, но вы меня вынуждаете:
float3 mask = tex2D(texMask, texCoords);
float3 tex0 = tex2D(tex_0, texCoordsTiled);
float3 tex1 = tex2D(tex_1, texCoordsTiled);
float3 tex2 = tex2D(tex_2, texCoordsTiled);
float3 tex3 = tex2D(tex_3, texCoordsTiled);
float3 color = lerp(tex0, tex1, mask.r);
color = lerp(color, tex2, mask.g);
color = lerp(color, tex3, mask.b);