TL;DR just select the objects you want to turn into water in your Tetra project and adjust its properties to get your desired kind of behavior. Keep reading if you actually want to understand how complex a water system is in a virtual world.
In the early days of open-world MMOs, water systems were simplistic, often represented as impassable barriers or basic animated planes with minimal interactivity, as seen in titles like Ultima Online or early EverQuest. These relied on static meshes and simple collision detection, but lacked dynamic responses due to limited computing power. By the 2000s, games like World of Warcraft and The Elder Scrolls series introduced more advanced water bodies, with flowing rivers and oceans that demanded heavy server-client synchronization for MMO-scale simulations. The complexity escalated with real-time wave propagation and player interactions, straining CPUs and networks, as rendering vast, persistent water expanses required balancing visual detail against the massive computational load of handling thousands of concurrent users in shared environments.
Tetra has a water system pre-included in the rendering pipeline for aquatic levels, leveraging WebGPU's capabilities to apply fluid dynamics universally. This means parameters like wave amplitude, foam intensity, and current strength are handled natively within shaders, triggered by property adjustments. Developers benefit from this abstraction, as no custom code is required to adapt the system for different water types or objects; the engine's node-based simulations ensure compatibility, with automatic propagation of data through the compute graph.
The visual complexity of rendering water encompasses a range of phenomena, from streaming currents and foam generation to distortion effects in waterfalls, all orchestrated through specialized shaders. Streams involve animating flow maps to simulate directional movement, while foam emerges from turbulence calculations at surface intersections, often using noise functions for whitecaps. Waterfall distortions employ refraction shaders that bend light rays, creating cascading blur and mist via particle overlays. These elements demand layered shader passes, where base water color blends with specular reflections and subsurface scattering, ensuring photorealistic appearance under varying lighting conditions.
Limitations across devices, particularly mobile, further compound these challenges, as lower-powered GPUs and batteries restrict the fidelity of water rendering. On desktops, high-detail shaders can run smoothly, but mobile browsers impose thermal throttling and reduced clock speeds, forcing downscaling of effects like foam resolution or distortion complexity. WebGPU in Tetra mitigates some issues with efficient pipelines, yet cross-device variability—such as iOS Safari's incomplete support—necessitates adaptive techniques, like reducing shader branches or using lower-precision floats to prevent overheating and maintain playable frame rates.
Examination of fluid dynamics reveals intricacies like ripples propagating from disturbances, buoyancy forces on submerged objects, and water masks to avoid erroneous rendering inside models. Ripples are modeled via wave equations, spreading outward with damping over distance, while buoyancy applies upward forces proportional to displaced volume using PhysX from NVIDIA for accurate simulations. Water masks employ stencil buffers or depth comparisons to clip rendering, preventing visual leaks into interiors like boat hulls, ensuring coherent immersion without computational waste.
Particles and simulations form the backbone of dynamic water trails and splashes, where emitters generate thousands of droplets governed by velocity and gravity. In Tetra, instanced particles update via compute shaders on WebGPU, simulating collisions and coalescence for realistic foam or wake trails. This particle-based approach integrates with broader fluid solvers, allowing emergent behaviors like vortex formation, but requires careful optimization to handle high counts without exceeding memory limits.
Underwater rendering necessitates specialized techniques, including a water line for the camera transitioning between surface and submerged views, achieved through custom passes that reference depth-aware methods from prior wetness implementations. A ShaderPass splits the viewport at the water plane, applying fog, caustics, and color grading below the line while preserving clear air above, blending seamlessly with refraction distortions for immersive dives.
Waves and shore breaks are calculated using Fast Fourier Transform (FFT) algorithms, generating height maps from spectral data to simulate ocean undulations. In Tetra, WebGPU compute shaders perform FFT inversions in parallel, producing realistic swells that break near shores via non-linear wave equations, adapting amplitude and frequency for varying sea states without excessive CPU involvement.
Currents influence objects with rigid bodies by applying directional forces integrated into PhysX simulations, affecting velocity and rotation for drifting debris or swimming avatars. Vector fields define flow patterns, interpolated across the water volume, ensuring consistent interactions like pushing boats downstream while respecting mass and drag coefficients for physical accuracy.
Rendering employs GPU tessellation to subdivide water meshes dynamically, enhancing detail based on Level of Detail (LOD) systems that adjust subdivision levels with distance. Closer views receive finer tessellation for intricate ripples, while distant horizons use coarser grids, optimizing performance on WebGPU by minimizing vertex counts without sacrificing visual coherence.
The use of decals and water-deforming objects enables local modifications to simulations, such as splashes from impacts, combined with special custom ShaderPasses for visually pleasing effects. Decals project foam textures onto disturbed areas, while deformers warp the water mesh via displacement maps; ShaderPasses then layer distortions and reflections, fusing these with global simulations for stunning, cohesive aquatics.
In Tetra, the integration of underwater physics and water bodies is streamlined for plane objects, ensuring seamless application without extensive developer intervention. All predefined water planes generate necessary buffers by default, including depth textures for masking and simulation boundaries, accessible in post-processing stages. This setup allows custom ShaderPasses to handle buoyancy and currents automatically, modulating interactions with rigid bodies to align with PhysX computations.
By embedding these features at the asset level, the system democratizes advanced aquatic effects, making them accessible even to non-technical users. This approach not only accelerates iteration in browser environments, where performance is paramount, but also ensures consistency across devices, as WebGPU handles the underlying computations efficiently. Ultimately, it empowers developers to prototype and refine water interactions rapidly, dreamscaping more dynamic and responsive game worlds
This design philosophy minimizes setup overhead, allowing creators to focus on level design rather than technical plumbing. For any water plane, the process simplifies to selection within the Infinity SDK and tweaking properties like viscosity or turbulence via intuitive controls. These values interpolate simulation uniforms in real-time, blending effects like ripple propagation or buoyancy forces non-destructively, and can be animated or tied to environmental triggers without additional scripting. Tetra's implementation of its water system is extremely efficient and performing, utilizing WebGPU to render bodies of water with ease that behave like you would expect.