Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by TipmyPip. 08/26/26 22:38
Retrieve optimize() variables order (edited)
by NorbertSz. 08/25/26 13:24
Max Number of Strategies in /Strategy folder
by Martin_HH. 08/17/26 07:54
Pause button for evaluation shell?
by AndrewAMD. 08/13/26 17:16
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 08/10/26 12:46
phantom() not defined in indicators.c
by jcl. 08/07/26 11:45
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
0 registered members (), 5,109 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
riggi89, shuhari, KD1990, Student_64151, Koti
19230 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
[REQ]Turbulent water shader #245357
01/09/09 16:39
01/09/09 16:39
Joined: Aug 2000
Posts: 1,141
Baunatal, Germany
Tobias Offline OP

Moderator
Tobias  Offline OP

Moderator

Joined: Aug 2000
Posts: 1,141
Baunatal, Germany
Does someone know a shader that produces the swirling water effect as in old A4 A5 and A6 levels? I know the water reflection shaders look much better, but I'm sort of missing the old effect, it could still be used for swamps or lava or the like.

Re: [REQ]Turbulent water shader [Re: Tobias] #245879
01/12/09 14:43
01/12/09 14:43
Joined: Dec 2000
Posts: 4,608
mk_1 Offline

Expert
mk_1  Offline

Expert

Joined: Dec 2000
Posts: 4,608
It's basicall some sine calculations based on time
something like

tex.x += cos(tex.x * Pi * time);
tex.y += sin(tex.x * Pi * time);
color = tex2D(texture0, tex.xy);

sorry if this is syntactically incorrect since I haven't worked with hlsl for a long time.

You need to offset the actually pixel position based on the current pixel (to get the compress/expand effect) and a time value (so it's moving). Just an idea but it could work like that


Follow me on twitter
Re: [REQ]Turbulent water shader [Re: mk_1] #246375
01/14/09 21:07
01/14/09 21:07
Joined: Jan 2003
Posts: 4,615
Cambridge
Joey Offline
Expert
Joey  Offline
Expert

Joined: Jan 2003
Posts: 4,615
Cambridge
if you use world coordinates then it wouldn't even be necessary to keep edges and seams in mind.


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