float4x4 view_matrix;
float noise_frequency;
float4x4 view_proj_matrix;
struct VS_OUTPUT
{
   float4 Pos  : POSITION;
   float3 P    : TEXCOORD0;
   float3 Peye : TEXCOORD1;
   float3 Neye : TEXCOORD2;
};


VS_OUTPUT main (float4 vPosition: POSITION, float3 vNormal: NORMAL)
{
   VS_OUTPUT Out = (VS_OUTPUT) 0; 

   Out.Pos = mul (view_proj_matrix, vPosition);

   // Just output model coordinates for this so marble doesn't swim all over
   Out.P = vPosition * noise_frequency;

   // Put position and normal in eye space
   Out.Peye = mul (view_matrix, vPosition);
   Out.Neye = mul (view_matrix, vNormal);

   return Out;
}




