Changing Terrain Tiling
Terrain tiling is controlled in the FX file for the terrain. Below is one of the two vertex shaders found in the default file. The section in bold, lists the terrain UV and how many times to multiply the detail textures. In this case it is multiplied by 2. To increase the tiling, this number simply needs to be increased as well.
VS_OUTPUT VS_Main(float4 Pos:POSITION,float2 InTex: TEXCOORD0)
{
VS_OUTPUT Out;
Out.InTex = InTex * 2;
Out.texP2 = InTex * 2;
Out.texP3 = InTex * 2;
float index = Pos.y;
Pos.xz = mul(Pos.xz,squareSpace);
Pos.y = fxHeight[index].x;
Out.LgTex = fxHeight[index].yz;
Out.Pos = mul(Pos,matWorldViewProj);
Out.Fog = 1.0 - ( (Out.Pos.z-fogStart) / (fogEnd - fogStart) );
return Out;
}
|