Torque Shader EngineTorque Shader Engine Documentation
CVS Revision Label 0.1.x

Wave Data

There are wave settings for the waves that are used in the ps 2.0 water shader. The wave parameters do not affect the 1.0 water movement. The water shader uses the wave parameters to sample the water bumpmap and combine it in different ways to get the final movement effect. It averages the first two waves and adds the third at 1/3 the strength of the first two. The purpose of the third wave is to break up repetitive patterns that the first two can form. It is best, therefore, to use a larger texture scale for the third wave. The parameters for the waves are:

waveDir

Direction that the wave travels along the x/y plane. It is a 2D normalized vector.

waveSpeed

Speed that the wave travels in the specified direction. This is a single floating point value.

waveTexScale

This is the scale of the wave - how much the texture is stretched.