// --------------------------------------------------------------------------- // Project: NintendoWare // File: gfx_ParticleGShader.gsh // // 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: $ // --------------------------------------------------------------------------- // ジオメトリシェーダ指定 #pragma gs_assemble_as_geometry_shader //------------------------------------------ // Definitions //------------------------------------------ // ダミーで一つ入力属性を定義する #pragma bind_symbol(geometry_input_dummy, v0, v0) // 通常のジオメトリデータモード0であるため // 頂点シェーダから送出されたデータは、入力レジスタに0から順番に格納される #define in_position v0 #define in_quaternion v1 #define in_view v2 #define in_color v3 #define in_texcoord v4 #define in_texoffset v5 #define in_posoffset1 v6 #define in_posoffset2 v7 #pragma output_map(position, o0) #pragma output_map(quaternion, o1) #pragma output_map(view, o2) #pragma output_map(color, o3) #pragma output_map (texture0, o4.xy) #pragma output_map (texture1, o5.xy) //#pragma output_map (texture2, o6.xy) #define out_pos o0 #define out_quat o1 #define out_view o2 #define out_col o3 #define out_tex0 o4 #define out_tex1 o5 //#define out_tex2 o6 // レジスタ #define TEMP0 r0 main: // 頂点出力(共通) // vertex0 mov TEMP0, in_position add TEMP0, TEMP0, in_posoffset1 mov out_pos, TEMP0 mov out_quat, in_quaternion mov out_view, in_view mov out_col, in_color mov TEMP0, in_texcoord add TEMP0.xy, TEMP0.xy, in_texoffset.xy add TEMP0.xy, TEMP0.xy, in_texoffset.zw mov out_tex0, TEMP0 mov out_tex1, TEMP0 // mov out_tex2, TEMP0 smf 0, 0, 0 vout // vertex1 mov TEMP0, in_position add TEMP0, TEMP0, -in_posoffset2 mov out_pos, TEMP0 mov out_quat, in_quaternion mov out_view, in_view mov out_col, in_color mov TEMP0, in_texcoord add TEMP0.xy, TEMP0.xy, in_texoffset.xy mov out_tex0, TEMP0 mov out_tex1, TEMP0 // mov out_tex2, TEMP0 smf 0, 0, 1 vout // vertex2 mov TEMP0, in_position add TEMP0, TEMP0, in_posoffset2 mov out_pos, TEMP0 mov out_quat, in_quaternion mov out_view, in_view mov out_col, in_color mov TEMP0, in_texcoord add TEMP0.xy, TEMP0.xy, in_texoffset.zw mov out_tex0, TEMP0 mov out_tex1, TEMP0 // mov out_tex2, TEMP0 smf 0, 1, 2 vout // vertex3 mov TEMP0, in_position add TEMP0, TEMP0, -in_posoffset1 mov out_pos, TEMP0 mov out_quat, in_quaternion mov out_view, in_view mov out_col, in_color mov out_tex0, in_texcoord mov out_tex1, in_texcoord // mov out_tex2, in_texcoord smf 1, 1, 0 vout end endmain: