1// --------------------------------------------------------------------------- 2// Project: NintendoWare 3// File: CalcTexcoord2.vsh 4// 5// Copyright (C)2009-2011 Nintendo/HAL Laboratory, Inc. All rights reserved. 6// 7// These coded instructions, statements, and computer programs contain proprietary 8// information of Nintendo and/or its licensed developers and are protected by 9// national and international copyright laws. They may not be disclosed to third 10// parties or copied or duplicated in any form, in whole or in part, without the 11// prior written consent of Nintendo. 12// 13// The content herein is highly confidential and should be handled accordingly. 14// 15// $Revision: $ 16// --------------------------------------------------------------------------- 17 18#include "ShaderConfig.h" 19#include "VertexShader.h" 20 21//------------------------------------------ 22// �e�N�X�`�����W�v�Z 23//------------------------------------------ 24// �e�N�X�`�����W2 25l_calc_texcoord2: 26 mov TEMP0.xy, nw_texture_coordinate._Z 27 ifb nw_uv_mapping_position2 // UV�}�b�s���O 28#ifdef NW_FIXED_TEX_SORUCE // �e�N�X�`���\�[�X���Œ�Ŏ擾���܂��B 29 mul TEMP_TEX.xy, nw_texcoord2.xy, nw_attribute_scale1._Z 30#else 31 call l_get_texcoord_source 32#endif 33 dp4 TRAN_TEX2.x, TEMP_TEX, nw_texture_matrix2[0]._XYWZ 34 dp4 TRAN_TEX2.y, TEMP_TEX, nw_texture_matrix2[1]._XYWZ 35 mov o_TexCoord2, TRAN_TEX2 36 else 37 ifb nw_is_texture2_enabled 38 mov TEMP_TEX.zw, CONST_0_0_1_1 39 mov TRAN_TEX2.zw, TEMP_TEX.zw 40 call l_gen_texcoord_sphere_reflection 41 dp4 TRAN_TEX2.x, TEMP_TEX, nw_texture_matrix2[0]._XYZW 42 dp4 TRAN_TEX2.y, TEMP_TEX, nw_texture_matrix2[1]._XYZW 43 // �o�̓��W�X�^�ɂ͑S�ẴR���|�[�l���g�ɏ������݂��s���K�v������܂��B 44 mov o_TexCoord2, TRAN_TEX2 45 else 46 mov o_TexCoord2, CONST_0 47 endif 48 nop 49 endif 50 nop 51 ret 52