//Volumetric lighting CS from cache.
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.0.10011.16384
//
//   using 3Dmigoto v1.3.16 on Fri Jan 14 20:06:33 2022
//
//
// Note: shader requires additional functionality:
//       64 UAV slots
//
//
// Buffer Definitions:
//
// cbuffer ConstBuf__volumetricFogData
// {
//
//   struct VolumetricFogData
//   {
//
//       float4 cPoissonSamples[64];    // Index:    0
//       float4x4 cInvViewProjMatrixNoZReproj;// Index:   64
//       float4x4 cReprojToPreviousFrame;// Index:   68
//       float4 cWorldEyePos;           // Index:   72
//       float4x4 cGIVolumeTransform;   // Index:   73
//       float4 cGIVolumeStart;         // Index:   77
//       float4 cGIVolumeTexelScale;    // Index:   78
//
//       struct AtmosphericConstants
//       {
//
//           float3 cFogColor;          // Index:   79
//           float cHeightFalloff;      // Index:   79.w
//           float3 cEyePosition;       // Index:   80
//           float cHeightDensity;      // Index:   80.w
//           float cStartDistance;      // Index:   81
//           float cGlobalDensity;      // Index:   81.y
//           float cDepthReprojectScale;// Index:   81.z
//           float cDepthReprojectBias; // Index:   81.w
//           float4x4 cInvProjNoZReproj;// Index:   82
//           float3 cDirectionalFogDirection;// Index:   86
//           float cDirectionalityPower;// Index:   86.w
//           float3 cDirectionalFogColor;// Index:   87
//           float cDensityMapSparseBias;// Index:   87.w
//           float3 cDensityMapInvExtents;// Index:   88
//           float cDensityMapSparseSegmentScale;// Index:   88.w
//           float3 cDensityMapBias;    // Index:   89
//           float cDensityMapSparseCutoff;// Index:   89.w
//           float cVolFogExponentMultiply;// Index:   90
//           float cVolFogDistanceMultiply;// Index:   90.y
//           float cVolFogExponentNormalize;// Index:   90.z
//           float cVolFogDistanceNormalize;// Index:   90.w
//           float cVolFogResolutionScale;// Index:   91
//           int cVolFogWidth;          // Index:   91.y
//           int cVolFogHeight;         // Index:   91.z
//           int cVolFogDepth;          // Index:   91.w
//
//       } atmosphericConstants;        // Index:   79
//       float3 cFogAlbedo;             // Index:   92
//       float cLightingTemporal;       // Index:   92.w
//       float cDensityTemporal;        // Index:   93
//       float cPrevFogResolutionScale; // Index:   93.y
//       float CascadeShadowSize;       // Index:   93.z
//       float OneOverCascadeShadowSize;// Index:   93.w
//       float ShadowTextureW;          // Index:   94
//       float ShadowTextureH;          // Index:   94.y
//       float OneOverShadowTextureW;   // Index:   94.z
//       float OneOverShadowTextureH;   // Index:   94.w
//
//   } resourceTables__volumetricFogData;// Index:    0-94             Components:   380
                                        // Textures:  t0-t6
//
// }
//
// cbuffer ConstBuf__lightConstants
// {
//
//   struct VolumetricLightConstants
//   {
//
//       struct LightingCB
//       {
//
//           uint imageWidth;           // Index:    0
//           uint imageHeight;          // Index:    0.y
//           float invImageWidth;       // Index:    0.z
//           float invImageHeight;      // Index:    0.w
//           uint tilesHorz;            // Index:    1
//           uint tilesVert;            // Index:    1.y
//           uint tilesHorzHalfRes;     // Index:    1.z
//           uint tilesVertHalfRes;     // Index:    1.w
//           uint numLocalShadows;      // Index:    2
//           uint numLocalLights;       // Index:    2.y
//           uint numExposureLights;    // Index:    2.z
//           uint numDirectionalLights; // Index:    2.w
//           uint numDirectionalShadows;// Index:    3
//
//           struct Projector
//           {
//
//               float4x4 mat;          // Index:    4
//
//           } projectors[4];           // Index:    4
//
//           struct DirectionalLight
//           {
//
//               float3 dirWS;          // Index:   20
//               uint groupID;          // Index:   20.w
//               float3 color;          // Index:   21
//               float solidAngle;      // Index:   21.w
//               float halfAngle;       // Index:   22
//               int shadowMaskIndex;   // Index:   22.y
//               int projectorIndex;    // Index:   22.z
//               float ssdoAmount;      // Index:   22.w
//
//           } DirectionalLights[2];    // Index:   20
//
//           struct LightShadowInfo
//           {
//
//               float4x4 gWorldToLight;// Index:   26
//
//               struct CascadeOffset
//               {
//
//                   float fScale;      // Index:   30
//                   float3 vTranslate; // Index:   30.y
//
//               } gCascadeOffset[3];   // Index:   30
//               float4 uvScaleOffset[4];// Index:   33
//               int extraCascadeIndex; // Index:   37
//               float cascadeRange;    // Index:   37.y
//               float2 linearizeConstants;// Index:   37.z
//               float filterSize;      // Index:   38
//               float shadowFade;      // Index:   38.y
//               float shadowBias;      // Index:   38.z
//               float padd;            // Index:   38.w
//
//           } DirectionalShadows[2];   // Index:   26
//
//           struct LocalLightFull
//           {
//
//               float3 posWS;          // Index:   52
//               float sourceRadiusSquared;// Index:   52.w
//               float3 dirWS;          // Index:   53
//               float falloffConstant; // Index:   53.w
//               float3 color;          // Index:   54
//               uint groupID;          // Index:   54.w
//               float innerMinusOuterCosHalfAngleRcp;// Index:   55
//               float outerCosHalfAngle;// Index:   55.y
//               int lightIndex;        // Index:   55.z
//               int capsuleShadowIndex;// Index:   55.w
//               int projectorIndex;    // Index:   56
//               float fadeStartOnDist; // Index:   56.y
//               float fadeRcpDist;     // Index:   56.z
//               float fadeRate;        // Index:   56.w
//               float ssdoAmount;      // Index:   57
//               uint3 _unused1;        // Index:   57.y
//
//           } LocalLightsUnshadowed[32];// Index:   52
//
//           struct LocalLightFull
//           {
//
//               float3 posWS;          // Index:  244
//               float sourceRadiusSquared;// Index:  244.w
//               float3 dirWS;          // Index:  245
//               float falloffConstant; // Index:  245.w
//               float3 color;          // Index:  246
//               uint groupID;          // Index:  246.w
//               float innerMinusOuterCosHalfAngleRcp;// Index:  247
//               float outerCosHalfAngle;// Index:  247.y
//               int lightIndex;        // Index:  247.z
//               int capsuleShadowIndex;// Index:  247.w
//               int projectorIndex;    // Index:  248
//               float fadeStartOnDist; // Index:  248.y
//               float fadeRcpDist;     // Index:  248.z
//               float fadeRate;        // Index:  248.w
//               float ssdoAmount;      // Index:  249
//               uint3 _unused1;        // Index:  249.y
//
//           } LocalLightsShadowed[16]; // Index:  244
//
//           struct LightShadowInfo
//           {
//
//               float4x4 gWorldToLight;// Index:  340
//
//               struct CascadeOffset
//               {
//
//                   float fScale;      // Index:  344
//                   float3 vTranslate; // Index:  344.y
//
//               } gCascadeOffset[3];   // Index:  344
//               float4 uvScaleOffset[4];// Index:  347
//               int extraCascadeIndex; // Index:  351
//               float cascadeRange;    // Index:  351.y
//               float2 linearizeConstants;// Index:  351.z
//               float filterSize;      // Index:  352
//               float shadowFade;      // Index:  352.y
//               float shadowBias;      // Index:  352.z
//               float padd;            // Index:  352.w
//
//           } LocalLightsShadows[16];  // Index:  340
//
//           struct LightShadowInfo
//           {
//
//               float4x4 gWorldToLight;// Index:  548
//
//               struct CascadeOffset
//               {
//
//                   float fScale;      // Index:  552
//                   float3 vTranslate; // Index:  552.y
//
//               } gCascadeOffset[3];   // Index:  552
//               float4 uvScaleOffset[4];// Index:  555
//               int extraCascadeIndex; // Index:  559
//               float cascadeRange;    // Index:  559.y
//               float2 linearizeConstants;// Index:  559.z
//               float filterSize;      // Index:  560
//               float shadowFade;      // Index:  560.y
//               float shadowBias;      // Index:  560.z
//               float padd;            // Index:  560.w
//
//           } ShadowTransmittanceInfo; // Index:  548
//
//           struct LightShadowInfo
//           {
//
//               float4x4 gWorldToLight;// Index:  561
//
//               struct CascadeOffset
//               {
//
//                   float fScale;      // Index:  565
//                   float3 vTranslate; // Index:  565.y
//
//               } gCascadeOffset[3];   // Index:  565
//               float4 uvScaleOffset[4];// Index:  568
//               int extraCascadeIndex; // Index:  572
//               float cascadeRange;    // Index:  572.y
//               float2 linearizeConstants;// Index:  572.z
//               float filterSize;      // Index:  573
//               float shadowFade;      // Index:  573.y
//               float shadowBias;      // Index:  573.z
//               float padd;            // Index:  573.w
//
//           } ExtraCascades[2];        // Index:  561
//
//           struct ExposureLightFull
//           {
//
//               float3 posWS;          // Index:  587
//               float falloffConstant; // Index:  587.w
//               float3 color;          // Index:  588
//               uint groupID;          // Index:  588.w
//
//           } ExposureLightsFull[16];  // Index:  587
//
//       } global;                      // Index:    0
//
//   } resourceTables__lightConstants;  // Index:    0-618            Components:  2476
                                        // Textures:  t8-t11
//
// }
//
// cbuffer ConstBuf__volumetricFogDensityData
// {
//
//   struct VolumetricFogDensityData
//   {
//
//       struct AtmosphericConstants
//       {
//
//           float3 cFogColor;          // Index:    0
//           float cHeightFalloff;      // Index:    0.w
//           float3 cEyePosition;       // Index:    1
//           float cHeightDensity;      // Index:    1.w
//           float cStartDistance;      // Index:    2
//           float cGlobalDensity;      // Index:    2.y
//           float cDepthReprojectScale;// Index:    2.z
//           float cDepthReprojectBias; // Index:    2.w
//           float4x4 cInvProjNoZReproj;// Index:    3
//           float3 cDirectionalFogDirection;// Index:    7
//           float cDirectionalityPower;// Index:    7.w
//           float3 cDirectionalFogColor;// Index:    8
//           float cDensityMapSparseBias;// Index:    8.w
//           float3 cDensityMapInvExtents;// Index:    9
//           float cDensityMapSparseSegmentScale;// Index:    9.w
//           float3 cDensityMapBias;    // Index:   10
//           float cDensityMapSparseCutoff;// Index:   10.w
//           float cVolFogExponentMultiply;// Index:   11
//           float cVolFogDistanceMultiply;// Index:   11.y
//           float cVolFogExponentNormalize;// Index:   11.z
//           float cVolFogDistanceNormalize;// Index:   11.w
//           float cVolFogResolutionScale;// Index:   12
//           int cVolFogWidth;          // Index:   12.y
//           int cVolFogHeight;         // Index:   12.z
//           int cVolFogDepth;          // Index:   12.w
//
//       } atmosphericConstants;        // Index:    0
//
//       struct FogDensityMapConstants
//       {
//
//           float4x4 cMatrix;          // Index:   13
//           float cStartDistance;      // Index:   17
//           float cStartDistanceRcp;   // Index:   17.y
//           float cFogVerticalAttenuation;// Index:   17.z
//           float cDensityHeightStart; // Index:   17.w
//           float cDensityHeightScale; // Index:   18
//           float cGlobalDensityScale; // Index:   18.y
//           float cVolumetricFogScattering;// Index:   18.z
//           float cFlowMap0Scale;      // Index:   18.w
//           float cFlowMap1Scale;      // Index:   19
//           float cFlowMap0Weight;     // Index:   19.y
//           float cFlowMap1Weight;     // Index:   19.z
//           int cFlowMapEnabled;       // Index:   19.w
//           float cLocalWeight;        // Index:   20
//
//       } fogDensityMapConstants;      // Index:   13
//       float cStartDistance;          // Index:   20.y
//       float cStartDistanceRcp;       // Index:   20.z
//       float cVolumetricFogScattering;// Index:   20.w
//       float cVolumetricFogAbsorption;// Index:   21
//       float cFogVerticalAttenuation; // Index:   21.y
//       float3 cWorldEyePos;           // Index:   22
//       float cVerticalFalloffRelativePosTimesAttenuation;// Index:   22.w
//       float cVerticalFalloffRelativePos;// Index:   23
//       float cVolumetricFogTransmittanceFade;// Index:   23.y
//
//   } resourceTables__volumetricFogDensityData;// Index:    0-23.y           Components:    94
                                        // Textures:  t12-t17
//
// }
//
// cbuffer ConstBuf__splitConstants
// {
//
//   struct VolumetricSplitConstants
//   {
//
//       uint3 cGroupOffset;            // Index:    0
//       uint localLightMask;           // Index:    0.w
//       uint shadowLightAndGIMask;     // Index:    1
//
//   } resourceTables__splitConstants;  // Index:    0-1.x            Components:     5
//
// }
//
// Resource bind info for resourceTables__volumetricFogDensityData.DensityAtLightPoints
// {
//
//   float $Element;                    // Index:    0.x              Components:     1
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// resourceTables__volumetricFogData__smpLinear    sampler      NA          NA    1        1
// resourceTables__volumetricFogData__smpLinearClamp    sampler      NA          NA    3        1
// resourceTables__volumetricFogData__smpComparison  sampler_c      NA          NA    5        1
// resourceTables__volumetricFogDensityData__smpLinearClamp    sampler      NA          NA    6        1
// resourceTables__volumetricFogDensityData__smpLinearBorder    sampler      NA          NA    7        1
// resourceTables__volumetricFogData.ShadowTexture    texture   float          2d    3        1
// resourceTables__volumetricFogData.ShadowTransmittanceTexture0    texture  float4          2d    5        1
// resourceTables__volumetricFogData.ShadowTransmittanceTexture1    texture  float4          2d    6        1
// resourceTables__lightConstants.ProjTextureMaps[0]    texture  float4          2d    8        1
// resourceTables__lightConstants.ProjTextureMaps[1]    texture  float4          2d    9        1
// resourceTables__lightConstants.ProjTextureMaps[2]    texture  float4          2d   10        1
// resourceTables__lightConstants.ProjTextureMaps[3]    texture  float4          2d   11        1
// resourceTables__volumetricFogDensityData.DensityAtLightPoints    texture  struct         r/o   12        1
// resourceTables__volumetricFogDensityData.PC_ParticleDensityTexture    texture   float          3d   14        1
// resourceTables__volumetricFogDensityData.PC_ParticleScatterTexture    texture   float          3d   15        1
// resourceTables__volumetricFogDensityData.DensityMap    texture  float3          2d   16        1
// resourceTables__volumetricFogDensityData.FlowMap    texture  float3          2d   17        1
// resourceTables__volumetricFogData.OutLightingTexture        UAV  float3          3d    8        1
// resourceTables__volumetricFogData.OutOpticalDensityTexture        UAV  float2          3d    9        1
// resourceTables__volumetricFogData.OutDirectionTexture        UAV  float4          3d   10        1
// ConstBuf__volumetricFogData       cbuffer      NA          NA    0        1
// ConstBuf__lightConstants          cbuffer      NA          NA    1        1
// ConstBuf__volumetricFogDensityData    cbuffer      NA          NA    2        1
// ConstBuf__splitConstants          cbuffer      NA          NA    4        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// no Input
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// no Output
cs_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[94], dynamicIndexed
dcl_constantbuffer cb1[619], dynamicIndexed
dcl_constantbuffer cb2[23], immediateIndexed
dcl_constantbuffer cb4[2], immediateIndexed
dcl_sampler s1, mode_default
dcl_sampler s3, mode_default
dcl_sampler s5, mode_comparison
dcl_sampler s6, mode_default
dcl_sampler s7, mode_default
dcl_resource_texture2d (float,float,float,float) t3
dcl_resource_texture2d (float,float,float,float) t5
dcl_resource_texture2d (float,float,float,float) t6
dcl_resource_texture2d (float,float,float,float) t8
dcl_resource_texture2d (float,float,float,float) t9
dcl_resource_texture2d (float,float,float,float) t10
dcl_resource_texture2d (float,float,float,float) t11
dcl_resource_structured t12, 4
dcl_resource_texture3d (float,float,float,float) t14
dcl_resource_texture3d (float,float,float,float) t15
dcl_resource_texture2d (float,float,float,float) t16
dcl_resource_texture2d (float,float,float,float) t17
dcl_uav_typed_texture3d (float,float,float,float) u8
dcl_uav_typed_texture3d (float,float,float,float) u9
dcl_uav_typed_texture3d (float,float,float,float) u10
dcl_input vThreadIDInGroupFlattened
dcl_input vThreadGroupID.xyz
dcl_temps 50
dcl_indexableTemp x0[16], 4
dcl_indexableTemp x1[8], 4
dcl_thread_group 4, 4, 4
dcl_resource_texture2d (float,float,float,float) t125
ld_indexable(texture2d)(float,float,float,float) r40.xyzw, l(0, 0, 0, 0), t125.xyzw
iadd r0.xyzw, vThreadGroupID.xyzz, cb4[0].xyzz
ishl r1.x, vThreadIDInGroupFlattened.x, l(1)
ushr r1.xy, l(0xebfa5014, 0xfa4141af, 0, 0), r1.xxxx
and r1.xy, r1.xyxx, l(3, 3, 0, 0)
ushr r1.zw, vThreadIDInGroupFlattened.xxxx, l(0, 0, 4, 4)
bfi r0.xyzw, l(30, 30, 30, 30), l(2, 2, 2, 2), r0.xyzw, r1.xyzw
utof r1.xyz, r0.xywx
mov r1.w, vThreadIDInGroupFlattened.x
add r1.xyz, r1.xyzx, cb0[r1.w + 0].xyzx
itof r2.xyz, cb0[91].yzwy
mul r1.xyz, r1.xyzx, l(2.000000, -2.000000, 1.000000, 0.000000)
div r1.xyz, r1.xyzx, r2.xyzx
add r1.xyz, r1.xyzx, l(-1.000000, 1.000000, 0.000000, 0.000000)
mul r1.z, r1.z, cb0[90].x
exp r1.z, r1.z
add r1.z, r1.z, l(-1.000000)
mul r2.z, r1.z, cb0[90].y
mul r2.xy, r1.xyxx, r2.zzzz
mov r2.w, l(1.000000)

add r40.w, r2.z, -r40.y
mad r2.x, -r40.x, r40.w, r2.x

dp4 r1.x, r2.xyzw, cb0[64].xyzw
dp4 r1.y, r2.xyzw, cb0[65].xyzw
dp4 r1.z, r2.xyzw, cb0[66].xyzw
add r2.xyz, r1.xyzx, -cb0[72].xyzx
dp3 r2.x, r2.xyzx, r2.xyzx
max r2.x, r2.x, l(0.000001)
rsq r2.y, r2.x
mul r2.x, r2.y, r2.x
mov r1.w, l(1.000000)
dp4 r3.x, r1.xyzw, cb2[13].xyzw
dp4 r3.y, r1.xyzw, cb2[15].xyzw
mov_sat r2.yz, r3.xxyx
eq r2.yz, r2.yyzy, r3.xxyx
and r2.y, r2.z, r2.y
if_nz r2.y
  if_nz cb2[19].w
    sample_l_indexable(texture2d)(float,float,float,float) r2.yz, r3.xyxx, t17.zxyw, s6, l(0.000000)
    mad r2.yz, r2.yyzy, l(0.000000, 2.000000, 2.000000, 0.000000), l(0.000000, -1.000000, -1.000000, 0.000000)
    mad r3.zw, r2.yyyz, cb2[18].wwww, r3.xxxy
    sample_l_indexable(texture2d)(float,float,float,float) r4.xyz, r3.zwzz, t16.xyzw, s6, l(0.000000)
    mad r2.yz, r2.yyzy, cb2[19].xxxx, r3.xxyx
    sample_l_indexable(texture2d)(float,float,float,float) r2.yzw, r2.yzyy, t16.wxyz, s6, l(0.000000)
    mul r2.yzw, r2.yyzw, cb2[19].zzzz
    mad r2.yzw, cb2[19].yyyy, r4.xxyz, r2.yyzw
  else
    sample_l_indexable(texture2d)(float,float,float,float) r2.yzw, r3.xyxx, t16.wxyz, s6, l(0.000000)
  endif
  mul r3.x, r2.z, cb2[18].y
  mad r2.y, cb2[18].x, r2.y, cb2[17].w
  mul r2.w, r2.w, cb2[17].z
  mad_sat r3.y, r2.x, cb2[17].y, l(-1.000000)
  add r2.y, r1.y, -r2.y
  mul r2.y, r2.w, -r2.y
  exp r2.y, r2.y
  min r2.y, r2.y, l(1.000000)
  mul r2.w, r3.x, r3.y
  mul r2.y, r2.y, r2.w
  mul r2.y, r2.y, cb2[18].z
  mad r2.z, cb2[18].y, r2.z, l(-1.000000)
  mad r2.z, cb2[20].x, r2.z, l(1.000000)
  mul r2.y, r2.y, cb2[20].x
else
  mov r2.yz, l(0,0,1.000000,0)
endif
mad_sat r2.x, r2.x, cb2[20].z, l(-1.000000)
mad r2.w, -r1.y, cb2[21].y, cb2[22].w
exp r2.w, r2.w
min r2.w, r2.w, l(1.000000)
mul r2.x, r2.z, r2.x
mul r2.x, r2.w, r2.x
mad r3.xzw, r2.xxxx, cb2[20].wwww, r2.yyyy
mul r3.y, r2.x, cb2[21].x
mad r2.xyz, r1.xyzx, cb2[9].xyzx, cb2[10].xyzx
lt r4.xyz, l(0.000000, 0.000000, 0.000000, 0.000000), r2.xyzx
lt r5.xyz, r2.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
iadd r4.xyz, -r4.xyzx, r5.xyzx
itof r4.xyz, r4.xyzx
mul r4.xyz, r4.xyzx, cb2[8].wwww
mad r4.xyz, cb2[9].wwww, r2.xyzx, r4.xyzx
lt r5.xyz, |r2.xyzx|, cb2[10].wwww
movc r2.xyz, r5.xyzx, r2.xyzx, r4.xyzx
mad r2.xyz, r2.xyzx, l(0.496093750, 0.496093750, 0.496093750, 0.000000), l(0.500000, 0.500000, 0.500000, 0.000000)
sample_l_indexable(texture3d)(float,float,float,float) r2.w, r2.xyzx, t15.yzwx, s7, l(0.000000)
sample_l_indexable(texture3d)(float,float,float,float) r4.y, r2.xyzx, t14.yxzw, s7, l(0.000000)
mov r4.xzw, r2.wwww
add_sat r2.xyzw, r4.xyzw, l(-1.000000, -1.000000, -1.000000, -1.000000)
mad r2.xyzw, r2.xyzw, l(2048.000000, 2048.000000, 2048.000000, 2048.000000), r3.xyzw
mov x0[0].x, cb1[4].x
mov x0[1].x, cb1[5].x
mov x0[3].x, cb1[7].x
mov x0[0].y, cb1[4].y
mov x0[1].y, cb1[5].y
mov x0[3].y, cb1[7].y
mov x0[0].z, cb1[4].z
mov x0[1].z, cb1[5].z
mov x0[3].z, cb1[7].z
mov x0[0].w, cb1[4].w
mov x0[1].w, cb1[5].w
mov x0[3].w, cb1[7].w
mov x0[4].x, cb1[8].x
mov x0[5].x, cb1[9].x
mov x0[7].x, cb1[11].x
mov x0[4].y, cb1[8].y
mov x0[5].y, cb1[9].y
mov x0[7].y, cb1[11].y
mov x0[4].z, cb1[8].z
mov x0[5].z, cb1[9].z
mov x0[7].z, cb1[11].z
mov x0[4].w, cb1[8].w
mov x0[5].w, cb1[9].w
mov x0[7].w, cb1[11].w
mov x0[8].x, cb1[12].x
mov x0[9].x, cb1[13].x
mov x0[11].x, cb1[15].x
mov x0[8].y, cb1[12].y
mov x0[9].y, cb1[13].y
mov x0[11].y, cb1[15].y
mov x0[8].z, cb1[12].z
mov x0[9].z, cb1[13].z
mov x0[11].z, cb1[15].z
mov x0[8].w, cb1[12].w
mov x0[9].w, cb1[13].w
mov x0[11].w, cb1[15].w
mov x0[12].x, cb1[16].x
mov x0[13].x, cb1[17].x
mov x0[15].x, cb1[19].x
mov x0[12].y, cb1[16].y
mov x0[13].y, cb1[17].y
mov x0[15].y, cb1[19].y
mov x0[12].z, cb1[16].z
mov x0[13].z, cb1[17].z
mov x0[15].z, cb1[19].z
mov x0[12].w, cb1[16].w
mov x0[13].w, cb1[17].w
mov x0[15].w, cb1[19].w
mad r3.x, -cb0[93].w, l(2.000000), l(1.000000)
dp4 r4.x, r1.xyzw, cb1[548].xyzw
dp4 r4.y, r1.xyzw, cb1[549].xyzw
dp4 r3.y, r1.xyzw, cb1[550].xyzw
dp4 r3.z, r1.xyzw, cb1[551].xyzw
div r4.xy, r4.xyxx, r3.zzzz
mad r4.xy, r4.xyxx, l(0.500000, -0.500000, 0.000000, 0.000000), l(0.500000, 0.500000, 0.000000, 0.000000)
sample_l_indexable(texture2d)(float,float,float,float) r5.xyzw, r4.xyxx, t5.xyzw, s3, l(0.000000)
sample_l_indexable(texture2d)(float,float,float,float) r4.xyzw, r4.xyxx, t6.xyzw, s3, l(0.000000)
div r3.y, r3.y, r3.z
max r3.y, r3.y, l(0.000000)
min r3.y, r3.y, l(0.999990)
mul r3.z, r3.y, l(8.000000)
round_ni r3.z, r3.z
ftoi r3.w, r3.z
ilt r6.x, r3.w, l(7)
iadd r6.y, r3.w, l(1)
movc r6.x, r6.x, r6.y, l(7)
mad r3.y, r3.y, l(8.000000), -r3.z
mov r7.w, l(1.000000)
mov r8.z, l(1.000000)
mov r9.z, l(1.000000)
mov r10.z, l(1.000000)
mov r11.xyzw, l(0,0,0,0)
mov r12.xyzw, l(0,0,0,0)
mov r13.xyzw, l(0,0,0,0)
mov r3.z, l(0)
loop
  uge r6.y, r3.z, cb1[2].w
  breakc_nz r6.y
  ult r6.y, r3.z, cb1[3].x
  if_nz r6.y
    imul null, r6.y, r3.z, l(13)
    dp4 r14.x, r1.xyzw, cb1[r6.y + 26].xyzw
    dp4 r14.y, r1.xyzw, cb1[r6.y + 27].xyzw
    dp4 r14.z, r1.xyzw, cb1[r6.y + 28].xyzw
    lt r6.z, r14.z, l(0.000000)
    lt r6.w, l(1.000000), r14.z
    or r6.z, r6.w, r6.z
    if_z r6.z
      mov r8.x, cb1[r6.y + 30].x
      mad r8.xyw, r14.xyxz, r8.xxxz, cb1[r6.y + 30].yzyw
      mov r9.x, cb1[r6.y + 31].x
      mad r9.xyw, r14.xyxz, r9.xxxz, cb1[r6.y + 31].yzyw
      mov r10.x, cb1[r6.y + 32].x
      mad r10.xyw, r14.xyxz, r10.xxxz, cb1[r6.y + 32].yzyw
      lt r15.xy, |r14.xyxx|, r3.xxxx
      and r6.w, r15.y, r15.x
      lt r15.xy, |r8.xyxx|, r3.xxxx
      and r14.w, r15.y, r15.x
      lt r15.xy, |r9.xyxx|, r3.xxxx
      and r15.x, r15.y, r15.x
      lt r15.yz, |r10.xxyx|, r3.xxxx
      and r15.y, r15.z, r15.y
      mad r10.xy, r10.xyxx, cb1[r6.y + 36].xyxx, cb1[r6.y + 36].zwzz
      mad r9.xy, r9.xyxx, cb1[r6.y + 35].xyxx, cb1[r6.y + 35].zwzz
      movc r9.xyw, r15.xxxx, r9.xyxw, r10.xyxw
      mad r8.xy, r8.xyxx, cb1[r6.y + 34].xyxx, cb1[r6.y + 34].zwzz
      movc r8.xyw, r14.wwww, r8.xyxw, r9.xyxw
      mad r14.xy, r14.xyxx, cb1[r6.y + 33].xyxx, cb1[r6.y + 33].zwzz
      movc r8.xyw, r6.wwww, r14.xyxz, r8.xyxw
      movc r9.x, r15.y, l(3), l(-1)
      movc r9.x, r15.x, l(2), r9.x
      movc r9.x, r14.w, l(1), r9.x
      movc r6.w, r6.w, l(0), r9.x
    else
      mov r8.xyw, l(0,0,0,0)
      mov r6.w, l(0)
    endif
    ige r6.w, r6.w, l(0)
    movc r6.z, r6.z, l(0), r6.w
    if_nz r6.z
      mov_sat r8.w, r8.w
      sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r6.z, r8.xyxx, t3.xxxx, s5, r8.w
    else
      mov r6.z, l(1.000000)
    endif
    add_sat r6.y, r6.z, cb1[r6.y + 38].y
    mov x1[0].x, r5.x
    mov x1[1].x, r5.y
    mov x1[2].x, r5.z
    mov x1[3].x, r5.w
    mov x1[4].x, r4.x
    mov x1[5].x, r4.y
    mov x1[6].x, r4.z
    mov x1[7].x, r4.w
    mov r6.z, x1[r3.w + 0].x
    mov r6.w, x1[r6.x + 0].x
    add r6.w, -r6.z, r6.w
    mad r6.z, r3.y, r6.w, r6.z
    exp r6.z, -r6.z
    min r6.z, r6.z, l(1.000000)
    mul r6.y, r6.z, r6.y
  else
    mov r6.y, l(1.000000)
  endif
  lt r6.z, l(0.00392156886), r6.y
  if_nz r6.z
    imul null, r6.z, r3.z, l(3)
    mul r6.y, r6.y, cb1[r6.z + 21].w
    mul r6.y, r6.y, l(0.0795774683)
    mul r8.xyw, r6.yyyy, cb1[r6.z + 21].xyxz
    ige r6.y, cb1[r6.z + 22].z, l(0)
    if_nz r6.y
      ishl r6.y, cb1[r6.z + 22].z, l(2)
      mov r14.x, x0[r6.y + 0].x
      mov r15.x, x0[r6.y + 1].x
      mov r16.x, x0[r6.y + 3].x
      mov r14.y, x0[r6.y + 0].y
      mov r15.y, x0[r6.y + 1].y
      mov r16.y, x0[r6.y + 3].y
      mov r14.z, x0[r6.y + 0].z
      mov r15.z, x0[r6.y + 1].z
      mov r16.z, x0[r6.y + 3].z
      mov r14.w, x0[r6.y + 0].w
      mov r15.w, x0[r6.y + 1].w
      mov r16.w, x0[r6.y + 3].w
      dp4 r9.x, r1.xyzw, r14.xyzw
      dp4 r9.y, r1.xyzw, r15.xyzw
      dp4 r6.y, r1.xyzw, r16.xyzw
      div r6.yw, r9.xxxy, r6.yyyy
      sample_l_indexable(texture2d)(float,float,float,float) r9.xyw, r6.ywyy, t8.xywz, s1, l(0.000000)
      sample_l_indexable(texture2d)(float,float,float,float) r10.xyw, r6.ywyy, t9.xywz, s1, l(0.000000)
      sample_l_indexable(texture2d)(float,float,float,float) r14.xyz, r6.ywyy, t10.xyzw, s1, l(0.000000)
      sample_l_indexable(texture2d)(float,float,float,float) r15.xyz, r6.ywyy, t11.xyzw, s1, l(0.000000)
      ieq r16.xyz, l(1, 2, 3, 0), cb1[r6.z + 22].zzzz
      movc r9.xyw, r16.xxxx, r10.xyxw, r9.xyxw
      movc r9.xyw, r16.yyyy, r14.xyxz, r9.xyxw
      movc r9.xyw, r16.zzzz, r15.xyxz, r9.xyxw
      mul r8.xyw, r8.xyxw, r9.xyxw
    endif
    mov r7.xyz, cb1[r6.z + 20].xyzx
    mad r11.xyzw, r7.xyzw, r8.xxxx, r11.xyzw
    mad r12.xyzw, r7.xyzw, r8.yyyy, r12.xyzw
    mad r13.xyzw, r7.xyzw, r8.wwww, r13.xyzw
  endif
  iadd r3.z, r3.z, l(1)
endloop
and r3.x, cb4[1].x, l(0x0000ffff)
mov r4.w, l(1.000000)
mov r5.xyzw, r11.xyzw
mov r6.xyzw, r12.xyzw
mov r7.xyzw, r13.xyzw
mov r3.y, l(0)
loop
  uge r3.z, r3.y, cb1[2].x
  breakc_nz r3.z
  ishl r3.w, l(1), r3.y
  and r3.w, r3.x, r3.w
  if_z r3.w
    iadd r3.w, r3.y, l(1)
    mov r3.y, r3.w
    continue
  endif
  if_nz r3.z
    break
  endif
  imul null, r3.z, r3.y, l(6)
  add r8.xyz, -r1.xyzx, cb1[r3.z + 244].xyzx
  dp3 r3.w, r8.xyzx, r8.xyzx
  rsq r8.w, r3.w
  mul r4.xyz, r8.wwww, r8.xyzx
  add r8.x, r3.w, -cb1[r3.z + 244].w
  max r8.x, r8.x, l(0.001000)
  rcp r8.x, r8.x
  mad r8.x, cb1[r3.z + 244].w, r8.x, l(1.000000)
  rsq r8.x, r8.x
  add r8.x, -r8.x, l(1.000000)
  mul r8.x, r8.x, l(6.28318548)
  mul r8.y, r3.w, r3.w
  mad_sat r8.y, -r8.y, cb1[r3.z + 245].w, l(1.000000)
  mul r8.y, r8.y, r8.y
  mul r8.x, r8.y, r8.x
  dp3_sat r8.y, cb1[r3.z + 245].xyzx, r4.xyzx
  add_sat r8.y, r8.y, -cb1[r3.z + 247].y
  mul_sat r8.y, r8.y, cb1[r3.z + 247].x
  mul r8.z, r8.y, r8.y
  mad r8.y, -r8.y, l(2.000000), l(3.000000)
  mul r8.y, r8.y, r8.z
  mul r8.x, r8.y, r8.x
  lt r8.y, l(0.000000), r8.x
  if_nz r8.y
    mul r3.w, r3.w, r8.w
    ld_structured_indexable(structured_buffer, stride=4)(mixed,mixed,mixed,mixed) r8.y, cb1[r3.z + 247].z, l(0), t12.xxxx
    mul r8.y, r3.w, -r8.y
    exp r8.y, r8.y
    mad_sat r3.w, r3.w, cb1[r3.z + 248].z, -cb1[r3.z + 248].y
    log r3.w, r3.w
    mul r3.w, r3.w, cb1[r3.z + 248].w
    exp r3.w, r3.w
    mul r8.x, r8.y, r8.x
    mul r3.w, r3.w, r8.x
    mul r3.w, r3.w, l(0.0795774683)
    imul null, r8.x, r3.y, l(13)
    dp4 r9.x, r1.xyzw, cb1[r8.x + 340].xyzw
    dp4 r9.y, r1.xyzw, cb1[r8.x + 341].xyzw
    dp4 r9.z, r1.xyzw, cb1[r8.x + 342].xyzw
    dp4 r8.y, r1.xyzw, cb1[r8.x + 343].xyzw
    lt r8.zw, r8.yyyy, |r9.xxxy|
    or r8.z, r8.w, r8.z
    lt r8.w, r8.y, l(0.000000)
    or r8.z, r8.w, r8.z
    if_nz r8.z
      mov r10.xy, l(0,0,0,0)
      mov r14.x, l(0)
    else
      div r14.xyz, r9.zxyz, r8.yyyy
      mad r10.xy, r14.yzyy, cb1[r8.x + 347].xyxx, cb1[r8.x + 347].zwzz
    endif
    ige r8.y, r8.z, l(0)
    if_nz r8.y
      mov_sat r14.x, r14.x
      sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r8.y, r10.xyxx, t3.xxxx, s5, r14.x
    else
      mov r8.y, l(1.000000)
    endif
    add_sat r8.x, r8.y, cb1[r8.x + 352].y
    mul r3.w, r3.w, r8.x
    mul r8.xyz, r3.wwww, cb1[r3.z + 246].xyzx
    ige r3.w, cb1[r3.z + 248].x, l(0)
    if_nz r3.w
      ishl r3.w, cb1[r3.z + 248].x, l(2)
      mov r9.x, x0[r3.w + 0].x
      mov r10.x, x0[r3.w + 1].x
      mov r14.x, x0[r3.w + 3].x
      mov r9.y, x0[r3.w + 0].y
      mov r10.y, x0[r3.w + 1].y
      mov r14.y, x0[r3.w + 3].y
      mov r9.z, x0[r3.w + 0].z
      mov r10.z, x0[r3.w + 1].z
      mov r14.z, x0[r3.w + 3].z
      mov r9.w, x0[r3.w + 0].w
      mov r10.w, x0[r3.w + 1].w
      mov r14.w, x0[r3.w + 3].w
      dp4 r9.x, r1.xyzw, r9.xyzw
      dp4 r9.y, r1.xyzw, r10.xyzw
      dp4 r3.w, r1.xyzw, r14.xyzw
      div r9.xy, r9.xyxx, r3.wwww
      sample_l_indexable(texture2d)(float,float,float,float) r10.xyz, r9.xyxx, t8.xyzw, s1, l(0.000000)
      sample_l_indexable(texture2d)(float,float,float,float) r14.xyz, r9.xyxx, t9.xyzw, s1, l(0.000000)
      sample_l_indexable(texture2d)(float,float,float,float) r15.xyz, r9.xyxx, t10.xyzw, s1, l(0.000000)
      sample_l_indexable(texture2d)(float,float,float,float) r9.xyz, r9.xyxx, t11.xyzw, s1, l(0.000000)
      ieq r16.xyz, l(1, 2, 3, 0), cb1[r3.z + 248].xxxx
      movc r10.xyz, r16.xxxx, r14.xyzx, r10.xyzx
      movc r10.xyz, r16.yyyy, r15.xyzx, r10.xyzx
      movc r9.xyz, r16.zzzz, r9.xyzx, r10.xyzx
      mul r8.xyz, r8.xyzx, r9.xyzx
    endif
    mad r5.xyzw, r4.xyzw, r8.xxxx, r5.xyzw
    mad r6.xyzw, r4.xyzw, r8.yyyy, r6.xyzw
    mad r7.xyzw, r4.xyzw, r8.zzzz, r7.xyzw
  endif
  iadd r3.y, r3.y, l(1)
endloop
mov r3.w, l(1.000000)
mov r4.xyzw, r5.xyzw
mov r8.xyzw, r6.xyzw
mov r9.xyzw, r7.xywz
mov r10.x, l(0)
loop
  uge r10.y, r10.x, cb1[2].y
  breakc_nz r10.y
  ishl r10.z, l(1), r10.x
  and r10.z, r10.z, cb4[0].w
  if_z r10.z
    iadd r10.z, r10.x, l(1)
    mov r10.x, r10.z
    continue
  endif
  if_nz r10.y
    break
  endif
  imul null, r10.y, r10.x, l(6)
  add r11.xyz, -r1.xyzx, cb1[r10.y + 52].xyzx
  dp3 r10.z, r11.xyzx, r11.xyzx
  rsq r10.w, r10.z
  mul r3.xyz, r10.wwww, r11.xyzx
  add r11.x, r10.z, -cb1[r10.y + 52].w
  max r11.x, r11.x, l(0.001000)
  rcp r11.x, r11.x
  mad r11.x, cb1[r10.y + 52].w, r11.x, l(1.000000)
  rsq r11.x, r11.x
  add r11.x, -r11.x, l(1.000000)
  mul r11.x, r11.x, l(6.28318548)
  mul r11.y, r10.z, r10.z
  mad_sat r11.y, -r11.y, cb1[r10.y + 53].w, l(1.000000)
  mul r11.y, r11.y, r11.y
  mul r11.x, r11.y, r11.x
  dp3_sat r11.y, cb1[r10.y + 53].xyzx, r3.xyzx
  add_sat r11.y, r11.y, -cb1[r10.y + 55].y
  mul_sat r11.y, r11.y, cb1[r10.y + 55].x
  mul r11.z, r11.y, r11.y
  mad r11.y, -r11.y, l(2.000000), l(3.000000)
  mul r11.y, r11.y, r11.z
  mul r11.x, r11.y, r11.x
  lt r11.y, l(0.000000), r11.x
  if_nz r11.y
    mul r10.z, r10.w, r10.z
    ld_structured_indexable(structured_buffer, stride=4)(mixed,mixed,mixed,mixed) r10.w, cb1[r10.y + 55].z, l(0), t12.xxxx
    mul r10.w, r10.z, -r10.w
    exp r10.w, r10.w
    mad_sat r10.z, r10.z, cb1[r10.y + 56].z, -cb1[r10.y + 56].y
    log r10.z, r10.z
    mul r10.z, r10.z, cb1[r10.y + 56].w
    exp r10.z, r10.z
    mul r10.w, r10.w, r11.x
    mul r10.z, r10.z, r10.w
    mul r10.z, r10.z, l(0.0795774683)
    mul r11.xyz, r10.zzzz, cb1[r10.y + 54].xyzx
    ige r10.z, cb1[r10.y + 56].x, l(0)
    if_nz r10.z
      ishl r10.z, cb1[r10.y + 56].x, l(2)
      mov r12.x, x0[r10.z + 0].x
      mov r13.x, x0[r10.z + 1].x
      mov r14.x, x0[r10.z + 3].x
      mov r12.y, x0[r10.z + 0].y
      mov r13.y, x0[r10.z + 1].y
      mov r14.y, x0[r10.z + 3].y
      mov r12.z, x0[r10.z + 0].z
      mov r13.z, x0[r10.z + 1].z
      mov r14.z, x0[r10.z + 3].z
      mov r12.w, x0[r10.z + 0].w
      mov r13.w, x0[r10.z + 1].w
      mov r14.w, x0[r10.z + 3].w
      dp4 r12.x, r1.xyzw, r12.xyzw
      dp4 r12.y, r1.xyzw, r13.xyzw
      dp4 r10.z, r1.xyzw, r14.xyzw
      div r10.zw, r12.xxxy, r10.zzzz
      sample_l_indexable(texture2d)(float,float,float,float) r12.xyz, r10.zwzz, t8.xyzw, s1, l(0.000000)
      sample_l_indexable(texture2d)(float,float,float,float) r13.xyz, r10.zwzz, t9.xyzw, s1, l(0.000000)
      sample_l_indexable(texture2d)(float,float,float,float) r14.xyz, r10.zwzz, t10.xyzw, s1, l(0.000000)
      sample_l_indexable(texture2d)(float,float,float,float) r15.xyz, r10.zwzz, t11.xyzw, s1, l(0.000000)
      ieq r10.yzw, l(0, 1, 2, 3), cb1[r10.y + 56].xxxx
      movc r12.xyz, r10.yyyy, r13.xyzx, r12.xyzx
      movc r12.xyz, r10.zzzz, r14.xyzx, r12.xyzx
      movc r10.yzw, r10.wwww, r15.xxyz, r12.xxyz
      mul r11.xyz, r10.yzwy, r11.xyzx
    endif
    mad r4.xyzw, r3.xyzw, r11.xxxx, r4.xyzw
    mad r8.xyzw, r3.xyzw, r11.yyyy, r8.xyzw
    mad r9.xyzw, r3.xywz, r11.zzzz, r9.xyzw
  endif
  iadd r10.x, r10.x, l(1)
endloop
mul r3.xyzw, r8.xyzw, l(0.587000, 0.587000, 0.587000, 0.587000)
mad r3.xyzw, r4.xyzw, l(0.299000, 0.299000, 0.299000, 0.299000), r3.xyzw
mad r3.xyzw, r9.xywz, l(0.114000, 0.114000, 0.114000, 0.114000), r3.xyzw
rcp r3.w, r3.w
mul r3.xyz, r3.wwww, r3.xyzx
dp4 r4.x, r1.xyzw, cb0[73].xyzw
dp4 r4.y, r1.xyzw, cb0[74].xyzw
dp4 r4.z, r1.xyzw, cb0[75].xyzw
lt r1.xyz, |r4.xyzx|, l(1.000000, 1.000000, 1.000000, 0.000000)
and r1.x, r1.y, r1.x
and r1.x, r1.z, r1.x
mov r9.xw, r4.wwww
mov r9.y, r8.w
movc r1.xyzw, r1.xxxx, l(0,0,0,0), r9.xyzw
store_uav_typed u8.xyzw, r0.xyww, r1.xyzw
mov r3.w, l(1.000000)
store_uav_typed u10.xyzw, r0.xyww, r3.xyzw
store_uav_typed u9.xyzw, r0.xyzw, r2.xyzw
ret
// Approximately 497 instruction slots used
