Hey guys,
I'm new to shaders and I was just wondering how I'd scale the detailmap image so it tiles instead of streching it across the whole mesh.
Code:
bmap detailmap = <detailmap.bmp>;
material terrian_multitex
{
Skin2 = detailmap;
Effect"
// Texture entSkin1;
Texture entSkin2;
Texture mtlSkin1;
Texture mtlSkin2;
Matrix matMtl;
Matrix matMtl2;
Matrix matMtl3;
Matrix matMtl0;
Technique Test
{
Pass P0
{
// Texture[0] = <entSkin1>;
Texture[1] = <entSkin2>;
Texture[2] = <mtlSkin1>;
Texture[3] = <mtlSkin2>;
TexCoordIndex[0] = 0;
TexCoordIndex[1] = 0;
TexCoordIndex[2] = 0;
TexCoordIndex[3] = 0;
PixelShader = asm
{
ps_1_2
tex t0
tex t1
sub r0,t0,t1
};
}
}
";
}
Hope somebody knows
Thanks
-Bright