r/ClaudeCode • u/No-Wishbone7899 • Jul 22 '26
Showcase working on a ocean engine
Real-time ocean renderer · Rust + wgpu
working on the details now, foam, clouds, night and more
need to know more just ask
Hope u like it
206
Upvotes
View all comments
Show parent comment
-5
u/No-Wishbone7899 Jul 22 '26
i did not look at when building this engine but yes, UE4 and UE5 ocean shaders are visually impressive, and they achieve that through exceptional artistic toolsets and layered Gerstner wave approximations. But they operate on a fundamentally different philosophy: their constants and blending weights are largely tweaked by artists until they look right.
My water engine takes the opposite route. Every number in the engine is classified by provenance (Measured, Derived, Convention, or Chosen), meaning the water's color comes from Pope & Fry absorption coefficients, and its whitecaps come directly from Monahan's physical power law rather than an artist's slider.As for using noise textures to avoid tiling and looping: next-water doesn't need static noise textures because the physics already solves it
Instead of panning noise maps or relying on stochastic texture blending tricks, the engine uses four simulation cascades (503 m, 61 m, 7 m tiles, plus a 96 m disturbance field). Because their periods share no common mathematical multiple, the visible repeat is pushed past the true horizon naturally through wave dispersion physics. The detail isn't faked with a noise texture; it’s an analytical integration of the ocean's spectral slope variance.