//home specular 
// ---- Created with 3Dmigoto v0.6.164 on Sun Jan 18 08:19:05 2026
cbuffer cb6 : register(b6)
{
  float4 cb6[14];
}

cbuffer cb5 : register(b5)
{
  float4 cb5[15];
}

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

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

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

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,r4,r5;
  uint4 bitmask, uiDest;
  float4 fDest;

  r0.x = (int)v4.x + asint(cb4[0].x);
  r0.y = (uint)r0.x << 3;
  r0.x = (int)r0.x * 7;
  r1.xyzw = cb5[r0.y+1].xyzw * v0.yyyy;
  r1.xyzw = cb5[r0.y+0].xyzw * v0.xxxx + r1.xyzw;
  r1.xyzw = cb5[r0.y+2].xyzw * v0.zzzz + r1.xyzw;
  r1.xyzw = cb5[r0.y+3].xyzw + r1.xyzw;
  r2.xyzw = cb3[18].xyzw * r1.yyyy;
  r2.xyzw = cb3[17].xyzw * r1.xxxx + r2.xyzw;
  r2.xyzw = cb3[19].xyzw * r1.zzzz + r2.xyzw;
  r1.xyzw = cb3[20].xyzw * r1.wwww + r2.xyzw;
  o0.xyzw = r1.xyzw;
  o2.w = r1.z;
  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 = cb5[r0.y+1].xyz * v0.yyy;
  r1.xyz = cb5[r0.y+0].xyz * v0.xxx + r1.xyz;
  r1.xyz = cb5[r0.y+2].xyz * v0.zzz + r1.xyz;
  r1.xyz = cb5[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 = rsqrt(cb4[17].x * cb4[17].x + cb4[18].x * cb4[18].x + cb4[19].x * cb4[19].x);  
float fov = cb3[17].x * cb3[17].x + cb3[18].x * cb3[18].x + cb3[19].x * cb3[19].x;  
o2.x -= s.x *  s.y *  cb3[9].x / fov;
o2.y -= s.x *  s.y * cb3[10].x / fov;
o2.z -= s.x *  s.y * cb3[11].x / fov;   
  
  r1.w = 0;
  o3.xyzw = r1.wwwx;
  o4.xyzw = r1.wwwy;
  r2.x = dot(v1.xyz, cb5[r0.y+4].xyz);
  r2.y = dot(v1.xyz, cb5[r0.y+5].xyz);
  r2.z = dot(v1.xyz, cb5[r0.y+6].xyz);
  r0.y = dot(r2.xyz, r2.xyz);
  r0.y = rsqrt(r0.y);
  r0.yzw = r2.xyz * r0.yyy;
  o5.xyz = r0.yzw;
  o5.w = r1.z;
  r1.w = r0.z * r0.z;
  r1.w = r0.y * r0.y + -r1.w;
  r2.xyzw = r0.yzww * r0.zwwy;
  r3.x = dot(cb6[r0.x+3].xyzw, r2.xyzw);
  r3.y = dot(cb6[r0.x+4].xyzw, r2.xyzw);
  r3.z = dot(cb6[r0.x+5].xyzw, r2.xyzw);
  r2.xyz = cb6[r0.x+6].xyz * r1.www + r3.xyz;
  r3.xyzw = cb2[4].xyzw + -r1.yyyy;
  r4.xyzw = r3.xyzw * r0.zzzz;
  r3.xyzw = r3.xyzw * r3.xyzw;
  r5.xyzw = cb2[3].xyzw + -r1.xxxx;
  r1.xyzw = cb2[5].xyzw + -r1.zzzz;
  r4.xyzw = r5.xyzw * r0.yyyy + r4.xyzw;
  r0.xyzw = r1.xyzw * r0.wwww + r4.xyzw;
  r3.xyzw = r5.xyzw * r5.xyzw + r3.xyzw;
  r1.xyzw = r1.xyzw * r1.xyzw + r3.xyzw;
  r1.xyzw = max(float4(9.99999997e-07,9.99999997e-07,9.99999997e-07,9.99999997e-07), r1.xyzw);
  r3.xyzw = rsqrt(r1.xyzw);
  r1.xyzw = r1.xyzw * cb2[6].xyzw + float4(1,1,1,1);
  r1.xyzw = float4(1,1,1,1) / r1.xyzw;
  r0.xyzw = r3.xyzw * r0.xyzw;
  r0.xyzw = max(float4(0,0,0,0), r0.xyzw);
  r0.xyzw = r0.xyzw * r1.xyzw;
  r1.xyz = cb2[8].xyz * r0.yyy;
  r1.xyz = cb2[7].xyz * r0.xxx + r1.xyz;
  r0.xyz = cb2[9].xyz * r0.zzz + r1.xyz;
  r0.xyz = cb2[10].xyz * r0.www + r0.xyz;
  r1.xyz = r0.xyz * float3(0.305306017,0.305306017,0.305306017) + float3(0.682171106,0.682171106,0.682171106);
  r1.xyz = r0.xyz * r1.xyz + float3(0.0125228781,0.0125228781,0.0125228781);
  o6.xyz = r0.xyz * r1.xyz + r2.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 Sun Jan 18 08:19:05 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[11], immediateIndexed
dcl_constantbuffer CB3[21], immediateIndexed
dcl_constantbuffer CB4[1], immediateIndexed
dcl_constantbuffer CB5[15], dynamicIndexed
dcl_constantbuffer CB6[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 6
iadd r0.x, v4.x, cb4[0].x
ishl r0.y, r0.x, l(3)
imul null, r0.x, r0.x, l(7)
mul r1.xyzw, v0.yyyy, cb5[r0.y + 1].xyzw
mad r1.xyzw, cb5[r0.y + 0].xyzw, v0.xxxx, r1.xyzw
mad r1.xyzw, cb5[r0.y + 2].xyzw, v0.zzzz, r1.xyzw
add r1.xyzw, r1.xyzw, cb5[r0.y + 3].xyzw
mul r2.xyzw, r1.yyyy, cb3[18].xyzw
mad r2.xyzw, cb3[17].xyzw, r1.xxxx, r2.xyzw
mad r2.xyzw, cb3[19].xyzw, r1.zzzz, r2.xyzw
mad r1.xyzw, cb3[20].xyzw, r1.wwww, r2.xyzw
mov o0.xyzw, r1.xyzw
mov o2.w, r1.z
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, cb5[r0.y + 1].xyzx
mad r1.xyz, cb5[r0.y + 0].xyzx, v0.xxxx, r1.xyzx
mad r1.xyz, cb5[r0.y + 2].xyzx, v0.zzzz, r1.xyzx
mad r1.xyz, cb5[r0.y + 3].xyzx, v0.wwww, r1.xyzx
add o2.xyz, r1.xyzx, -cb1[4].xyzx
mov r1.w, l(0)
mov o3.xyzw, r1.wwwx
mov o4.xyzw, r1.wwwy
dp3 r2.x, v1.xyzx, cb5[r0.y + 4].xyzx
dp3 r2.y, v1.xyzx, cb5[r0.y + 5].xyzx
dp3 r2.z, v1.xyzx, cb5[r0.y + 6].xyzx
dp3 r0.y, r2.xyzx, r2.xyzx
rsq r0.y, r0.y
mul r0.yzw, r0.yyyy, r2.xxyz
mov o5.xyz, r0.yzwy
mov o5.w, r1.z
mul r1.w, r0.z, r0.z
mad r1.w, r0.y, r0.y, -r1.w
mul r2.xyzw, r0.zwwy, r0.yzww
dp4 r3.x, cb6[r0.x + 3].xyzw, r2.xyzw
dp4 r3.y, cb6[r0.x + 4].xyzw, r2.xyzw
dp4 r3.z, cb6[r0.x + 5].xyzw, r2.xyzw
mad r2.xyz, cb6[r0.x + 6].xyzx, r1.wwww, r3.xyzx
add r3.xyzw, -r1.yyyy, cb2[4].xyzw
mul r4.xyzw, r0.zzzz, r3.xyzw
mul r3.xyzw, r3.xyzw, r3.xyzw
add r5.xyzw, -r1.xxxx, cb2[3].xyzw
add r1.xyzw, -r1.zzzz, cb2[5].xyzw
mad r4.xyzw, r5.xyzw, r0.yyyy, r4.xyzw
mad r0.xyzw, r1.xyzw, r0.wwww, r4.xyzw
mad r3.xyzw, r5.xyzw, r5.xyzw, r3.xyzw
mad r1.xyzw, r1.xyzw, r1.xyzw, r3.xyzw
max r1.xyzw, r1.xyzw, l(0.000001, 0.000001, 0.000001, 0.000001)
rsq r3.xyzw, r1.xyzw
mad r1.xyzw, r1.xyzw, cb2[6].xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
div r1.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000), r1.xyzw
mul r0.xyzw, r0.xyzw, r3.xyzw
max r0.xyzw, r0.xyzw, l(0.000000, 0.000000, 0.000000, 0.000000)
mul r0.xyzw, r1.xyzw, r0.xyzw
mul r1.xyz, r0.yyyy, cb2[8].xyzx
mad r1.xyz, cb2[7].xyzx, r0.xxxx, r1.xyzx
mad r0.xyz, cb2[9].xyzx, r0.zzzz, r1.xyzx
mad r0.xyz, cb2[10].xyzx, r0.wwww, r0.xyzx
mad r1.xyz, r0.xyzx, l(0.305306017, 0.305306017, 0.305306017, 0.000000), l(0.682171106, 0.682171106, 0.682171106, 0.000000)
mad r1.xyz, r0.xyzx, r1.xyzx, l(0.0125228781, 0.0125228781, 0.0125228781, 0.000000)
mad o6.xyz, r0.xyzx, r1.xyzx, r2.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

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