//Nioh 2 HUD VS 6. P5S HUD VS 2.
// ---- Created with 3Dmigoto v1.3.16 on Mon Feb 08 17:50:35 2021
//
//cbuffer _Globals : register(b0)
//{
//  float4 ktglViewport : packoffset(c0);
//  float4 ktglColorScale : packoffset(c1);
//}
//
//
//
//// 3Dmigoto declarations
//#define cmp -
//Texture1D<float4> IniParams : register(t120);
//Texture2D<float4> StereoParams : register(t125);
//
//
//void main(
//  float3 v0 : POSITION0,
//  float4 v1 : COLOR0,
//  float2 v2 : TEXCOORD0,
//  out float4 o0 : SV_Position0,
//  out float4 o1 : COLOR0,
//  out float2 o2 : TEXCOORD0)
//{
//  float4 stereo = StereoParams.Load(0);
//  float4 iniparams9 = IniParams.Load(int2(9,0));
//  float4 iniparams3 = IniParams.Load(int2(3,0));
//  o0.xy = v0.xy * ktglViewport.xy + ktglViewport.zw;
//  o0.z = v0.z;
//  o0.w = 1;
//  o1.xyzw = ktglColorScale.xyzw * v1.xyzw;
//  o2.xy = v2.xy;
//  if (iniparams3.w!=10) {
//  //o0.x+=stereo.x*iniparams9.x*o0.w;
//  }
//  return;
//}
//
///*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
//
//   using 3Dmigoto v1.3.16 on Mon Feb 08 17:50:35 2021
//
//
// Buffer Definitions:
//
// cbuffer $Globals
// {
//
//   float4 ktglViewport;               // Offset:    0 Size:    16
//   float4 ktglColorScale;             // Offset:   16 Size:    16
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// $Globals                          cbuffer      NA          NA    0        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xyz         0     NONE   float   xyz
// COLOR                    0   xyzw        1     NONE   float   xyzw
// 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   xyzw        1     NONE   float   xyzw
// TEXCOORD                 0   xy          2     NONE   float   xy
//
vs_4_0
dcl_constantbuffer cb0[2], immediateIndexed
dcl_constantbuffer cb12[1], immediateIndexed
dcl_input v0.xyz
dcl_input v1.xyzw
dcl_input v2.xy
dcl_output_siv o0.xyzw, position
dcl_output o1.xyzw
dcl_output o2.xy
dcl_temps 5
dcl_resource_texture2d (float,float,float,float) t125
ld_indexable(texture2d)(float,float,float,float) r1.xyzw, l(0, 0, 0, 0), t125.xyzw
dcl_resource_texture1d (float,float,float,float) t120
ld_indexable(texture1d)(float,float,float,float) r2.xyzw, l(9, 0, 0, 0), t120.xyzw
ld_indexable(texture1d)(float,float,float,float) r3.xyzw, l(3, 0, 0, 0), t120.xyzw

mad r0.xy, v0.xyxx, cb0[0].xyxx, cb0[0].zwzz

//ieq r4.z, r3.x, l(5.0)
//
//ieq r4.x, r3.w, l(10.0)
//ieq r4.y, r3.w, l(11.0)
//or r4.x, r4.x, r4.y
//if_z r4.x
//mad r0.x, r1.x, r2.x, r0.x
//if_nz r4.z
//mul r0.x, r0.x, r2.y
//endif
////mul r1.w, r1.y, l(0.000575)
////add r1.w, l(1.0), -r1.w
////mad r0.x, r1.x, r1.w, r0.x
//endif

mov o0.xy, r0.xyxx
mov o0.z, v0.z
mov o0.w, l(1.000000)
mul o1.xyzw, v1.xyzw, cb0[1].xyzw
mov o2.xy, v2.xyxx
ret
// Approximately 6 instruction slots used
