uniform float fTime0_X;
uniform float noise;
uniform float scale;

uniform vec3 fvLightPosition;
uniform vec3 fvEyePosition;

varying vec2 Texcoord;
varying vec3 ViewDirection;
varying vec3 LightDirection;
varying vec3 Normal;
   
void main( void )
{
   vec4 pos = ftransform() + vec4(sin(fTime0_X*100.0*scale+ftransform().x)*noise, cos(fTime0_X*100.0*scale+ftransform().y)*noise, 0, 0);
   gl_Position = pos;
   Texcoord    = gl_MultiTexCoord0.xy;
    
   vec4 fvObjectPosition = gl_ModelViewMatrix * pos;
   
   
   ViewDirection  = fvEyePosition - fvObjectPosition.xyz;
   LightDirection = fvLightPosition - fvObjectPosition.xyz;
   Normal         = gl_NormalMatrix * gl_Normal;
   
}