// --------------------------------------------------------------------------- // Project: NintendoWare // File: CalcTexCoord2.vsh // // Copyright (C)2009-2010 Nintendo Co., Ltd. All rights reserved. // // These coded instructions, statements, and computer programs contain // proprietary information of Nintendo of America Inc. and/or Nintendo // Company Ltd., and are protected by Federal copyright law. 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. // // $Revision:$ // --------------------------------------------------------------------------- #include "ShaderConfig.h" #include "VertexShader.h" //------------------------------------------ // テクスチャ座標計算 //------------------------------------------ // テクスチャ座標2 l_calc_texcoord2: mov TEMP0.xy, nw_texture_coordinate._Z ifb nw_uv_mapping_position2 // UVマッピング #ifdef NW_FIXED_TEX_SORUCE // テクスチャソースを固定で取得します。 mul TEMP_TEX.xy, nw_texcoord2.xy, nw_attribute_scale1._Z mov TEMP_TEX.zw, CONST_0_0_1_1 #else call l_get_texcoord_source #endif dp4 TRAN_TEX2.x, TEMP_TEX, nw_texture_matrix2[0]._XYWZ dp4 TRAN_TEX2.y, TEMP_TEX, nw_texture_matrix2[1]._XYWZ mov TRAN_TEX2.zw, TEMP_TEX.zw mov o_TexCoord2, TRAN_TEX2 else ifb nw_is_texture2_enabled mov TEMP_TEX.zw, CONST_0_0_1_1 mov TRAN_TEX2.zw, TEMP_TEX.zw call l_gen_texcoord_sphere_reflection dp4 TRAN_TEX2.x, TEMP_TEX, nw_texture_matrix2[0]._XYZW dp4 TRAN_TEX2.y, TEMP_TEX, nw_texture_matrix2[1]._XYZW // 出力レジスタには全てのコンポーネントに書き込みを行う必要があります。 mov o_TexCoord2, TRAN_TEX2 else mov o_TexCoord2, CONST_0 endif nop endif nop ret