//Virtua Fighter VS 1.
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v1.3.16 on Sun May 12 13:35:01 2019
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xyzw        0     NONE   float   xyzw
// COLOR                    0   xyzw        1     NONE   float   xyzw
// TEXCOORD                 0   xy          2     NONE   float   xy
// BINORMAL                 0   x           3     NONE   float   x
// COLOR                    1   x           4     NONE   float   x
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// COLOR                    0   xyzw        0     NONE   float   xyzw
// TEXCOORD                 0   xy          1     NONE   float   xy
// TEXCOORD                 7     z         1     NONE   float     z
// TEXCOORD                 8      w        1     NONE   float      w
// SV_POSITION              0   xyzw        2      POS   float   xyzw
//
vs_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[2], immediateIndexed
dcl_constantbuffer cb2[8], immediateIndexed
dcl_input v0.xyzw
dcl_input v1.xyzw
dcl_input v2.xy
dcl_input v3.x
dcl_input v4.x
dcl_output o0.xyzw
dcl_output o1.xy
dcl_output o1.z
dcl_output o1.w
dcl_output_siv o2.xyzw, position
dcl_temps 35
dcl_resource_texture2d (float,float,float,float) t125
dcl_resource_texture1d (float,float,float,float) t120
ld_indexable(texture2d)(float,float,float,float) r25.xyzw, l(0, 0, 0, 0), t125.xyzw
ld_indexable(texture2d)(float,float,float,float) r27.xyzw, l(0, 0, 0, 0), t120.xyzw
ld_indexable(texture2d)(float,float,float,float) r28.xyzw, l(3, 0, 0, 0), t120.xyzw
ld_indexable(texture2d)(float,float,float,float) r30.xyzw, l(5, 0, 0, 0), t120.xyzw
mov o0.xyzw, v1.xyzw
mov o1.xy, v2.xyxx
mad o1.w, v4.x, l(0.000976562500), l(0.000488281250)
dp4 r0.z, cb2[6].xyzw, v0.xyzw
add r1.x, r0.z, -v3.x
mad r1.x, cb0[0].x, r1.x, v3.x
mad_sat r1.x, r1.x, cb0[1].x, cb0[1].y
mad o1.z, r1.x, cb0[1].z, cb0[1].w
dp4 r0.x, cb2[4].xyzw, v0.xyzw
dp4 r0.y, cb2[5].xyzw, v0.xyzw
dp4 r0.w, cb2[7].xyzw, v0.xyzw
dp4 r20.x, cb2[0].xyzw, r0.xyzw
dp4 r20.y, cb2[1].xyzw, r0.xyzw
dp4 r20.z, cb2[2].xyzw, r0.xyzw
dp4 r20.w, cb2[3].xyzw, r0.xyzw

//Aspect ratio for arcade.
ieq r31.x, r30.x, l(1.000000)
if_nz r31.x
mul r20.x, r20.x, r30.z
mul r20.y, r20.y, r30.w
endif

//HUD control.
ieq r31.y, r20.w, l(1.000000)
ieq r31.z, r20.w, l(6.000000)
ieq r31.w, r20.w, l(10.000000)
or r31.y, r31.y, r31.z
or r31.y, r31.y, r31.w
if_z r31.y
add r25.w, r20.w, -r25.y
mad r20.x, r25.x, r25.w, r20.x
else
mul r25.w, r20.w, r27.x
mad r20.x, r25.x, r25.w, r20.x
endif

mov o2.xyzw, r20.xyzw
ret
// Approximately 0 instruction slots used

///////////////////////////////// HLSL Code /////////////////////////////////
// // ---- Created with 3Dmigoto v1.3.16 on Sun May 12 13:35:01 2019
// cbuffer cb2 : register(b2)
// {
//   float4 cb2[8];
// }
//
// cbuffer cb0 : register(b0)
// {
//   float4 cb0[2];
// }
//
//
//
//
// // 3Dmigoto declarations
// #define cmp -
// Texture1D<float4> IniParams : register(t120);
// Texture2D<float4> StereoParams : register(t125);
//
//
// void main(
//   float4 v0 : POSITION0,
//   float4 v1 : COLOR0,
//   float2 v2 : TEXCOORD0,
//   float v3 : BINORMAL0,
//   float v4 : COLOR1,
//   out float4 o0 : COLOR0,
//   out float2 o1 : TEXCOORD0,
//   out float p1 : TEXCOORD7,
//   out float p1 : TEXCOORD8,
//   out float4 o2 : SV_POSITION0)
// {
//   float4 r0,r1;
//   uint4 bitmask, uiDest;
//   float4 fDest;
//
//   o0.xyzw = v1.xyzw;
//   o1.xy = v2.xy;
//   p1.x = v4.x * 0.0009765625 + 0.00048828125;
//   r0.z = dot(cb2[6].xyzw, v0.xyzw);
//   r1.x = -v3.x + r0.z;
//   r1.x = cb0[0].x * r1.x + v3.x;
//   r1.x = saturate(r1.x * cb0[1].x + cb0[1].y);
//   p1.x = r1.x * cb0[1].z + cb0[1].w;
//   r0.x = dot(cb2[4].xyzw, v0.xyzw);
//   r0.y = dot(cb2[5].xyzw, v0.xyzw);
//   r0.w = dot(cb2[7].xyzw, v0.xyzw);
//   o2.x = dot(cb2[0].xyzw, r0.xyzw);
//   o2.y = dot(cb2[1].xyzw, r0.xyzw);
//   o2.z = dot(cb2[2].xyzw, r0.xyzw);
//   o2.w = dot(cb2[3].xyzw, r0.xyzw);
//   return;
// }
//////////////////////////////// HLSL Errors ////////////////////////////////
// E:\SteamLibrary\steamapps\common\Yakuza Kiwami 2\ShaderFixes\1fc3f5abdcebe92d-vs_replace.txt(30,13-14): error X3003: redefinition of 'p1'
/////////////////////////////////////////////////////////////////////////////
