!!ARBvp1.0

###################################################################################
#
# Copyright 2009 Canonical Ltd.
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of either or both of the following licenses:
#
# 1) the GNU Lesser General Public License version 3, as published by the
# Free Software Foundation; and/or
# 2) the GNU Lesser General Public License version 2.1, as published by
# the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranties of
# MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR
# PURPOSE.  See the applicable version of the GNU Lesser General Public
# License for more details.
#
# You should have received a copy of both the GNU Lesser General Public
# License version 3 and version 2.1 along with this program.  If not, see
# <http://www.gnu.org/licenses/>
#
# Authored by: Canonical Ltd
#
###################################################################################

ATTRIB iPos          = vertex.position;
PARAM  mvp[4]       = { state.matrix.mvp };

OUTPUT oPos         = result.position;
OUTPUT oColor       = result.color.primary;
OUTPUT oTexCoord0   = result.texcoord[0];
OUTPUT oTexCoord1   = result.texcoord[1];
OUTPUT oTexCoord2   = result.texcoord[2];
OUTPUT oTexCoord3   = result.texcoord[3];
OUTPUT oTexCoord4   = result.texcoord[4];
OUTPUT oTexCoord5   = result.texcoord[5];
OUTPUT oTexCoord6   = result.texcoord[6];
OUTPUT oTexCoord7   = result.texcoord[7];

# Transform the vertex to clip coordinates.
DP4   oPos.x, mvp[0], iPos;
DP4   oPos.y, mvp[1], iPos;
DP4   oPos.z, mvp[2], iPos;
DP4   oPos.w, mvp[3], iPos;

MOV   oColor, vertex.color;
MOV   oTexCoord0, vertex.texcoord[0];
MOV   oTexCoord1, vertex.texcoord[1];
MOV   oTexCoord2, vertex.texcoord[2];
MOV   oTexCoord3, vertex.texcoord[3];
MOV   oTexCoord4, vertex.texcoord[4];
MOV   oTexCoord5, vertex.texcoord[5];
MOV   oTexCoord6, vertex.texcoord[6];
MOV   oTexCoord7, vertex.texcoord[7];

END

