An advanced water shading system and custom 3D engine built to test the capability of the new Stage3D and Pixel Bender 3D API’s in Flash Player 11.

Instructions

Click above to lauch demo, you will need Flash Player 11.

WARNING: This demo makes heavy use of GPU acceleration that some machines may have difficulty running, particularly on the Mac OS at the moment.

Move the mouse to rotate the camera (keep the cursor in the middle to stop spinning). Click to focus and use the arrow keys or AWSD to move or click and hold to move forward.

Detail

The entire scene is rendered multiple times onto texture maps which are then sampled with a wave distortion effect to simulate the reflective and refractive properties of water.

Colour abberation and meniscus of the water surface is achieved by offsetting the RGB sample co-ordinates, the latter also uses an alpha fade to provide a seamless blend where the water meets the camera lens.

Caustics and underwater fogging are mapped onto the terrain depending on the height of
the surface.

The new Stage3D API’s (previously known as ‘Molehill’) have enabled us to push a vast number of polygons and complex shading effects not previously possible in Flash.

This project is an ongoing experiment, watch this space!

Technology

ActionScript 3.0
Flash CS5
Flash Player Stage3D
Pixel Bender 3D