Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in D:\http\wolfkingdom.com\wp-includes\pomo\plural-forms.php on line 210
The Ocean Water System – Wolf's Online Kingdom The Game

I love Playway Water System… but the ones who really knows me, are aware that I have some experience with water shaders!

90% of the work made by Playway is a complex and powerful framework, that can save presets, and manage the different shaders. 10% is made in the shaders themselves.

This shader seems to be done by a good mathematician. FFT/Gerstner waves are the best and in general, the water is moving great. But here is a list of things that I want to change in order to use it in my game:

  1. removing this milky look, and get a full control over the color, saturation, contrast and in general look of the water.
  2. adding an automatic shoreline. I want the shore to adapt when the water is moving.
  3. having a smooth way to fade from one preset to another. The demo is doing it, why no function for doing it in the shaders?

Abracadabra, here is the improved Playway shader inspector.

I added a profile merging system. I just looked how the demo was doing it and added the feature inside the inspector.

Then, I added Gamma, Brightness, Saturation, Contrast and optionally Hue (I disabled it because it sucks some GPU for nothing).

And finally, I  checked the shaders and it happens to be more or less a copy of the Unity’s Standard shader patched with Water4, so the shoreline code from Water 4 worked almost without a change!

I got some problems with the shoreline been static, so I added some UV animation (cos(uv)). And here we go (check the pictures and the video).

I also changed the fact that the shader strictly follow the color of the sun, which in many case (rain) is not working, so now I give to the sun a 30% importance. Also the Shoreline is not affected by the sun color, so that it stay white in the night.

Playway has its own foam shader but boy, that is like using a bazooka to kill a mosquito, and in the end the foam is looking really bad. Having a simple foam texture without normal map is visually better and faster.

The result is a shader that is compact and quick, it would even work on Mobile or VR.

Now the water is doing everything I want for my game:

  • Color adaptation to the light and Global Illumination. Reflection and refraction that are taking about 10% or less of the process
  • A real dynamic shoreline that moves and adapt when the water move.
  • Real shadows on the water, which is very important for the general ambiance specially the morning and the end of the afternoon.

And of course, underwater, and other things that Playway designed in the original package.



Here are some pictures, but nothing is better than a video. I have a 24 km2 area with shore that is working perfectly now, and it works any time of the day. These pictures are not transparent + shadows.

These pictures are with transparency + shadows.


Here is the video (shader not transparent):


Author TheWolf
Views 14500

Comments (2)

  • Thiago Travi
    May 24, 2017 at 6:22 pm Reply
    Hey Wolf! That was a super smart implementation. Are you planning to share it? Congratulations for the hard work!
    • May 25, 2017 at 7:01 pm Reply
      Why helping the author, I am not in the beta, I have asked, received an old version and now he doesn't reply...

Leave a Reply


Receive a notification when we post something new.

Recent Comments

Support us at IndieDB

Wolf Online Kingdom

Follow Us on Facebook

Follow Us on Twitter

Watch us on Youtube

Skip to toolbar