// --------------------------------------------------------------------------- // Project: NintendoWare // File: CalcColor.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" //------------------------------------------ // カラー //------------------------------------------ l_calc_color: // 頂点カラーはスケール値が0以外なら存在します。 mov TEMP0.y, nw_attribute_scale0._W cmp NEQ, NEQ, TEMP0.xy, CONST_0 // 先に全てのカラーに 1 を入れておく mov TEMP_COLO.xyzw, CONST_1 ifc 0, 1, COND_MODE_STA1 // 頂点カラーが有効な場合 // ifbのジャンプによるストール対策のために先に値をいれておく。 mul TEMP0.xyzw, nw_color.xyzw, nw_attribute_scale0._W ifb nw_is_vertex_alpha_enable mov TEMP_COLO.w, TEMP0.w endif mul TEMP_COLO.xyz, TEMP0.xyz, nw_vertex_color_scale endif callb nw_is_hemi_sphere_lighting, l_calc_hemisphere_lighting // 半球ライトが有効な場合 max o_Color, TEMP_COLO, CONST_0 ret