//Sun VS.
// ---- Created with 3Dmigoto v1.3.11 on Thu Aug 09 18:17:51 2018
//
//cbuffer _Globals : register(b0)
//{
//  float4 uClipPlane0 : packoffset(c0);
//  float4 uClipPlane1 : packoffset(c1);
//  float4 uClipPlane2 : packoffset(c2);
//  float4 uClipPlane3 : packoffset(c3);
//  int uReflective : packoffset(c4);
//  float3 uLightDirection : packoffset(c4.y);
//  float4 uLightDirectionColor : packoffset(c5);
//  float4x4 uCameraTransform : packoffset(c6);
//}
//
//cbuffer RenderView : register(b1)
//{
//  float4x4 uProjectionMatrix : packoffset(c0);
//  float4x4 uModelViewMatrix : packoffset(c4);
//  float4x4 uInverseProjectionMatrix : packoffset(c8);
//  float4x4 uPrevProjection : packoffset(c12);
//  float4x4 uInverseModelViewMatrix : packoffset(c16);
//  float4x4 uPrevModelView : packoffset(c20);
//  float4x4 uRotationMatrix : packoffset(c24);
//  float4x4 uInverseRotationMatrix : packoffset(c28);
//  float4x4 uTransposedRotationMatrix : packoffset(c32);
//  float4x4 uClipMatrix : packoffset(c36);
//  float4x4 uInverseClipMatrix : packoffset(c40);
//  float4x4 uPrevClipMatrix : packoffset(c44);
//  float4x4 uNormalMatrix : packoffset(c48);
//  float3 uViewOrigin : packoffset(c52);
//  float uViewWidth : packoffset(c52.w);
//  float uViewHeight : packoffset(c53);
//  float uZNear : packoffset(c53.y);
//  float uZFar : packoffset(c53.z);
//  float2 uInvFocalCoords : packoffset(c54);
//  float4 uFrustumCorners[4] : packoffset(c55);
//}
//
//cbuffer DriverStereoParams : register(b12)
//{
//    float driver_neg_sep_conv;
//    float driver_sep;
//}
//
//
//// 3Dmigoto declarations
//#define cmp -
//Texture1D<float4> IniParams : register(t120);
//Texture2D<float4> StereoParams : register(t125);
//
//
//void main(
//  float3 v0 : ATTRIB0,
//  float2 v1 : ATTRIB1,
//  out float4 o0 : SV_POSITION0,
//  out float2 o1 : TEXCOORD0)
//{
//  float4 r0,r1;
//  uint4 bitmask, uiDest;
//  float4 fDest;
//
//  float4 stereo = StereoParams.Load(0);
//  float4 iniparams3 = IniParams.Load(int2(3,0));
//  
//  r0.xyzw = uCameraTransform._m01_m11_m21_m31 * v0.yyyy;
//  r0.xyzw = uCameraTransform._m00_m10_m20_m30 * v0.xxxx + r0.xyzw;
//  r0.xyzw = uCameraTransform._m02_m12_m22_m32 * v0.zzzz + r0.xyzw;
//  r0.xyzw = uCameraTransform._m03_m13_m23_m33 + r0.xyzw;
//  r1.xyzw = uModelViewMatrix._m01_m11_m21_m31 * r0.yyyy;
//  r1.xyzw = uModelViewMatrix._m00_m10_m20_m30 * r0.xxxx + r1.xyzw;
//  r1.xyzw = uModelViewMatrix._m02_m12_m22_m32 * r0.zzzz + r1.xyzw;
//  r0.xyzw = uModelViewMatrix._m03_m13_m23_m33 * r0.wwww + r1.xyzw;
//  r1.xyzw = uProjectionMatrix._m01_m11_m21_m31 * r0.yyyy;
//  r1.xyzw = uProjectionMatrix._m00_m10_m20_m30 * r0.xxxx + r1.xyzw;
//  r1.xyzw = uProjectionMatrix._m02_m12_m22_m32 * r0.zzzz + r1.xyzw;
//  o0.xyzw = uProjectionMatrix._m03_m13_m23_m33 * r0.wwww + r1.xyzw;
//  o1.xy = v1.xy;
//  if (driver_sep)
//  {
//	o0.x += driver_sep * o0.w*0 + driver_neg_sep_conv*0.00000000000001;
//  }
//  o0.x+=stereo.x*(o0.w-stereo.y);
//  return;
//}
//
///*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.18773
//
//   using 3Dmigoto v1.3.11 on Thu Aug 09 18:17:51 2018
//
//
// Buffer Definitions:
//
// cbuffer $Globals
// {
//
//   float4 uClipPlane0;                // Offset:    0 Size:    16 [unused]
//   float4 uClipPlane1;                // Offset:   16 Size:    16 [unused]
//   float4 uClipPlane2;                // Offset:   32 Size:    16 [unused]
//   float4 uClipPlane3;                // Offset:   48 Size:    16 [unused]
//   int uReflective;                   // Offset:   64 Size:     4 [unused]
//   float3 uLightDirection;            // Offset:   68 Size:    12 [unused]
//   float4 uLightDirectionColor;       // Offset:   80 Size:    16 [unused]
//   float4x4 uCameraTransform;         // Offset:   96 Size:    64
//
// }
//
// cbuffer RenderView
// {
//
//   float4x4 uProjectionMatrix;        // Offset:    0 Size:    64
//   float4x4 uModelViewMatrix;         // Offset:   64 Size:    64
//   float4x4 uInverseProjectionMatrix; // Offset:  128 Size:    64 [unused]
//   float4x4 uPrevProjection;          // Offset:  192 Size:    64 [unused]
//   float4x4 uInverseModelViewMatrix;  // Offset:  256 Size:    64 [unused]
//   float4x4 uPrevModelView;           // Offset:  320 Size:    64 [unused]
//   float4x4 uRotationMatrix;          // Offset:  384 Size:    64 [unused]
//   float4x4 uInverseRotationMatrix;   // Offset:  448 Size:    64 [unused]
//   float4x4 uTransposedRotationMatrix;// Offset:  512 Size:    64 [unused]
//   float4x4 uClipMatrix;              // Offset:  576 Size:    64 [unused]
//   float4x4 uInverseClipMatrix;       // Offset:  640 Size:    64 [unused]
//   float4x4 uPrevClipMatrix;          // Offset:  704 Size:    64 [unused]
//   float4x4 uNormalMatrix;            // Offset:  768 Size:    64 [unused]
//   float3 uViewOrigin;                // Offset:  832 Size:    12 [unused]
//   float uViewWidth;                  // Offset:  844 Size:     4 [unused]
//   float uViewHeight;                 // Offset:  848 Size:     4 [unused]
//   float uZNear;                      // Offset:  852 Size:     4 [unused]
//   float uZFar;                       // Offset:  856 Size:     4 [unused]
//   float2 uInvFocalCoords;            // Offset:  864 Size:     8 [unused]
//   float4 uFrustumCorners[4];         // Offset:  880 Size:    64 [unused]
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// $Globals                          cbuffer      NA          NA    0        1
// RenderView                        cbuffer      NA          NA    1        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// ATTRIB                   0   xyz         0     NONE   float   xyz
// ATTRIB                   1   xy          1     NONE   float   xy
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float   xyzw
// TEXCOORD                 0   xy          1     NONE   float   xy
//
vs_4_0
dcl_constantbuffer cb0[10], immediateIndexed
dcl_constantbuffer cb1[8], immediateIndexed
dcl_constantbuffer cb12[1], immediateIndexed
dcl_input v0.xyz
dcl_input v1.xy
dcl_output_siv o0.xyzw, position
dcl_output o1.xy
dcl_temps 32
dcl_resource_texture2d (float,float,float,float) t125
ld_indexable(texture2d)(float,float,float,float) r25.xyzw, l(0, 0, 0, 0), t125.xyzw
mul r0.xyzw, v0.yyyy, cb0[7].xyzw
mad r0.xyzw, cb0[6].xyzw, v0.xxxx, r0.xyzw
mad r0.xyzw, cb0[8].xyzw, v0.zzzz, r0.xyzw
add r0.xyzw, r0.xyzw, cb0[9].xyzw
mul r1.xyzw, r0.yyyy, cb1[5].xyzw
mad r1.xyzw, cb1[4].xyzw, r0.xxxx, r1.xyzw
mad r1.xyzw, cb1[6].xyzw, r0.zzzz, r1.xyzw
mad r0.xyzw, cb1[7].xyzw, r0.wwww, r1.xyzw
mul r1.xyzw, r0.yyyy, cb1[1].xyzw
mad r1.xyzw, cb1[0].xyzw, r0.xxxx, r1.xyzw
mad r1.xyzw, cb1[2].xyzw, r0.zzzz, r1.xyzw
mad r10.xyzw, cb1[3].xyzw, r0.wwww, r1.xyzw

add r26.x, r10.w, -r25.y
mad r10.x, r25.x, r26.x, r10.x

mov o0.xyzw, r10.xyzw
mov o1.xy, v1.xyxx
ret
// Approximately 14 instruction slots used
