//Sun position PS.
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v1.3.16 on Sun May 23 12:09:39 2021
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float
// TEXCOORD                 0   xy          1     NONE   float   xy
// TEXCOORD                 1   xy          2     NONE   float   xy
// TEXCOORD                 2   xy          3     NONE   float   xy
//
//
// 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[1], immediateIndexed
dcl_constantbuffer cb1[44], immediateIndexed
dcl_constantbuffer cb2[18], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s1, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_texture2d (float,float,float,float) t1
dcl_input_ps linear v1.xy
dcl_input_ps linear v2.xy
dcl_input_ps linear v3.xy
dcl_output o0.xyzw
dcl_temps 40
dcl_resource_texture2d (float,float,float,float) t125
ld_indexable(texture2d)(float,float,float,float) r25.xyzw, l(0, 0, 0, 0), t125.xyzw

mov r11.xy, v1.xy
mad r11.x, -r25.x, l(0.5), r11.x

add r0.x, v3.y, l(-1.000000)
max r0.x, r0.x, l(1.000000)
div r0.x, v3.x, r0.x
add r0.x, r0.x, l(-0.500000)
add r0.y, v2.y, v2.x
mul r0.y, r0.y, cb2[16].y
div r0.z, v3.x, v3.y
mad r0.x, r0.x, r0.y, r0.z
frc r0.x, -r0.x
mul r0.x, r0.x, l(6.28318548)
sincos r0.x, r1.x, r0.x
mov r2.x, -r0.x
mov r2.y, r1.x
mov r2.z, r0.x
mul r0.xy, v1.xyxx, l(0.500000, -0.500000, 0.000000, 0.000000)
dp2 r1.y, r0.yxyy, r2.xyxx
dp2 r1.z, r0.yxyy, r2.yzyy
mad_sat r0.xy, r1.yzyy, cb2[16].zzzz, l(0.500000, 0.500000, 0.000000, 0.000000)
ftoi r0.z, cb2[16].w
imin r0.z, r0.z, l(3)
ishr r0.w, l(8), r0.z
itof r0.zw, r0.zzzw
add r1.x, r0.w, l(-1.000000)
div r1.x, r1.x, r0.w
div r0.w, l(0.500000), r0.w
mad r1.yz, r0.xxyx, r1.xxxx, r0.wwww
add r0.x, r1.y, cb0[0].x
div r1.x, r0.x, cb0[0].y
sample_l_indexable(texture2d)(float,float,float,float) r0.xyz, r1.xzxx, t1.xyzw, s0, r0.z
mul r0.xyz, r0.xyzx, cb1[43].yyyy
max r1.xyz, |r0.xyzx|, l(0.000001, 0.000001, 0.000001, 0.000000)
rsq r1.xyz, r1.xyzx
div r1.xyz, l(1.000000, 1.000000, 1.000000, 1.000000), r1.xyzx
mul r1.xyz, r1.xyzx, l(3.000000, 3.000000, 3.000000, 0.000000)
min r1.xyz, r1.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
max r0.xyz, r0.xyzx, r1.xyzx
add r1.xyz, -cb2[2].xyzx, cb2[4].xyzx
mad r2.xy, v1.xyxx, l(0.500000, -0.500000, 0.000000, 0.000000), l(0.500000, 0.500000, 0.000000, 0.000000)
sample_indexable(texture2d)(float,float,float,float) r0.w, r2.xyxx, t0.yzwx, s1
mad r1.xyz, r0.wwww, r1.xyzx, cb2[2].xyzx
add r2.xyz, -r1.xyzx, cb2[6].xyzx
mul r1.w, r0.w, r0.w
mad r1.xyz, r1.wwww, r2.xyzx, r1.xyzx
mul r1.xyz, r0.wwww, r1.xyzx
max r1.xyz, |r1.xyzx|, l(0.000001, 0.000001, 0.000001, 0.000000)
log r1.xyz, r1.xyzx
mul r1.xyz, r1.xyzx, cb2[16].xxxx
exp r1.xyz, r1.xyzx
mul r0.xyz, r0.xyzx, r1.xyzx
mul r0.xyz, r0.xyzx, cb2[17].xxxx
dp2 r0.w, v2.xyxx, v2.xyxx
sqrt r0.w, r0.w
add_sat r0.w, -r0.w, l(1.500000)
mad r0.xyz, r0.xyzx, r0.wwww, cb2[7].xyzx
max r0.xyz, r0.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
mul o0.xyz, r0.xyzx, cb0[0].zzzz
mov o0.w, l(1.000000)
ret
// Approximately 0 instruction slots used
