//Dead enemy blood waves to stereoize.
// ---- Created with 3Dmigoto v1.3.16 on Sun Oct  3 21:00:20 2021
//
//cbuffer vblock : register(b0)
//{
//  float4 modelmatrixx : packoffset(c0);
//  float4 modelmatrixy : packoffset(c1);
//  float4 modelmatrixz : packoffset(c2);
//  float4 particlevsparm0 : packoffset(c3);
//  float4 viewmatrixz : packoffset(c4);
//  float4 projectionmatrixz : packoffset(c5);
//  float4 mvpmatrixx : packoffset(c6);
//  float4 mvpmatrixy : packoffset(c7);
//  float4 mvpmatrixw : packoffset(c8);
//  float4 mvpmatrixz : packoffset(c9);
//  float4 vfxgenericparam4 : packoffset(c10);
//  float4 vfxgenericparam7 : packoffset(c11);
//  float4 vfxdynamicvpparam0 : packoffset(c12);
//  float4 vfxdynamicvpparam1 : packoffset(c13);
//  float4 globalvieworigin : packoffset(c14);
//  float4 fogdistanceparam : packoffset(c15);
//  float4 fogcolorpacked : packoffset(c16);
//  float4 vfxgenericparam5 : packoffset(c17);
//  float4 vfxgenericparam6 : packoffset(c18);
//  float4 vfxgenericparam10 : packoffset(c19);
//}
//
//
//
//// 3Dmigoto declarations
//#define cmp -
//Texture1D<float4> IniParams : register(t120);
//Texture2D<float4> StereoParams : register(t125);
//
//
//void main(
//  float4 v0 : POSITION0,
//  out float4 o0 : COLOR0,
//  out float4 o1 : TEXCOORD0,
//  out float4 o2 : TEXCOORD1,
//  out float4 o3 : TEXCOORD2,
//  out float4 o4 : TEXCOORD3,
//  out float4 o5 : TEXCOORD5,
//  out float4 o6 : TEXCOORD6,
//  out float4 o7 : SV_Position0)
//{
//  float4 r0,r1,r2,r3,r4;
//  uint4 bitmask, uiDest;
//  float4 fDest;
//
//  r0.x = dot(v0.xyzw, modelmatrixx.xyzw);
//  r0.y = dot(v0.xyzw, modelmatrixy.xyzw);
//  r0.z = dot(v0.xyzw, modelmatrixz.xyzw);
//  r1.x = cmp(particlevsparm0.x != 0.000000);
//  r0.w = 1;
//  r2.x = dot(r0.xyzw, viewmatrixz.xyzw);
//  r1.y = particlevsparm0.x + r2.x;
//  r1.y = r2.x * r1.y;
//  r1.y = particlevsparm0.x / r1.y;
//  r1.y = particlevsparm0.y * r1.y;
//  r1.z = cmp(r2.x == 0.000000);
//  r1.y = r1.z ? -0 : -r1.y;
//  r3.x = projectionmatrixz.z + r1.y;
//  r4.x = dot(r0.xyzw, mvpmatrixx.xyzw);
//  r4.y = dot(r0.xyzw, mvpmatrixy.xyzw);
//  r2.y = 1;
//  r3.y = projectionmatrixz.w;
//  r4.z = dot(r2.xy, r3.xy);
//  r4.w = dot(r0.xyzw, mvpmatrixw.xyzw);
//  r2.x = dot(v0.xyzw, mvpmatrixx.xyzw);
//  r2.y = dot(v0.xyzw, mvpmatrixy.xyzw);
//  r2.z = dot(v0.xyzw, mvpmatrixz.xyzw);
//  r2.w = dot(v0.xyzw, mvpmatrixw.xyzw);
//  o7.xyzw = r1.xxxx ? r4.xyzw : r2.xyzw;
//  r1.xyz = vfxgenericparam7.yyy * vfxgenericparam4.xyz;
//  r2.xyz = float3(6,6,6) * r1.xyz;
//  r0.w = cmp(0 < vfxgenericparam7.z);
//  r1.xyz = r1.xyz * float3(6,6,6) + float3(9.99999975e-06,9.99999975e-06,9.99999975e-06);
//  r1.xyz = max(float3(0,0,0), r1.xyz);
//  r1.xyz = log2(r1.xyz);
//  r1.xyz = float3(2.20000005,2.20000005,2.20000005) * r1.xyz;
//  r1.xyz = exp2(r1.xyz);
//  r1.xyz = r0.www ? r1.xyz : r2.xyz;
//  r0.w = cmp(0.899999976 < vfxdynamicvpparam0.z);
//  if (r0.w != 0) {
//    r0.w = max(r1.x, r1.y);
//    r0.w = max(r0.w, r1.z);
//    r1.w = cmp(0 < vfxdynamicvpparam0.y);
//    r2.x = cmp(vfxdynamicvpparam0.y < 1);
//    r1.w = r1.w ? r2.x : 0;
//    r2.x = cmp(r0.w >= vfxdynamicvpparam0.y);
//    r2.y = 1 + -vfxdynamicvpparam0.y;
//    r2.y = vfxdynamicvpparam0.x / r2.y;
//    r0.w = -vfxdynamicvpparam0.y + r0.w;
//    r0.w = r2.y * r0.w;
//    r0.w = r2.x ? r0.w : 0;
//    r0.w = r1.w ? r0.w : vfxdynamicvpparam0.x;
//    r1.xyz = r1.xyz * r0.www;
//  }
//  r0.w = max(r1.x, r1.y);
//  r0.w = max(r0.w, r1.z);
//  r1.w = cmp(0 < r0.w);
//  r2.xyz = r1.xyz / r0.www;
//  o0.xyz = r1.www ? r2.xyz : r1.xyz;
//  r1.x = cmp(0.899999976 < vfxdynamicvpparam1.x);
//  if (r1.x != 0) {
//    r1.x = cmp(fogdistanceparam.w == 1.000000);
//    r1.yz = globalvieworigin.xy;
//    r2.xy = -r1.yz + r0.xy;
//    r2.z = 0;
//    r1.yzw = -globalvieworigin.xyz + r0.xyz;
//    r1.xyz = r1.xxx ? r2.xyz : r1.yzw;
//    r1.x = dot(r1.xyz, r1.xyz);
//    r1.x = sqrt(r1.x);
//    r1.x = -fogdistanceparam.x + r1.x;
//    r1.x = max(0, r1.x);
//    r1.x = min(fogdistanceparam.y, r1.x);
//    r1.x = fogdistanceparam.z * r1.x;
//    r1.x = exp2(-r1.x);
//    r1.x = min(1, r1.x);
//    r1.x = 1 + -r1.x;
//    r1.x = min(fogcolorpacked.w, r1.x);
//    o6.w = max(0, r1.x);
//    o6.xyz = fogcolorpacked.xyz;
//  } else {
//    o6.xyzw = float4(1,1,1,0);
//  }
//  r1.xyz = vfxgenericparam5.yzx * float3(2,2,2) + float3(-1,-1,-1);
//  r1.w = dot(r1.xyz, r1.xyz);
//  r1.w = rsqrt(r1.w);
//  r1.xyz = r1.xyz * r1.www;
//  r2.xyz = vfxgenericparam6.zxy * float3(2,2,2) + float3(-1,-1,-1);
//  r1.w = dot(r2.xyz, r2.xyz);
//  r1.w = rsqrt(r1.w);
//  r2.xyz = r2.xyz * r1.www;
//  r1.w = cmp(vfxgenericparam6.w == 0.000000);
//  r3.xyz = r2.zxy * r1.yzx;
//  r4.xyz = r2.xyz * r1.xyz;
//  r4.xyz = r2.zxy * r1.yzx + -r4.xyz;
//  r3.xyz = r2.xyz * r1.xyz + -r3.xyz;
//  r3.xyz = r1.www ? r4.xyz : r3.xyz;
//  r1.w = dot(r3.xyz, r3.xyz);
//  r1.w = rsqrt(r1.w);
//  r3.xyz = r3.xyz * r1.www;
//  o1.xyz = -globalvieworigin.xyz + r0.xyz;
//  o0.w = vfxgenericparam4.w;
//  o1.w = r0.w;
//  o2.x = r2.y;
//  o2.y = r3.x;
//  o2.z = r1.z;
//  o2.w = vfxgenericparam7.x;
//  o3.x = r2.z;
//  o3.y = r3.y;
//  o3.z = r1.x;
//  o3.w = vfxgenericparam7.w * 0.0078125 + 0.00390625;
//  o4.x = r2.x;
//  o4.y = r3.z;
//  o4.z = r1.y;
//  o4.w = 0;
//  o5.xyzw = vfxgenericparam10.xyzw;
//  return;
//}
//
///*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384
//
//   using 3Dmigoto v1.3.16 on Sun Oct  3 21:00:20 2021
//
//
// Buffer Definitions:
//
// cbuffer vblock
// {
//
//   float4 modelmatrixx;               // Offset:    0 Size:    16
//   float4 modelmatrixy;               // Offset:   16 Size:    16
//   float4 modelmatrixz;               // Offset:   32 Size:    16
//   float4 particlevsparm0;            // Offset:   48 Size:    16
//   float4 viewmatrixz;                // Offset:   64 Size:    16
//   float4 projectionmatrixz;          // Offset:   80 Size:    16
//   float4 mvpmatrixx;                 // Offset:   96 Size:    16
//   float4 mvpmatrixy;                 // Offset:  112 Size:    16
//   float4 mvpmatrixw;                 // Offset:  128 Size:    16
//   float4 mvpmatrixz;                 // Offset:  144 Size:    16
//   float4 vfxgenericparam4;           // Offset:  160 Size:    16
//   float4 vfxgenericparam7;           // Offset:  176 Size:    16
//   float4 vfxdynamicvpparam0;         // Offset:  192 Size:    16
//   float4 vfxdynamicvpparam1;         // Offset:  208 Size:    16
//   float4 globalvieworigin;           // Offset:  224 Size:    16
//   float4 fogdistanceparam;           // Offset:  240 Size:    16
//   float4 fogcolorpacked;             // Offset:  256 Size:    16
//   float4 vfxgenericparam5;           // Offset:  272 Size:    16
//   float4 vfxgenericparam6;           // Offset:  288 Size:    16
//   float4 vfxgenericparam10;          // Offset:  304 Size:    16
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// vblock                            cbuffer      NA          NA    0        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xyzw        0     NONE   float   xyzw
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// COLOR                    0   xyzw        0     NONE   float   xyzw
// TEXCOORD                 0   xyzw        1     NONE   float   xyzw
// TEXCOORD                 1   xyzw        2     NONE   float   xyzw
// TEXCOORD                 2   xyzw        3     NONE   float   xyzw
// TEXCOORD                 3   xyzw        4     NONE   float   xyzw
// TEXCOORD                 5   xyzw        5     NONE   float   xyzw
// TEXCOORD                 6   xyzw        6     NONE   float   xyzw
// SV_Position              0   xyzw        7      POS   float   xyzw
//
vs_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[20], immediateIndexed
dcl_constantbuffer cb12[1], immediateIndexed
dcl_input v0.xyzw
dcl_output o0.xyzw
dcl_output o1.xyzw
dcl_output o2.xyzw
dcl_output o3.xyzw
dcl_output o4.xyzw
dcl_output o5.xyzw
dcl_output o6.xyzw
dcl_output_siv o7.xyzw, position
dcl_temps 29
dcl_resource_texture2d (float,float,float,float) t125
ld_indexable(texture2d)(float,float,float,float) r14.xyzw, l(0, 0, 0, 0), t125.xyzw
dp4 r0.x, v0.xyzw, cb0[0].xyzw
dp4 r0.y, v0.xyzw, cb0[1].xyzw
dp4 r0.z, v0.xyzw, cb0[2].xyzw
ne r1.x, cb0[3].x, l(0.000000)
mov r0.w, l(1.000000)
dp4 r2.x, r0.xyzw, cb0[4].xyzw
add r1.y, r2.x, cb0[3].x
mul r1.y, r1.y, r2.x
div r1.y, cb0[3].x, r1.y
mul r1.y, r1.y, cb0[3].y
eq r1.z, r2.x, l(0.000000)
movc r1.y, r1.z, l(-0.000000), -r1.y
add r3.x, r1.y, cb0[5].z
dp4 r4.x, r0.xyzw, cb0[6].xyzw
dp4 r4.y, r0.xyzw, cb0[7].xyzw
mov r2.y, l(1.000000)
mov r3.y, cb0[5].w
dp2 r4.z, r2.xyxx, r3.xyxx
dp4 r4.w, r0.xyzw, cb0[8].xyzw
dp4 r2.x, v0.xyzw, cb0[6].xyzw
dp4 r2.y, v0.xyzw, cb0[7].xyzw
dp4 r2.z, v0.xyzw, cb0[9].xyzw
dp4 r2.w, v0.xyzw, cb0[8].xyzw
movc r17.xyzw, r1.xxxx, r4.xyzw, r2.xyzw
mul r1.xyz, cb0[10].xyzx, cb0[11].yyyy
mul r2.xyz, r1.xyzx, l(6.000000, 6.000000, 6.000000, 0.000000)
lt r0.w, l(0.000000), cb0[11].z
mad r1.xyz, r1.xyzx, l(6.000000, 6.000000, 6.000000, 0.000000), l(0.000010, 0.000010, 0.000010, 0.000000)
max r1.xyz, r1.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
log r1.xyz, r1.xyzx
mul r1.xyz, r1.xyzx, l(2.200000, 2.200000, 2.200000, 0.000000)
exp r1.xyz, r1.xyzx
movc r1.xyz, r0.wwww, r1.xyzx, r2.xyzx
lt r0.w, l(0.900000), cb0[12].z
if_nz r0.w
  max r0.w, r1.y, r1.x
  max r0.w, r1.z, r0.w
  lt r1.w, l(0.000000), cb0[12].y
  lt r2.x, cb0[12].y, l(1.000000)
  and r1.w, r1.w, r2.x
  ge r2.x, r0.w, cb0[12].y
  add r2.y, -cb0[12].y, l(1.000000)
  div r2.y, cb0[12].x, r2.y
  add r0.w, r0.w, -cb0[12].y
  mul r0.w, r0.w, r2.y
  and r0.w, r0.w, r2.x
  movc r0.w, r1.w, r0.w, cb0[12].x
  mul r1.xyz, r0.wwww, r1.xyzx
endif
max r0.w, r1.y, r1.x
max r0.w, r1.z, r0.w
lt r1.w, l(0.000000), r0.w
div r2.xyz, r1.xyzx, r0.wwww
movc o0.xyz, r1.wwww, r2.xyzx, r1.xyzx
lt r1.x, l(0.900000), cb0[13].x
if_nz r1.x
  eq r1.x, cb0[15].w, l(1.000000)
  mov r1.yz, cb0[14].xxyx
  add r2.xy, r0.xyxx, -r1.yzyy
  mov r2.z, l(0)
  add r1.yzw, r0.xxyz, -cb0[14].xxyz
  movc r1.xyz, r1.xxxx, r2.xyzx, r1.yzwy
  dp3 r1.x, r1.xyzx, r1.xyzx
  sqrt r1.x, r1.x
  add r1.x, r1.x, -cb0[15].x
  max r1.x, r1.x, l(0.000000)
  min r1.x, r1.x, cb0[15].y
  mul r1.x, r1.x, cb0[15].z
  exp r1.x, -r1.x
  min r1.x, r1.x, l(1.000000)
  add r1.x, -r1.x, l(1.000000)
  min r1.x, r1.x, cb0[16].w
  max o6.w, r1.x, l(0.000000)
  mov o6.xyz, cb0[16].xyzx
else
  mov o6.xyzw, l(1.000000,1.000000,1.000000,0)
endif
mad r1.xyz, cb0[17].yzxy, l(2.000000, 2.000000, 2.000000, 0.000000), l(-1.000000, -1.000000, -1.000000, 0.000000)
dp3 r1.w, r1.xyzx, r1.xyzx
rsq r1.w, r1.w
mul r1.xyz, r1.wwww, r1.xyzx
mad r2.xyz, cb0[18].zxyz, l(2.000000, 2.000000, 2.000000, 0.000000), l(-1.000000, -1.000000, -1.000000, 0.000000)
dp3 r1.w, r2.xyzx, r2.xyzx
rsq r1.w, r1.w
mul r2.xyz, r1.wwww, r2.xyzx
eq r1.w, cb0[18].w, l(0.000000)
mul r3.xyz, r1.yzxy, r2.zxyz
mul r4.xyz, r1.xyzx, r2.xyzx
mad r4.xyz, r2.zxyz, r1.yzxy, -r4.xyzx
mad r3.xyz, r2.xyzx, r1.xyzx, -r3.xyzx
movc r3.xyz, r1.wwww, r4.xyzx, r3.xyzx
dp3 r1.w, r3.xyzx, r3.xyzx
rsq r1.w, r1.w
mul r3.xyz, r1.wwww, r3.xyzx
add o1.xyz, r0.xyzx, -cb0[14].xyzx
mov o0.w, cb0[10].w
mov o1.w, r0.w
mov o2.x, r2.y
mov o2.y, r3.x
mov o2.z, r1.z
mov o2.w, cb0[11].x
mov o3.x, r2.z
mov o3.y, r3.y
mov o3.z, r1.x
mad o3.w, cb0[11].w, l(0.00781250000), l(0.00390625000)
mov o4.x, r2.x
mov o4.y, r3.z
mov o4.z, r1.y
mov o4.w, l(0)
mov o5.xyzw, cb0[19].xyzw

add r14.w, r17.w, -r14.y
mad r17.x, r14.x, r14.w, r17.x

mov o7.xyzw, r17.xyzw
ret
// Approximately 111 instruction slots used
