1// ---------------------------------------------------------------------------
2//  Project:  NintendoWare
3//  File:     font_TextWriterShader.vsh
4//
5//  Copyright (C)2009-2011 Nintendo/HAL Laboratory, Inc.  All rights reserved.
6//
7//  These coded instructions, statements, and computer programs contain proprietary
8//  information of Nintendo and/or its licensed developers and are protected by
9//  national and international copyright laws. They may not be disclosed to third
10//  parties or copied or duplicated in any form, in whole or in part, without the
11//  prior written consent of Nintendo.
12//
13//  The content herein is highly confidential and should be handled accordingly.
14//
15//  $Revision: $
16// ---------------------------------------------------------------------------
17
18// Input registers map
19#define aPosition		v0
20#define aPositionZ		v1
21#define aColor			v2
22#define aTexCoord		v3
23
24// Output registers map
25#define vPosition		o0
26#define vFrontColor		o1
27#define vTexCoord0		o2
28
29#define CONSTANT		c95
30def		CONSTANT,		0.0, 0.5, 1.0, 0.003921569
31
32#define CONST_1			CONSTANT.z
33#define CONST_1__255	CONSTANT.w
34
35#define pos             r14
36#define tmp             r15
37#define cProjMtx		c0
38#define cViewMtx		c4
39
40#pragma bind_symbol ( aPosition.xy, v0, v0 )
41#pragma bind_symbol ( aPositionZ.x, v1, v1 )
42#pragma bind_symbol ( aColor, v2, v2 )
43#pragma bind_symbol ( aTexCoord.xy, v3, v3 )
44
45#pragma bind_symbol ( uProjection, c0, c3 )
46#pragma bind_symbol ( uModelView, c4, c6 )
47
48#pragma output_map ( position, o0 )
49#pragma output_map ( color, o1 )
50#pragma output_map ( texture0, o2.xy )
51
52main:
53	mov		pos.xy,			aPosition
54	mov		pos.z,			aPositionZ.x
55    mov     pos.w,          CONST_1
56    m4x3    tmp.xyz,        pos,  cViewMtx
57    mov     tmp.w,          CONST_1
58    m4x4    vPosition,      tmp,        cProjMtx
59
60    mul     vFrontColor,    aColor,     CONST_1__255
61    mov     vTexCoord0,     aTexCoord.xyxy
62    end
63endmain:
64