The Alpha value of material's Diffuse color control the
transparencyof water, 100 is appropriate commonly. Also can use RGB
as water color.
Usage:material.setTexture(0,
bump_texture)material.setTexture(1, reflected_texture)local waternormal=vec4.new(0,1,0)local wavespeed=0.2material.setEffectVector('vecWaterNormal',waternormal)material.setFactor( wavespeed, 0,0,0 )

PixelShader: No

lake.fx

Compose reflected / refractive images
and water color by depth map, and use a bump map to distort
result.
See Render scene depth info to a texturefor depth map, and you need hide ocean
self when rendering the map.

The Alpha value of material's Diffuse color control the
transparencyof water, 100 is appropriate commonly. Also can use RGB
as water color.
Usage:material.setTexture(0,
reflected_texture)material.setTexture(1, refractive_texture)material.setTexture(2, depth_texture)material.setTexture(3, bump_texture)

(Remark: if use the lake.fx
or lakeRipple.fx, you needs use Back Buffer Aligned render target for
reflected / refractive / depth map, and do not
check RTT's 'Consistent with back buffer'style.)

Workflow:

1. Create a surface ( or Ocean ) as water,
and check it's bump style.

2. Create a portal on the surface
( no needed for Ocean
)

3. Add two render targets
Right-Click in the Texture Browse Window, select "Add Render
Target" from the context menu. Then select a
image file in Open File Dialog. Please ensure the image width is same as height
(square image). Do same for
another render target. ( use "Add Back Buffer Aligned > Render
Target" if use Ocean )
4. Select render targetsSelect the portal ( Ocean ), in the Render To Texture rollout of portal panel, select
one render target; and check 'Consistent with back buffer'style ( no needed for Ocean ). Click the 'Actions'
button, add two actions:

Message

Function

Object

Render Texture Begin

Hide

water surface

Render Texture End

Show

water surface

In the Render To Texture (Mirror) rollout, select
another render target, and do same as above.

6. Create materialIn the Material panel, new a material; set 1st texture to the bump texture;
set 2nd texture to the render target in RTT(Mirror); set 3rd texture to the
render target in RTT; load shader file "effects\water\bump_nops.fx".
( or other shader, and matching textures setting )

6. Assign the material to water surfacePlease ensure no texture assign to water surface. You can use UV Tool to
adjust water surface's texture coordinates for changing wave size.

( if usebump_norefra_nops.fx, no
need the 3rd texture; and only need set RTT(Mirror) in the portal. )