//DMC3 main menu HUD (also Dante. Update).
// ---- Created with 3Dmigoto v1.3.7 on Mon Apr 02 13:17:21 2018

cbuffer VS_CONSTANT_BUFFER : register(b0)
{

  struct
  {
    float4x4 Wc;
    float4x4 Ws;
  } matrices : packoffset(c0);


  struct
  {
    float4x4 Lc;
    float4x4 Lv;
  } light : packoffset(c8);


  struct
  {
    float4 base;
    float4 specular;
    float4 alpha;
  } colors : packoffset(c16);

  float4 screenScale : packoffset(c19);
  float4 screenOffset : packoffset(c20);
  float2 strow : packoffset(c21);
  float3 fogCol : packoffset(c22);
  float4 extraMatrices[176] : packoffset(c23);
  float4 uvScale : packoffset(c199);
}



// 3Dmigoto declarations
#define cmp -
Texture1D<float4> IniParams : register(t120);
Texture2D<float4> StereoParams : register(t125);


void main(
  float3 v0 : POSITION0,
  float3 v1 : NORMAL0,
  float2 v2 : TEXCOORD0,
  uint4 v3 : BLENDINDICES0,
  float v4 : PSIZE0,
  out float4 o0 : SV_POSITION0,
  out float2 o1 : TEXCOORD0,
  out float4 o2 : COLOR1,
  out float4 o3 : COLOR0)
{
  float4 r0,r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11;
  uint4 bitmask, uiDest;
  float4 fDest;

  float4 stereo = StereoParams.Load(0);
  float4 iniparams = IniParams.Load(0);
  
  r0.x = v3.y;
  r0.y = 1;
  r0.y = (int)r0.y + (int)r0.x;
  r0.z = 2;
  r0.z = (int)r0.z + (int)r0.x;
  r0.w = 3;
  r0.w = (int)r0.w + (int)r0.x;
  r1.x = extraMatrices[r0.x].x;
  r2.x = extraMatrices[r0.x].y;
  r3.x = extraMatrices[r0.x].z;
  r4.x = extraMatrices[r0.x].w;
  r1.y = extraMatrices[r0.y].x;
  r2.y = extraMatrices[r0.y].y;
  r3.y = extraMatrices[r0.y].z;
  r4.y = extraMatrices[r0.y].w;
  r1.z = extraMatrices[r0.z].x;
  r2.z = extraMatrices[r0.z].y;
  r3.z = extraMatrices[r0.z].z;
  r4.z = extraMatrices[r0.z].w;
  r5.xyzw = extraMatrices[r0.w].xyzw;
  r6.x = v4.x;
  r6.x = 0.03125 * r6.x;
  r6.y = floor(r6.x);
  r6.z = -r6.y;
  r6.x = r6.x + r6.z;
  r6.x = 1.03225803 * r6.x;
  r6.z = 0;
  r6.z = cmp(r6.z < r6.y);
  if (r6.z != 0) {
    r6.y = 0.03125 * r6.y;
    r6.z = floor(r6.y);
    r6.w = -r6.z;
    r6.y = r6.y + r6.w;
    r6.y = 1.03225803 * r6.y;
    r6.z = 0.03125 * r6.z;
    r6.w = floor(r6.z);
    r6.w = -r6.w;
    r6.z = r6.z + r6.w;
    r6.z = 1.03225803 * r6.z;
    r6.w = v3.z;
    r7.x = v3.w;
    r8.xyzw = extraMatrices[r0.x].xyzw * r6.xxxx;
    r9.xyzw = extraMatrices[r6.w].xyzw * r6.yyyy;
    r8.xyzw = r9.xyzw + r8.xyzw;
    r9.xyzw = extraMatrices[r7.x].xyzw * r6.zzzz;
    r8.xyzw = r9.xyzw + r8.xyzw;
    r9.xyzw = extraMatrices[r0.y].xyzw * r6.xxxx;
    r0.x = 1;
    r0.x = (int)r0.x + (int)r6.w;
    r10.xyzw = extraMatrices[r0.x].xyzw * r6.yyyy;
    r9.xyzw = r10.xyzw + r9.xyzw;
    r0.x = 1;
    r0.x = (int)r0.x + (int)r7.x;
    r10.xyzw = extraMatrices[r0.x].xyzw * r6.zzzz;
    r9.xyzw = r10.xyzw + r9.xyzw;
    r10.xyzw = extraMatrices[r0.z].xyzw * r6.xxxx;
    r0.x = 2;
    r0.x = (int)r0.x + (int)r6.w;
    r11.xyzw = extraMatrices[r0.x].xyzw * r6.yyyy;
    r10.xyzw = r11.xyzw + r10.xyzw;
    r0.x = 2;
    r0.x = (int)r0.x + (int)r7.x;
    r11.xyzw = extraMatrices[r0.x].xyzw * r6.zzzz;
    r10.xyzw = r11.xyzw + r10.xyzw;
    r0.xyzw = extraMatrices[r0.w].xyzw * r6.xxxx;
    r6.x = 3;
    r6.x = (int)r6.x + (int)r6.w;
    r11.xyzw = extraMatrices[r6.x].xyzw * r6.yyyy;
    r0.xyzw = r11.xyzw + r0.xyzw;
    r6.x = 3;
    r6.x = (int)r6.x + (int)r7.x;
    r6.xyzw = extraMatrices[r6.x].xyzw * r6.zzzz;
    r4.xyzw = r6.xyzw + r0.xyzw;
    r1.x = r8.x;
    r1.y = r9.x;
    r1.z = r10.x;
    r1.w = r4.x;
    r2.x = r8.y;
    r2.y = r9.y;
    r2.z = r10.y;
    r2.w = r4.y;
    r3.x = r8.z;
    r3.y = r9.z;
    r3.z = r10.z;
    r3.w = r4.z;
    r4.x = r8.w;
    r4.y = r9.w;
    r4.z = r10.w;
  } else {
    r1.w = r5.x;
    r1.xyzw = r1.xyzw;
    r2.w = r5.y;
    r2.xyzw = r2.xyzw;
    r3.w = r5.z;
    r3.xyzw = r3.xyzw;
    r4.w = r5.w;
    r4.xyzw = r4.xyzw;
  }
  r0.xyz = v0.xyz;
  r0.w = 1;
  r5.x = dot(r0.xyzw, r1.xyzw);
  r5.y = dot(r0.xyzw, r2.xyzw);
  r5.z = dot(r0.xyzw, r3.xyzw);
  r0.x = dot(r0.xyzw, r4.xyzw);
  r4.xyz = v1.xyz;
  r4.w = 0;
  r0.y = dot(r4.xyzw, r1.xyzw);
  r0.z = dot(r4.xyzw, r2.xyzw);
  r0.w = dot(r4.xyzw, r3.xyzw);
  r1.xyzw = matrices.Ws._m00_m10_m20_m30 * r5.xxxx;
  r2.xyzw = matrices.Ws._m01_m11_m21_m31 * r5.yyyy;
  r1.xyzw = r2.xyzw + r1.xyzw;
  r2.xyzw = matrices.Ws._m02_m12_m22_m32 * r5.zzzz;
  r1.xyzw = r2.xyzw + r1.xyzw;
  r2.xyzw = matrices.Ws._m03_m13_m23_m33 * r0.xxxx;
  r1.xyzw = r2.xyzw + r1.xyzw;
  r2.xyzw = light.Lv._m00_m10_m20_m30 * r0.yyyy;
  r3.xyzw = light.Lv._m01_m11_m21_m31 * r0.zzzz;
  r2.xyzw = r3.xyzw + r2.xyzw;
  r0.xyzw = light.Lv._m02_m12_m22_m32 * r0.wwww;
  r0.xyzw = r2.xyzw + r0.xyzw;
  r2.xyzw = float4(1,1,1,1) * light.Lv._m03_m13_m23_m33;
  r0.xyzw = r2.xyzw + r0.xyzw;
  r2.xyzw = int4(0,0,0,0);
  r0.xyzw = max(r2.xyzw, r0.xyzw);
  r2.xyz = light.Lc._m00_m10_m20 * r0.xxx;
  r3.xyz = light.Lc._m01_m11_m21 * r0.yyy;
  r2.xyz = r3.xyz + r2.xyz;
  r0.xyz = light.Lc._m02_m12_m22 * r0.zzz;
  r0.xyz = r2.xyz + r0.xyz;
  r2.xyz = light.Lc._m03_m13_m23 * r0.www;
  r0.xyz = r2.xyz + r0.xyz;
  r0.xyz = r0.xyz / float3(128,128,128);
  r0.xyz = colors.base.xyz * r0.xyz;
  r0.w = colors.alpha.w;
  r2.xy = strow.xy + v2.xy;
  r2.xy = float2(0.000244140625,0.000244140625) * r2.xy;
  r2.xy = uvScale.xy * r2.xy;
  r3.xyzw = screenScale.xyzw * r1.xyzw;
  r1.xyzw = screenOffset.xyzw * r1.wwww;
  r1.xyzw = r3.xyzw + r1.xyzw;
  r3.xyz = fogCol.xyz;
  r3.w = colors.base.w;
  r1.y = -r1.y;
  r0.xyzw = max(float4(0,0,0,0), r0.xyzw);
  r0.xyzw = min(float4(1,1,1,1), r0.xyzw);
  r3.xyzw = max(float4(0,0,0,0), r3.xyzw);
  r3.xyzw = min(float4(1,1,1,1), r3.xyzw);
  o0.xzw = r1.xzw;
  o0.y = r1.y;
  if (r1.z<0.00001 && r1.z>-0.00001)
  {
	o0.x+=stereo.x*iniparams.x;
	o0.x=o0.x*iniparams.y;
  }
  o2.xyzw = r3.xyzw;
  o3.xyzw = r0.xyzw;
  o1.xy = r2.xy;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384
//
//   using 3Dmigoto v1.3.7 on Mon Apr 02 13:17:21 2018
//
//
// Buffer Definitions:
//
// cbuffer VS_CONSTANT_BUFFER
// {
//
//   struct MDL_GLOBAL_MAT
//   {
//
//       float4x4 Wc;                   // Offset:    0
//       float4x4 Ws;                   // Offset:   64
//
//   } matrices;                        // Offset:    0 Size:   128
//
//   struct MDL_LIGHT_MAT
//   {
//
//       float4x4 Lc;                   // Offset:  128
//       float4x4 Lv;                   // Offset:  192
//
//   } light;                           // Offset:  128 Size:   128
//
//   struct MDL_PARTS_COLOR_PKT
//   {
//
//       float4 base;                   // Offset:  256
//       float4 specular;               // Offset:  272
//       float4 alpha;                  // Offset:  288
//
//   } colors;                          // Offset:  256 Size:    48
//   float4 screenScale;                // Offset:  304 Size:    16
//   float4 screenOffset;               // Offset:  320 Size:    16
//   float2 strow;                      // Offset:  336 Size:     8
//   float3 fogCol;                     // Offset:  352 Size:    12
//   float4 extraMatrices[176];         // Offset:  368 Size:  2816
//   float4 uvScale;                    // Offset: 3184 Size:    16
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// VS_CONSTANT_BUFFER                cbuffer      NA          NA    0        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xyz         0     NONE   float   xyz
// NORMAL                   0   xyz         1     NONE   float   xyz
// TEXCOORD                 0   xy          2     NONE   float   xy
// BLENDINDICES             0   xyzw        3     NONE    uint    yzw
// PSIZE                    0   x           4     NONE   float   x
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float   xyzw
// TEXCOORD                 0   xy          1     NONE   float   xy
// COLOR                    1   xyzw        2     NONE   float   xyzw
// COLOR                    0   xyzw        3     NONE   float   xyzw
//
vs_5_0
dcl_globalFlags refactoringAllowed | skipOptimization
dcl_constantbuffer cb0[200], dynamicIndexed
dcl_input v0.xyz
dcl_input v1.xyz
dcl_input v2.xy
dcl_input v3.yzw
dcl_input v4.x
dcl_output_siv o0.xyzw, position
dcl_output o1.xy
dcl_output o2.xyzw
dcl_output o3.xyzw
dcl_temps 12
//
// Initial variable locations:
//   v0.x <- vi.position.x; v0.y <- vi.position.y; v0.z <- vi.position.z;
//   v1.x <- vi.normal.x; v1.y <- vi.normal.y; v1.z <- vi.normal.z;
//   v2.x <- vi.tex0.x; v2.y <- vi.tex0.y;
//   v3.x <- vi.matIndex.x; v3.y <- vi.matIndex.y; v3.z <- vi.matIndex.z; v3.w <- vi.matIndex.w;
//   v4.x <- vi.flags;
//   o3.x <- <main return value>.oColor.x; o3.y <- <main return value>.oColor.y; o3.z <- <main return value>.oColor.z; o3.w <- <main return value>.oColor.w;
//   o2.x <- <main return value>.oFogCol.x; o2.y <- <main return value>.oFogCol.y; o2.z <- <main return value>.oFogCol.z; o2.w <- <main return value>.oFogCol.w;
//   o1.x <- <main return value>.oTexCoord.x; o1.y <- <main return value>.oTexCoord.y;
//   o0.x <- <main return value>.oPosition.x; o0.y <- <main return value>.oPosition.y; o0.z <- <main return value>.oPosition.z; o0.w <- <main return value>.oPosition.w
//
#line 46 "C:\dev\dmc\dmc3\code\dmc3\source\dmc3nb\shaders\hlsl\vs\DMC3_MOD.hlsl"
mov r0.x, v3.y  // r0.x <- matIndxY
mov r0.y, l(1)
iadd r0.y, r0.y, r0.x
mov r0.z, l(2)
iadd r0.z, r0.z, r0.x
mov r0.w, l(3)
iadd r0.w, r0.w, r0.x
mov r1.x, cb0[r0.x + 23].x  // r1.x <- bmat1._m00
mov r2.x, cb0[r0.x + 23].y  // r2.x <- bmat1._m01
mov r3.x, cb0[r0.x + 23].z  // r3.x <- bmat1._m02
mov r4.x, cb0[r0.x + 23].w  // r4.x <- bmat1._m03
mov r1.y, cb0[r0.y + 23].x  // r1.y <- bmat1._m10
mov r2.y, cb0[r0.y + 23].y  // r2.y <- bmat1._m11
mov r3.y, cb0[r0.y + 23].z  // r3.y <- bmat1._m12
mov r4.y, cb0[r0.y + 23].w  // r4.y <- bmat1._m13
mov r1.z, cb0[r0.z + 23].x  // r1.z <- bmat1._m20
mov r2.z, cb0[r0.z + 23].y  // r2.z <- bmat1._m21
mov r3.z, cb0[r0.z + 23].z  // r3.z <- bmat1._m22
mov r4.z, cb0[r0.z + 23].w  // r4.z <- bmat1._m23
mov r5.xyzw, cb0[r0.w + 23].xyzw  // r5.x <- bmat1._m30; r5.y <- bmat1._m31; r5.z <- bmat1._m32; r5.w <- bmat1._m33

#line 52
mov r6.x, v4.x  // r6.x <- w3
mul r6.x, r6.x, l(0.031250)  // r6.x <- weightVal
round_ni r6.y, r6.x  // r6.y <- w3
mov r6.z, -r6.y
add r6.x, r6.z, r6.x
mul r6.x, r6.x, l(1.032258)  // r6.x <- w1
itof r6.z, l(0)
lt r6.z, r6.z, r6.y
if_nz r6.z
  mul r6.y, r6.y, l(0.031250)  // r6.y <- weightVal
  round_ni r6.z, r6.y  // r6.z <- w3
  mov r6.w, -r6.z
  add r6.y, r6.w, r6.y
  mul r6.y, r6.y, l(1.032258)  // r6.y <- w2
  mul r6.z, r6.z, l(0.031250)  // r6.z <- weightVal

#line 63
  round_ni r6.w, r6.z
  mov r6.w, -r6.w
  add r6.z, r6.w, r6.z
  mul r6.z, r6.z, l(1.032258)  // r6.z <- w3
  mov r6.w, v3.z  // r6.w <- matIndxZ
  mov r7.x, v3.w  // r7.x <- matIndxW
  mul r8.xyzw, r6.xxxx, cb0[r0.x + 23].xyzw
  mul r9.xyzw, r6.yyyy, cb0[r6.w + 23].xyzw
  add r8.xyzw, r8.xyzw, r9.xyzw
  mul r9.xyzw, r6.zzzz, cb0[r7.x + 23].xyzw
  add r8.xyzw, r8.xyzw, r9.xyzw  // r8.x <- bmat1._m00; r8.y <- bmat1._m01; r8.z <- bmat1._m02; r8.w <- bmat1._m03
  mul r9.xyzw, r6.xxxx, cb0[r0.y + 23].xyzw
  mov r0.x, l(1)
  iadd r0.x, r0.x, r6.w
  mul r10.xyzw, r6.yyyy, cb0[r0.x + 23].xyzw
  add r9.xyzw, r9.xyzw, r10.xyzw
  mov r0.x, l(1)
  iadd r0.x, r0.x, r7.x
  mul r10.xyzw, r6.zzzz, cb0[r0.x + 23].xyzw
  add r9.xyzw, r9.xyzw, r10.xyzw  // r9.x <- bmat1._m10; r9.y <- bmat1._m11; r9.z <- bmat1._m12; r9.w <- bmat1._m13
  mul r10.xyzw, r6.xxxx, cb0[r0.z + 23].xyzw
  mov r0.x, l(2)
  iadd r0.x, r0.x, r6.w
  mul r11.xyzw, r6.yyyy, cb0[r0.x + 23].xyzw
  add r10.xyzw, r10.xyzw, r11.xyzw
  mov r0.x, l(2)
  iadd r0.x, r0.x, r7.x
  mul r11.xyzw, r6.zzzz, cb0[r0.x + 23].xyzw
  add r10.xyzw, r10.xyzw, r11.xyzw  // r10.x <- bmat1._m20; r10.y <- bmat1._m21; r10.z <- bmat1._m22; r10.w <- bmat1._m23
  mul r0.xyzw, r6.xxxx, cb0[r0.w + 23].xyzw
  mov r6.x, l(3)
  iadd r6.x, r6.x, r6.w
  mul r11.xyzw, r6.yyyy, cb0[r6.x + 23].xyzw
  add r0.xyzw, r0.xyzw, r11.xyzw
  mov r6.x, l(3)
  iadd r6.x, r6.x, r7.x
  mul r6.xyzw, r6.zzzz, cb0[r6.x + 23].xyzw
  add r4.xyzw, r0.xyzw, r6.xyzw  // r4.x <- bmat1._m30; r4.y <- bmat1._m31; r4.z <- bmat1._m32; r4.w <- bmat1._m33
  mov r1.x, r8.x  // r1.x <- bmat1._m00
  mov r1.y, r9.x  // r1.y <- bmat1._m10
  mov r1.z, r10.x  // r1.z <- bmat1._m20
  mov r1.w, r4.x  // r1.w <- bmat1._m30
  mov r2.x, r8.y  // r2.x <- bmat1._m01
  mov r2.y, r9.y  // r2.y <- bmat1._m11
  mov r2.z, r10.y  // r2.z <- bmat1._m21
  mov r2.w, r4.y  // r2.w <- bmat1._m31
  mov r3.x, r8.z  // r3.x <- bmat1._m02
  mov r3.y, r9.z  // r3.y <- bmat1._m12
  mov r3.z, r10.z  // r3.z <- bmat1._m22
  mov r3.w, r4.z  // r3.w <- bmat1._m32
  mov r4.x, r8.w  // r4.x <- bmat1._m03
  mov r4.y, r9.w  // r4.y <- bmat1._m13
  mov r4.z, r10.w  // r4.z <- bmat1._m23
else   // Prior locations: r5.x <- bmat1._m30; r5.y <- bmat1._m31; r5.z <- bmat1._m32; r5.w <- bmat1._m33; r6.x <- w1; r6.y <- w3; r0.x <- matIndxY
  mov r1.w, r5.x
  mov r1.xyzw, r1.xyzw  // r1.w <- bmat1._m30
  mov r2.w, r5.y
  mov r2.xyzw, r2.xyzw  // r2.w <- bmat1._m31
  mov r3.w, r5.z
  mov r3.xyzw, r3.xyzw  // r3.w <- bmat1._m32
  mov r4.w, r5.w
  mov r4.xyzw, r4.xyzw  // r4.w <- bmat1._m33
endif

#line 75
mov r0.xyz, v0.xyzx
mov r0.w, l(1.000000)
dp4 r5.x, r0.xyzw, r1.xyzw  // r5.x <- netPosition.x
dp4 r5.y, r0.xyzw, r2.xyzw  // r5.y <- netPosition.y
dp4 r5.z, r0.xyzw, r3.xyzw  // r5.z <- netPosition.z
dp4 r0.x, r0.xyzw, r4.xyzw  // r0.x <- netPosition.w
mov r4.xyz, v1.xyzx
mov r4.w, l(0)
dp4 r0.y, r4.xyzw, r1.xyzw  // r0.y <- netNormal.x
dp4 r0.z, r4.xyzw, r2.xyzw  // r0.z <- netNormal.y
dp4 r0.w, r4.xyzw, r3.xyzw  // r0.w <- netNormal.z

#line 93
mul r1.xyzw, r5.xxxx, cb0[4].xyzw
mul r2.xyzw, r5.yyyy, cb0[5].xyzw
add r1.xyzw, r1.xyzw, r2.xyzw
mul r2.xyzw, r5.zzzz, cb0[6].xyzw
add r1.xyzw, r1.xyzw, r2.xyzw
mul r2.xyzw, r0.xxxx, cb0[7].xyzw
add r1.xyzw, r1.xyzw, r2.xyzw  // r1.x <- vo.oPosition.x; r1.y <- vo.oPosition.y; r1.z <- vo.oPosition.z; r1.w <- vo.oPosition.w

#line 99
mul r2.xyzw, r0.yyyy, cb0[12].xyzw
mul r3.xyzw, r0.zzzz, cb0[13].xyzw
add r2.xyzw, r2.xyzw, r3.xyzw
mul r0.xyzw, r0.wwww, cb0[14].xyzw
add r0.xyzw, r0.xyzw, r2.xyzw
mul r2.xyzw, cb0[15].xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
add r0.xyzw, r0.xyzw, r2.xyzw  // r0.x <- lightI.x; r0.y <- lightI.y; r0.z <- lightI.z; r0.w <- lightI.w
itof r2.xyzw, l(0, 0, 0, 0)
max r0.xyzw, r0.xyzw, r2.xyzw
mul r2.xyz, r0.xxxx, cb0[8].xyzx
mul r3.xyz, r0.yyyy, cb0[9].xyzx
add r2.xyz, r2.xyzx, r3.xyzx
mul r0.xyz, r0.zzzz, cb0[10].xyzx
add r0.xyz, r0.xyzx, r2.xyzx
mul r2.xyz, r0.wwww, cb0[11].xyzx
add r0.xyz, r0.xyzx, r2.xyzx
div r0.xyz, r0.xyzx, l(128.000000, 128.000000, 128.000000, 0.000000)  // r0.x <- lCol.x; r0.y <- lCol.y; r0.z <- lCol.z
mul r0.xyz, r0.xyzx, cb0[16].xyzx  // r0.x <- vo.oColor.x; r0.y <- vo.oColor.y; r0.z <- vo.oColor.z
mov r0.w, cb0[18].w  // r0.w <- vo.oColor.w
add r2.xy, v2.xyxx, cb0[21].xyxx
mul r2.xy, r2.xyxx, l(0.000244, 0.000244, 0.000000, 0.000000)  // r2.x <- vo.oTexCoord.x; r2.y <- vo.oTexCoord.y
mul r2.xy, r2.xyxx, cb0[199].xyxx

#line 111
mul r3.xyzw, r1.xyzw, cb0[19].xyzw
mul r1.xyzw, r1.wwww, cb0[20].xyzw
add r1.xyzw, r1.xyzw, r3.xyzw  // r1.x <- vo.oPosition.x; r1.y <- vo.oPosition.y; r1.z <- vo.oPosition.z; r1.w <- vo.oPosition.w
mov r3.xyz, cb0[22].xyzx  // r3.x <- vo.oFogCol.x; r3.y <- vo.oFogCol.y; r3.z <- vo.oFogCol.z
mov r3.w, cb0[16].w  // r3.w <- vo.oFogCol.w

#line 119
mov r1.y, -r1.y
max r0.xyzw, r0.xyzw, l(0.000000, 0.000000, 0.000000, 0.000000)
min r0.xyzw, r0.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)  // r0.x <- vo.oColor.x; r0.y <- vo.oColor.y; r0.z <- vo.oColor.z; r0.w <- vo.oColor.w
max r3.xyzw, r3.xyzw, l(0.000000, 0.000000, 0.000000, 0.000000)
min r3.xyzw, r3.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)  // r3.x <- vo.oFogCol.x; r3.y <- vo.oFogCol.y; r3.z <- vo.oFogCol.z; r3.w <- vo.oFogCol.w
mov o0.xzw, r1.xxzw
mov o0.y, r1.y
mov o2.xyzw, r3.xyzw
mov o3.xyzw, r0.xyzw
mov o1.xy, r2.xyxx
ret
// Approximately 154 instruction slots used

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