//Fog PS 1.
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
//
//   using 3Dmigoto v0.6.181 on Wed Jul 12 12:59:14 2023
//
//
// Buffer Definitions:
//
// cbuffer $Globals
// {
//
//   float4 projParams;                 // Index:    0.xyzw           Components:     4
//   float3 eyePosWorld;                // Index:    1.xyz            Components:     3
//   float4 fogColor;                   // Index:    2.xyzw           Components:     4
//   float3 fogData;                    // Index:    3.xyz            Components:     3
//   float4 rtParams0;                  // Index:    4.xyzw           Components:     4 [unused]
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// prepassDepthTex_sampler_          sampler      NA          NA    1        1
// prepassDepthTexTex                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
// TEXCOORD                 2   xy          2     NONE   float
// TEXCOORD                 3     zw        2     NONE   float
// TEXCOORD                 4   xyz         3     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[4], immediateIndexed
dcl_constantbuffer CB13[40], immediateIndexed
dcl_sampler s1, mode_default
dcl_resource_texture2d (float,float,float,float) t1
dcl_input_ps linear v1.xy
dcl_input_ps linear v3.xyz
dcl_output o0.xyzw
dcl_temps 29
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_l_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r0.x, v1.xyxx, t1.xyzw, s1, l(0.000000)
add r0.x, r0.x, -cb0[0].z
div r0.x, cb0[0].w, r0.x

mov r10.x, r0.x

div r0.x, r0.x, cb0[0].y
ge r0.y, r0.x, l(0.999990)
movc r0.x, r0.y, l(50.000000), r0.x

mov r21.xyz, v3.xyzx
div r24.x, r25.y, r10.x
add r24.x, r24.x, l(-1.0)
mul r26.x, r24.x, cb13[30].x
mul r26.y, r24.x, cb13[31].x
mul r26.z, r24.x, cb13[32].x
mul r26.w, cb13[30].x, cb13[30].x
mad r26.w, cb13[31].x, cb13[31].x, r26.w
mad r26.w, cb13[32].x, cb13[32].x, r26.w
div r26.xyz, r26.xyzx, r26.wwww
div r26.xyz, r26.xyzx, r0.x
//mul r26.xyz, r26.xyzx, cb0[3].y
mul r26.xyz, r26.xyzx, l(128.0)
//mul r26.xyz, r26.xyzx, l(2000.0)
//mul r26.xyz, r26.xyzx, l(0.1)
//mad r21.xyz, r25.xxxx, r26.xyzx, r21.xyzx

mad r0.xyz, r21.xyzx, r0.xxxx, cb0[1].xyzx
add r0.xyw, -r0.xyxz, cb0[1].xyxz
mad r0.z, -r0.z, cb0[3].z, l(1.000000)
dp3 r0.x, r0.xywx, r0.xywx
sqrt r0.x, r0.x
add r0.x, r0.x, -cb0[3].y
mul r0.x, r0.x, -cb0[3].x
mul r0.x, r0.z, r0.x
mul r0.x, r0.x, l(1.442695)
exp r0.x, r0.x
min r0.x, r0.x, l(1.000000)
add o0.w, -r0.x, l(1.000000)
mov o0.xyz, cb0[2].xyzx
ret
// Approximately 20 instruction slots used
