I worked on this project for Forza Motorsport 3. One of our major new tracks was to be set in the real-world location of the Amalfi coast in Italy. This track would wind its way along a coastal road, and the Mediterranean Sea would therefore be a major part of the track's backdrop. We did not originally have any water shader tech, so I developed an animated ocean shader specifically for this track. As the player would be driving relatively close to the water, I decided to make use of the vertex shader to make a geometrically animated surface, as this would allow for more interesting specular highlights than using normal maps alone. After some research on the subject, I decided to drive the animation with Gerstner waves, a specific type of sine wave which uses a pair of equations to create a waveform with pinched peaks and flattened troughs. These were much more suitable for water simulation than standard smooth sine waves. A series of these Gerstner waves of different periods and amplitudes are combined to create the effect here. In the pixel shader, the amount of Z-displacement from the vertex shader is used to control the blending of a foam texture. The water's color is also driven by the incidence angle of the camera and a cubemap. A pair of normal maps are also panned over the surface to further perturb the specular highlights.