Performance about water

Hello!
I’have just add reflective/refractive water to my water plane, before it has the simple water shader ( you know in a terrain builded in Unity2.0, a very big island) The terrain have trees, some buidings etc…and te performance is brilliant, but when the reflective water is added…Wow! all its just freezing…the framerate drops a lot. The buildings, etc…doesn’t have millions of polygons…maybe i’m doing something wrong? any idea to make water reflective run right?

Thank you in advance guys! Today it’s my first day with unity Pro demo and I’m thinking seriously to buy it. It’s…(ejem, excuse, fucking brilliant :wink: )

BLUE.

There are some settings in the Water script that you can tweak, but really your scene has to be rendered another time to generate the reflection texture. And another render if you also have refraction enabled. So if you have a scene view open too, suddenly you’re rendering your scene 4 times (6 times with refraction) instead of 2 times.

Could that be it?

-Jon

ouch ok. Must be that. rendering 6 times the scene is a little too much! There’s another way to recreate a kind of reflection…or something similar ( doesn’t matter if this is a false reflection or a cubemap…i don’t know…) any ideas please?

Thanks Jonathan.

light bake it? someone more qualified could explain, but basically you should be able to print a mirror image of static objects into a texture.

Interestingly, the island demo has virtually the same fps here whether I’m using water reflection/refraction (I have a build from the alpha test period) or just with Indie water.

Anyway, make sure you test an actual build, don’t just run it in the editor; the “rendering the scene 6 times” would only be valid for the editor with the scene view as well as the game view visible. As far as I know, there’s really no decent way to get water reflections other than with using another camera like this…a cubemap isn’t suitable for that sort of thing at all. If you reduce the resolution of the reflection, that might help too.

–Eric

I think a good tradeoff is the shader in the nature demo that does reflection but instead of real refraction uses transparency. Looks almost the same as refraction except when you get real close. It renders the scene only one extra time.

Just export package the shaders / water prefab from the Island Demo project folder.