24 Comments

  1. Kilian277

    Hi there,

    Is there a way to add reflections to the shader like the normal pro daylight water ?

    (i have unity pro)

    Thanks!

      • admin

        Unfortunately I don’t have Pro 😉 It should be possible with very little modification, but I think you will also need the script from Unity water which dynamically renders the reflection texture.

        • Kilian277

          Do i need to make a script that dynamically updates the _Cube variable in the shader ?

          Because at shaders i’m a total noob :)

          But i’m good at C# and core programming

          • Kilian277

            Well it isn’t working i added (tried to) some sort of reflection from the mirrorreflection shader and when i play the water plane just flikkers to white or to black color ??
            Any ideas

          • admin

            If you are rendering a cube map then yes, you should be updating whatever texture _Cube in the animated water shader is pointing to and it should work without any modifications. Note that the reflection might be severely distorted due to surface bumpiness, for testing purposes set bump map to the neutral color (.5,.5,1.0 – I believe) or maybe remove it (then Unity might use the neutral values automatically) – that way you should see a uniform reflection and you can sort out the bugs with rendering your cube map.

  2. Kilian277

    About being distorted you have absolutely right :)

    But it is working now there is a reflection on the water plane only now i need to adjust the script so it renders it better (resolution)

    Many thanks for the help !

      • Kilian277

        Hi,

        sorry to bother you again but i want to add foam to the places where it flows very rapidly how to do that ?

        • admin

          Could be tricky because animated water already uses so many textures, but if you can spare another texture unit just add foam texture (you can resign on one of the normal maps and use the same one twice instead), animate it exactly the same way I animate normal maps and lerp between water and foam color depending on the speed. Or just give me a really nice-looking tile-able foam texture and I can try to do this for you 😉

          • admin

            I’ve put it as a new post. If you could prepare a video of the attached demo scene for me, I would be grateful – because of several weird things going on, I have no way of doing that 😉

  3. tremor76

    Hello,

    I first want to say that I am an internet hermit and typically never comment or reply to anything.

    I stumbled upon this shader while trying to find a solution to the water in my game. I didn’t need hyper-realistic 3D waves and physics, but I did need a nice looking effect that supported transparency. Your shader was exactly what I was looking for.

    So, thank you for creating this. It will save me a lot of time and hopefully solve the water issues I’ve been having!

  4. Andres

    Hi Stanislaw

    Thank you for sharing. Great shader, exactly what we needed to add a decorative pond to our scene.

    One question. We need to simulate a paused scene. But decreasing the _Speed value to zero does not stop the water from getting animated.

    What do you suggest we modify in order to get this effect?

  5. Michael

    Hi this looks really cool. Could you point me to a resource to learn how to use it? I created a plane(?) and created a new material(?) and changed the shader to the one I downloaded.. at this point do I just need to add some water texture with transparency?

    I can do programming and scripting all day but when it comes to these graphics I’m totally lost lol.. I assume I need the mesh plane to attach all these things to..?

Leave a Reply

Your email address will not be published. Required fields are marked *