A stylized ocean water material in Unreal Engine 5, built without touching a node
2:29
A stylized ocean water material built from a single prompt, in about twelve minutes. No Unreal water plugin, no starter content, and no nodes placed by hand. The agent writes the Gerstner wave HLSL itself, fixes its own compile errors, and hands back a material instance with every parameter exposed.
- 1One prompt asks for stylized water with full control over waves and foam. The agent reads its own material skill first to confirm the conventions, then drives every asset operation through the cfa command line.
- 2It writes Gerstner waves summed across multiple octaves inside a single Custom HLSL node, each layer with its own wavelength, amplitude, steepness and direction, and derives the normals analytically instead of sampling a normal map.
- 3When the material does not compile it reads the error back from Unreal and fixes it, finishing clean at zero errors and 2005 pixel instructions, then clears the orphaned nodes and wires refraction distortion into the depth sampling.
- 4Four assets come out of it: the water material, a Gerstner waves function, a foam function, and a material instance. Shallow and deep colour, subsurface scatter, foam colour and coverage, wind direction, wave scale and choppiness all change from the instance, without opening the graph.