//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-t2
//
// }
//
// 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
//
// }
//
// cbuffer ConstBuf__giVolumeConstants
// {
//
//   struct GIVolumeConstants
//   {
//
//       int numGIVolumes;              // Index:    0
//
//       struct GIVolumeGlobal
//       {
//
//           float giVolumeSHDiffuseBlur;// Index:    1
//           float giVolumeSHSpecularBlur;// Index:    1.y
//           float giVolumeSaturation;  // Index:    1.z
//           float4 defaultOcclusionSH; // Index:    2
//           float4 skyFullRSH;         // Index:    3
//           float4 skyFullGSH;         // Index:    4
//           float4 skyFullBSH;         // Index:    5
//           float4 skyFullClampRSH;    // Index:    6
//           float4 skyFullClampGSH;    // Index:    7
//           float4 skyFullClampBSH;    // Index:    8
//           float4 skyFullGeoRSH;      // Index:    9
//           float4 skyFullGeoGSH;      // Index:   10
//           float4 skyFullGeoBSH;      // Index:   11
//           float4 skyTopRSH;          // Index:   12
//           float4 skyTopGSH;          // Index:   13
//           float4 skyTopBSH;          // Index:   14
//           float4 skyTopClampRSH;     // Index:   15
//           float4 skyTopClampGSH;     // Index:   16
//           float4 skyTopClampBSH;     // Index:   17
//           float4 skyTopGeoRSH;       // Index:   18
//           float4 skyTopGeoGSH;       // Index:   19
//           float4 skyTopGeoBSH;       // Index:   20
//           float4 skyTopAndBounceRSH; // Index:   21
//           float4 skyTopAndBounceGSH; // Index:   22
//           float4 skyTopAndBounceBSH; // Index:   23
//           float4 skyTopAndBounceClampRSH;// Index:   24
//           float4 skyTopAndBounceClampGSH;// Index:   25
//           float4 skyTopAndBounceClampBSH;// Index:   26
//           float4 skyTopAndBounceGeoRSH;// Index:   27
//           float4 skyTopAndBounceGeoGSH;// Index:   28
//           float4 skyTopAndBounceGeoBSH;// Index:   29
//           float4 skyDifFullRSH;      // Index:   30
//           float4 skyDifFullGSH;      // Index:   31
//           float4 skyDifFullBSH;      // Index:   32
//           float4 skyDifFullClampRSH; // Index:   33
//           float4 skyDifFullClampGSH; // Index:   34
//           float4 skyDifFullClampBSH; // Index:   35
//           float4 skyDifFullGeoRSH;   // Index:   36
//           float4 skyDifFullGeoGSH;   // Index:   37
//           float4 skyDifFullGeoBSH;   // Index:   38
//           float4 skyDifTopRSH;       // Index:   39
//           float4 skyDifTopGSH;       // Index:   40
//           float4 skyDifTopBSH;       // Index:   41
//           float4 skyDifTopClampRSH;  // Index:   42
//           float4 skyDifTopClampGSH;  // Index:   43
//           float4 skyDifTopClampBSH;  // Index:   44
//           float4 skyDifTopGeoRSH;    // Index:   45
//           float4 skyDifTopGeoGSH;    // Index:   46
//           float4 skyDifTopGeoBSH;    // Index:   47
//           float4 skyDifTopAndBounceRSH;// Index:   48
//           float4 skyDifTopAndBounceGSH;// Index:   49
//           float4 skyDifTopAndBounceBSH;// Index:   50
//           float4 skyDifTopAndBounceClampRSH;// Index:   51
//           float4 skyDifTopAndBounceClampGSH;// Index:   52
//           float4 skyDifTopAndBounceClampBSH;// Index:   53
//           float4 skyDifTopAndBounceGeoRSH;// Index:   54
//           float4 skyDifTopAndBounceGeoGSH;// Index:   55
//           float4 skyDifTopAndBounceGeoBSH;// Index:   56
//
//       } global;                      // Index:    1
//
//       struct GIVolume
//       {
//
//           float3 invTransX;          // Index:   57
//           float3 invTransY;          // Index:   58
//           float3 invTransZ;          // Index:   59
//           float3 invTransT;          // Index:   60
//           float3 invRotX;            // Index:   61
//           float3 invRotY;            // Index:   62
//           float3 invRotZ;            // Index:   63
//           uint3 indDims;             // Index:   64
//           float3 invIndDims;         // Index:   65
//           uint3 atlasDims;           // Index:   66
//           float3 invAtlasDims;       // Index:   67
//           float4 cr1Min;             // Index:   68
//           float4 cr1MaxSubMin;       // Index:   69
//           float4 cr2Min;             // Index:   70
//           float4 cr2MaxSubMin;       // Index:   71
//           float4 cr3Min;             // Index:   72
//           float4 cr3MaxSubMin;       // Index:   73
//           float normalOffset;        // Index:   74
//           float4 giTintScaled;       // Index:   75
//           uint flags;                // Index:   76
//
//       } giVolumes[4];                // Index:   57
//
//   } resourceTables__giVolumeConstants;// Index:    0-136.x          Components:   545
                                        // Textures:  t18-t25
//
// }
//
// 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__smpLinearClamp    sampler      NA          NA    3        1
// resourceTables__giVolumeConstants__giSampler    sampler      NA          NA   10        1
// resourceTables__volumetricFogData.LightTextureAccum    texture  float3          3d    0        1
// resourceTables__volumetricFogData.DirTextureAccum    texture  float4          3d    2        1
// resourceTables__volumetricFogDensityData.DensityAtLightPoints    texture  struct         r/o   12        1
// resourceTables__giVolumeConstants.giVolumesInd[0]    texture  float4          3d   18        1
// resourceTables__giVolumeConstants.giVolumesInd[1]    texture  float4          3d   19        1
// resourceTables__giVolumeConstants.giVolumesInd[2]    texture  float4          3d   20        1
// resourceTables__giVolumeConstants.giVolumesInd[3]    texture  float4          3d   21        1
// resourceTables__giVolumeConstants.giVolumesSH0[0]    texture  float4          3d   22        1
// resourceTables__giVolumeConstants.giVolumesSH0[1]    texture  float4          3d   23        1
// resourceTables__giVolumeConstants.giVolumesSH0[2]    texture  float4          3d   24        1
// resourceTables__giVolumeConstants.giVolumesSH0[3]    texture  float4          3d   25        1
// resourceTables__volumetricFogData.OutLightingTexture        UAV  float3          3d    8        1
// resourceTables__volumetricFogData.OutDirectionTexture        UAV  float4          3d   10        1
// ConstBuf__volumetricFogData       cbuffer      NA          NA    0        1
// ConstBuf__lightConstants          cbuffer      NA          NA    1        1
// ConstBuf__giVolumeConstants       cbuffer      NA          NA    3        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[93], dynamicIndexed
dcl_constantbuffer cb1[619], dynamicIndexed
dcl_constantbuffer cb3[137], immediateIndexed
dcl_constantbuffer cb4[1], immediateIndexed
dcl_constantbuffer cb12[3], immediateIndexed
dcl_sampler s3, mode_default
dcl_sampler s10, mode_default
dcl_resource_texture3d (float,float,float,float) t0
dcl_resource_texture3d (float,float,float,float) t2
dcl_resource_structured t12, 4
dcl_resource_texture3d (float,float,float,float) t18
dcl_resource_texture3d (float,float,float,float) t19
dcl_resource_texture3d (float,float,float,float) t20
dcl_resource_texture3d (float,float,float,float) t21
dcl_resource_texture3d (float,float,float,float) t22
dcl_resource_texture3d (float,float,float,float) t23
dcl_resource_texture3d (float,float,float,float) t24
dcl_resource_texture3d (float,float,float,float) t25
dcl_uav_typed_texture3d (float,float,float,float) u8
dcl_uav_typed_texture3d (float,float,float,float) u10
dcl_input vThreadIDInGroupFlattened
dcl_input vThreadGroupID.xyz
dcl_temps 50
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
ld_indexable(texture2d)(float,float,float,float) r41.xyzw, l(2, 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
add r2.xyz, r1.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000)
itof r3.xyz, cb0[91].yzwy
mul r2.xyz, r2.xyzx, l(2.000000, -2.000000, 1.000000, 0.000000)
div r2.xyz, r2.xyzx, r3.xyzx
add r2.xyz, r2.xyzx, l(-1.000000, 1.000000, 0.000000, 0.000000)
mul r1.w, r2.z, cb0[90].x
exp r1.w, r1.w
add r1.w, r1.w, l(-1.000000)
mul r4.z, r1.w, cb0[90].y
mul r4.xy, r2.xyxx, r4.zzzz
mov r4.w, l(1.000000)

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

dp4 r2.x, r4.xyzw, cb0[68].xyzw
dp4 r2.y, r4.xyzw, cb0[69].xyzw
dp4 r1.w, r4.xyzw, cb0[70].xyzw

ge r42.x, r41.x, l(5.0)
if_z r42.x
add r40.w, r1.w, -cb12[2].y
mad r2.x, cb12[2].x, r40.w, r2.x
else
add r40.w, r1.w, -r40.y
mad r2.x, r40.x, r40.w, r2.x
endif

div r2.xy, r2.xyxx, r1.wwww
mad r4.xy, r2.xyxx, l(0.500000, -0.500000, 0.000000, 0.000000), l(0.500000, 0.500000, 0.000000, 0.000000)
mad r2.z, r1.w, cb0[90].w, l(1.000000)
log r2.z, r2.z
mul r4.z, r2.z, cb0[90].z
lt r2.xy, |r2.xyxx|, l(1.000000, 1.000000, 0.000000, 0.000000)
and r2.x, r2.y, r2.x
and r2.x, r2.x, l(0x3f800000)
mul r2.x, r2.x, cb0[92].w
mul_sat r1.w, r1.w, l(1000.000000)
mul r1.w, r1.w, r2.x
sample_l_indexable(texture3d)(float,float,float,float) r2.xyz, r4.xyzx, t0.xyzw, s3, l(0.000000)
sample_l_indexable(texture3d)(float,float,float,float) r4.xyz, r4.xyzx, t2.xyzw, s3, l(0.000000)
mov r2.w, vThreadIDInGroupFlattened.x
add r1.xyz, r1.xyzx, cb0[r2.w + 0].xyzx
mul r1.xyz, r1.xyzx, l(2.000000, -2.000000, 1.000000, 0.000000)
div r1.xyz, r1.xyzx, r3.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 r3.z, r1.z, cb0[90].y
mul r3.xy, r1.xyxx, r3.zzzz
mov r3.w, l(1.000000)

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

dp4 r1.x, r3.xyzw, cb0[64].xyzw
dp4 r1.y, r3.xyzw, cb0[65].xyzw
dp4 r1.z, r3.xyzw, cb0[66].xyzw
mul r3.w, l(0.282094806), cb3[2].x
ilt r2.w, l(0), cb3[0].x
if_nz r2.w
  mul r5.xyz, r1.yyyy, cb3[58].xzyx
  mad r5.xyz, cb3[57].xzyx, r1.xxxx, r5.xyzx
  mad r5.xyz, cb3[59].xzyx, r1.zzzz, r5.xyzx
  add r5.xyz, r5.xyzx, cb3[60].xzyx
  lt r6.xyz, |r5.xzyx|, l(0.500000, 0.500000, 0.500000, 0.000000)
  and r2.w, r6.y, r6.x
  and r2.w, r6.z, r2.w
  if_nz r2.w
    add r5.xyz, r5.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000)
    and r4.w, l(1), cb3[76].x
    if_nz r4.w
      utof r6.xyz, cb3[64].xyzx
      mul r6.xyz, r5.xyzx, r6.xyzx
      ftoi r7.xyz, r6.xyzx
      mov r7.w, l(0)
      ld_indexable(texture3d)(float,float,float,float) r7.xyzw, r7.xyzw, t18.xyzw
      mul r8.xyzw, r7.xyzw, l(1020.000000, 255.000000, 63.750000, 255.000000)
      frc r4.w, r8.z
      mad r8.x, r4.w, l(4.000000), r8.x
      mad r8.z, r7.z, l(63.750000), -r4.w
      frc r6.xyz, r6.xyzx
      mad r6.xyz, r6.xyzx, r8.wwww, r8.xyzx
      add r6.xyz, r6.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000)
      utof r7.xyz, cb3[66].xyzx
      div r5.xyz, r6.xyzx, r7.xyzx
    endif
    sample_l_indexable(texture3d)(float,float,float,float) r5.xyzw, r5.xyzx, t22.xyzw, s10, l(0.000000)
    mul r5.xyzw, r5.xyzw, cb3[75].xyzw
    mul r3.xyzw, r5.xyzw, l(0.282094806, 0.282094806, 0.282094806, 0.282094806)
  else
    mov r3.xyz, l(0,0,0,0)
  endif
  ige r4.w, l(1), cb3[0].x
  or r4.w, r2.w, r4.w
  if_z r4.w
    mul r5.xyz, r1.yyyy, cb3[78].xzyx
    mad r5.xyz, cb3[77].xzyx, r1.xxxx, r5.xyzx
    mad r5.xyz, cb3[79].xzyx, r1.zzzz, r5.xyzx
    add r5.xyz, r5.xyzx, cb3[80].xzyx
    lt r6.xyz, |r5.xzyx|, l(0.500000, 0.500000, 0.500000, 0.000000)
    and r5.w, r6.y, r6.x
    and r5.w, r6.z, r5.w
    if_nz r5.w
      add r5.xyz, r5.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000)
      and r5.w, l(1), cb3[96].x
      if_nz r5.w
        utof r6.xyz, cb3[84].xyzx
        mul r6.xyz, r5.xyzx, r6.xyzx
        ftoi r7.xyz, r6.xyzx
        mov r7.w, l(0)
        ld_indexable(texture3d)(float,float,float,float) r7.xyzw, r7.xyzw, t19.xyzw
        mul r8.xyzw, r7.xyzw, l(1020.000000, 255.000000, 63.750000, 255.000000)
        frc r5.w, r8.z
        mad r8.x, r5.w, l(4.000000), r8.x
        mad r8.z, r7.z, l(63.750000), -r5.w
        frc r6.xyz, r6.xyzx
        mad r6.xyz, r6.xyzx, r8.wwww, r8.xyzx
        add r6.xyz, r6.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000)
        utof r7.xyz, cb3[86].xyzx
        div r5.xyz, r6.xyzx, r7.xyzx
      endif
      sample_l_indexable(texture3d)(float,float,float,float) r5.xyzw, r5.xyzx, t23.xyzw, s10, l(0.000000)
      mul r5.xyzw, r5.xyzw, cb3[95].xyzw
      mul r3.xyzw, r5.xyzw, l(0.282094806, 0.282094806, 0.282094806, 0.282094806)
      mov r2.w, l(-1)
    else
      mov r2.w, l(0)
    endif
  endif
else
  mov r3.xyz, l(0,0,0,0)
  mov r2.w, l(0)
  mov r4.w, l(-1)
endif
if_z r4.w
  ige r4.w, l(2), cb3[0].x
  or r4.w, r2.w, r4.w
  if_z r4.w
    mul r5.xyz, r1.yyyy, cb3[98].xzyx
    mad r5.xyz, cb3[97].xzyx, r1.xxxx, r5.xyzx
    mad r5.xyz, cb3[99].xzyx, r1.zzzz, r5.xyzx
    add r5.xyz, r5.xyzx, cb3[100].xzyx
    lt r6.xyz, |r5.xzyx|, l(0.500000, 0.500000, 0.500000, 0.000000)
    and r5.w, r6.y, r6.x
    and r2.w, r6.z, r5.w
    if_nz r2.w
      add r5.xyz, r5.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000)
      and r5.w, l(1), cb3[116].x
      if_nz r5.w
        utof r6.xyz, cb3[104].xyzx
        mul r6.xyz, r5.xyzx, r6.xyzx
        ftoi r7.xyz, r6.xyzx
        mov r7.w, l(0)
        ld_indexable(texture3d)(float,float,float,float) r7.xyzw, r7.xyzw, t20.xyzw
        mul r8.xyzw, r7.xyzw, l(1020.000000, 255.000000, 63.750000, 255.000000)
        frc r5.w, r8.z
        mad r8.x, r5.w, l(4.000000), r8.x
        mad r8.z, r7.z, l(63.750000), -r5.w
        frc r6.xyz, r6.xyzx
        mad r6.xyz, r6.xyzx, r8.wwww, r8.xyzx
        add r6.xyz, r6.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000)
        utof r7.xyz, cb3[106].xyzx
        div r5.xyz, r6.xyzx, r7.xyzx
      endif
      sample_l_indexable(texture3d)(float,float,float,float) r5.xyzw, r5.xyzx, t24.xyzw, s10, l(0.000000)
      mul r5.xyzw, r5.xyzw, cb3[115].xyzw
      mul r3.xyzw, r5.xyzw, l(0.282094806, 0.282094806, 0.282094806, 0.282094806)
    endif
  endif
else
  mov r4.w, l(-1)
endif
if_z r4.w
  ige r4.w, l(3), cb3[0].x
  or r2.w, r2.w, r4.w
  if_z r2.w
    mul r5.xyz, r1.yyyy, cb3[118].xzyx
    mad r5.xyz, cb3[117].xzyx, r1.xxxx, r5.xyzx
    mad r5.xyz, cb3[119].xzyx, r1.zzzz, r5.xyzx
    add r5.xyz, r5.xyzx, cb3[120].xzyx
    lt r6.xyz, |r5.xzyx|, l(0.500000, 0.500000, 0.500000, 0.000000)
    and r2.w, r6.y, r6.x
    and r2.w, r6.z, r2.w
    if_nz r2.w
      add r5.xyz, r5.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000)
      and r2.w, l(1), cb3[136].x
      if_nz r2.w
        utof r6.xyz, cb3[124].xyzx
        mul r6.xyz, r5.xyzx, r6.xyzx
        ftoi r7.xyz, r6.xyzx
        mov r7.w, l(0)
        ld_indexable(texture3d)(float,float,float,float) r7.xyzw, r7.xyzw, t21.xyzw
        mul r8.xyzw, r7.xyzw, l(1020.000000, 255.000000, 63.750000, 255.000000)
        frc r2.w, r8.z
        mad r8.x, r2.w, l(4.000000), r8.x
        mad r8.z, r7.z, l(63.750000), -r2.w
        frc r6.xyz, r6.xyzx
        mad r6.xyz, r6.xyzx, r8.wwww, r8.xyzx
        add r6.xyz, r6.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000)
        utof r7.xyz, cb3[126].xyzx
        div r5.xyz, r6.xyzx, r7.xyzx
      endif
      sample_l_indexable(texture3d)(float,float,float,float) r5.xyzw, r5.xyzx, t25.xyzw, s10, l(0.000000)
      mul r5.xyzw, r5.xyzw, cb3[135].xyzw
      mul r3.xyzw, r5.xyzw, l(0.282094806, 0.282094806, 0.282094806, 0.282094806)
    endif
  endif
endif
mul r2.w, r3.w, l(0.282094806)
mul r5.x, r2.w, cb3[21].x
mul r5.y, r2.w, cb3[22].x
mul r5.z, r2.w, cb3[23].x
add r3.xyz, r3.xyzx, r5.xyzx
mul r5.xyzw, r3.xxyy, l(0.000000, 1.000000, 0.000000, 1.000000)
mul r3.xyzw, r3.zzzz, l(0.000000, 0.000000, 0.000000, 1.000000)
mov r6.w, l(1.000000)
mov r7.xyzw, r5.xxxy
mov r8.xyzw, r5.zzzw
mov r9.xyzw, r3.xywz
mov r2.w, l(0)
loop
  uge r4.w, r2.w, cb1[2].y
  breakc_nz r4.w
  ishl r10.x, l(1), r2.w
  and r10.x, r10.x, cb4[0].w
  if_z r10.x
    iadd r10.x, r2.w, l(1)
    mov r2.w, r10.x
    continue
  endif
  if_nz r4.w
    break
  endif
  imul null, r4.w, r2.w, l(6)
  add r10.xyz, -r1.xyzx, cb1[r4.w + 52].xyzx
  dp3 r10.w, r10.xyzx, r10.xyzx
  rsq r11.x, r10.w
  mul r6.xyz, r10.xyzx, r11.xxxx
  add r10.x, r10.w, -cb1[r4.w + 52].w
  max r10.x, r10.x, l(0.001000)
  rcp r10.x, r10.x
  mad r10.x, cb1[r4.w + 52].w, r10.x, l(1.000000)
  rsq r10.x, r10.x
  add r10.x, -r10.x, l(1.000000)
  mul r10.x, r10.x, l(6.28318548)
  mul r10.y, r10.w, r10.w
  mad_sat r10.y, -r10.y, cb1[r4.w + 53].w, l(1.000000)
  mul r10.y, r10.y, r10.y
  mul r10.x, r10.y, r10.x
  dp3_sat r10.y, cb1[r4.w + 53].xyzx, r6.xyzx
  add_sat r10.y, r10.y, -cb1[r4.w + 55].y
  mul_sat r10.y, r10.y, cb1[r4.w + 55].x
  mul r10.z, r10.y, r10.y
  mad r10.y, -r10.y, l(2.000000), l(3.000000)
  mul r10.y, r10.y, r10.z
  mul r10.x, r10.y, r10.x
  lt r10.y, l(0.000000), r10.x
  if_nz r10.y
    mul r10.y, r10.w, r11.x
    ld_structured_indexable(structured_buffer, stride=4)(mixed,mixed,mixed,mixed) r10.z, cb1[r4.w + 55].z, l(0), t12.xxxx
    mul r10.z, r10.y, -r10.z
    exp r10.z, r10.z
    mad_sat r10.y, r10.y, cb1[r4.w + 56].z, -cb1[r4.w + 56].y
    log r10.y, r10.y
    mul r10.y, r10.y, cb1[r4.w + 56].w
    exp r10.y, r10.y
    mul r10.x, r10.z, r10.x
    mul r10.x, r10.y, r10.x
    mul r10.x, r10.x, l(0.0795774683)
    mul r10.xyz, r10.xxxx, cb1[r4.w + 54].xyzx
    mad r7.xyzw, r6.xyzw, r10.xxxx, r7.xyzw
    mad r8.xyzw, r6.xyzw, r10.yyyy, r8.xyzw
    mad r9.xyzw, r6.xywz, r10.zzzz, r9.xyzw
  endif
  iadd r2.w, r2.w, l(1)
endloop
mul r3.xyzw, r8.xyzw, l(0.587000, 0.587000, 0.587000, 0.587000)
mad r3.xyzw, r7.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 r1.x, r3.w
mul r5.xyz, r1.xxxx, r3.xyzx
mov r9.xw, r7.wwww
mov r9.y, r8.w
add r2.xyzw, r2.xyzx, -r9.wyzw
mad r2.xyzw, r1.wwww, r2.xyzw, r9.xyzw
store_uav_typed u8.xyzw, r0.xyww, r2.xyzw
mad r1.xyz, -r3.xyzx, r1.xxxx, r4.xyzx
mad r1.xyz, r1.wwww, r1.xyzx, r5.xyzx
mov r1.w, l(1.000000)
store_uav_typed u10.xyzw, r0.xyzw, r1.xyzw
ret
// Approximately 282 instruction slots used
