// AUTOMATICALLY CONVERTED FROM SHADER FIXES 
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
//
//   using 3Dmigoto v0.6.181 on Thu Jan  4 23:59:24 2024
//
//
// Buffer Definitions:
//
// cbuffer Buffer1
// {
//
//   float _generated_dummy_variable_1; // Index:    0.x              Components:     1 [unused]
//   float4 cFogParams;                 // Index:    6.xyzw           Components:     4
//   float4 cClipPlane0;                // Index:   24.xyzw           Components:     4
//
// }
//
// cbuffer Buffer5
// {
//
//   row_major float4x4 cObjectToView;  // Index:    0 1 2 3          Components:    16
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// StereoParams                      texture  float4          2d  125        1
// Buffer1                           cbuffer      NA          NA    1        1
// Buffer5                           cbuffer      NA          NA    5        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xyzw        0     NONE   float   xyzw
// TEXCOORD                 0   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
// TEXCOORD                 1     z         1     NONE   float     z
// SV_ClipDistance          0   x           2  CLIPDST   float   x
// P                        0   x           3  RTINDEX    uint   x
//
vs_5_0
dcl_output_siv o3.x, rendertarget_array_index
dcl_globalFlags refactoringAllowed
dcl_constantbuffer CB1[25], immediateIndexed
dcl_constantbuffer CB5[4], immediateIndexed
dcl_resource_buffer (float,float,float,float) t125
dcl_input v0.xyzw
dcl_input v1.xy
dcl_output_siv o0.xyzw, position
dcl_output o1.xy
dcl_output o1.z
dcl_output_siv o2.x, clip_distance
dcl_temps 5
ld_indexable(buffer)(float,float,float,float) r4.xyzw, l(0, 0, 0, 0), t125.xyzw
mov o3.x, r4.z
ld_indexable(buffer)(float,float,float,float) r0.xy, l(0, 0, 0, 0), t125.xyzw
mul r0.x, r0.y, r0.x
dp4 r1.x, cb5[0].xyzw, v0.xyzw
mad r2.x, r0.x, l(0.996875), r1.x
dp4 r1.y, cb5[1].xyzw, v0.xyzw
dp4 r1.z, cb5[2].xyzw, v0.xyzw
dp4 r1.w, cb5[3].xyzw, v0.xyzw
mov r2.yzw, r1.yyzw
mov o1.xy, v1.xyxx
dp4 r0.x, r1.xyzw, r1.xyzw
dp4 o2.x, cb1[24].xyzw, r1.xyzw
sqrt r0.x, r0.x
mad r0.x, r0.x, cb1[6].x, cb1[6].y
max r0.x, r0.x, cb1[6].w
min o1.z, r0.x, l(1.000000)
add r3.x, -r4.y, r2.w
mul r3.y, r4.x, r4.w
mad r3.x, r3.x, r3.y, r2.x
ne r3.y, l(1.000000), r2.w
movc r2.x, r3.y, r3.x, r2.x
mov o0.xyzw, r2.xyzw
ret
// Approximately 16 instruction slots used

///////////////////////////////// HLSL Code /////////////////////////////////
// // ---- Created with 3Dmigoto v0.6.181 on Thu Jan  4 23:59:24 2024
//
// cbuffer Buffer1 : register(b1)
// {
//   float _generated_dummy_variable_1 : packoffset(c0);
//   float4 cFogParams : packoffset(c6);
//   float4 cClipPlane0 : packoffset(c24);
// }
//
// cbuffer Buffer5 : register(b5)
// {
//   row_major float4x4 cObjectToView : packoffset(c0);
// }
//
//
//
// // 3Dmigoto declarations
// #define cmp -
// Texture1D<float4> IniParams : register(t120);
// Buffer<float4> StereoParams : register(t125);
//
//
// void main(
//   float4 v0 : POSITION0,
//   float2 v1 : TEXCOORD0,
//   out float4 o0 : SV_POSITION0,
//   out float2 o1 : TEXCOORD0,
//   out float p1 : TEXCOORD1,
//   out float o2 : SV_ClipDistance0,
//   out uint o3 : P0)
// {
//   float4 r0,r1,r2,r3,r4;
//   uint4 bitmask, uiDest;
//   float4 fDest;
//
//   r4.xyzw = StereoParams.Load(float4(0,0,0,0)).xyzw;
//   o3.x = r4.z;
//   r0.xy = StereoParams.Load(float4(0,0,0,0)).xy;
//   r0.x = r0.x * r0.y;
//   r1.x = dot(cObjectToView._m00_m01_m02_m03, v0.xyzw);
//   r2.x = r0.x * 0.996874988 + r1.x;
//   r1.y = dot(cObjectToView._m10_m11_m12_m13, v0.xyzw);
//   r1.z = dot(cObjectToView._m20_m21_m22_m23, v0.xyzw);
//   r1.w = dot(cObjectToView._m30_m31_m32_m33, v0.xyzw);
//   r2.yzw = r1.yzw;
//   o1.xy = v1.xy;
//   r0.x = dot(r1.xyzw, r1.xyzw);
//   o2.x = dot(cClipPlane0.xyzw, r1.xyzw);
//   r0.x = sqrt(r0.x);
//   r0.x = r0.x * cFogParams.x + cFogParams.y;
//   r0.x = max(cFogParams.w, r0.x);
//   p1.x = min(1, r0.x);
//   r3.x = r2.w + -r4.y;
//   r3.y = r4.w * r4.x;
//   r3.x = r3.x * r3.y + r2.x;
//   r3.y = cmp(1.000000 != r2.w);
//   r2.x = r3.y ? r3.x : r2.x;
//   o0.xyzw = r2.xyzw;
//   return;
// }
/////////////////////////////////////////////////////////////////////////////
