//Light shafts PS 1.
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
//
//   using 3Dmigoto v0.6.181 on Wed Jul 12 10:18:39 2023
//
//
// Buffer Definitions:
//
// cbuffer $Globals
// {
//
//   float4 projParams;                 // Index:    0.xyzw           Components:     4 [unused]
//   float3 camForward;                 // Index:    1.xyz            Components:     3
//   float3 lightDirection;             // Index:    2.xyz            Components:     3
//   float2 screenSunPos;               // Index:    3.xy             Components:     2
//   float2 oneOverTargetSize;          // Index:    3.zw             Components:     2 [unused]
//   float numSamples;                  // Index:    4.x              Components:     1
//   float density;                     // Index:    4.y              Components:     1
//   float weight;                      // Index:    4.z              Components:     1
//   float decay;                       // Index:    4.w              Components:     1
//   float exposure;                    // Index:    5.x              Components:     1
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// frameSampler_sampler_             sampler      NA          NA    0        1
// backBuffer_sampler_               sampler      NA          NA    1        1
// frameSamplerTex                   texture  float4          2d    0        1
// backBufferTex                     texture  float4          2d    1        1
// $Globals                          cbuffer      NA          NA    0        1
//
//
//
// 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     zw        1     NONE   float     zw
// TEXCOORD                 2   xy          2     NONE   float
// TEXCOORD                 3     zw        2     NONE   float
// TEXCOORD                 4   xyz         3     NONE   float
//
//
// 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[6], 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 v1.zw
dcl_output o0.xyzw
dcl_temps 31
dcl_resource_texture2d (float,float,float,float) t125
ld_indexable(texture2d)(float,float,float,float) r25.xyzw, l(0, 0, 0, 0), t125.xyzw
sample_indexable(texture2d)(float,float,float,float) r0.xyzw, v1.zwzz, t1.xyzw, s1
dp3_sat r1.x, -cb0[2].xyzx, cb0[1].xyzx
mul r1.y, r1.x, cb0[4].x
ftoi r1.z, r1.y
ige r1.w, l(0), r1.z
if_nz r1.w
  mov o0.xyzw, r0.xyzw
  ret
endif
sample_indexable(texture2d)(float,float,float,float) r2.xyz, v1.xyxx, t0.xyzw, s0
add r3.xy, v1.xyxx, -cb0[3].xyxx

mad r3.x, r25.x, l(-0.5), r3.x

round_z r1.y, r1.y
div r1.y, l(1.000000, 1.000000, 1.000000, 1.000000), r1.y
mul r1.y, r1.y, cb0[4].y
mov r4.xyz, r2.xyzx
mov r3.zw, v1.xxxy
mov r5.x, l(1.000000)
mov r1.w, l(0)
loop
  ige r2.w, r1.w, r1.z
  breakc_nz r2.w
  mad r3.zw, -r3.xxxy, r1.yyyy, r3.zzzw
  sample_l_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r6.xyz, r3.zwzz, t0.xyzw, s0, l(0.000000)
  mul r5.xy, r5.xxxx, cb0[4].wzww
  mad r4.xyz, r6.xyzx, r5.yyyy, r4.xyzx
  iadd r1.w, r1.w, l(1)
endloop
mul r2.xyz, r4.xyzx, cb0[5].xxxx
mov r2.w, l(1.000000)
mad o0.xyzw, r1.xxxx, r2.xyzw, r0.xyzw
ret
// Approximately 31 instruction slots used
