Gamestudio Links
Zorro Links
Newest Posts
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Trading Journey
by 7th_zorro. 04/27/24 04:42
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
MT5 bridge not working on MT5 v. 5 build 4160
by EternallyCurious. 04/25/24 20:49
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (Akow, AndrewAMD, Quad), 733 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
how to rotate a texture? #385027
10/11/11 18:45
10/11/11 18:45

M
mercuryus OP
Unregistered
mercuryus OP
Unregistered
M



how can i rotate a texture - like shifting with mtl_uvspeed?

Re: how to rotate a texture? [Re: ] #385030
10/11/11 20:01
10/11/11 20:01
Joined: Oct 2005
Posts: 4,771
Bay City, MI
lostclimate Offline
Expert
lostclimate  Offline
Expert

Joined: Oct 2005
Posts: 4,771
Bay City, MI
it will require some trig, i wont explain it in full because its a little compilicated but you'd want to look up using sin and cos functions if you look it up (soh cah toa) on google you should be able to find the proper info to figure it out. laugh

Re: how to rotate a texture? [Re: lostclimate] #385031
10/11/11 20:05
10/11/11 20:05
Joined: Jan 2003
Posts: 4,615
Cambridge
Joey Offline
Expert
Joey  Offline
Expert

Joined: Jan 2003
Posts: 4,615
Cambridge
Code:
x' = cos(a)*x - sin(a)*y
y' = sin(a)*x + cos(a)*y


then use that as lookup. You can also create a rotation matrix offline, pass it to your shader and use mul(...), that should be way faster.


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