// ---- Created with 3Dmigoto v0.6.164 on Sat Jan 31 19:46:42 2026
cbuffer cb5 : register(b5)
{
  float4 cb5[14];
}

cbuffer cb4 : register(b4)
{
  float4 cb4[15];
}

cbuffer cb3 : register(b3)
{
  float4 cb3[1];
}

cbuffer cb2 : register(b2)
{
  float4 cb2[21];
}

cbuffer cb1 : register(b1)
{
  float4 cb1[5];
}

cbuffer cb0 : register(b0)
{
  float4 cb0[10];
}




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


void main(
  float4 v0 : POSITION0,
  float3 v1 : NORMAL0,
  float4 v2 : TEXCOORD0,
  float2 v3 : TEXCOORD1,
  uint v4 : SV_InstanceID0,
  out float4 o0 : SV_POSITION0,
  out float4 o1 : TEXCOORD0,
  out float4 o2 : TEXCOORD1,
  out float4 o3 : TEXCOORD2,
  out float4 o4 : TEXCOORD3,
  out float4 o5 : TEXCOORD4,
  out float4 o6 : TEXCOORD5,
  out float4 o7 : TEXCOORD7,
  out uint o8 : SV_InstanceID0)
{
// Needs manual fix for instruction:
// unknown dcl_: dcl_input_sgv v4.x, instance_id
  float4 r0,r1,r2,r3;
  uint4 bitmask, uiDest;
  float4 fDest;

  r0.x = (int)v4.x + asint(cb3[0].x);
  r0.y = (uint)r0.x << 3;
  r0.x = (int)r0.x * 7;
  r1.xyzw = cb4[r0.y+1].xyzw * v0.yyyy;
  r1.xyzw = cb4[r0.y+0].xyzw * v0.xxxx + r1.xyzw;
  r1.xyzw = cb4[r0.y+2].xyzw * v0.zzzz + r1.xyzw;
  r1.xyzw = cb4[r0.y+3].xyzw + r1.xyzw;
  r2.xyzw = cb2[18].xyzw * r1.yyyy;
  r2.xyzw = cb2[17].xyzw * r1.xxxx + r2.xyzw;
  r2.xyzw = cb2[19].xyzw * r1.zzzz + r2.xyzw;
  o0.xyzw = cb2[20].xyzw * r1.wwww + r2.xyzw;
  r0.z = cmp(cb0[9].w == 0.000000);
  r0.zw = r0.zz ? v2.xy : v3.xy;
  o1.zw = r0.zw * cb0[7].xy + cb0[7].zw;
  o1.xy = v2.xy * cb0[6].xy + cb0[6].zw;
  r1.xyz = cb4[r0.y+1].xyz * v0.yyy;
  r1.xyz = cb4[r0.y+0].xyz * v0.xxx + r1.xyz;
  r1.xyz = cb4[r0.y+2].xyz * v0.zzz + r1.xyz;
  r1.xyz = cb4[r0.y+3].xyz * v0.www + r1.xyz;
  o2.xyz = -cb1[4].xyz + r1.xyz;

float4 s = StereoParams.Load(0);
float4 testeo = IniParams.Load(int2(90,0));   
float fov =  cb2[9].x * cb2[9].x + cb2[10].x * cb2[10].x + cb2[11].x * cb2[11].x ;
o2.x -= s.x *  s.y *  cb2[9].x  / fov ;  
o2.y -= s.x *  s.y *  cb2[10].x / fov ;
o2.z -= s.x *  s.y *  cb2[11].x / fov ;    
  
  o2.w = 0;
  r1.w = 0;
  o3.xyzw = r1.wwwx;
  o4.xyzw = r1.wwwy;
  o5.w = r1.z;
  r1.x = dot(v1.xyz, cb4[r0.y+4].xyz);
  r1.y = dot(v1.xyz, cb4[r0.y+5].xyz);
  r1.z = dot(v1.xyz, cb4[r0.y+6].xyz);
  r0.y = dot(r1.xyz, r1.xyz);
  r0.y = rsqrt(r0.y);
  r0.yzw = r1.xyz * r0.yyy;
  o5.xyz = r0.yzw;
  r1.x = r0.z * r0.z;
  r1.x = r0.y * r0.y + -r1.x;
  r2.xyzw = r0.yzww * r0.zwwy;
  r3.x = dot(cb5[r0.x+3].xyzw, r2.xyzw);
  r3.y = dot(cb5[r0.x+4].xyzw, r2.xyzw);
  r3.z = dot(cb5[r0.x+5].xyzw, r2.xyzw);
  o6.xyz = cb5[r0.x+6].xyz * r1.xxx + r3.xyz;
  o6.w = 0;
  o7.xyzw = float4(0,0,0,0);
  o8.x = v4.x;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v0.6.164 on Sat Jan 31 19:46:42 2026
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xyzw        0     NONE   float   xyzw
// NORMAL                   0   xyz         1     NONE   float   xyz
// TEXCOORD                 0   xy          2     NONE   float   xy
// TEXCOORD                 1   xy          3     NONE   float   xy
// SV_InstanceID            0   x           4   INSTID    uint   x
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float   xyzw
// TEXCOORD                 0   xyzw        1     NONE   float   xyzw
// TEXCOORD                 1   xyzw        2     NONE   float   xyzw
// TEXCOORD                 2   xyzw        3     NONE   float   xyzw
// TEXCOORD                 3   xyzw        4     NONE   float   xyzw
// TEXCOORD                 4   xyzw        5     NONE   float   xyzw
// TEXCOORD                 5   xyzw        6     NONE   float   xyzw
// TEXCOORD                 7   xyzw        7     NONE   float   xyzw
// SV_InstanceID            0   x           8     NONE    uint   x
//
vs_4_0
dcl_constantbuffer CB0[10], immediateIndexed
dcl_constantbuffer CB1[5], immediateIndexed
dcl_constantbuffer CB2[21], immediateIndexed
dcl_constantbuffer CB3[1], immediateIndexed
dcl_constantbuffer CB4[15], dynamicIndexed
dcl_constantbuffer CB5[14], dynamicIndexed
dcl_input v0.xyzw
dcl_input v1.xyz
dcl_input v2.xy
dcl_input v3.xy
dcl_input_sgv v4.x, instance_id
dcl_output_siv o0.xyzw, position
dcl_output o1.xyzw
dcl_output o2.xyzw
dcl_output o3.xyzw
dcl_output o4.xyzw
dcl_output o5.xyzw
dcl_output o6.xyzw
dcl_output o7.xyzw
dcl_output o8.x
dcl_temps 4
iadd r0.x, v4.x, cb3[0].x
ishl r0.y, r0.x, l(3)
imul null, r0.x, r0.x, l(7)
mul r1.xyzw, v0.yyyy, cb4[r0.y + 1].xyzw
mad r1.xyzw, cb4[r0.y + 0].xyzw, v0.xxxx, r1.xyzw
mad r1.xyzw, cb4[r0.y + 2].xyzw, v0.zzzz, r1.xyzw
add r1.xyzw, r1.xyzw, cb4[r0.y + 3].xyzw
mul r2.xyzw, r1.yyyy, cb2[18].xyzw
mad r2.xyzw, cb2[17].xyzw, r1.xxxx, r2.xyzw
mad r2.xyzw, cb2[19].xyzw, r1.zzzz, r2.xyzw
mad o0.xyzw, cb2[20].xyzw, r1.wwww, r2.xyzw
eq r0.z, cb0[9].w, l(0.000000)
movc r0.zw, r0.zzzz, v2.xxxy, v3.xxxy
mad o1.zw, r0.zzzw, cb0[7].xxxy, cb0[7].zzzw
mad o1.xy, v2.xyxx, cb0[6].xyxx, cb0[6].zwzz
mul r1.xyz, v0.yyyy, cb4[r0.y + 1].xyzx
mad r1.xyz, cb4[r0.y + 0].xyzx, v0.xxxx, r1.xyzx
mad r1.xyz, cb4[r0.y + 2].xyzx, v0.zzzz, r1.xyzx
mad r1.xyz, cb4[r0.y + 3].xyzx, v0.wwww, r1.xyzx
add o2.xyz, r1.xyzx, -cb1[4].xyzx
mov o2.w, l(0)
mov r1.w, l(0)
mov o3.xyzw, r1.wwwx
mov o4.xyzw, r1.wwwy
mov o5.w, r1.z
dp3 r1.x, v1.xyzx, cb4[r0.y + 4].xyzx
dp3 r1.y, v1.xyzx, cb4[r0.y + 5].xyzx
dp3 r1.z, v1.xyzx, cb4[r0.y + 6].xyzx
dp3 r0.y, r1.xyzx, r1.xyzx
rsq r0.y, r0.y
mul r0.yzw, r0.yyyy, r1.xxyz
mov o5.xyz, r0.yzwy
mul r1.x, r0.z, r0.z
mad r1.x, r0.y, r0.y, -r1.x
mul r2.xyzw, r0.zwwy, r0.yzww
dp4 r3.x, cb5[r0.x + 3].xyzw, r2.xyzw
dp4 r3.y, cb5[r0.x + 4].xyzw, r2.xyzw
dp4 r3.z, cb5[r0.x + 5].xyzw, r2.xyzw
mad o6.xyz, cb5[r0.x + 6].xyzx, r1.xxxx, r3.xyzx
mov o6.w, l(0)
mov o7.xyzw, l(0,0,0,0)
mov o8.x, v4.x
ret
// Approximately 0 instruction slots used

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