July 7, 2012

water/undewater shader WIP

This is a water shader I am working on in my spare time. The work is based on my own observations of water characteristics and written from a scratch. It is still a work in progress.
Right now the water surface is a plane, but support for real geometry waves is on its way.

Due to my old computer I am currently on, I am almost unable to capture a video with decent framerate, but the shader uses simple calculations and runs very well on even 6 years old mid-end hardware.

thread on BlenderArtists HERE

blend HERE

known issues and bugs:
- OpenGL clipping plane is not working on some GPUs
- mouselook goes wacko on some BLender versions but works fine in others
- some are reporting that sun-grab is not working
- and for some it does not open blend at all..


  1. Incredible work! That's some amazing water.

  2. this is just so awsum , words cant describe it! :)
    can i use this great work in my game project? with your credits ofcourse..

    Dharmil Asawla.
    CEO & Founder of Spheron Incorporated.

    1. Hi,
      well you can try, but the setup is very fragile and the shader is a mess itself. Hopefully I will make a more usable version sometime soon.

  3. really like this! I am wondering though how to change the texture of the landscape, any ideas?

    1. you mean that checkered texture on the ground? you can switch it with any other texture in material editor in Blender.

  4. Awesome work !! But this shader still buggy i think ,i append it to my project to test it ,but the water shader is'nt working .

    1. yeah the setup is yet very fragile. I hope to continue the work on it and make it more accessible for others to implement.

  5. Hello, this is really awesome and super realistic. I tried integrating bgui v 0.08 into the blend file you posted but its doing something weird. The frame buttons are having their color modified by the "watershader_high" shader. As a result the bgui label text cant be seen. I did some digging and narrowed down the problem to the vertex shader. If the line "gl_Position = ftransform();" is commented out then the labels show up(but no water shading ofcourse).

    I dont really know if this is a bgui problem or something with the shader and I know very little about graphics coding in general.

  6. I don't get what I see in video- there apperas to be like gray blanket over water- when I walk deep in water so I see just a small angle(like 1 degree over water sorface) I get clear, reflective water. How to make me get it always, not just when almost with head in water?