#version 150

in vec4 gxl3d_Position;
in vec4 gxl3d_TexCoord0;

out vec3 Vertex_Position;
out float gl_ClipDistance[1];
out vec4 Vertex_UV;

uniform mat4 gxl3d_ModelViewProjectionMatrix;
uniform mat4 gxl3d_ModelMatrix;
uniform vec4 clip_plane;

void main()
{
  Vertex_Position = gxl3d_Position.xyz;
  gl_Position = gxl3d_ModelViewProjectionMatrix * gxl3d_Position;
  gl_ClipDistance[0] = dot(gxl3d_ModelMatrix * gxl3d_Position, clip_plane);
  Vertex_UV = gxl3d_TexCoord0;
}
