Ive got a material code that applies mipmapping to my terrains. but i dont know if this is a pixel or vertex shader. here is the code :
Code:
function mtl_terraintex_init(){
// Adjust the texture transform to do some tiling of the textures
mtl.matrix11 = float(50); // default u scale
mtl.matrix22 = float(50); // default v scale
}
material mat_terrain_detail
{
event = mtl_terraintex_init;
effect = "
matrix matMtl;
texture entSkin1;
technique t0
{
pass p0
{
Texture[0] = <entSkin1>;
TextureTransformFlags[0] = Count2;
TextureTransform[0] = <matMtl>;
TexCoordIndex[0] = 1;
}
}";
}
action DetailTextures
{
my.transparent=off;
my.material = mat_terrain_detail;
}
i have to know this because my game should also run on older gfx cards