// ---- Created with 3Dmigoto v1.3.16 on Mon Jun 24 14:55:54 2024
Texture2D<float4> t3 : register(t3);

Texture3D<float4> t2 : register(t2);

Texture2D<float4> t1 : register(t1);

Texture2D<float4> t0 : register(t0);

SamplerState s3_s : register(s3);

SamplerState s2_s : register(s2);

SamplerState s1_s : register(s1);

SamplerState s0_s : register(s0);

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

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

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




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


void main(
  float4 v0 : SV_POSITION0,
  float4 v1 : COLOR0,
  float4 v2 : TEXCOORD0,
  float4 v3 : TEXCOORD1,
  float4 v4 : TEXCOORD2,
  float4 v5 : TEXCOORD3,
  float4 v6 : TEXCOORD5,
  float4 v7 : TEXCOORD6,
  out float4 o0 : SV_Target0)
{
  float4 r0,r1,r2,r3;
  uint4 bitmask, uiDest;
  float4 fDest;

  r0.x = dot(v7.xyz, v7.xyz);
  r0.x = rsqrt(r0.x);
  r0.xyz = v7.xyz * r0.xxx;
  r1.x = r0.y * r0.y;
  r1.x = r0.x * r0.x + -r1.x;
  r2.xyzw = r0.xyzz * r0.yzzx;
  r3.x = dot(cb2[42].xyzw, r2.xyzw);
  r3.y = dot(cb2[43].xyzw, r2.xyzw);
  r3.z = dot(cb2[44].xyzw, r2.xyzw);
  r1.xyz = cb2[45].xyz * r1.xxx + r3.xyz;
  r0.w = 1;
  r2.x = dot(cb2[39].xyzw, r0.xyzw);
  r2.y = dot(cb2[40].xyzw, r0.xyzw);
  r2.z = dot(cb2[41].xyzw, r0.xyzw);
  r0.xyz = saturate(r2.xyz + r1.xyz);
  r1.xyz = v4.xyz + -v3.xyz;
  r0.w = cmp(cb0[78].x == 4.000000);
  r0.w = r0.w ? 1.000000 : 0;
  r2.xyzw = cmp(cb0[78].xxxx == float4(0,1,2,3));
  r3.xyzw = t0.Sample(s0_s, v2.xy).xyzw;
  r0.w = r2.w ? r3.w : r0.w;
  r0.w = r2.z ? r3.z : r0.w;
  r0.w = r2.y ? r3.y : r0.w;
  r0.w = r2.x ? r3.x : r0.w;
  r1.xyz = r0.www * r1.xyz + v3.xyz;
  r1.xyz = -cb0[75].xyz + r1.xyz;
  r1.xyz = cb0[74].yyy * r1.xyz + cb0[75].xyz;
  r1.xyz = cb0[74].xxx * r1.xyz;
  r1.xyz = v1.xyz * r1.xyz;
  r1.xyz = cb0[80].xyz * r1.xyz;
  r1.xyz = r1.xyz + r1.xyz;
  r0.xyz = r0.xyz * r1.xyz + -r1.xyz;
  r0.xyz = cb0[84].www * r0.xyz + r1.xyz;
  r0.w = cmp(cb0[84].z == 1.000000);
  r0.xyz = r0.www ? r0.xyz : r1.xyz;
  r0.xyz = v5.www * r0.xyz + v5.xyz;
  r0.w = v6.x * 0.00194930285 + 0.00195694715;
  r0.w = sqrt(r0.w);
  r1.z = r0.w * 1.06666672 + -0.0666666701;
  r1.xy = v6.xy / v6.ww;
  r2.xyzw = t2.Sample(s2_s, r1.xyz).xyzw;
  r0.xyz = r2.www * r0.xyz + r2.xyz;
  r0.w = t3.SampleLevel(s3_s, r1.xy, 0).x;
  r1.x = t1.Sample(s1_s, r1.xy).x;
  o0.xyz = r0.www * cb0[86].xyz + r0.xyz;
  r0.x = cmp(cb0[81].x == 4.000000);
  r0.x = r0.x ? 1.000000 : 0;
  r2.xyzw = cmp(cb0[81].xxxx == float4(0,1,2,3));
  r0.x = r2.w ? r3.w : r0.x;
  r0.x = r2.z ? r3.z : r0.x;
  r0.x = r2.y ? r3.y : r0.x;
  r0.x = r2.x ? r3.x : r0.x;
  r0.y = cb0[75].w * v1.w;
  r0.x = r0.y * r0.x;
  r0.y = cb1[8].z * r1.x + cb1[8].w;
  r0.z = cb1[6].z * r1.x;
  r0.y = rcp(r0.y);
  r0.w = cmp(0 < cb0[85].y);
  r0.y = r0.w ? r0.z : r0.y;
  r0.y = -v6.w + r0.y;
  r0.z = saturate(r0.y / cb0[81].z);
  r0.y = saturate(cb0[81].y * r0.y);
  r0.w = 1 + -r0.y;
  r0.y = r0.z * r0.w + r0.y;
  r0.x = r0.x * r0.y;
  r0.x = saturate(dot(r0.xx, cb0[81].ww));
  r0.x = cb0[80].w * r0.x;
  o0.w = cb0[84].y * r0.x;
  o0.x = 1;
  o0.y = 0.36;
  o0.z = 0.25;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v1.3.16 on Mon Jun 24 14:55:54 2024
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float
// COLOR                    0   xyzw        1     NONE   float   xyzw
// TEXCOORD                 0   xyzw        2     NONE   float   xy
// TEXCOORD                 1   xyzw        3     NONE   float   xyz
// TEXCOORD                 2   xyzw        4     NONE   float   xyz
// TEXCOORD                 3   xyzw        5     NONE   float   xyzw
// TEXCOORD                 5   xyzw        6     NONE   float   xy w
// TEXCOORD                 6   xyzw        7     NONE   float   xyz
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target                0   xyzw        0   TARGET   float   xyzw
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer CB0[87], immediateIndexed
dcl_constantbuffer CB1[9], immediateIndexed
dcl_constantbuffer CB2[46], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s1, mode_default
dcl_sampler s2, mode_default
dcl_sampler s3, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_texture2d (float,float,float,float) t1
dcl_resource_texture3d (float,float,float,float) t2
dcl_resource_texture2d (float,float,float,float) t3
dcl_input_ps linear v1.xyzw
dcl_input_ps linear v2.xy
dcl_input_ps linear v3.xyz
dcl_input_ps linear v4.xyz
dcl_input_ps linear v5.xyzw
dcl_input_ps linear v6.xyw
dcl_input_ps linear v7.xyz
dcl_output o0.xyzw
dcl_temps 4
dp3 r0.x, v7.xyzx, v7.xyzx
rsq r0.x, r0.x
mul r0.xyz, r0.xxxx, v7.xyzx
mul r1.x, r0.y, r0.y
mad r1.x, r0.x, r0.x, -r1.x
mul r2.xyzw, r0.yzzx, r0.xyzz
dp4 r3.x, cb2[42].xyzw, r2.xyzw
dp4 r3.y, cb2[43].xyzw, r2.xyzw
dp4 r3.z, cb2[44].xyzw, r2.xyzw
mad r1.xyz, cb2[45].xyzx, r1.xxxx, r3.xyzx
mov r0.w, l(1.000000)
dp4 r2.x, cb2[39].xyzw, r0.xyzw
dp4 r2.y, cb2[40].xyzw, r0.xyzw
dp4 r2.z, cb2[41].xyzw, r0.xyzw
add_sat r0.xyz, r1.xyzx, r2.xyzx
add r1.xyz, -v3.xyzx, v4.xyzx
eq r0.w, cb0[78].x, l(4.000000)
and r0.w, r0.w, l(0x3f800000)
eq r2.xyzw, cb0[78].xxxx, l(0.000000, 1.000000, 2.000000, 3.000000)
sample_indexable(texture2d)(float,float,float,float) r3.xyzw, v2.xyxx, t0.xyzw, s0
movc r0.w, r2.w, r3.w, r0.w
movc r0.w, r2.z, r3.z, r0.w
movc r0.w, r2.y, r3.y, r0.w
movc r0.w, r2.x, r3.x, r0.w
mad r1.xyz, r0.wwww, r1.xyzx, v3.xyzx
add r1.xyz, r1.xyzx, -cb0[75].xyzx
mad r1.xyz, cb0[74].yyyy, r1.xyzx, cb0[75].xyzx
mul r1.xyz, r1.xyzx, cb0[74].xxxx
mul r1.xyz, r1.xyzx, v1.xyzx
mul r1.xyz, r1.xyzx, cb0[80].xyzx
add r1.xyz, r1.xyzx, r1.xyzx
mad r0.xyz, r0.xyzx, r1.xyzx, -r1.xyzx
mad r0.xyz, cb0[84].wwww, r0.xyzx, r1.xyzx
eq r0.w, cb0[84].z, l(1.000000)
movc r0.xyz, r0.wwww, r0.xyzx, r1.xyzx
mad r0.xyz, v5.wwww, r0.xyzx, v5.xyzx
mad r0.w, v6.x, l(0.00194930285), l(0.00195694715)
sqrt r0.w, r0.w
mad r1.z, r0.w, l(1.06666672), l(-0.0666666701)
div r1.xy, v6.xyxx, v6.wwww
sample_indexable(texture3d)(float,float,float,float) r2.xyzw, r1.xyzx, t2.xyzw, s2
mad r0.xyz, r2.wwww, r0.xyzx, r2.xyzx
sample_l_indexable(texture2d)(float,float,float,float) r0.w, r1.xyxx, t3.yzwx, s3, l(0.000000)
sample_indexable(texture2d)(float,float,float,float) r1.x, r1.xyxx, t1.xyzw, s1
mad o0.xyz, r0.wwww, cb0[86].xyzx, r0.xyzx
eq r0.x, cb0[81].x, l(4.000000)
and r0.x, r0.x, l(0x3f800000)
eq r2.xyzw, cb0[81].xxxx, l(0.000000, 1.000000, 2.000000, 3.000000)
movc r0.x, r2.w, r3.w, r0.x
movc r0.x, r2.z, r3.z, r0.x
movc r0.x, r2.y, r3.y, r0.x
movc r0.x, r2.x, r3.x, r0.x
mul r0.y, v1.w, cb0[75].w
mul r0.x, r0.x, r0.y
mad r0.y, cb1[8].z, r1.x, cb1[8].w
mul r0.z, r1.x, cb1[6].z
rcp r0.y, r0.y
lt r0.w, l(0.000000), cb0[85].y
movc r0.y, r0.w, r0.z, r0.y
add r0.y, r0.y, -v6.w
div_sat r0.z, r0.y, cb0[81].z
mul_sat r0.y, r0.y, cb0[81].y
add r0.w, -r0.y, l(1.000000)
mad r0.y, r0.z, r0.w, r0.y
mul r0.x, r0.y, r0.x
dp2_sat r0.x, r0.xxxx, cb0[81].wwww
mul r0.x, r0.x, cb0[80].w
mul o0.w, r0.x, cb0[84].y
ret
// Approximately 0 instruction slots used

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