//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__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-t15
//
// }
//
// 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__volumetricFogDensityData__smpLinearBorder    sampler      NA          NA    7        1
// resourceTables__giVolumeConstants__giSampler    sampler      NA          NA   10        1
// resourceTables__volumetricFogData.LightTextureAccum    texture  float3          3d    0        1
// resourceTables__volumetricFogData.OpticalDensityTextureAccum    texture  float2          3d    1        1
// resourceTables__volumetricFogData.DirTextureAccum    texture  float4          3d    2        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__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.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__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[94], dynamicIndexed
dcl_constantbuffer cb1[619], dynamicIndexed
dcl_constantbuffer cb2[23], immediateIndexed
dcl_constantbuffer cb3[137], immediateIndexed
dcl_constantbuffer cb4[1], immediateIndexed
dcl_constantbuffer cb12[3], immediateIndexed
dcl_sampler s3, mode_default
dcl_sampler s7, mode_default
dcl_sampler s10, mode_default
dcl_resource_texture3d (float,float,float,float) t0
dcl_resource_texture3d (float,float,float,float) t1
dcl_resource_texture3d (float,float,float,float) t2
dcl_resource_structured t12, 4
dcl_resource_texture3d (float,float,float,float) t14
dcl_resource_texture3d (float,float,float,float) t15
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) u9
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.y, r2.x, cb0[92].w
mul_sat r1.w, r1.w, l(1000.000000)
mul r2.y, r1.w, r2.y
mul r2.x, r2.x, cb0[93].x
mul r1.w, r1.w, r2.x
sample_l_indexable(texture3d)(float,float,float,float) r2.xzw, r4.xyzx, t0.xwyz, s3, l(0.000000)
sample_l_indexable(texture3d)(float,float,float,float) r5.xyz, r4.xyzx, t2.xyzw, s3, l(0.000000)
sample_l_indexable(texture3d)(float,float,float,float) r4.xy, r4.xyzx, t1.xyzw, s3, l(0.000000)
mov r3.w, vThreadIDInGroupFlattened.x
add r1.xyz, r1.xyzx, cb0[r3.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
add r3.xyz, r1.xyzx, -cb0[72].xyzx
dp3 r3.x, r3.xyzx, r3.xyzx
max r3.x, r3.x, l(0.000001)
rsq r3.y, r3.x
mul r3.x, r3.y, r3.x
mad_sat r3.x, r3.x, cb2[20].z, l(-1.000000)
mad r3.y, -r1.y, cb2[21].y, cb2[22].w
exp r3.y, r3.y
min r3.y, r3.y, l(1.000000)
mul r3.x, r3.y, r3.x
mul r6.xzw, r3.xxxx, cb2[20].wwww
mul r6.y, r3.x, cb2[21].x
mad r3.xyz, r1.xyzx, cb2[9].xyzx, cb2[10].xyzx
lt r7.xyz, l(0.000000, 0.000000, 0.000000, 0.000000), r3.xyzx
lt r8.xyz, r3.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
iadd r7.xyz, -r7.xyzx, r8.xyzx
itof r7.xyz, r7.xyzx
mul r7.xyz, r7.xyzx, cb2[8].wwww
mad r7.xyz, cb2[9].wwww, r3.xyzx, r7.xyzx
lt r8.xyz, |r3.xyzx|, cb2[10].wwww
movc r3.xyz, r8.xyzx, r3.xyzx, r7.xyzx
mad r3.xyz, r3.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) r3.w, r3.xyzx, t15.yzwx, s7, l(0.000000)
sample_l_indexable(texture3d)(float,float,float,float) r7.y, r3.xyzx, t14.yxzw, s7, l(0.000000)
mov r7.xzw, r3.wwww
add_sat r3.xyzw, r7.xyzw, l(-1.000000, -1.000000, -1.000000, -1.000000)
mad r3.xyzw, r3.xyzw, l(2048.000000, 2048.000000, 2048.000000, 2048.000000), r6.xyzw
mul r6.w, l(0.282094806), cb3[2].x
ilt r4.z, l(0), cb3[0].x
if_nz r4.z
  mul r7.xyz, r1.yyyy, cb3[58].xzyx
  mad r7.xyz, cb3[57].xzyx, r1.xxxx, r7.xyzx
  mad r7.xyz, cb3[59].xzyx, r1.zzzz, r7.xyzx
  add r7.xyz, r7.xyzx, cb3[60].xzyx
  lt r8.xyz, |r7.xzyx|, l(0.500000, 0.500000, 0.500000, 0.000000)
  and r4.z, r8.y, r8.x
  and r4.z, r8.z, r4.z
  if_nz r4.z
    add r7.xyz, r7.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000)
    and r4.w, l(1), cb3[76].x
    if_nz r4.w
      utof r8.xyz, cb3[64].xyzx
      mul r8.xyz, r7.xyzx, r8.xyzx
      ftoi r9.xyz, r8.xyzx
      mov r9.w, l(0)
      ld_indexable(texture3d)(float,float,float,float) r9.xyzw, r9.xyzw, t18.xyzw
      mul r10.xyzw, r9.xyzw, l(1020.000000, 255.000000, 63.750000, 255.000000)
      frc r4.w, r10.z
      mad r10.x, r4.w, l(4.000000), r10.x
      mad r10.z, r9.z, l(63.750000), -r4.w
      frc r8.xyz, r8.xyzx
      mad r8.xyz, r8.xyzx, r10.wwww, r10.xyzx
      add r8.xyz, r8.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000)
      utof r9.xyz, cb3[66].xyzx
      div r7.xyz, r8.xyzx, r9.xyzx
    endif
    sample_l_indexable(texture3d)(float,float,float,float) r7.xyzw, r7.xyzx, t22.xyzw, s10, l(0.000000)
    mul r7.xyzw, r7.xyzw, cb3[75].xyzw
    mul r6.xyzw, r7.xyzw, l(0.282094806, 0.282094806, 0.282094806, 0.282094806)
  else
    mov r6.xyz, l(0,0,0,0)
  endif
  ige r4.w, l(1), cb3[0].x
  or r4.w, r4.z, r4.w
  if_z r4.w
    mul r7.xyz, r1.yyyy, cb3[78].xzyx
    mad r7.xyz, cb3[77].xzyx, r1.xxxx, r7.xyzx
    mad r7.xyz, cb3[79].xzyx, r1.zzzz, r7.xyzx
    add r7.xyz, r7.xyzx, cb3[80].xzyx
    lt r8.xyz, |r7.xzyx|, l(0.500000, 0.500000, 0.500000, 0.000000)
    and r5.w, r8.y, r8.x
    and r5.w, r8.z, r5.w
    if_nz r5.w
      add r7.xyz, r7.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000)
      and r5.w, l(1), cb3[96].x
      if_nz r5.w
        utof r8.xyz, cb3[84].xyzx
        mul r8.xyz, r7.xyzx, r8.xyzx
        ftoi r9.xyz, r8.xyzx
        mov r9.w, l(0)
        ld_indexable(texture3d)(float,float,float,float) r9.xyzw, r9.xyzw, t19.xyzw
        mul r10.xyzw, r9.xyzw, l(1020.000000, 255.000000, 63.750000, 255.000000)
        frc r5.w, r10.z
        mad r10.x, r5.w, l(4.000000), r10.x
        mad r10.z, r9.z, l(63.750000), -r5.w
        frc r8.xyz, r8.xyzx
        mad r8.xyz, r8.xyzx, r10.wwww, r10.xyzx
        add r8.xyz, r8.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000)
        utof r9.xyz, cb3[86].xyzx
        div r7.xyz, r8.xyzx, r9.xyzx
      endif
      sample_l_indexable(texture3d)(float,float,float,float) r7.xyzw, r7.xyzx, t23.xyzw, s10, l(0.000000)
      mul r7.xyzw, r7.xyzw, cb3[95].xyzw
      mul r6.xyzw, r7.xyzw, l(0.282094806, 0.282094806, 0.282094806, 0.282094806)
      mov r4.z, l(-1)
    else
      mov r4.z, l(0)
    endif
  endif
else
  mov r6.xyz, l(0,0,0,0)
  mov r4.zw, l(0,0,0,-1)
endif
if_z r4.w
  ige r4.w, l(2), cb3[0].x
  or r4.w, r4.z, r4.w
  if_z r4.w
    mul r7.xyz, r1.yyyy, cb3[98].xzyx
    mad r7.xyz, cb3[97].xzyx, r1.xxxx, r7.xyzx
    mad r7.xyz, cb3[99].xzyx, r1.zzzz, r7.xyzx
    add r7.xyz, r7.xyzx, cb3[100].xzyx
    lt r8.xyz, |r7.xzyx|, l(0.500000, 0.500000, 0.500000, 0.000000)
    and r5.w, r8.y, r8.x
    and r4.z, r8.z, r5.w
    if_nz r4.z
      add r7.xyz, r7.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000)
      and r5.w, l(1), cb3[116].x
      if_nz r5.w
        utof r8.xyz, cb3[104].xyzx
        mul r8.xyz, r7.xyzx, r8.xyzx
        ftoi r9.xyz, r8.xyzx
        mov r9.w, l(0)
        ld_indexable(texture3d)(float,float,float,float) r9.xyzw, r9.xyzw, t20.xyzw
        mul r10.xyzw, r9.xyzw, l(1020.000000, 255.000000, 63.750000, 255.000000)
        frc r5.w, r10.z
        mad r10.x, r5.w, l(4.000000), r10.x
        mad r10.z, r9.z, l(63.750000), -r5.w
        frc r8.xyz, r8.xyzx
        mad r8.xyz, r8.xyzx, r10.wwww, r10.xyzx
        add r8.xyz, r8.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000)
        utof r9.xyz, cb3[106].xyzx
        div r7.xyz, r8.xyzx, r9.xyzx
      endif
      sample_l_indexable(texture3d)(float,float,float,float) r7.xyzw, r7.xyzx, t24.xyzw, s10, l(0.000000)
      mul r7.xyzw, r7.xyzw, cb3[115].xyzw
      mul r6.xyzw, r7.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 r4.z, r4.z, r4.w
  if_z r4.z
    mul r7.xyz, r1.yyyy, cb3[118].xzyx
    mad r7.xyz, cb3[117].xzyx, r1.xxxx, r7.xyzx
    mad r7.xyz, cb3[119].xzyx, r1.zzzz, r7.xyzx
    add r7.xyz, r7.xyzx, cb3[120].xzyx
    lt r8.xyz, |r7.xzyx|, l(0.500000, 0.500000, 0.500000, 0.000000)
    and r4.z, r8.y, r8.x
    and r4.z, r8.z, r4.z
    if_nz r4.z
      add r7.xyz, r7.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000)
      and r4.z, l(1), cb3[136].x
      if_nz r4.z
        utof r8.xyz, cb3[124].xyzx
        mul r8.xyz, r7.xyzx, r8.xyzx
        ftoi r9.xyz, r8.xyzx
        mov r9.w, l(0)
        ld_indexable(texture3d)(float,float,float,float) r9.xyzw, r9.xyzw, t21.xyzw
        mul r10.xyzw, r9.xyzw, l(1020.000000, 255.000000, 63.750000, 255.000000)
        frc r4.z, r10.z
        mad r10.x, r4.z, l(4.000000), r10.x
        mad r10.z, r9.z, l(63.750000), -r4.z
        frc r8.xyz, r8.xyzx
        mad r8.xyz, r8.xyzx, r10.wwww, r10.xyzx
        add r8.xyz, r8.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000)
        utof r9.xyz, cb3[126].xyzx
        div r7.xyz, r8.xyzx, r9.xyzx
      endif
      sample_l_indexable(texture3d)(float,float,float,float) r7.xyzw, r7.xyzx, t25.xyzw, s10, l(0.000000)
      mul r7.xyzw, r7.xyzw, cb3[135].xyzw
      mul r6.xyzw, r7.xyzw, l(0.282094806, 0.282094806, 0.282094806, 0.282094806)
    endif
  endif
endif
mul r4.z, r6.w, l(0.282094806)
mul r7.x, r4.z, cb3[21].x
mul r7.y, r4.z, cb3[22].x
mul r7.z, r4.z, cb3[23].x
add r6.xyz, r6.xyzx, r7.xyzx
mul r7.xyzw, r6.xxyy, l(0.000000, 1.000000, 0.000000, 1.000000)
mul r6.xyzw, r6.zzzz, l(0.000000, 0.000000, 0.000000, 1.000000)
mov r8.w, l(1.000000)
mov r9.xyzw, r7.xxxy
mov r10.xyzw, r7.zzzw
mov r11.xyzw, r6.xywz
mov r4.z, l(0)
loop
  uge r4.w, r4.z, cb1[2].y
  breakc_nz r4.w
  ishl r5.w, l(1), r4.z
  and r5.w, r5.w, cb4[0].w
  if_z r5.w
    iadd r5.w, r4.z, l(1)
    mov r4.z, r5.w
    continue
  endif
  if_nz r4.w
    break
  endif
  imul null, r4.w, r4.z, l(6)
  add r12.xyz, -r1.xyzx, cb1[r4.w + 52].xyzx
  dp3 r5.w, r12.xyzx, r12.xyzx
  rsq r12.w, r5.w
  mul r8.xyz, r12.wwww, r12.xyzx
  add r12.x, r5.w, -cb1[r4.w + 52].w
  max r12.x, r12.x, l(0.001000)
  rcp r12.x, r12.x
  mad r12.x, cb1[r4.w + 52].w, r12.x, l(1.000000)
  rsq r12.x, r12.x
  add r12.x, -r12.x, l(1.000000)
  mul r12.x, r12.x, l(6.28318548)
  mul r12.y, r5.w, r5.w
  mad_sat r12.y, -r12.y, cb1[r4.w + 53].w, l(1.000000)
  mul r12.y, r12.y, r12.y
  mul r12.x, r12.y, r12.x
  dp3_sat r12.y, cb1[r4.w + 53].xyzx, r8.xyzx
  add_sat r12.y, r12.y, -cb1[r4.w + 55].y
  mul_sat r12.y, r12.y, cb1[r4.w + 55].x
  mul r12.z, r12.y, r12.y
  mad r12.y, -r12.y, l(2.000000), l(3.000000)
  mul r12.y, r12.y, r12.z
  mul r12.x, r12.y, r12.x
  lt r12.y, l(0.000000), r12.x
  if_nz r12.y
    mul r5.w, r5.w, r12.w
    ld_structured_indexable(structured_buffer, stride=4)(mixed,mixed,mixed,mixed) r12.y, cb1[r4.w + 55].z, l(0), t12.xxxx
    mul r12.y, r5.w, -r12.y
    exp r12.y, r12.y
    mad_sat r5.w, r5.w, cb1[r4.w + 56].z, -cb1[r4.w + 56].y
    log r5.w, r5.w
    mul r5.w, r5.w, cb1[r4.w + 56].w
    exp r5.w, r5.w
    mul r12.x, r12.y, r12.x
    mul r5.w, r5.w, r12.x
    mul r5.w, r5.w, l(0.0795774683)
    mul r12.xyz, r5.wwww, cb1[r4.w + 54].xyzx
    mad r9.xyzw, r8.xyzw, r12.xxxx, r9.xyzw
    mad r10.xyzw, r8.xyzw, r12.yyyy, r10.xyzw
    mad r11.xyzw, r8.xywz, r12.zzzz, r11.xyzw
  endif
  iadd r4.z, r4.z, l(1)
endloop
mul r6.xyzw, r10.xyzw, l(0.587000, 0.587000, 0.587000, 0.587000)
mad r6.xyzw, r9.xyzw, l(0.299000, 0.299000, 0.299000, 0.299000), r6.xyzw
mad r6.xyzw, r11.xywz, l(0.114000, 0.114000, 0.114000, 0.114000), r6.xyzw
rcp r1.x, r6.w
mul r7.xyz, r1.xxxx, r6.xyzx
mov r11.xw, r9.wwww
mov r11.y, r10.w
add r8.xyzw, r2.xzwx, -r11.wyzw
mad r8.xyzw, r2.yyyy, r8.xyzw, r11.xyzw
store_uav_typed u8.xyzw, r0.xyww, r8.xyzw
mad r1.xyz, -r6.xyzx, r1.xxxx, r5.xyzx
mad r2.xyz, r2.yyyy, r1.xyzx, r7.xyzx
mov r2.w, l(1.000000)
store_uav_typed u10.xyzw, r0.xyww, r2.xyzw
add r2.xyzw, -r3.wyww, r4.xyxx
mad r1.xyzw, r1.wwww, r2.xyzw, r3.xyzw
store_uav_typed u9.xyzw, r0.xyzw, r1.xyzw
ret
// Approximately 314 instruction slots used
