//fire particles
cbuffer cb_object1 : register(b0)
{
  float4x4 u_mvMatrix : packoffset(c0);
  float4x4 u_mvpMatrix : packoffset(c4);
  float4x4 u_mlpMatrix : packoffset(c8);
  float4 u_tex0ScaleOffset : packoffset(c12);
}

cbuffer cb_object2 : register(b1)
{
  float2 u_depthRange : packoffset(c0);
  float3 u_lightPosition : packoffset(c1);
  float4 u_diffuseColor : packoffset(c2);
  float4 u_fogColor : packoffset(c3);
  float u_fogMinDistance : packoffset(c4);
}

Texture2D<float4> StereoParams : register(t125);
Texture1D<float4> IniParams : register(t120);

void main(
  float4 v0 : POSITION0,
  float3 v1 : NORMAL0,
  float2 v2 : TEXCOORD0,
  out float4 o0 : SV_Position0,
  out float3 o1 : COLOR0,
  out float3 o2 : COLOR1,
  out float3 o3 : COLOR2,
  out float2 o4 : TEXCOORD0,
  out float4 o5 : COLOR3)
{
  float4 r0,r1,r2;
  uint4 bitmask, uiDest;
  float4 fDest;

  r0.x = dot(v0.xyzw, u_mvpMatrix._m00_m10_m20_m30);
  r0.y = dot(v0.xyzw, u_mvpMatrix._m01_m11_m21_m31);
  r0.z = dot(v0.xyzw, u_mvpMatrix._m02_m12_m22_m32);
  r0.w = dot(v0.xyzw, u_mvpMatrix._m03_m13_m23_m33);
  o0.xyzw = r0.xyzw;
  o1.x = saturate(dot(r0.xyzw, u_mlpMatrix._m00_m10_m20_m30));
  o1.y = saturate(dot(r0.xyzw, u_mlpMatrix._m01_m11_m21_m31));
  o1.z = saturate(dot(r0.xyzw, u_mlpMatrix._m02_m12_m22_m32));
  r0.x = dot(v1.xyz, u_mvMatrix._m00_m10_m20);
  r0.y = dot(v1.xyz, u_mvMatrix._m01_m11_m21);
  r0.z = dot(v1.xyz, u_mvMatrix._m02_m12_m22);
  r0.w = dot(r0.xyz, r0.xyz);
  r0.w = rsqrt(r0.w);
  r0.xyz = r0.xyz * r0.www;
  r1.x = dot(v0.xyzw, u_mvMatrix._m00_m10_m20_m30);
  r1.y = dot(v0.xyzw, u_mvMatrix._m01_m11_m21_m31);
  r1.z = dot(v0.xyzw, u_mvMatrix._m02_m12_m22_m32);
  r0.w = dot(r1.xyz, r1.xyz);
  r0.w = sqrt(r0.w);
  r1.xyz = -r1.xyz / r0.www;
  r2.xyz = u_lightPosition.xyz + r1.xyz;
  r1.x = dot(r1.xyz, -u_lightPosition.xyz);
  r1.x = max(r1.x, 0.000000000e+000);
  r1.x = r1.x * r1.x;
  r1.x = r1.x * r1.x;
  r1.x = r1.x * r1.x;
  o5.xyz = u_diffuseColor.xyz * r1.xxx + u_fogColor.xyz;
  r1.x = dot(r2.xyz, r2.xyz);
  r1.x = rsqrt(r1.x);
  r1.xyz = r2.xyz * r1.xxx;
  r1.x = saturate(dot(r0.xyz, r1.xyz));
  r0.x = saturate(dot(r0.xyz, u_lightPosition.xyz));
  r0.xyz = u_diffuseColor.xyz * r0.xxx;
  r1.x = log2(r1.x);
  r1.x = 1.600000000e+001 * r1.x;
  r1.x = exp2(r1.x);
  o2.xyz = r1.xxx * r0.xyz;
  o3.xyz = r0.xyz;
  o4.xy = v2.xy * u_tex0ScaleOffset.xy + u_tex0ScaleOffset.zw;
  r0.x = -u_depthRange.y + r0.w;
  r0.y = -u_fogMinDistance + r0.w;
  r0.y = max(r0.y, 0.000000000e+000);
  r0.y = -u_fogColor.w * r0.y;
  r0.y = exp2(r0.y);
  r0.x = 5.000000000e+000 + r0.x;
  r0.x = max(r0.x, 0.000000000e+000);
  r0.x = min(r0.x, 5.000000000e+000);
  r0.x = -r0.x * 2.000000030e-001 + 1.000000000e+000;
  o5.w = r0.y * r0.x;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
//
//
// Buffer Definitions: 
//
// cbuffer cb_object1
// {
//
//   float4x4 u_mvMatrix;               // Offset:    0 Size:    64
//   float4x4 u_mvpMatrix;              // Offset:   64 Size:    64
//   float4x4 u_mlpMatrix;              // Offset:  128 Size:    64
//   float4 u_tex0ScaleOffset;          // Offset:  192 Size:    16
//
// }
//
// cbuffer cb_object2
// {
//
//   float2 u_depthRange;               // Offset:    0 Size:     8
//   float3 u_lightPosition;            // Offset:   16 Size:    12
//   float4 u_diffuseColor;             // Offset:   32 Size:    16
//   float4 u_fogColor;                 // Offset:   48 Size:    16
//   float u_fogMinDistance;            // Offset:   64 Size:     4
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// cb_object1                        cbuffer      NA          NA    0        1
// cb_object2                        cbuffer      NA          NA    1        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xyzw        0     NONE   float   xyzw
// NORMAL                   0   xyz         1     NONE   float   xyz 
// TEXCOORD                 0   xy          2     NONE   float   xy  
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position              0   xyzw        0      POS   float   xyzw
// COLOR                    0   xyz         1     NONE   float   xyz 
// COLOR                    1   xyz         2     NONE   float   xyz 
// COLOR                    2   xyz         3     NONE   float   xyz 
// TEXCOORD                 0   xy          4     NONE   float   xy  
// COLOR                    3   xyzw        5     NONE   float   xyzw
//
vs_4_0
dcl_constantbuffer cb0[13], immediateIndexed
dcl_constantbuffer cb1[5], immediateIndexed
dcl_input v0.xyzw
dcl_input v1.xyz
dcl_input v2.xy
dcl_output_siv o0.xyzw, position
dcl_output o1.xyz
dcl_output o2.xyz
dcl_output o3.xyz
dcl_output o4.xy
dcl_output o5.xyzw
dcl_temps 3
dp4 r0.x, v0.xyzw, cb0[4].xyzw
dp4 r0.y, v0.xyzw, cb0[5].xyzw
dp4 r0.z, v0.xyzw, cb0[6].xyzw
dp4 r0.w, v0.xyzw, cb0[7].xyzw
mov o0.xyzw, r0.xyzw
dp4_sat o1.x, r0.xyzw, cb0[8].xyzw
dp4_sat o1.y, r0.xyzw, cb0[9].xyzw
dp4_sat o1.z, r0.xyzw, cb0[10].xyzw
dp3 r0.x, v1.xyzx, cb0[0].xyzx
dp3 r0.y, v1.xyzx, cb0[1].xyzx
dp3 r0.z, v1.xyzx, cb0[2].xyzx
dp3 r0.w, r0.xyzx, r0.xyzx
rsq r0.w, r0.w
mul r0.xyz, r0.wwww, r0.xyzx
dp4 r1.x, v0.xyzw, cb0[0].xyzw
dp4 r1.y, v0.xyzw, cb0[1].xyzw
dp4 r1.z, v0.xyzw, cb0[2].xyzw
dp3 r0.w, r1.xyzx, r1.xyzx
sqrt r0.w, r0.w
div r1.xyz, -r1.xyzx, r0.wwww
add r2.xyz, r1.xyzx, cb1[1].xyzx
dp3 r1.x, r1.xyzx, -cb1[1].xyzx
max r1.x, r1.x, l(0.000000)
mul r1.x, r1.x, r1.x
mul r1.x, r1.x, r1.x
mul r1.x, r1.x, r1.x
mad o5.xyz, cb1[2].xyzx, r1.xxxx, cb1[3].xyzx
dp3 r1.x, r2.xyzx, r2.xyzx
rsq r1.x, r1.x
mul r1.xyz, r1.xxxx, r2.xyzx
dp3_sat r1.x, r0.xyzx, r1.xyzx
dp3_sat r0.x, r0.xyzx, cb1[1].xyzx
mul r0.xyz, r0.xxxx, cb1[2].xyzx
log r1.x, r1.x
mul r1.x, r1.x, l(16.000000)
exp r1.x, r1.x
mul o2.xyz, r0.xyzx, r1.xxxx
mov o3.xyz, r0.xyzx
mad o4.xy, v2.xyxx, cb0[12].xyxx, cb0[12].zwzz
add r0.x, r0.w, -cb1[0].y
add r0.y, r0.w, -cb1[4].x
max r0.y, r0.y, l(0.000000)
mul r0.y, r0.y, -cb1[3].w
exp r0.y, r0.y
add r0.x, r0.x, l(5.000000)
max r0.x, r0.x, l(0.000000)
min r0.x, r0.x, l(5.000000)
mad r0.x, -r0.x, l(0.200000), l(1.000000)
mul o5.w, r0.x, r0.y
ret 
// Approximately 50 instruction slots used

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
 