Gamestudio Links
Zorro Links
Newest Posts
zorro with ccxt?
by opm. 03/03/26 03:17
ZorroGPT
by TipmyPip. 03/02/26 18:13
WFO Training with parallel cores Zorro64
by Martin_HH. 02/26/26 16:03
Zorro version 3.0 prerelease!
by TipmyPip. 02/25/26 16:38
Camera always moves upwards?
by clonman. 02/21/26 09:29
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
3 registered members (TipmyPip, AndrewAMD, Quad), 5,508 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
the1, alx, ApprenticeInMuc, PatrickH90, USER0328
19200 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