// --------------------------------------------------------------------------- // Project: NintendoWare // File: CalcHemisphereLighting.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" //----------------------------------------------------------------------------- // @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