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:     
0020:     // copy given projection coordinate
0021:     O.HPOS = I.position;
0022: 
0023:     // Last frame
0024:     O.TEX0   = I.texcoord0;
0025:     O.TEX0.y =1-I.texcoord0.y+4.0f/512.0f;
0026:     // Burnd texture
0027:     O.TEX1 = I.texcoord0;
0028:     O.TEX1.y = 1-I.texcoord0.y;
0029:     // CatMap texture
0030:     O.TEX2   = I.texcoord0;
0031: 
0032:     return O;
0033: } 
0034: 
0035: 
0036: