Controlling texture size

Posted By: Beorn

Controlling texture size - 12/19/03 02:07

Im slowly getting grips on the fixed function thing, but i do need some explanation on how to change the size/tiling of a texture displayed. Especially dynamically.
Anyone got some beans to spill on this?

Posted By: ello

Re: Controlling texture size - 12/19/03 08:35

material blabla{
...
scale1=.1 //any value
...
}

...
blabla.scale1+=key_a-key_b;
...

//hope it works

Posted By: Beorn

Re: Controlling texture size - 12/19/03 11:04

Cool, thanks!
Is it possible to send different values to different stages?
Posted By: Beorn

Re: Controlling texture size - 12/19/03 15:31

This worked, but not as i hoped. I want to change the size freely, not just the level of tiling.

Ive been fiddling around with the code in readbeta without any luck so far, the only thing that happens is that the texture get all wash out, like it only uses one pixel from the skin or something, any ideas any one?

______________________________________

function mtl_shift_texture()
{
mtl.skill1 += time; // shift texture left
mtl.matrix41 = floatd(mtl.skill1,1000); // change texture u offset by 0.001 units
}

material shifter
{


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 { } }
";



© 2024 lite-C Forums