// MANUALLY DUMPED [ShaderRegex\ShaderFixes\UE5_masterotaku.ini\DecalsPS3z_1_nospec] KH3 extra input PS. Clouds during final Xehanort battle in Remind DLC. Part with keyholes. Full depth.
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v0.6.198 on Fri Apr 24 18:12:16 2026
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// TEXCOORD                10   xyzw        0     NONE   float
// TEXCOORD                11   xyzw        1     NONE   float
// COLOR                    0   xyzw        2     NONE   float   xyz
// COLOR                    1   xyzw        3     NONE   float   xyz
// SV_Position              0   xyzw        4      POS   float   xyz
// SV_IsFrontFace           0   x           5    FFACE    uint
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target                0   xyzw        0   TARGET   float   xyzw
// SV_Target                1   xyzw        1   TARGET   float   xyzw
// SV_Target                2   xyzw        2   TARGET   float   xyzw
// SV_Target                3   xyzw        3   TARGET   float   xyzw
// SV_Target                4   xyzw        4   TARGET   float   xyzw
// SV_Target                5   xyzw        5   TARGET   float   xyzw
// SV_Target                6   xyzw        6   TARGET   float   xyzw
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer CB0[162], immediateIndexed
dcl_constantbuffer CB1[19], immediateIndexed
dcl_constantbuffer CB2[4], immediateIndexed
dcl_sampler s0, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_texture2d (float,float,float,float) t1
dcl_input_ps linear v2.xyz
dcl_input_ps linear v3.xyz
dcl_input_ps_siv linear noperspective v4.xyz, position
dcl_output o0.xyzw
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_temps 19
dcl_resource_texture2d (float,float,float,float) t125
dcl_resource_texture1d (float,float,float,float) t120

ld_indexable(texture2d)(float,float,float,float) r7.xyzw, l(0, 0, 0, 0), t125.xyzw
ld_indexable(texture1d)(float,float,float,float) r5.xyzw, l(15, 0, 0, 0), t120.xyzw
ftou r6.xyzw, r5.xyzw
mov r8.xy, v4.xyxx
mov r18.xy, v4.xyxx
mul r9.xyzw, v4.yyyy, cb0[37].xyzw
mad r9.xyzw, r8.xxxx, cb0[36].xyzw, r9.xyzw
//Pattern break.
mad r9.xyzw, v4.zzzz, cb0[38].xyzw, r9.xyzw
add r9.xyzw, r9.xyzw, cb0[39].xyzw
ge r10.w, cb0[r6.x + 0].x, l(20.0)
if_nz r10.w
mul r10.x, l(0.5), cb0[r6.x + 0].x
else
mul r10.x, l(0.5), cb1[r6.x + 0].x
endif
mad r10.y, r9.w, r7.y, l(-1.0)
mul r10.y, r10.y, r10.x
mad r8.x, r7.x, r10.y, r8.x

mad r18.x, -r7.x, r10.x, r18.x

mul r0.xy, r18.xyxx, cb0[119].zwzz
mul r0.zw, cb0[118].xxxy, cb0[119].zzzw
div r0.xy, r0.xyxx, r0.zwzz
add r0.xy, r0.xyxx, cb2[1].xyxx
mul r0.xy, r0.xyxx, cb2[2].xyxx
sample_indexable(texture2d)(float,float,float,float) r0.xyz, r0.xyxx, t0.xyzw, s0
mul r1.xyz, v2.xyzx, v2.xyzx
mul r0.xyz, r0.xyzx, r1.xyzx
mad r0.xyz, r0.xyzx, v3.xyzx, cb2[3].xyzx
ieq r0.w, cb1[17].y, l(1)
ne r1.xy, l(0.000000, 0.000000, 0.000000, 0.000000), cb1[17].zwzz
or r0.w, r0.w, r1.x
or r1.x, cb1[17].y, l(512)
movc r0.w, r0.w, r1.x, cb1[17].y
or r1.x, r0.w, l(2048)
movc r0.w, r1.y, r1.x, r0.w
ne r1.xy, l(0.000000, 0.000000, 0.000000, 0.000000), cb1[18].xyxx
or r1.z, r0.w, l(0x00004000)
movc r0.w, r1.x, r1.z, r0.w
or r1.x, r0.w, l(4096)
movc r0.w, r1.y, r1.x, r0.w
mad r1.xyz, cb0[123].wwww, l(0.040000, 0.040000, 0.040000, 0.000000), cb0[123].xyzx
mad r1.xyz, r1.xyzx, l(0.450000, 0.450000, 0.450000, 0.000000), cb0[122].xyzx
lt r1.w, l(0.000000), cb0[126].x
if_nz r1.w


mul r2.xyzw, v4.yyyy, cb0[37].xyzw
mad r2.xyzw, r8.xxxx, cb0[36].xyzw, r2.xyzw
//Pattern break.
mad r2.xyzw, v4.zzzz, cb0[38].xyzw, r2.xyzw
add r2.xyzw, r2.xyzw, cb0[39].xyzw
  div r2.xyz, r2.xyzx, r2.wwww
  add r2.xyz, r2.xyzx, -cb0[58].xyzx
  add r3.xyz, r2.xyzx, -cb1[8].xyzx
  add r4.xyz, cb1[9].xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
  lt r3.xyz, r4.xyzx, |r3.xyzx|
  or r1.w, r3.y, r3.x
  or r1.w, r3.z, r1.w
  dp3 r2.x, r2.xyzx, l(0.577000, 0.577000, 0.577000, 0.000000)
  mul r2.x, r2.x, l(0.002000)
  frc r2.x, r2.x
  lt r2.x, l(0.500000), r2.x
  movc r2.xyz, r2.xxxx, l(0,1.000000,1.000000,0), l(1.000000,1.000000,0,0)
  movc r0.xyz, r1.wwww, r2.xyzx, r0.xyzx
endif
ne r1.w, l(0.000000, 0.000000, 0.000000, 0.000000), cb0[161].x
if_z r1.w
  ld_indexable(texture2d)(float,float,float,float) r1.w, l(0, 0, 0, 0), t1.yzwx
else
  mov r1.w, cb0[161].y
endif
div r0.xyz, r0.xyzx, r1.wwww
mul r0.xyz, r0.xyzx, cb0[160].wwww
mad o0.xyz, cb0[130].xxxx, r1.xyzx, r0.xyzx
itof r0.x, r0.w
mul o6.w, r0.x, l(0.0000152590219)
mov o0.w, l(0)
mov o1.xyzw, l(0,0,0,0)
mov o2.xyzw, l(0,0,0,0)
mov o3.xyzw, l(0,0,0,0)
mov o4.xyzw, l(0,0,0,0)
mov o5.xyzw, l(0,0,0,0)
mov o6.xyz, l(0,0,0,0)
ret
// Approximately 0 instruction slots used
