not exactly what I meant, but should work just as well. Do a point-sampled texture lookup for your base texture, and then, depending on the color of the pixel, fill the texel with a detailed tile. In principle that's something like

Code:
unsigned int4 base = tex2D(baseSampler, texCoord.xy);
switch (base.x) {
case 1:
    float3 out = tex2D(tile1Sampler, fmod(texCoord.xy*TILE_SIZE, TILE_SIZE);
    break;
...
}



Joey