Loading video...
Video Failed to Load
Volumetric fog (AERO) + GPU wave simulation. -- Interactive in Unity 6, URP. ✨ Already possible, you just need the texture.
69,490 views • 3 months ago •via X (Twitter)
13 Comments

Wow, how?! Any way we can get a sample scene in Aero?

> Wave sim outputs texture. > AERO has input for texture. 💡 A perfect match. 🫂

Wooow

Wow is this on asset store?

AERO has already been able to do this, I'm just supplying the output of a wave simulation as the input texture.

ohhhhh nice work!

Impressive🫡

Hey Super, build a single-page interactive Three.js app demonstrating volumetric fog (AERO-style) combined with a real GPU wave simulation, modeled on the Unity 6 URP demo referenced in the source post. The visitor's first action on load is to see a calm dark-blue water plane under raymarched volumetric fog with a single diagonal sun shaft; within two seconds an auto-generated ripple train is propagating across the water and visibly bending the fog density over each crest. Dragging the orbital camera (left-drag rotate, wheel zoom, right-drag pan) immediately reveals parallax between the wave height field and the fog volume. Clicking or tapping the water drops a new ripple source at the cursor world position; multiple simultaneous sources interfere coherently because they all feed the same ping-pong wave solver. Pin Three.js r161 from a CDN as the only 3D runtime; do not pull in React, Vue, Tailwind, or any other UI framework. The water surface is a 240×240-segment PlaneGeometry whose vertex shader displaces Y by sampling a 512×512 RG16F texture that is updated every frame by a full-screen quad shader solving the 2D wave equation (current = 2*previous - older + c²·∇²previous - damping·(previous - older)) using a ping-pong between two WebGLRenderTargets; new ripples are written into the current state by stamping a Gaussian bump at the cursor UV each time the user clicks or drags. The volumetric fog is rendered as a full-screen post pass after the scene: a raymarcher walks from the camera through the view-space depth buffer, accumulating scattering density, with density modulated by the same wave texture sampled at world-space (x,z) so fog thickens over wave crests. Anisotropic forward scattering is approximated with a clamped Henyey-Greenstein phase function (g ≈ 0.7) keyed off the dot product between the view ray and a user-controlled sun direction vector. The sun shaft appears as a soft cone of warm light whose intensity falls off with both density and view-sun angle.

ignoring all the lighting, how much ms does it take for sim/ray marching?

It depends on the march steps and simulation resolution.

you're an artist

GPU simulation ?

Yes, it's a wave(s) simulation- via a compute shader.
