// --------------------------------------------------------------------------- // Project: NintendoWare // File: CalcHemiSphereLighting.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" //----------------------------------------------------------------------------- // @brief 半球ライティングを計算し TEMP_COLO に結果を加えます。 //----------------------------------------------------------------------------- l_calc_hemisphere_lighting: dp3 TEMP1, TEMP_NORM, nw_hemi_sphere_direction._XYZW mov TEMP2, nw_hemi_sphere_direction._W mad TEMP1, TEMP1, TEMP2, TEMP2 mov TEMP3, nw_hemi_sphere_ground._XYZW sub TEMP2, nw_hemi_sphere_sky._XYZW, TEMP3 mad TEMP4, TEMP2, TEMP1, TEMP3 ifb nw_is_hemi_sphere_occlusion mul TEMP4, TEMP4, TEMP_COLO.wwww endif mad TEMP_COLO.xyz, TEMP4, nw_material_diffuse._XYZW, TEMP_COLO mov TEMP_STUS.x, CONST_1 ret