Water shader

Hi all,

Why does Unity’s daylight pre-fab use about 300-400 K verts? It looks great, but I can’t take such a hit in vert. count. Anyway to get quality similar without such a performance drop?

it has not nearly that many …

but the reflection means that the whole world is rendered multiple times thus if you have a world with 250k polys it will be 300k after it. the water model itself is pretty lightweight

I see.

Well, the official count in my game is : 687.3k verts w/ water. 218.2k verts w/o water.

I don’t really know what’s happening there. :? Any ideas, dreamora?

That sounds about right - 200 * 3 passes = 600, worst case. The water (iirc) will require one pass for the reflection, one for the refraction, and this is in addition to your original scene render.

lol damn you!! (not in a bad way ;))
I was just about to post a topic in this section named “Water shader”, i reload the page and your topic appears :lol:

Haha, oops! :smile:

I see – It’s in the center of a town, so I guess it’s somehow reflecting everything. Is there a way I can put a “fake” or baked reflection on it?

  • Alex

I’m not sure if the example project Island Demo has a different script than the Pro Standard Asset Water, but if it’s the same, it seems like you should be able to define both refraction and reflection layers. I don’t have Unity at hand right now, so I can’t be sure, but I found this post I made some time ago which code should be almost identical to the water code used in the Island Demo water:

http://forum.unity3d.com/viewtopic.php?p=224053#224053