Analysis updated 2026-05-18
Study a working example of GPU compute shader based wave simulation.
Learn how refraction, reflection, and bloom are combined in a real time OpenGL rendering pipeline.
Use it as a starting point for your own interactive water or fluid simulation demo.
| makarov-mm/water | adobe-creative/cs6-extended | amitrajput-dev/sonybridge | |
|---|---|---|---|
| Stars | 16 | 16 | 16 |
| Language | C++ | C++ | C++ |
| Setup difficulty | moderate | moderate | moderate |
| Complexity | 3/5 | 2/5 | 3/5 |
| Audience | developer | general | general |
Figures from each repo's GitHub metadata at analysis time.
Windows only, requires Visual Studio 2026 and a GPU with OpenGL 4.5 support.
Realtime Water is a small Windows desktop demo that shows an interactive pool of water sitting on a checkerboard table. The surface stays still until you click and drag your mouse across it, which dips the water and sends ripples outward that bounce off the edges of the table, interfere with each other, and slowly fade away, similar to touching a real pond. Everything you see is calculated live on the graphics card using compute and fragment shaders, built directly on native OpenGL 4.5. There is no physics happening on the processor and no external art assets loaded in: the table, the water's shading, and the waves themselves are all generated by code as the program runs. Under the hood, each frame follows a short pipeline. First, a compute shader solves the classic two dimensional wave equation with damping across a 512 by 512 grid, storing the current and previous water height so it can calculate the next step. Your mouse click adds a dip directly into that height data. Second, the checkerboard table is rendered from a camera's perspective and captured so the water can reflect and refract it realistically. Third, a mesh representing the water surface is displaced according to the wave heights and shaded with reflections, refraction, and a highlight that responds to the angle of view. Finally, a light bloom effect and color tone mapping are applied to the finished image. The project is a self contained Visual Studio solution with no external dependencies or package manager: everything needed to build and run it, aside from Visual Studio itself and a graphics card that supports OpenGL 4.5, is already included. You control it entirely with the mouse, pressing and dragging to create ripples, and pressing escape to quit. It is released under the MIT license, so you're free to reuse or adapt the code for other projects.
A self contained Windows demo showing an interactive water surface, rendered entirely on the GPU with OpenGL 4.5.
Mainly C++. The stack also includes C++, OpenGL, Win32.
Use freely for any purpose, including commercial use, as long as you keep the copyright notice.
Setup difficulty is rated moderate, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.