explaingit

makarov-mm/water

Analysis updated 2026-05-18

16C++Audience · developerComplexity · 3/5LicenseSetup · moderate

TLDR

A self contained Windows demo showing an interactive water surface, rendered entirely on the GPU with OpenGL 4.5.

Mindmap

mindmap
  root((Realtime Water))
    What it does
      Interactive water surface
      GPU wave simulation
      Reflections and refraction
    Tech stack
      C++
      OpenGL 4.5
      Win32
    Use cases
      Study wave simulation
      Learn shader techniques
      Starting point for demos
    Audience
      Graphics programmers
      Game developers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Study a working example of GPU compute shader based wave simulation.

USE CASE 2

Learn how refraction, reflection, and bloom are combined in a real time OpenGL rendering pipeline.

USE CASE 3

Use it as a starting point for your own interactive water or fluid simulation demo.

What is it built with?

C++OpenGLWin32

How does it compare?

makarov-mm/wateradobe-creative/cs6-extendedamitrajput-dev/sonybridge
Stars161616
LanguageC++C++C++
Setup difficultymoderatemoderatemoderate
Complexity3/52/53/5
Audiencedevelopergeneralgeneral

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Windows only, requires Visual Studio 2026 and a GPU with OpenGL 4.5 support.

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

In plain English

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.

Copy-paste prompts

Prompt 1
Explain how the compute shader wave simulation in this water demo solves the 2D wave equation.
Prompt 2
Walk me through building and running the Realtime Water Visual Studio solution on my machine.
Prompt 3
Show me how to add orbit camera controls to this OpenGL water simulation.
Prompt 4
Help me tune the wave speed and damping constants in WaveSimulation.hpp for slower moving waves.

Frequently asked questions

What is water?

A self contained Windows demo showing an interactive water surface, rendered entirely on the GPU with OpenGL 4.5.

What language is water written in?

Mainly C++. The stack also includes C++, OpenGL, Win32.

What license does water use?

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is water to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is water for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.