//
// Generated by Microsoft (R) D3DX9 Shader Compiler 9.15.779.0000
//
// Parameters:
//
//   float3 LightDir_Dir0;
//   
//   struct
//   {
//       float3 pos;
//       float3 color;
//       float4 atten;
//
//   } g_LightPoint[8];
//   
//   float g_MatDiffuseStrength;
//   float g_MatSpecularPower;
//   float g_MatSpecularStrength;
//   float3x2 g_TexMatrix;
//   float4x4 g_mViewInverse;
//   float4x4 g_mWorld;
//   float4x4 g_mWorldIT;
//   float4x4 g_mWorldViewProjection;
//   int g_nNumLightPoint;
//
//
// Registers:
//
//   Name                   Reg   Size
//   ---------------------- ----- ----
//   g_nNumLightPoint       i0       1
//   g_LightPoint           c0      24
//   g_mWorldViewProjection c24      4
//   g_mWorld               c28      3
//   g_mWorldIT             c31      3
//   g_mViewInverse         c34      3
//   g_TexMatrix            c37      2
//   LightDir_Dir0          c39      1
//   g_MatSpecularStrength  c40      1
//   g_MatSpecularPower     c41      1
//   g_MatDiffuseStrength   c42      1
//
//
// Default values:
//
//   g_nNumLightPoint
//     i0   = { 0, 0, 1, 0 };
//
//   g_LightPoint
//     c0   = { 0, 0, 0, 0 };
//     c1   = { 0, 0, 0, 0 };
//     c2   = { 0, 0, 0, 0 };
//     c3   = { 0, 0, 0, 0 };
//     c4   = { 0, 0, 0, 0 };
//     c5   = { 0, 0, 0, 0 };
//     c6   = { 0, 0, 0, 0 };
//     c7   = { 0, 0, 0, 0 };
//     c8   = { 0, 0, 0, 0 };
//     c9   = { 0, 0, 0, 0 };
//     c10  = { 0, 0, 0, 0 };
//     c11  = { 0, 0, 0, 0 };
//     c12  = { 0, 0, 0, 0 };
//     c13  = { 0, 0, 0, 0 };
//     c14  = { 0, 0, 0, 0 };
//     c15  = { 0, 0, 0, 0 };
//     c16  = { 0, 0, 0, 0 };
//     c17  = { 0, 0, 0, 0 };
//     c18  = { 0, 0, 0, 0 };
//     c19  = { 0, 0, 0, 0 };
//     c20  = { 0, 0, 0, 0 };
//     c21  = { 0, 0, 0, 0 };
//     c22  = { 0, 0, 0, 0 };
//     c23  = { 0, 0, 0, 0 };
//
//   g_mWorldViewProjection
//     c24  = { 0, 0, 0, 0 };
//     c25  = { 0, 0, 0, 0 };
//     c26  = { 0, 0, 0, 0 };
//     c27  = { 0, 0, 0, 0 };
//
//   g_mWorld
//     c28  = { 0, 0, 0, 0 };
//     c29  = { 0, 0, 0, 0 };
//     c30  = { 0, 0, 0, 0 };
//
//   g_mWorldIT
//     c31  = { 0, 0, 0, 0 };
//     c32  = { 0, 0, 0, 0 };
//     c33  = { 0, 0, 0, 0 };
//
//   g_mViewInverse
//     c34  = { 0, 0, 0, 0 };
//     c35  = { 0, 0, 0, 0 };
//     c36  = { 0, 0, 0, 0 };
//
//   g_TexMatrix
//     c37  = { 1, 0, 0, 0 };
//     c38  = { 0, 1, 0, 0 };
//
//   LightDir_Dir0
//     c39  = { 1, -1, 1, 0 };
//
//   g_MatSpecularStrength
//     c40  = { 1, 0, 0, 0 };
//
//   g_MatSpecularPower
//     c41  = { 10, 0, 0, 0 };
//
//   g_MatDiffuseStrength
//     c42  = { 1, 0, 0, 0 };
//

    vs_3_0
    def c43, 1, 0, 3, 0
	def c200, 1.0, 90.0, 0.0625, 0.5
    dcl_position v0
    dcl_texcoord v1
    dcl_normal v2
	dcl_2d s0
	dcl_position o0
    dcl_color o1
	dcl_color1 o2
    dcl_texcoord o3
    mad r1, v0.xyzx, c43.xxxy, c43.yyyx
    dp4 r8.z, r1, c30
    mad r3.xyz, v1.xyxw, c43.xxyw, c43.yyxw
    dp3 o3.y, r3, c38
    dp4 r8.x, r1, c28
    dp4 r8.y, r1, c29
    mad r0, v2.xyzx, c43.xxxy, c43.yyyx
    dp4 r6.z, r0, c33
    dp4 r6.x, r0, c31
    dp4 r6.y, r0, c32
    mov r0.x, c34.w
    mov r0.y, c35.w
    mov r0.z, c36.w
    dp3 r2.x, r6, c39
    add r7.xyz, -r8, r0
    mov r0.xyz, c43.y
    mov r0.w, c43.y
    rep i0
      mul r2.w, r0.w, c43.z
      mova a0.w, r2.w
      add r5.xyz, -r8, c0[a0.w]
      dp3 r4.z, r5, r5
      rsq r2.w, r4.z
      mul r5.xyz, r5, r2.w
      dst r4.xy, r4.z, r2.w
      dp3 r5.x, r6, r5
      dp3 r4.x, c2[a0.w], r4
      rcp r2.w, r4.x
      max r3.w, r5.x, c43.y
      min r3.w, r3.w, c43.x
      max r2.w, r2.w, c43.y
      min r2.w, r2.w, c43.x
      mul r4.xyz, r3.w, c1[a0.w]
      mad r0.xyz, r4, r2.w, r0
      add r0.w, r0.w, c43.x
    endrep
    mov r4.xyz, r0
    dp3 r0.x, -c39, r6
    add r0.w, r0.x, r0.x
    nrm r5.xyz, r7
    mad r0.xyz, r6, -r0.w, -c39
    dp3 r2.y, r0, r5
    mov r2.zw, c41.x
    lit r0, r2
    mul r0.w, r0.y, c43.z
    min r0.w, r0.w, c43.x
    mul r0.w, r0.z, r0.w
    mul r0.w, r0.w, c40.x
    mad r0.w, r0.y, c42.x, r0.w
    add o1.xyz, r4, r0.w
    mad o2.x, r0.y, -c43.z, c43.x
    dp4 r10.x, r1, c24
    dp4 r10.y, r1, c25
    dp4 r10.z, r1, c26
    dp4 r10.w, r1, c27
	
	texldl r11, c200.z, s0	
	mul r11.x, r11.x, r11.y//c200.x
	add r10.x, r10.x, r11.x
	
	mov o0, r10
    dp3 o3.x, r3, c37

// approximately 61 instruction slots used
 