also wenn du assemblercode benutzen würdest, dann könntest du sowas verwenden:
Code:
...
VertexShaderConstant[10]=<vecSkill1>;
VertexShader=
asm {
...
add oT0,v7,c10.xy
add oT1,v7,c10.zw
...
und per material.skill1,2(oT0),3,4(oT1) könntest du die x/y verschiebung steuern.
achja: aus dem handbuch :
material.matrix
material.matrix11..material.matrix44
A user-writable matrix that is available for effect scripts through
<matMtl>, and can be used for shaders or texture transformations. The
matrix parameter can be used for matrix operations, while the
elements of the matrix are accessible through the matrix11..matrix44
parameters.
Remarks:
The material matrix can be used for scaling and shifting a texture
according to the following formula:
u' = u * mtl.matrix11 + v * mtl.matrix21 + mtl.matrix41
v' = u * mtl.matrix12 + v * mtl.matrix22 + mtl.matrix42
(u,v = skin coordinates)
Shifting and scaling a texture this way is faster than using the
entity.u and v parameters, or the material.scale1 and scale2
parameters, which directly affect the model mesh. Therefore,
entity.u and entity.v will be abandoned, and material.scale1,scale2
can not be changed anymore during gameplay.
// use an effect for scaling or shifting a texture with a matrix
effect = "
matrix matMtl;
technique scale {
// use material transformation matrix, leave everything else at default values
pass p0
{
TextureTransformFlags[0] = Count2; // use u,v values
TextureTransform[0] = <matMtl>;
} }
technique fallback { pass p0 { } }
";
das würde bei deinem beispiel besser sein.