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
[REQ]Turbulent water shader #245357
01/09/09 16:39
01/09/09 16:39
Joined: Aug 2000
Posts: 1,140
Baunatal, Germany
Tobias Offline OP

Moderator
Tobias  Offline OP

Moderator

Joined: Aug 2000
Posts: 1,140
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 | 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