1// ---------------------------------------------------------------------------
2//  Project:  NintendoWare
3//  File:     nw4cDemo.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 aColor			v1
21#define aTexCoord		v2
22#define aOffset		    v3
23
24// Output registers map
25#define vPosition		o0
26#define vFrontColor		o1
27#define vTexCoord0		o2
28
29#define CONST			c95
30def		CONST,			0.0, 0.5, 1.0, 2.0
31
32
33#define tmpView			r15
34#define cProjMtx		c0
35#define cViewMtx		c4
36#define tmpPos			r0
37
38#pragma bind_symbol( aPosition.xyz, v0, v0 )
39#pragma bind_symbol( aColor, v1, v1 )
40#pragma bind_symbol( aOffset, v3, v3 )
41
42#pragma bind_symbol( uProjection, c0, c3 )
43#pragma bind_symbol( uModelView, c4, c7 )
44
45#pragma output_map ( position, o0 )
46#pragma output_map ( color, o1 )
47//#pragma output_map ( texture0, o2.xy )
48
49
50// �N���b�v���W��Z�͈̔͂́A���炩����[0, -w]�Ƃ��Ďˉe�s���������B
51main:
52	mov		tmpPos,				aPosition
53	add		tmpPos,				tmpPos,		aOffset
54	m4x4	tmpView, 		    tmpPos,		cViewMtx
55	mov		tmpView.w, 			CONST.z
56	m4x4    vPosition, 			tmpView,	cProjMtx
57
58	mov		o1,					aColor
59//	mov		vTexCoord0.xy,		aTexCoord
60	end
61endmain:
62
63