Posted By: Tobias
[REQ]Turbulent water shader - 01/09/09 16:39
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.
Posted By: mk_1
Re: [REQ]Turbulent water shader - 01/12/09 14:43
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
Posted By: Joey
Re: [REQ]Turbulent water shader - 01/14/09 21:07
if you use world coordinates then it wouldn't even be necessary to keep edges and seams in mind.