// --------------------------------------------------------------------------- // Project: NintendoWare // File: CalcTexcoord2.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: $ // --------------------------------------------------------------------------- #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 #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 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