// Dust clouds when landing/stomping PS
// Note: HLSL error occurred while dumping
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v0.6.164 on Tue Oct 28 01:34:42 2025
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float     zw
// TEXCOORD                 0   xy          1     NONE   float   xy
// COLOR                    0   xyzw        2     NONE   float
// TEXCOORD                 3   xyz         3     NONE   float   xyz
// NORMAL                   0   xyzw        4     NONE   float   xyzw
// NORMAL                   1   x           5     NONE   float   x
// NORMAL                   2    y          5     NONE   float
// NORMAL                   3     z         5     NONE   float     z
// NORMAL                   4      w        5     NONE   float      w
// NORMAL                   5   x           6     NONE   float   x
//
//
// 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[65], 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_siv linear noperspective v0.zw, position
dcl_input_ps linear v1.xy
dcl_input_ps linear v3.xyz
dcl_input_ps constant v4.xyzw
dcl_input_ps constant v5.x
dcl_input_ps constant v5.z
dcl_input_ps constant v5.w
dcl_input_ps constant v6.x
dcl_output o0.xyzw
//dcl_temps 2

//Declare
dcl_temps 28
dcl_resource_texture2d (float,float,float,float) t125


mul r0.xyzw, v3.yyyy, cb0[62].xyww
mad r0.xyzw, cb0[61].xyww, v3.xxxx, r0.xyzw
mad r0.xyzw, cb0[63].xyww, v3.zzzz, r0.xyzw
add r0.xyzw, r0.xyzw, cb0[64].xyww
mul r0.y, r0.y, cb0[12].x
mul r1.xzw, r0.xxzy, l(0.500000, 0.000000, 0.500000, 0.500000)
add r0.xy, r1.zzzz, r1.xwxx

// HLSL reference
// r0.x += stereo.x * (r0.z - stereo.y) * 0.5;
// r0.xy = r0.xy / r0.zz;

// Haloing fix on dust clouds
ld_indexable(texture2d)(float,float,float,float) r16.xyzw, l(0, 0, 0, 0), t125.xyzw
add r18.x, r0.z, -r16.y        // r1.x = (r0.z - stereo.y)
mul r18.x, r18.x, l(0.5)           // r1.x = (r0.z - stereo.y) * 0.5
mad r0.x, r16.x, r18.x, r0.x   // r0.x = stereo.x * r1.x + r0.x

// Modified assembly code
//div r0.xy, r0.xy, r0.zz          // r0.xy = r0.xy / r0.z

// Original assembly code
div r0.xy, r0.xyxx, r0.zzzz

sample_indexable(texture2d)(float,float,float,float) r0.x, r0.xyxx, t1.xyzw, s1
mad r0.x, cb0[14].x, r0.x, cb0[14].y
div r0.x, l(1.000000, 1.000000, 1.000000, 1.000000), r0.x
mad r0.x, r0.x, cb0[12].z, -r0.z
mad_sat r0.y, r0.w, cb0[47].z, cb0[47].w
add r0.y, -r0.y, l(1.000000)
mul_sat r0.x, r0.x, v6.x
add r1.xyz, v3.xyzx, -cb0[11].xyzx
dp3 r0.z, r1.xyzx, r1.xyzx
sqrt r0.z, r0.z
add r0.z, r0.z, -v5.w
add r0.w, -v5.w, v5.z
div_sat r0.z, r0.z, r0.w
add r0.w, -v4.w, l(1.000000)
sample_indexable(texture2d)(float,float,float,float) r1.xyzw, v1.xyxx, t0.xyzw, s0
add_sat r0.w, -r0.w, r1.w
mul r0.z, r0.z, r0.w
ge r0.z, r0.z, v5.x
and r0.z, r0.z, l(0x3f800000)
mul o0.w, r0.z, r0.x
mul r0.xzw, r1.xxyz, v4.xxyz
mad r1.xyz, -r1.xyzx, v4.xyzx, cb0[48].xyzx
mad r0.xyz, r0.yyyy, r1.xyzx, r0.xzwx
add r0.xyz, r0.xyzx, -cb0[48].xyzx
mul r0.w, v0.w, v0.z
div r0.w, r0.w, cb0[12].y
add r0.w, -r0.w, l(1.000000)
mul r0.w, r0.w, cb0[12].z
max r0.w, r0.w, l(0.000000)
mad_sat r0.w, r0.w, cb0[47].z, cb0[47].w
mad o0.xyz, r0.wwww, r0.xyzx, cb0[48].xyzx
ret
// Approximately 0 instruction slots used

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