// --------------------------------------------------------------------------- // Project: NintendoWare // File: demo_Common.vsh // // Copyright (C)2009-2011 Nintendo/HAL Laboratory, Inc. All rights reserved. // // These coded instructions, statements, and computer programs contain proprietary // information of Nintendo and/or its licensed developers and are protected by // national and international copyright laws. They may not be disclosed to third // parties or copied or duplicated in any form, in whole or in part, without the // prior written consent of Nintendo. // // The content herein is highly confidential and should be handled accordingly. // // $Revision: 31311 $ // --------------------------------------------------------------------------- // Input registers map #define aPosition v0 #define aColor v1 #define aTexCoord v2 // Output registers map #define vPosition o0 #define vFrontColor o1 #define vTexCoord0 o2 #define CONST c95 def CONST, 0.0, 0.5, 1.0, 2.0 #define tmpView r15 #define cProjMtx c0 #define cViewMtx c4 #pragma bind_symbol( aPosition.xyz, v0, v0 ) #pragma bind_symbol( aColor, v1, v1 ) #pragma bind_symbol( uProjection, c0, c3 ) #pragma bind_symbol( uModelView, c4, c7 ) #pragma output_map ( position, o0 ) #pragma output_map ( color, o1 ) //#pragma output_map ( texture0, o2.xy ) // クリップ座標のZの範囲は、あらかじめ[0, -w]として射影行列を生成する。 main: // m4x3 tmpView.xyz, aPosition, cViewMtx m4x4 tmpView, aPosition, cViewMtx mov tmpView.w, CONST.z m4x4 vPosition, tmpView, cProjMtx mov vFrontColor, aColor // mov vTexCoord0.xy, aTexCoord end endmain: