- Home /
Water volume for Sidescroller
Hi all, I'm currently building a 2.5d sidescroller and my project has hit a slight snag, although its mainly a visual problem i've been trying to find out how the water in the example below has been made.
I can deduct from the image and the game in motion that water volume is contained in a sqaure (because of the sharp contrast between the color of the water, and above it), possibly vertex animated (suggested on Polycount.com) - the animated motion isn't the problem. The problem is how that contained fog is done? Though if its a seperate entity, then how is the water surface preventing any fog from "bleeding" through?
I have a feeling its all mainly shader related, but i'd love to hear if anyone has cracked this!
Any help at all is appreciated, even if its just pointing to similar solutions, i'm really stuck!
Answer by robert · Sep 28, 2012 at 04:05 PM
To know exactly what is it doing, you could try running it through Intel GPA or similar.
But I guess there are two ways to go about it, in both cases it's a plane with the islands cut out, maybe some vertex animation along the top edge, i.e. the surface of the water.
Just a simple transparent shader with a blend mode that looks best, not necessarily SrcAlpha OneMinusSrcAlpha. You can experiment with different options to see what effects you can achieve.
A shader with a grab pass, that allows you to read the framebuffer behind whatever you have drawn and do anything with it. This approach will not only allow you to do any processing on the color, but also do any wavy distortions you like.
I hope I understood your question correctly :)
Excellent Robert! Thanks a ton - i'll get right on it :D
Your answer
Follow this Question
Related Questions
Foggy Water? 1 Answer
Is it possible to use layers with fog? 0 Answers
Trying to change fog when entering a collider trigger! 0 Answers
Input.GetAxis to act like button 1 Answer