1//
2//------------------------------------------------------------
3// Copyright(c) 2009-2010 by Digital Media Professionals Inc.
4// All rights reserved.
5//------------------------------------------------------------
6// This source code is the confidential and proprietary
7// of Digital Media Professionals Inc.
8//------------------------------------------------------------
9//
10
11// Input registers map
12#define aPosition       v0
13#define aColor          v1
14
15// Output registers map
16#define vPosition       o0
17#define vQuaternion     o1
18#define vView           o2
19#define vTexCoord       o3
20
21#define dmp_projection_matrix           c0
22#define dmp_local_to_view_matrix        c4
23#define dmp_local_to_world_matrix       c8
24#define TEMP_VIEW           r15
25
26#pragma bind_symbol(aPosition.xyzw,v0,v0)
27#pragma bind_symbol(aColor.xyz,v1,v1)
28
29#pragma output_map (position, o0)
30#pragma output_map (color,    o1)
31
32#pragma bind_symbol(uProjection,c0,c3)
33#pragma bind_symbol(uModelView,c4,c7)
34
35l_position:
36    m4x4    TEMP_VIEW,        aPosition,          dmp_local_to_view_matrix
37	m4x4    vPosition,          TEMP_VIEW,          dmp_projection_matrix
38    ret
39    nop
40
41main:
42    call    l_position
43    mov     o1, aColor
44    end
45endmain:
46