//lights
// ---- Created with 3Dmigoto v0.6.109 on Wed Feb 11 19:53:26 2026
Texture2D<float4> t5 : register(t5);

Texture2D<float4> t4 : register(t4);

Texture2D<float4> t3 : register(t3);

Texture2D<float4> t2 : register(t2);

Texture2D<float4> t1 : register(t1);

Texture2D<float4> t0 : register(t0);

SamplerState s5_s : register(s5);

SamplerState s4_s : register(s4);

SamplerState s3_s : register(s3);

SamplerState s2_s : register(s2);

SamplerState s1_s : register(s1);

SamplerState s0_s : register(s0);

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

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

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

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




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


void main(
  float4 v0 : SV_POSITION0,
  float4 v1 : TEXCOORD0,
  float3 v2 : TEXCOORD1,
  out float4 o0 : SV_Target0)
{
  float4 r0,r1,r2,r3,r4,r5,r6,r7,r8;
  uint4 bitmask, uiDest;
  float4 fDest;

  r0.x = cb1[5].z / v2.z;
  r0.xyz = v2.xyz * r0.xxx;
  r1.xy = v1.xy / v1.ww;
  r2.xyzw = t0.Sample(s0_s, r1.xy).xyzw;
  r0.w = cb1[7].x * r2.x + cb1[7].y;
  r0.w = 1 / r0.w;
  r2.xyz = r0.xyz * r0.www;

//float fov =  rsqrt(cb13[17].x * cb13[17].x + cb13[18].x * cb13[18].x + cb13[19].x * cb13[19].x);  
float4 s = StereoParams.Load(0);
float4 testeo = IniParams.Load(int2(90,0)); 
r2.x -= s.x * (r2.z - s.y) *  cb2[10].x;    
  
  r3.xyz = cb2[19].xyz * r2.yyy;
  r2.xyw = cb2[18].xyz * r2.xxx + r3.xyz;
  r2.xyw = cb2[20].xyz * r2.zzz + r2.xyw;
  r2.xyw = cb2[21].xyz + r2.xyw;
  r3.xyz = -cb3[25].xyz + r2.xyw;
  r0.x = dot(r3.xyz, r3.xyz);
  r0.x = sqrt(r0.x);
  r0.x = -r0.z * r0.w + r0.x;
  r0.x = cb3[25].w * r0.x + r2.z;
  r0.x = saturate(r0.x * cb3[24].z + cb3[24].w);
  r3.xyzw = t1.Sample(s1_s, r1.xy).xyzw;
  r0.y = 1 + -r3.x;
  r0.x = r0.x * r0.y + r3.x;
  r3.xyzw = t2.Sample(s2_s, r1.xy).xyzw;
  r4.xyzw = t3.Sample(s3_s, r1.xy).xyzw;
  r5.xyzw = t4.Sample(s4_s, r1.xy).xyzw;
  r0.y = r5.w * 3 + 0.5;
  r0.y = floor(r0.y);
  r0.y = cmp(r0.y == 2.000000);
  r1.xyzw = t5.Sample(s5_s, r1.xy).xyzw;
  r0.z = cmp(r1.x < 0);
  r0.w = -0.125 * r1.x;
  r0.w = floor(r0.w);
  r0.w = 0.25 * r0.w;
  r0.w = frac(r0.w);
  r0.w = -r0.w * 1.33333337 + 1;
  r0.z = r0.z ? r0.w : 1;
  r1.xyz = cb0[14].xyz + cb0[3].xyz;
  r0.w = dot(r1.xyz, float3(1,1,1));
  r0.w = cmp(abs(r0.w) < 0.00999999978);
  r0.z = min(r0.x, r0.z);
  r0.x = r0.w ? r0.z : r0.x;
  r0.xzw = cb0[5].xyz * r0.xxx;
  r1.xyz = r5.xyz * float3(2,2,2) + float3(-1,-1,-1);
  r1.w = dot(r1.xyz, r1.xyz);
  r1.w = rsqrt(r1.w);
  r1.xyz = r1.xyz * r1.www;
  r2.xyz = -cb1[4].xyz + r2.xyw;
  r1.w = dot(r2.xyz, r2.xyz);
  r1.w = rsqrt(r1.w);
  r5.xyz = r2.xyz * r1.www;
  if (r0.y != 0) {
    r0.y = cmp(r4.x == 1.000000);
    r2.w = r0.y ? 1.000000 : 0;
    r6.yz = r4.yx;
    r6.xw = float2(0.0399999991,1);
    r6.xy = r0.yy ? r6.xy : r6.zw;
    r0.y = saturate(dot(r1.xyz, -cb0[3].xyz));
    r3.w = 1 + -r4.w;
    r7.xyz = -r2.xyz * r1.www + -cb0[3].xyz;
    r5.w = dot(r7.xyz, r7.xyz);
    r5.w = max(0.00100000005, r5.w);
    r5.w = rsqrt(r5.w);
    r7.xyz = r7.xyz * r5.www;
    r5.w = dot(r1.xyz, -r5.xyz);
    r6.z = saturate(dot(r1.xyz, r7.xyz));
    r6.w = saturate(dot(-cb0[3].xyz, r7.xyz));
    r7.x = r6.w * r6.w;
    r7.x = dot(r7.xx, r3.ww);
    r7.x = -0.5 + r7.x;
    r7.y = 1 + -r0.y;
    r7.z = r7.y * r7.y;
    r7.z = r7.z * r7.z;
    r7.z = r7.z * r7.y;
    r7.z = r7.x * r7.z + 1;
    r7.w = 1 + -abs(r5.w);
    r8.x = r7.w * r7.w;
    r8.x = r8.x * r8.x;
    r7.w = r8.x * r7.w;
    r7.x = r7.x * r7.w + 1;
    r7.x = r7.z * r7.x;
    r7.x = r7.x * r0.y;
    r7.z = r3.w * r3.w;
    r3.w = -r3.w * r3.w + 1;
    r7.w = abs(r5.w) * r3.w + r7.z;
    r3.w = r0.y * r3.w + r7.z;
    r3.w = abs(r5.w) * r3.w;
    r3.w = r0.y * r7.w + r3.w;
    r3.w = 9.99999975e-06 + r3.w;
    r3.w = 0.5 / r3.w;
    r5.w = r7.z * r7.z;
    r7.z = r6.z * r5.w + -r6.z;
    r6.z = r7.z * r6.z + 1;
    r5.w = 0.318309873 * r5.w;
    r6.z = r6.z * r6.z + 1.00000001e-07;
    r5.w = r5.w / r6.z;
    r3.w = r5.w * r3.w;
    r3.w = 3.14159274 * r3.w;
    r0.y = r3.w * r0.y;
    r0.y = max(0, r0.y);
    r3.w = dot(r6.xxx, r6.xxx);
    r3.w = cmp(r3.w != 0.000000);
    r3.w = r3.w ? 1.000000 : 0;
    r0.y = r3.w * r0.y;
    r3.w = 1 + -r6.w;
    r5.w = r3.w * r3.w;
    r5.w = r5.w * r5.w;
    r3.w = r5.w * r3.w;
    r5.w = 1 + -r6.x;
    r3.w = r5.w * r3.w + r6.x;
    r0.y = r3.w * r0.y;
    r0.y = r0.y * r6.y;
    r6.xyz = r7.xxx * r0.xzw;
    r7.xzw = r0.yyy * r0.xzw;
    r6.xyz = r3.xyz * r6.xyz + r7.xzw;
    r3.w = 10 * r4.y;
    r5.w = -r4.y * 10 + 6;
    r3.w = r2.w * r5.w + r3.w;
    r7.xzw = r1.xyz * float3(0.00999999978,0.00999999978,0.00999999978) + -cb0[3].xyz;
    r5.x = saturate(dot(r7.xzw, r5.xyz));
    r3.w = r5.x * r3.w + -r3.w;
    r3.w = exp2(r3.w);
    r5.xyz = r3.www * r0.xzw;
    r3.w = 1 + -r7.y;
    r2.w = r2.w * r3.w + r7.y;
    r5.xyz = r5.xyz * r2.www;
    r7.xyz = float3(4,4,4) * r3.xyz;
    r7.xyz = r7.xyz * r4.zzz;
    r5.xyz = r7.xyz * r5.xyz;
    r0.y = saturate(r0.y);
    r0.y = 1 + -r0.y;
    r5.xyz = r5.xyz * r0.yyy + r6.xyz;
  } else {
    r2.xyz = -r2.xyz * r1.www + -cb0[3].xyz;
    r0.y = dot(r2.xyz, r2.xyz);
    r0.y = max(0.00100000005, r0.y);
    r0.y = rsqrt(r0.y);
    r2.xyz = r2.xyz * r0.yyy;
    r0.y = saturate(dot(r1.xyz, -cb0[3].xyz));
    r1.x = saturate(dot(r1.xyz, r2.xyz));
    r1.y = saturate(dot(-cb0[3].xyz, r2.xyz));
    r1.z = -r4.w * 0.925000012 + 1;
    r1.w = r1.z * r1.z;
    r2.x = r1.w * r1.w;
    r1.xy = r1.xy * r1.xy;
    r1.w = r1.w * r1.w + -1;
    r1.x = r1.x * r1.w + 1.00001001;
    r1.y = max(0.100000001, r1.y);
    r1.z = r1.z * r1.z + 0.5;
    r1.xy = r1.xy * r1.xz;
    r1.x = r1.y * r1.x;
    r1.x = 4 * r1.x;
    r1.x = r2.x / r1.x;
    r1.xyz = r1.xxx * r4.xyz + r3.xyz;
    r0.xzw = r1.xyz * r0.xzw;
    r5.xyz = r0.xzw * r0.yyy;
  }
  o0.xyz = r5.xyz;
  o0.w = 1;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v0.6.109 on Wed Feb 11 19:53:26 2026
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float
// TEXCOORD                 0   xyzw        1     NONE   float   xy w
// TEXCOORD                 1   xyz         2     NONE   float   xyz
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target                0   xyzw        0   TARGET   float   xyzw
//
ps_4_0
dcl_constantbuffer CB0[15], immediateIndexed
dcl_constantbuffer CB1[8], immediateIndexed
dcl_constantbuffer CB2[22], immediateIndexed
dcl_constantbuffer CB3[26], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s1, mode_default
dcl_sampler s2, mode_default
dcl_sampler s3, mode_default
dcl_sampler s4, mode_default
dcl_sampler s5, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_texture2d (float,float,float,float) t1
dcl_resource_texture2d (float,float,float,float) t2
dcl_resource_texture2d (float,float,float,float) t3
dcl_resource_texture2d (float,float,float,float) t4
dcl_resource_texture2d (float,float,float,float) t5
dcl_input_ps linear v1.xyw
dcl_input_ps linear v2.xyz
dcl_output o0.xyzw
dcl_temps 9
div r0.x, cb1[5].z, v2.z
mul r0.xyz, r0.xxxx, v2.xyzx
div r1.xy, v1.xyxx, v1.wwww
sample r2.xyzw, r1.xyxx, t0.xyzw, s0
mad r0.w, cb1[7].x, r2.x, cb1[7].y
div r0.w, l(1.000000, 1.000000, 1.000000, 1.000000), r0.w
mul r2.xyz, r0.wwww, r0.xyzx
mul r3.xyz, r2.yyyy, cb2[19].xyzx
mad r2.xyw, cb2[18].xyxz, r2.xxxx, r3.xyxz
mad r2.xyw, cb2[20].xyxz, r2.zzzz, r2.xyxw
add r2.xyw, r2.xyxw, cb2[21].xyxz
add r3.xyz, r2.xywx, -cb3[25].xyzx
dp3 r0.x, r3.xyzx, r3.xyzx
sqrt r0.x, r0.x
mad r0.x, -r0.z, r0.w, r0.x
mad r0.x, cb3[25].w, r0.x, r2.z
mad_sat r0.x, r0.x, cb3[24].z, cb3[24].w
sample r3.xyzw, r1.xyxx, t1.xyzw, s1
add r0.y, -r3.x, l(1.000000)
mad r0.x, r0.x, r0.y, r3.x
sample r3.xyzw, r1.xyxx, t2.xyzw, s2
sample r4.xyzw, r1.xyxx, t3.xyzw, s3
sample r5.xyzw, r1.xyxx, t4.xyzw, s4
mad r0.y, r5.w, l(3.000000), l(0.500000)
round_ni r0.y, r0.y
eq r0.y, r0.y, l(2.000000)
sample r1.xyzw, r1.xyxx, t5.xyzw, s5
lt r0.z, r1.x, l(0.000000)
mul r0.w, r1.x, l(-0.125000)
round_ni r0.w, r0.w
mul r0.w, r0.w, l(0.250000)
frc r0.w, r0.w
mad r0.w, -r0.w, l(1.33333337), l(1.000000)
movc r0.z, r0.z, r0.w, l(1.000000)
add r1.xyz, cb0[3].xyzx, cb0[14].xyzx
dp3 r0.w, r1.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
lt r0.w, |r0.w|, l(0.010000)
min r0.z, r0.z, r0.x
movc r0.x, r0.w, r0.z, r0.x
mul r0.xzw, r0.xxxx, cb0[5].xxyz
mad r1.xyz, r5.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(-1.000000, -1.000000, -1.000000, 0.000000)
dp3 r1.w, r1.xyzx, r1.xyzx
rsq r1.w, r1.w
mul r1.xyz, r1.wwww, r1.xyzx
add r2.xyz, r2.xywx, -cb1[4].xyzx
dp3 r1.w, r2.xyzx, r2.xyzx
rsq r1.w, r1.w
mul r5.xyz, r1.wwww, r2.xyzx
if_nz r0.y
  eq r0.y, r4.x, l(1.000000)
  and r2.w, r0.y, l(0x3f800000)
  mov r6.yz, r4.yyxy
  mov r6.xw, l(0.040000,0,0,1.000000)
  movc r6.xy, r0.yyyy, r6.xyxx, r6.zwzz
  dp3_sat r0.y, r1.xyzx, -cb0[3].xyzx
  add r3.w, -r4.w, l(1.000000)
  mad r7.xyz, -r2.xyzx, r1.wwww, -cb0[3].xyzx
  dp3 r5.w, r7.xyzx, r7.xyzx
  max r5.w, r5.w, l(0.001000)
  rsq r5.w, r5.w
  mul r7.xyz, r5.wwww, r7.xyzx
  dp3 r5.w, r1.xyzx, -r5.xyzx
  dp3_sat r6.z, r1.xyzx, r7.xyzx
  dp3_sat r6.w, -cb0[3].xyzx, r7.xyzx
  mul r7.x, r6.w, r6.w
  dp2 r7.x, r7.xxxx, r3.wwww
  add r7.x, r7.x, l(-0.500000)
  add r7.y, -r0.y, l(1.000000)
  mul r7.z, r7.y, r7.y
  mul r7.z, r7.z, r7.z
  mul r7.z, r7.y, r7.z
  mad r7.z, r7.x, r7.z, l(1.000000)
  add r7.w, -|r5.w|, l(1.000000)
  mul r8.x, r7.w, r7.w
  mul r8.x, r8.x, r8.x
  mul r7.w, r7.w, r8.x
  mad r7.x, r7.x, r7.w, l(1.000000)
  mul r7.x, r7.x, r7.z
  mul r7.x, r0.y, r7.x
  mul r7.z, r3.w, r3.w
  mad r3.w, -r3.w, r3.w, l(1.000000)
  mad r7.w, |r5.w|, r3.w, r7.z
  mad r3.w, r0.y, r3.w, r7.z
  mul r3.w, r3.w, |r5.w|
  mad r3.w, r0.y, r7.w, r3.w
  add r3.w, r3.w, l(0.000010)
  div r3.w, l(0.500000), r3.w
  mul r5.w, r7.z, r7.z
  mad r7.z, r6.z, r5.w, -r6.z
  mad r6.z, r7.z, r6.z, l(1.000000)
  mul r5.w, r5.w, l(0.318309873)
  mad r6.z, r6.z, r6.z, l(1.000000012E-07)
  div r5.w, r5.w, r6.z
  mul r3.w, r3.w, r5.w
  mul r3.w, r3.w, l(3.14159274)
  mul r0.y, r0.y, r3.w
  max r0.y, r0.y, l(0.000000)
  dp3 r3.w, r6.xxxx, r6.xxxx
  ne r3.w, r3.w, l(0.000000)
  and r3.w, r3.w, l(0x3f800000)
  mul r0.y, r0.y, r3.w
  add r3.w, -r6.w, l(1.000000)
  mul r5.w, r3.w, r3.w
  mul r5.w, r5.w, r5.w
  mul r3.w, r3.w, r5.w
  add r5.w, -r6.x, l(1.000000)
  mad r3.w, r5.w, r3.w, r6.x
  mul r0.y, r0.y, r3.w
  mul r0.y, r6.y, r0.y
  mul r6.xyz, r0.xzwx, r7.xxxx
  mul r7.xzw, r0.xxzw, r0.yyyy
  mad r6.xyz, r3.xyzx, r6.xyzx, r7.xzwx
  mul r3.w, r4.y, l(10.000000)
  mad r5.w, -r4.y, l(10.000000), l(6.000000)
  mad r3.w, r2.w, r5.w, r3.w
  mad r7.xzw, r1.xxyz, l(0.010000, 0.000000, 0.010000, 0.010000), -cb0[3].xxyz
  dp3_sat r5.x, r7.xzwx, r5.xyzx
  mad r3.w, r5.x, r3.w, -r3.w
  exp r3.w, r3.w
  mul r5.xyz, r0.xzwx, r3.wwww
  add r3.w, -r7.y, l(1.000000)
  mad r2.w, r2.w, r3.w, r7.y
  mul r5.xyz, r2.wwww, r5.xyzx
  mul r7.xyz, r3.xyzx, l(4.000000, 4.000000, 4.000000, 0.000000)
  mul r7.xyz, r4.zzzz, r7.xyzx
  mul r5.xyz, r5.xyzx, r7.xyzx
  mov_sat r0.y, r0.y
  add r0.y, -r0.y, l(1.000000)
  mad r5.xyz, r5.xyzx, r0.yyyy, r6.xyzx
else
  mad r2.xyz, -r2.xyzx, r1.wwww, -cb0[3].xyzx
  dp3 r0.y, r2.xyzx, r2.xyzx
  max r0.y, r0.y, l(0.001000)
  rsq r0.y, r0.y
  mul r2.xyz, r0.yyyy, r2.xyzx
  dp3_sat r0.y, r1.xyzx, -cb0[3].xyzx
  dp3_sat r1.x, r1.xyzx, r2.xyzx
  dp3_sat r1.y, -cb0[3].xyzx, r2.xyzx
  mad r1.z, -r4.w, l(0.925000), l(1.000000)
  mul r1.w, r1.z, r1.z
  mul r2.x, r1.w, r1.w
  mul r1.xy, r1.xyxx, r1.xyxx
  mad r1.w, r1.w, r1.w, l(-1.000000)
  mad r1.x, r1.x, r1.w, l(1.000010)
  max r1.y, r1.y, l(0.100000)
  mad r1.z, r1.z, r1.z, l(0.500000)
  mul r1.xy, r1.xzxx, r1.xyxx
  mul r1.x, r1.x, r1.y
  mul r1.x, r1.x, l(4.000000)
  div r1.x, r2.x, r1.x
  mad r1.xyz, r1.xxxx, r4.xyzx, r3.xyzx
  mul r0.xzw, r0.xxzw, r1.xxyz
  mul r5.xyz, r0.yyyy, r0.xzwx
endif
mov o0.xyz, r5.xyzx
mov o0.w, l(1.000000)
ret
// Approximately 0 instruction slots used

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