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