All pastes #168250 Raw Edit

Miscellany

public text v1 · immutable
·published 2006-09-12 20:55 UTC
rendered paste body
first we set the position of the vertex:
gl_Position = gl_ProjectionMatrix * gl_ModelViewMatrix * gl_Vertex;
//standard procdure for transform vertices around so they are in the correct place inrealtion to the camera screen etc...

// and here is some fancy math, combining sine and sin waves with diffrent waves lengths (or cosine waves )gives nice random looking ones

vec4 Position=gl_Position;
   Position.y+=10*(sin(-0.05*Position.x+0.5*time)*0.5+0.5);
   
  
    ////******SECOND HEIGHT TRANSFORMATION  *******////

   Position.y+=10*(sin((-0.07*Position.x+0.07*Position.z)+time*1.3)*0.5+0.5);

//for cooler stuff like distrortions you can use these random waves to make random texture coords these random texcoords can be used to distort a texture of the water surface in a cool refarctiony way lol

just using numbers on the waves tweak as u wish
 float second2=0.070*cos(-0.07*Position.x+0.07*Position.z+1.3*time)