@Rick
Ok.. change shader you want to use (ex : Dynamic\diffuse.shader) :
Find :
uniform vec4 lighting_ambient;
Add below :
uniform vec3 tileselect;
Find :
outcolor *= texture2D(texture0,ex_texcoords0);
Replace it so it reads :
outcolor *= texture2D(texture0,vec2(ex_texcoords0.x*tileselect.z+tileselect.z*tileselect.x,ex_texcoords0.y*tileselect.z+tileselect.z*tileselect.y));
That's it for the shader part.
In your application, you need to do this for a 3x3 texture in psuedo :
surface = entity:GetSurface()
material = surface:GetMaterial()
shader = material:GetShader()
shader:SetVec3("tileselect",tile_x,tile_y,1.0/3.0) --1.0/4.0 if you use a 4x4 texture and so on...
tile_x and tile_y is typical 0,0 --> 2,2 for a 3x3 texture.
Let me know how it works out.