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//------------------------------------------ 12// related cmp 13//------------------------------------------ 14#define CMP_MODE_EQ 0 15#define CMP_MODE_NE 1 16#define CMP_MODE_LT 2 17#define CMP_MODE_LE 3 18#define CMP_MODE_GT 4 19#define CMP_MODE_GE 5 20 21//------------------------------------------ 22// related condition 23//------------------------------------------ 24#define COND_MODE_OR 0 25#define COND_MODE_AND 1 26#define COND_MODE_STA0 2 27#define COND_MODE_STA1 3 28 29//------------------------------------------ 30// related status reg 31//------------------------------------------ 32#define STAT0_0 0 33#define STAT0_1 1 34#define STAT1_0 0 35#define STAT1_1 1 36 37// Input registers map 38#define aPosition v0 39#define aTexCoord v1 40 41 42// Constant registers map 43#define MATRIX_ModelView c0 44#define MATRIX_ModelView0 c0 45#define MATRIX_ModelView00 c0 46#define MATRIX_ModelView01 c1 47#define MATRIX_ModelView02 c2 48#define MATRIX_ModelView03 c3 49 50#define MATRIX_Proj c4 51#define MATRIX_Proj0 c4 52#define MATRIX_Proj1 c5 53#define MATRIX_Proj2 c6 54#define MATRIX_Proj3 c7 55 56#define CONST c95 // 0.0 0.5 1.0 3.0 57 58#define EQ 0 59#define NEQ 1 60#define LESS 2 61#define LEQ 3 62#define GT 4 63#define GEQ 5 64 65// Temporary registers map 66#define TEMP0 r0 67#define TEMP1 r1 68#define TEMP2 r2 69#define TEMP3 r3 70#define TEMP4 r4 71 72#define TEMP_TEX0 r10 73#define TEMP_TEX1 r11 74#define TEMP_TEX2 r12 75#define TEMP_TEX3 r13 76#define TEMP_TANG r13 77#define TEMP_NORM r14 78#define TEMP_VIEW r15 79#define TEMP_POS r12 80 81// Constant registers 82def CONST, 0.0, 0.5, 1.0, 3.0 83 84#pragma bind_symbol(aPosition.xyzw,v0,v0) 85#pragma bind_symbol(aTexCoord.xyz,v1,v1) 86 87#pragma output_map (position, o0) 88#pragma output_map (texture0, o1.xy) 89#pragma output_map (texture1, o2.xy) 90 91#pragma bind_symbol(uProjection,c0,c3) 92#pragma bind_symbol(uModelView,c4,c7) 93 94main: 95 call l_position // ../Common/Common.vsh 96 mov o1, aTexCoord 97 mov o2, aTexCoord 98 end 99endmain: 100