// quad.vert
//
/////////////////////////////////////////////////////////////////////////////
//
// Quad Vertex Shader
//
// By Matt Molloy
//
// (c) Copyright 2006, United Developers, LLC, All Rights Reserved
//
// This software is the property of United Developers, LLC, and is legally
// protected as a trade secret, proprietary information, and copyrighted work
// of United Developers, LLC. It may not be used, duplicated, or disclosed to
// others outside of United Developers, LLC, nor may it be modified, translated,
// etc., except as specifically permitted by the software license terms or an
// agreement with United Developers, LLC.
//
/////////////////////////////////////////////////////////////////////////////
#ifdef GLSL

attribute vec3 pos;
attribute vec2 tx;
attribute vec4 color;

varying vec2 Tx
varying vec4 Color;

/////////////////////////////////////////////////////////////////////////////
// Main Entry
/////////////////////////////////////////////////////////////////////////////
void main( void )
{
   // Output the position and the texture coordinates
   gl_Position = mj_ModelViewProjMatrix * pos;
   Tx = mj_TextureMatrix0 * tx;
   Color = color;
}
#endif

#ifdef HLSL

/////////////////////////////////////////////////////////////////////////////
// Main Entry
/////////////////////////////////////////////////////////////////////////////
void main
( 
in vec3 pos   : POSITION,
in vec2 tx    : TEXCOORD0,
in vec4 color : COLOR0,

out vec4 Pos    : POSITION,
out vec2 Tx     : TEXCOORD0,
out vec4 Color  : COLOR0
)
{
   // Output the position and the texture coordinates
   Pos = mul( mj_ModelViewProjMatrix, vec4( pos, 1.0 ) );
   Tx = mul( mj_TextureMatrix0, tx );
   Color = color;
}

#endif
