Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AbrahamR), 717 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Controlling texture size #21356
12/19/03 02:07
12/19/03 02:07
Joined: Aug 2003
Posts: 145
Beorn Offline OP
Member
Beorn  Offline OP
Member

Joined: Aug 2003
Posts: 145
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?


Re: Controlling texture size [Re: Beorn] #21357
12/19/03 08:35
12/19/03 08:35
Joined: Oct 2002
Posts: 8,939
planet.earth
ello Offline
Senior Expert
ello  Offline
Senior Expert

Joined: Oct 2002
Posts: 8,939
planet.earth
material blabla{
...
scale1=.1 //any value
...
}

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

//hope it works



www.earthcontrol.de
quoted: We want to maintain a clean, decent, American family suited forum look... which means you may post zombies or chainsaw massacres, but no erotic.
Re: Controlling texture size [Re: ello] #21358
12/19/03 11:04
12/19/03 11:04
Joined: Aug 2003
Posts: 145
Beorn Offline OP
Member
Beorn  Offline OP
Member

Joined: Aug 2003
Posts: 145
Cool, thanks!
Is it possible to send different values to different stages?

Re: Controlling texture size [Re: ello] #21359
12/19/03 15:31
12/19/03 15:31
Joined: Aug 2003
Posts: 145
Beorn Offline OP
Member
Beorn  Offline OP
Member

Joined: Aug 2003
Posts: 145
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 { } }
";





Moderated by  Blink, Hummel, Superku 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1