As to my knowledge, external variables are referred to in angular brackets:
TextureTransform[0] = <matMtl>;
I'm not sure if that is the reason for the problem, but apart from that I see nothing obviously wrong in your code. The model looks as if the scale factors are zero. Maybe mtl_scale is never called?
In the effects.wdl you'll find an example how to use the material matrix for shifting and scaling textures. Compare your code with that example.
function mtl_eye_init()
{
// copy standard model material properties
mtl_copy(mat_model);
mtl.matrix11 = float(1); // default u scale
mtl.matrix22 = float(1); // default v scale
}
material auge_mdl
{
event = mtl_eye_init;
effect = "
matrix matMtl;
technique scale
{
// use material transformation matrix, leave everything else at default values
pass p0
{
TextureTransformFlags[0] = Count2;
TextureTransform[0] = <matMtl>;
}
}
technique fallback { pass p0 { } }
";
}
Let me know if you find out the reason for the problem.