0001: //
0002: // This program creates the fire effect.
0003: //
0004: 
0005: // ----------------------------------------------------------------------------
0006: // Input datas
0007: // ----------------------------------------------------------------------------
0008: struct appdata  {
0009:     float4 position  : POSITION;
0010:     float4 texcoord0 : TEXCOORD0;
0011: };
0012: // ----------------------------------------------------------------------------
0013: // Vertex shader program
0014: // ----------------------------------------------------------------------------
0015: vf20 main(appdata I
0016:         , uniform float4x4 worldviewproj_matrix
0017: ) {
0018:     vf20 O;
0019:     
0021:     O.HPOS = I.position;
0022: 
0023:     // 1フレ前の画像
0024:     O.TEX0   = I.texcoord0;
0025:     O.TEX0.y =1-I.texcoord0.y+4.0f/512.0f;
0026:     // 燃えている部分のマップ
0027:     O.TEX1 = I.texcoord0;
0028:     O.TEX1.y = 1-I.texcoord0.y;
0029:     // 猫マップ
0030:     O.TEX2   = I.texcoord0;
0031: 
0032:     return O;
0033: } 
0034: 
0035: 
0036: