Gamestudio Links
Zorro Links
Newest Posts
What are you working on?
by rayp. 07/11/26 18:10
Z9 getting Error 058
by madpower2000. 07/09/26 18:09
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 07/09/26 13:16
New Zorro version 3.11
by jcl. 07/06/26 06:56
Synthetic test data in Zorro
by jcl. 07/06/26 06:54
Parameter filename BUG
by walt_Schwarz. 07/02/26 15:36
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
2 registered members (TipmyPip, 1 invisible), 6,366 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
riggi89, shuhari, KD1990, Ephraim, Student_64151
19223 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 | 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