Skip to main content
GameDev.net gamedev.net
🔒 Locked

Water effect

Started by bleyblue2 Nov 15, 2004 at 2:57 PM 4 replies 1.1k views
Original Post
bleyblue2
bleyblue2
Hi, i'm currently using projective texture mapping (and hlsl shaders) to render my environment to a plane. Now that my plane acts like a mirror, i would like to animate it so that it has a "water look". What formulas should i use to animate vertices and how much should my water plane be tesselated ? (i'm not implemting any LOD algorithm atm) What pixel shader effects can i write to get a realistic water ? Thanks for your replies.
kVandaele
kVandaele
i'm no expert in this but there are several samples of this in the DirectX (9 - summer update) Sample Browser, such as BumpWaves or Water, amongst others...
bleyblue2
bleyblue2
well, i think these samples just went out with the SDK october update.
circlesoft
circlesoft
FX Composer has an awesome water sample. The great thing is, it comes with all the code, and it's all in HLSL. In other words, you don't have to do any computations outside of the vertex or pixel shader.
tiger54
tiger54
A good example is this:
http://mirror.ati.com/developer/samples/oceanwater.html

The best water effect is in Myst4, you can see the formulas in GPU-Gems (see Nvidia page).

I am also searching a good and easy water effect...
You can create water effect with:
- move y position of VS with cos and sin
- move z and y also with cos and sin
- move the own texture
- add the sky texture or create reflection on the water
- add an alpha so you can see the ground of the water

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.