I wanna make water and waves for my little 2D PC game like in this video: http://www.youtube.com/watch?v=ooU6cTeirlQ I don't know how to write a similar shader. Does anybody know how to write a similar shader? Or is it possible to do the waves without shaders?
Answer
It's hard to tell how this is made exactly (except by the developer), but let me summarize what has already been said in comments, with some additions:
This is a 3D mesh seen from the edge, probably a simple grid
Each vertex of the grid is following spring physics affected by:
- A sine wave
- The dolphin diving in and out
- Their depth
Backface culling is disabled, and different textures/shading are used on both faces (tips)
The textures might be animated (animated UVs?), but this isn't really visible
There's some kind of alpha blending involved on the last row(s) of vertices
Additionally, to perfect the illusion, you have some animated sprites for the dolphin splashes, and a trail that seems to be a textured quad strip.
No comments:
Post a Comment