Featured contribution |
Top Previous Next |
Water shader
This month I have decided to put up a standalone demo that uses Steempipe's water shader, because his code will run on older 3D cards as well (as long as they support PS / VS 1.1). I have used my water code from Aum34 as a base, so you might want to read that article as well.
There are two bitmaps that need your attention: - the sky cube bitmap; the same bitmap will be used for the sky, as well as for the image that is reflected by the water; - the water bump bitmap; this is a dot3 tga file. Don't forget to pull down one of the vertices on the terrain; examine my water.hmp to see what I did.
Copy the \watershader folder inside 3DGS' folder. Open water_test.wmp, and then run it using the water.wdl script file. Press the "zero" key once and then move the camera around using the arrow keys and / or the mouse.
Here's how you can use this shader in your game: 1) Copy the content of the \watershader folder inside your game folder; 2) Include waves.wdl file in your main script file; 3) Place a terrain in your level and attach it the action named "water_shader". That's all!
Special thanks go to Loopix, who came up with the idea!
|