//ocean 3
// Generated by Microsoft (R) HLSL Shader Compiler 10.0.10011.16384
//
//   using 3Dmigoto v1.3.16 on Sat Aug 15 15:54:16 2020
//
//
// Buffer Definitions:
//
// cbuffer WorldViewGlobals
// {
//
//   row_major float4x4 g_ViewProjMatrix;// Offset:    0 Size:    64 [unused]
//   row_major float4x4 g_ViewProjSS;   // Offset:   64 Size:    64
//   row_major float4x4 g_ViewProjSSInverseTranspose;// Offset:  128 Size:    64
//   row_major float4x4 g_ViewMatrix;   // Offset:  192 Size:    64 [unused]
//   row_major float4x4 g_NDCToWorld;   // Offset:  256 Size:    64
//   row_major float4x4 g_OverlaySamplingMatrix;// Offset:  320 Size:    64
//   row_major float4x4 g_ShadowMapSamplingMatrix;// Offset:  384 Size:    64
//   row_major float4x4 g_ShadowMapSamplingMatrixInverse;// Offset:  448 Size:    64 [unused]
//   float4 g_vDynLightingGridInfo;     // Offset:  512 Size:    16
//   float3 g_vLightDirection;          // Offset:  528 Size:    12
//   float g_ShadowZBias;               // Offset:  540 Size:     4 [unused]
//   float4 g_MainPassDimensions;       // Offset:  544 Size:    16
//   float4 g_FinalDimensions;          // Offset:  560 Size:    16
//   float4 g_ShadowMapDimensions;      // Offset:  576 Size:    16
//   int g_bSSOverlay;                  // Offset:  592 Size:     4
//   int g_bShadows;                    // Offset:  596 Size:     4
//   int g_nPixelsPerBlock;             // Offset:  600 Size:     4 [unused]
//   uint g_nRTSamples;                 // Offset:  604 Size:     4 [unused]
//   float g_fMipBias;                  // Offset:  608 Size:     4 [unused]
//   float2 g_vNearFar;                 // Offset:  612 Size:     8
//   float g_SceneExposure;             // Offset:  620 Size:     4
//   float g_InvSceneExposure;          // Offset:  624 Size:     4
//   float g_IntermediateExposure;      // Offset:  628 Size:     4
//   float g_InvIntermediateExposure;   // Offset:  632 Size:     4
//   float4 g_vFogParams;               // Offset:  640 Size:    16 [unused]
//   float4 g_vFogSkyColor_IntegralDensity;// Offset:  656 Size:    16 [unused]
//   float3 g_vFogLightColor;           // Offset:  672 Size:    12 [unused]
//   float3 g_vWorldWrapTranslation;    // Offset:  688 Size:    12 [unused]
//   float3 g_vEyePosition;             // Offset:  704 Size:    12
//   float3 g_vLightColor;              // Offset:  720 Size:    12
//   float4 g_EnvSHPremultipliedIrradiance[7];// Offset:  736 Size:   112
//   float4 g_EnvSHRadiance[7];         // Offset:  848 Size:   112 [unused]
//   float3 g_vSkySH;                   // Offset:  960 Size:    12 [unused]
//   float g_DoTonemap;                 // Offset:  972 Size:     4 [unused]
//   float g_LightMapWeight;            // Offset:  976 Size:     4 [unused]
//   float g_fModelTime;                // Offset:  980 Size:     4 [unused]
//   float2 g_vPixelMultiplier;         // Offset:  984 Size:     8 [unused]
//   float4 g_FOWFullFogParchmentUVTransform;// Offset:  992 Size:    16
//   float3 g_FOWCoastStripeColor;      // Offset: 1008 Size:    12 [unused]
//   float g_FOWCoastStripeThickness;   // Offset: 1020 Size:     4 [unused]
//   float3 g_FOWTintColor;             // Offset: 1024 Size:    12
//   float g_fFOWBorderNoiseUVScale;    // Offset: 1036 Size:     4
//   float3 g_vFOWBorderColor;          // Offset: 1040 Size:    12
//   float g_fFOWBorderNoiseIntensity;  // Offset: 1052 Size:     4
//   float3 g_FOWTerrainHatchColor;     // Offset: 1056 Size:    12 [unused]
//   float g_FOWTerrainHatchTextureCount;// Offset: 1068 Size:     4 [unused]
//   float4 g_FOWTerrainHatchUVTransform;// Offset: 1072 Size:    16 [unused]
//   float3 g_FOWModelsHatchColor;      // Offset: 1088 Size:    12 [unused]
//   float g_FOWModelsHatchTextureCount;// Offset: 1100 Size:     4 [unused]
//   float4 g_FOWModelsHatchUVTransform;// Offset: 1104 Size:    16 [unused]
//   float3 g_FOWModelsStrokeColor;     // Offset: 1120 Size:    12 [unused]
//   float g_FOWModelsStrokeOpacity;    // Offset: 1132 Size:     4 [unused]
//   float4 g_FOWFlowLineColor;         // Offset: 1136 Size:    16 [unused]
//   float3 g_FOWFlowLinePositionBias;  // Offset: 1152 Size:    12 [unused]
//   float g_FOWFlowLineThickness;      // Offset: 1164 Size:     4 [unused]
//   float g_FOWModelsParchmentWeight;  // Offset: 1168 Size:     4 [unused]
//   float g_FOWModelsStrokeThickness;  // Offset: 1172 Size:     4 [unused]
//   float g_FOWStrokeOpacityMultiplier;// Offset: 1176 Size:     4 [unused]
//   row_major float4x4 g_TerrainHexToWorld;// Offset: 1184 Size:    64 [unused]
//   float g_TerrainFlatHeight;         // Offset: 1248 Size:     4 [unused]
//
// }
//
// cbuffer WorldView_WaterGlobals
// {
//
//   float g_fTime;                     // Offset:    0 Size:     4 [unused]
//   float g_fSSReflectPasses;          // Offset:    4 Size:     4 [unused]
//   float g_fInvSpecPowerSun;          // Offset:    8 Size:     4
//   float g_fInvSpecPowerDynamic;      // Offset:   12 Size:     4
//   float4 g_FOWWaterUVTransform;      // Offset:   16 Size:    16
//   float2 g_vWorldDimensions;         // Offset:   32 Size:     8 [unused]
//   float2 g_vMaskOrigin;              // Offset:   40 Size:     8 [unused]
//   float2 g_vMaskDimensions;          // Offset:   48 Size:     8 [unused]
//   float g_fWhiteCapSharpness;        // Offset:   56 Size:     4
//   float2 g_vWhiteCapThreshold;       // Offset:   64 Size:     8
//   float2 g_vParallaxBias;            // Offset:   72 Size:     8
//   float g_fFresnelF0;                // Offset:   80 Size:     4
//   float g_fEnvFresnelExp;            // Offset:   84 Size:     4
//   float2 g_vOverlayRippleStrength;   // Offset:   88 Size:     8
//   float g_fRefractionScale;          // Offset:   96 Size:     4
//   float2 g_vWorldXRange;             // Offset:  100 Size:     8 [unused]
//   float g_fRiverBumpScale;           // Offset:  108 Size:     4 [unused]
//   float g_vRiverScrollSpeed;         // Offset:  112 Size:     4 [unused]
//   float3 g_vRiverLeanInfo;           // Offset:  116 Size:    12 [unused]
//   float g_fInvRiverDepthRange0;      // Offset:  128 Size:     4 [unused]
//   float g_fInvRiverDepthRange1;      // Offset:  132 Size:     4 [unused]
//   bool g_b_dither;                   // Offset:  136 Size:     4
//   float2 g_dither_offset;            // Offset:  144 Size:     8 [unused]
//   float2 g_dither_inv_dims;          // Offset:  152 Size:     8
//
// }
//
// cbuffer WaterMaterials
// {
//
//   float2 g_vScrollDir0_0;            // Offset:    0 Size:     8
//   float2 g_vScrollDir1_0;            // Offset:    8 Size:     8 [unused]
//   float3 g_vOceanLeanInfo_0;         // Offset:   16 Size:    12
//   float g_fOceanBumpScale_0;         // Offset:   28 Size:     4
//   float2 g_fBumpTileRate_0;          // Offset:   32 Size:     8 [unused]
//   float g_fInvOceanDepthRange_0;     // Offset:   40 Size:     4
//   uint g_MaskIndex_0;                // Offset:   44 Size:     4
//   uint g_PrimaryBumps_0;             // Offset:   48 Size:     4
//   uint g_SecondaryBumps_0;           // Offset:   52 Size:     4
//   uint g_DarkMap_0;                  // Offset:   56 Size:     4
//   uint g_ScatterMap_0;               // Offset:   60 Size:     4
//   float2 g_vScrollDir0_1;            // Offset:   64 Size:     8
//   float2 g_vScrollDir1_1;            // Offset:   72 Size:     8 [unused]
//   float3 g_vOceanLeanInfo_1;         // Offset:   80 Size:    12
//   float g_fOceanBumpScale_1;         // Offset:   92 Size:     4
//   float2 g_fBumpTileRate_1;          // Offset:   96 Size:     8 [unused]
//   float g_fInvOceanDepthRange_1;     // Offset:  104 Size:     4
//   uint g_MaskIndex_1;                // Offset:  108 Size:     4
//   uint g_PrimaryBumps_1;             // Offset:  112 Size:     4
//   uint g_SecondaryBumps_1;           // Offset:  116 Size:     4
//   uint g_DarkMap_1;                  // Offset:  120 Size:     4
//   uint g_ScatterMap_1;               // Offset:  124 Size:     4
//   float2 g_vScrollDir0_2;            // Offset:  128 Size:     8
//   float2 g_vScrollDir1_2;            // Offset:  136 Size:     8 [unused]
//   float3 g_vOceanLeanInfo_2;         // Offset:  144 Size:    12
//   float g_fOceanBumpScale_2;         // Offset:  156 Size:     4
//   float2 g_fBumpTileRate_2;          // Offset:  160 Size:     8 [unused]
//   float g_fInvOceanDepthRange_2;     // Offset:  168 Size:     4
//   uint g_MaskIndex_2;                // Offset:  172 Size:     4
//   uint g_PrimaryBumps_2;             // Offset:  176 Size:     4
//   uint g_SecondaryBumps_2;           // Offset:  180 Size:     4
//   uint g_DarkMap_2;                  // Offset:  184 Size:     4
//   uint g_ScatterMap_2;               // Offset:  188 Size:     4
//   uint g_uWhiteCapFlags;             // Offset:  192 Size:     4
//   float3 g_vWhiteCapOpacity;         // Offset:  196 Size:    12
//
// }
//
// Resource bind info for FlattenedLightInfo
// {
//
//   float4 $Element;                   // Offset:    0 Size:    16
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// SS_DEFAULT                        sampler      NA          NA    0        1
// SS_DEFAULT_CLAMP                  sampler      NA          NA    2        1
// SS_ANISO                          sampler      NA          NA    4        1
// SS_ANISO_CLAMP                    sampler      NA          NA    5        1
// SS_POINT                          sampler      NA          NA    6        1
// SS_POINT_CLAMP                    sampler      NA          NA    7        1
// ScatterMap                        texture  float4     2darray    0        1
// PrimaryOverlay                    texture  float4          2d    1        1
// BackBuffer                        texture  float4          2d    2        1
// DepthBuffer                       texture  float4          2d    3        1
// WaterMask                         texture  float4     2darray    4        1
// DarkMap                           texture  float4     2darray    5        1
// SecondaryOverlay                  texture  float4          2d    6        1
// LEAN1                             texture  float4     2darray    7        1
// LEAN0                             texture  float4     2darray    8        1
// LightIndexRanges                  texture   uint4          2d    9        1
// g_ShadowMap                       texture  float4          2d   10        1
// Currents                          texture  float2          2d   11        1
// FlattenedLightInfo                texture  struct         r/o   13        1
// DitherMap                         texture  float4          2d   14        1
// FOWDeepParchment                  texture  float4          2d   15        1
// g_Opacity_ShadowMap               texture  float4          2d   16        1
// FOWShallowParchment               texture  float4          2d   17        1
// FullFogParchment                  texture  float4          2d   20        1
// FOWMask                           texture  float4          2d   21        1
// NoiseMap                          texture   float          2d   22        1
// WorldViewGlobals                  cbuffer      NA          NA    1        1
// WorldView_WaterGlobals            cbuffer      NA          NA    2        1
// WaterMaterials                    cbuffer      NA          NA    3        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float   xy
// TEXCOORD                 0   xyz         1     NONE   float   xyz
// TEXCOORD                 1   xy          2     NONE   float   xy
// TEXCOORD                 2     zw        2     NONE   float     zw
// TEXCOORD                 3   xy          3     NONE   float   xy
// TEXCOORD                 4   xyzw        4     NONE   float   xyzw
// TEXCOORD                 5   xyzw        5     NONE   float   xyzw
// TEXCOORD                 6   xyzw        6     NONE   float   xyzw
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_TARGET                0   xyzw        0   TARGET   float   xyzw
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb1[66], immediateIndexed
dcl_constantbuffer cb2[10], immediateIndexed
dcl_constantbuffer cb3[13], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s2, mode_default
dcl_sampler s4, mode_default
dcl_sampler s5, mode_default
dcl_sampler s6, mode_default
dcl_sampler s7, mode_default
dcl_resource_texture2darray (float,float,float,float) t0
dcl_resource_texture2d (float,float,float,float) t1
dcl_resource_texture2d (float,float,float,float) t2
dcl_resource_texture2d (float,float,float,float) t3
dcl_resource_texture2darray (float,float,float,float) t4
dcl_resource_texture2darray (float,float,float,float) t5
dcl_resource_texture2d (float,float,float,float) t6
dcl_resource_texture2darray (float,float,float,float) t7
dcl_resource_texture2darray (float,float,float,float) t8
dcl_resource_texture2d (uint,uint,uint,uint) t9
dcl_resource_texture2d (float,float,float,float) t10
dcl_resource_texture2d (float,float,float,float) t11
dcl_resource_structured t13, 16
dcl_resource_texture2d (float,float,float,float) t14
dcl_resource_texture2d (float,float,float,float) t15
dcl_resource_texture2d (float,float,float,float) t16
dcl_resource_texture2d (float,float,float,float) t17
dcl_resource_texture2d (float,float,float,float) t20
dcl_resource_texture2d (float,float,float,float) t21
dcl_resource_texture2d (float,float,float,float) t22
dcl_input_ps_siv linear noperspective v0.xy, position
dcl_input_ps linear v1.xyz
dcl_input_ps linear v2.xy
dcl_input_ps linear v2.zw
dcl_input_ps linear noperspective v3.xy
dcl_input_ps linear v4.xyzw
dcl_input_ps linear v5.xyzw
dcl_input_ps linear v6.xyzw
dcl_output o0.xyzw
dcl_temps 19
mul r0.xyz, v1.yyyy, cb1[21].xywx
mad r0.xyz, v1.xxxx, cb1[20].xywx, r0.xyzx
add r0.xyz, r0.xyzx, cb1[23].xywx
div r0.xy, r0.xyxx, r0.zzzz
sample_indexable(texture2d)(float,float,float,float) r1.xyz, r0.xyxx, t21.xyzw, s2
mov_sat r1.xyz, r1.xyzx
mad r2.xyz, r1.xyzx, l(-2.000000, -2.000000, -2.000000, 0.000000), l(3.000000, 3.000000, 3.000000, 0.000000)
mul r1.xyz, r1.xyzx, r1.xyzx
mul r3.xyz, r1.xyzx, r2.xyzx
utof r4.z, cb3[2].w
mov r4.xy, v2.zwzz
sample_indexable(texture2darray)(float,float,float,float) r0.z, r4.xyzx, t4.yzxw, s0
utof r4.z, cb3[6].w
mov r4.xy, v2.zwzz
sample_indexable(texture2darray)(float,float,float,float) r0.w, r4.xyzx, t4.yzwx, s0
utof r4.z, cb3[10].w
mov r4.xy, v2.zwzz
sample_indexable(texture2darray)(float,float,float,float) r1.z, r4.xyzx, t4.yzxw, s0
add r1.w, r0.w, r0.z
add r1.w, r1.z, r1.w
div r0.zw, r0.zzzw, r1.wwww
div r1.z, r1.z, r1.w
utof r4.xyzw, cb3[3].xyzw
mov r5.xy, v4.xyxx
mov r5.z, r4.x
sample_indexable(texture2darray)(float,float,float,float) r1.w, r5.xyzx, t7.xzwy, s4
add r1.w, r1.w, l(-0.500000)
mov r6.xy, v4.zwzz
mov r6.z, r4.y
sample_indexable(texture2darray)(float,float,float,float) r2.z, r6.xyzx, t7.xzyw, s4
add r1.w, r1.w, r2.z
add r1.w, r1.w, l(-0.500000)
mul r1.w, r1.w, cb3[1].w
mul r1.w, r1.w, l(0.500000)
utof r7.xyzw, cb3[7].xyzw
mov r8.xy, v5.xyxx
mov r8.z, r7.x
sample_indexable(texture2darray)(float,float,float,float) r2.z, r8.xyzx, t7.xzyw, s4
add r2.z, r2.z, l(-0.500000)
mov r9.xy, v5.zwzz
mov r9.z, r7.y
sample_indexable(texture2darray)(float,float,float,float) r2.w, r9.xyzx, t7.xzwy, s4
add r2.z, r2.z, r2.w
add r2.z, r2.z, l(-0.500000)
mul r2.z, r2.z, cb3[5].w
mul r2.z, r2.z, l(0.500000)
utof r10.xyzw, cb3[11].xyzw
mov r11.xy, v6.xyxx
mov r11.z, r10.x
sample_indexable(texture2darray)(float,float,float,float) r2.w, r11.xyzx, t7.xzwy, s4
add r2.w, r2.w, l(-0.500000)
mov r12.xy, v6.zwzz
mov r12.z, r10.y
sample_indexable(texture2darray)(float,float,float,float) r3.w, r12.xyzx, t7.xzwy, s4
add r2.w, r2.w, r3.w
add r2.w, r2.w, l(-0.500000)
mul r2.w, r2.w, cb3[9].w
mul r2.w, r2.w, l(0.500000)
mul r2.z, r0.w, r2.z
mad r1.w, r0.z, r1.w, r2.z
mad r1.w, r1.z, r2.w, r1.w
mad r1.w, r1.w, cb2[4].z, cb2[4].w
add r13.xyz, -v1.xyzx, cb1[44].xyzx
dp3 r2.z, r13.xyzx, r13.xyzx
rsq r2.z, r2.z
mul r13.xyzw, r2.zzzz, r13.xyxy
mad r14.xyzw, r1.wwww, r13.zwzw, v4.xyzw
mad r15.xyzw, r1.wwww, r13.zwzw, v5.xyzw
mad r13.xyzw, r1.wwww, r13.xyzw, v6.xyzw
sample_indexable(texture2d)(float,float,float,float) r2.zw, v2.xyxx, t11.zwxy, s0
mad r2.zw, r2.zzzw, l(0.000000, 0.000000, 2.000000, 2.000000), l(0.000000, 0.000000, -1.000000, -1.000000)
dp2 r1.w, r2.zwzz, cb3[0].xyxx
add r1.w, r1.w, l(2.000000)
mul r1.w, r1.w, r1.w
mul r1.w, r1.w, r1.w
add r3.w, r1.w, r1.w
div r1.w, r1.w, r3.w
dp2 r3.w, r2.zwzz, cb3[4].xyxx
add r3.w, r3.w, l(2.000000)
mul r3.w, r3.w, r3.w
mul r3.w, r3.w, r3.w
add r5.w, r3.w, r3.w
div r3.w, r3.w, r5.w
dp2 r2.z, r2.zwzz, cb3[8].xyxx
add r2.z, r2.z, l(2.000000)
mul r2.z, r2.z, r2.z
mul r2.z, r2.z, r2.z
add r2.w, r2.z, r2.z
div r2.z, r2.z, r2.w
mul r1.w, r1.w, cb3[1].z
mul r1.w, r1.w, cb3[1].w
mov r5.xy, r14.xyxx
sample_indexable(texture2darray)(float,float,float,float) r16.xyzw, r5.xyzx, t8.zwxy, s4
sample_indexable(texture2darray)(float,float,float,float) r5.xy, r5.xyzx, t7.xyzw, s4
mad r5.zw, r16.zzzw, l(0.000000, 0.000000, 2.000000, 2.000000), l(0.000000, 0.000000, -1.000000, -1.000000)
mul r14.xy, r1.wwww, r5.zwzz
mad r16.z, r5.x, l(2.000000), l(-1.000000)
mul r2.w, r1.w, r1.w
add r5.x, r5.y, l(-0.500000)
mov r6.xy, r14.zwzz
sample_indexable(texture2darray)(float,float,float,float) r17.xyzw, r6.xyzx, t8.zwxy, s4
sample_indexable(texture2darray)(float,float,float,float) r6.xy, r6.xyzx, t7.xyzw, s4
mad r6.zw, r17.wwwz, l(0.000000, 0.000000, 2.000000, 2.000000), l(0.000000, 0.000000, -1.000000, -1.000000)
mul r6.zw, r1.wwww, r6.zzzw
mad r17.z, r6.x, l(2.000000), l(-1.000000)
mul r17.xyz, r2.wwww, r17.xyzx
add r5.y, r6.y, l(-0.500000)
mad r5.zw, r5.wwwz, r1.wwww, r6.zzzw
mad r16.xyz, r2.wwww, r16.xyzx, r17.xyzx
mul r6.xy, r14.xyxx, r6.wzww
add r17.xy, r6.xyxx, r6.xyxx
dp2 r17.z, r14.xyxx, r6.zwzz
add r6.xyz, r16.xyzx, r17.xyzx
mad r6.xyz, -r5.wzww, r5.wzzw, r6.xyzx
mul r1.w, r3.w, cb3[5].z
mul r1.w, r1.w, cb3[5].w
mov r8.xy, r15.xyxx
sample_indexable(texture2darray)(float,float,float,float) r14.xyzw, r8.xyzx, t8.zwxy, s4
sample_indexable(texture2darray)(float,float,float,float) r8.xy, r8.xyzx, t7.xyzw, s4
mad r8.zw, r14.zzzw, l(0.000000, 0.000000, 2.000000, 2.000000), l(0.000000, 0.000000, -1.000000, -1.000000)
mul r15.xy, r1.wwww, r8.zwzz
mad r14.z, r8.x, l(2.000000), l(-1.000000)
mul r2.w, r1.w, r1.w
add r8.x, r8.y, l(-0.500000)
mov r9.xy, r15.zwzz
sample_indexable(texture2darray)(float,float,float,float) r16.xyzw, r9.xyzx, t8.zwxy, s4
sample_indexable(texture2darray)(float,float,float,float) r9.xy, r9.xyzx, t7.xyzw, s4
mad r9.zw, r16.wwwz, l(0.000000, 0.000000, 2.000000, 2.000000), l(0.000000, 0.000000, -1.000000, -1.000000)
mul r9.zw, r1.wwww, r9.zzzw
mad r16.z, r9.x, l(2.000000), l(-1.000000)
mul r16.xyz, r2.wwww, r16.xyzx
add r8.y, r9.y, l(-0.500000)
mad r8.zw, r8.wwwz, r1.wwww, r9.zzzw
mad r14.xyz, r2.wwww, r14.xyzx, r16.xyzx
mul r9.xy, r15.xyxx, r9.wzww
add r16.xy, r9.xyxx, r9.xyxx
dp2 r16.z, r15.xyxx, r9.zwzz
add r9.xyz, r14.xyzx, r16.xyzx
mad r9.xyz, -r8.wzww, r8.wzzw, r9.xyzx
mul r1.w, r2.z, cb3[9].z
mul r1.w, r1.w, cb3[9].w
mov r11.xy, r13.xyxx
sample_indexable(texture2darray)(float,float,float,float) r14.xyzw, r11.xyzx, t8.zwxy, s4
sample_indexable(texture2darray)(float,float,float,float) r2.zw, r11.xyzx, t7.zwxy, s4
mad r11.xy, r14.zwzz, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
mul r11.zw, r1.wwww, r11.xxxy
mad r14.z, r2.z, l(2.000000), l(-1.000000)
mul r2.z, r1.w, r1.w
add r13.x, r2.w, l(-0.500000)
mov r12.xy, r13.zwzz
sample_indexable(texture2darray)(float,float,float,float) r15.xyzw, r12.xyzx, t8.zwxy, s4
sample_indexable(texture2darray)(float,float,float,float) r12.xy, r12.xyzx, t7.xyzw, s4
mad r12.zw, r15.wwwz, l(0.000000, 0.000000, 2.000000, 2.000000), l(0.000000, 0.000000, -1.000000, -1.000000)
mul r12.zw, r1.wwww, r12.zzzw
mad r15.z, r12.x, l(2.000000), l(-1.000000)
mul r15.xyz, r2.zzzz, r15.xyzx
add r13.y, r12.y, l(-0.500000)
mad r11.xy, r11.yxyy, r1.wwww, r12.zwzz
mad r14.xyz, r2.zzzz, r14.xyzx, r15.xyzx
mul r2.zw, r11.zzzw, r12.wwwz
add r15.xy, r2.zwzz, r2.zwzz
dp2 r15.z, r11.zwzz, r12.zwzz
add r12.xyz, r14.xyzx, r15.xyzx
mad r12.xyz, -r11.yxyy, r11.yxxy, r12.xyzx
max r2.zw, r5.xxxy, cb2[4].xxxx
min r2.zw, r2.zzzw, cb2[4].yyyy
add r2.zw, r2.zzzw, -cb2[4].xxxx
add r1.w, -cb2[4].x, cb2[4].y
div_sat r2.zw, r2.zzzw, r1.wwww
mul r2.z, r2.w, r2.z
and r14.xyz, l(1, 2, 4, 0), cb3[12].xxxx
max r11.zw, r8.xxxy, cb2[4].xxxx
min r11.zw, r11.zzzw, cb2[4].yyyy
add r11.zw, r11.zzzw, -cb2[4].xxxx
div_sat r11.zw, r11.zzzw, r1.wwww
mul r2.w, r11.w, r11.z
movc r2.zw, r14.xxxy, r2.zzzw, l(0,0,0,0)
max r11.zw, r13.xxxy, cb2[4].xxxx
min r11.zw, r11.zzzw, cb2[4].yyyy
add r11.zw, r11.zzzw, -cb2[4].xxxx
div_sat r11.zw, r11.zzzw, r1.wwww
mul r1.w, r11.w, r11.z
movc r1.w, r14.z, r1.w, l(0)
add r3.w, r5.y, r5.x
mul r3.w, r0.z, r3.w
add r5.x, r8.y, r8.x
mul r5.x, r0.w, r5.x
mul r5.x, r5.x, cb3[5].w
mad r3.w, r3.w, cb3[1].w, r5.x
add r5.x, r13.y, r13.x
mul r5.x, r1.z, r5.x
mad r13.z, r5.x, cb3[9].w, r3.w
mul r9.xyz, r0.wwww, r9.xyzx
mad r6.xyz, r0.zzzz, r6.xyzx, r9.xyzx
mad r6.xyz, r1.zzzz, r12.xyzx, r6.xyzx
mov r9.x, cb2[0].z
mov r9.z, l(0)
add r9.xyz, r6.xyzx, r9.xxzx
mov r12.x, cb2[0].w
mov r12.z, l(0)
add r6.xyz, r6.xyzx, r12.xxzx
mul r5.xy, r0.wwww, r8.zwzz
mad r5.xy, r0.zzzz, r5.zwzz, r5.xyxx
mad r5.xz, r1.zzzz, r11.xxyx, r5.xxyx
mov r5.y, l(1.000000)
dp3 r3.w, r5.xyzx, r5.xyzx
rsq r3.w, r3.w
mul r8.xyz, r3.wwww, r5.xyzx
mov r13.xy, v1.xyxx
add r11.xyz, -r13.xyzx, cb1[44].xyzx
dp3 r3.w, r11.xyzx, r11.xyzx
rsq r5.y, r3.w
mul r12.xyz, r5.yyyy, r11.xyzx
mul r2.w, r0.w, r2.w
mad r2.z, r0.z, r2.z, r2.w
mad r1.w, r1.z, r1.w, r2.z
mul r2.z, r0.w, cb3[12].z
mad r2.z, r0.z, cb3[12].y, r2.z
mad r2.z, r1.z, cb3[12].w, r2.z
gather4_indexable(texture2d)(float,float,float,float) r14.xyzw, v3.xyxx, t3.xyzw, s7.x
max r14.xy, r14.ywyy, r14.xzxx
max r14.z, r14.y, r14.x
add r15.xy, cb1[38].yyyy, cb1[38].zyzz
mad r2.w, r14.z, r15.x, -r15.y
add r5.w, -cb1[38].y, cb1[38].z
mul r6.w, r5.w, r14.z
div r2.w, r2.w, r6.w
mul r15.zw, v3.yyyy, cb1[17].zzzw
mad r15.zw, v3.xxxx, cb1[16].zzzw, r15.zzzw
mad r15.zw, r2.wwww, cb1[18].zzzw, r15.zzzw
add r15.zw, r15.zzzw, cb1[19].zzzw
div r2.w, r15.z, r15.w
add r2.w, -r13.z, r2.w
mul r6.w, r2.w, cb2[6].x
mul r6.w, r6.w, l(-0.500000)
dp3 r9.w, -r12.yzxy, r8.xyzx
mad r11.w, -r9.w, r9.w, l(1.000000)
mad r11.w, -r11.w, l(0.565323055), l(1.000000)
sqrt r12.w, r11.w
mad r9.w, r9.w, l(0.751879692), r12.w
ge r11.w, r11.w, l(0.000000)
mul r16.xyz, r8.zxyz, r9.wwww
mad r16.xyz, r12.xyzx, l(-0.751879692, -0.751879692, -0.751879692, 0.000000), -r16.xyzx
and r16.xyz, r11.wwww, r16.xyzx
mad r13.xyw, r16.xyxz, r6.wwww, r13.xyxz
mul r16.xyz, r13.yyyy, cb1[5].xywx
mad r16.xyz, r13.xxxx, cb1[4].xywx, r16.xyzx
mad r13.xyw, r13.wwww, cb1[6].xyxw, r16.xyxz
add r13.xyw, r13.xyxw, cb1[7].xyxw
div r13.xy, r13.xyxx, r13.wwww
mul r16.xy, r13.xyxx, cb1[35].zwzz
sample_l_indexable(texture2d)(float,float,float,float) r6.w, r16.xyxx, t2.xyzw, s7, l(0.000000)
sample_l_indexable(texture2d)(float,float,float,float) r16.z, r16.xyxx, t3.yzxw, s7, l(0.000000)
mad r9.w, r16.z, r15.x, -r15.y
mul r11.w, r5.w, r16.z
div r9.w, r9.w, r11.w
mul r13.xy, r16.yyyy, cb1[17].zwzz
mad r13.xy, r16.xxxx, cb1[16].zwzz, r13.xyxx
mad r13.xy, r9.wwww, cb1[18].zwzz, r13.xyxx

//add r13.xy, r13.xyxx, cb1[19].zwzz

div r9.w, r13.x, r13.y
add r9.w, -r13.z, r9.w
add r11.w, -r2.w, r9.w
min r2.w, r2.w, r9.w
div r2.w, r11.w, r2.w
lt r9.w, l(-0.500000), r9.w
lt r6.w, l(0.000000), r6.w
or r6.w, r6.w, r9.w
lt r2.w, l(0.500000), |r2.w|
or r2.w, r2.w, r6.w
mov r14.xy, v3.xyxx
movc r13.xyz, r2.wwww, r14.xyzx, r16.xyzx
mad r2.w, r13.z, r15.x, -r15.y
mul r5.w, r5.w, r13.z
div r2.w, r2.w, r5.w
mul r13.zw, r13.yyyy, cb1[17].zzzw
mad r13.zw, r13.xxxx, cb1[16].zzzw, r13.zzzw
mad r13.zw, r2.wwww, cb1[18].zzzw, r13.zzzw
add r13.zw, r13.zzzw, cb1[19].zzzw
div r2.w, r13.z, r13.w
mul r5.w, cb1[39].z, cb1[39].x
sample_l_indexable(texture2d)(float,float,float,float) r13.xyz, r13.xyxx, t2.xyzw, s7, l(0.000000)
mul r13.xyz, r5.wwww, r13.xyzx
add r2.w, r2.w, -v1.z
mul r4.x, r2.w, cb3[2].z
mul r7.x, r2.w, cb3[6].z
mul r10.x, r2.w, cb3[10].z
mov r4.y, l(0)
sample_indexable(texture2darray)(float,float,float,float) r14.xyz, r4.xyzx, t5.xyzw, s2
mov r7.y, l(0)
sample_indexable(texture2darray)(float,float,float,float) r15.xyz, r7.xyzx, t5.xyzw, s2
mov r10.y, l(0)
sample_indexable(texture2darray)(float,float,float,float) r16.xyz, r10.xyzx, t5.xyzw, s2
mul r15.xyz, r0.wwww, r15.xyzx
mad r14.xyz, r0.zzzz, r14.xyzx, r15.xyzx
mad r14.xyz, r1.zzzz, r16.xyzx, r14.xyzx
sample_indexable(texture2darray)(float,float,float,float) r4.xyz, r4.xywx, t0.xyzw, s2
sample_indexable(texture2darray)(float,float,float,float) r7.xyz, r7.xywx, t0.xyzw, s2
sample_indexable(texture2darray)(float,float,float,float) r10.xyz, r10.xywx, t0.xyzw, s2
mul r7.xyz, r0.wwww, r7.xyzx
mad r4.xyz, r0.zzzz, r4.xyzx, r7.xyzx
mad r4.xyz, r1.zzzz, r10.xyzx, r4.xyzx
if_nz cb1[37].y
  dp2 r0.z, r8.xzxx, r8.xzxx
  rsq r0.z, r0.z
  mul r0.zw, r0.zzzz, r8.zzzx
  mul r7.xy, r0.zwzz, l(0.200000, 0.200000, 0.000000, 0.000000)
  mov r7.z, l(0)
  add r7.xyz, r7.xyzx, v1.xyzx
  mul r10.xyzw, r7.yyyy, cb1[25].xyzw
  mad r10.xyzw, r7.xxxx, cb1[24].xyzw, r10.xyzw
  mad r7.xyzw, r7.zzzz, cb1[26].xyzw, r10.xyzw
  add r7.xyzw, r7.xyzw, cb1[27].xyzw
  div r7.xyz, r7.xyzx, r7.wwww
  mad r0.zw, r7.xxxy, cb1[36].xxxy, l(0.000000, 0.000000, -0.500000, -0.500000)
  frc r0.zw, r0.zzzw
  add r10.xy, -r0.wzww, l(1.000000, 1.000000, 0.000000, 0.000000)
  mul r15.x, r10.x, r10.y
  mul r15.yz, r0.zzwz, r10.xxyx
  mul r15.w, r0.w, r0.z
  gather4_indexable(texture2d)(float,float,float,float) r10.xyzw, r7.xyxx, t10.xyzw, s6.x
  ge r10.xyzw, r10.wzxy, r7.zzzz
  and r10.xyzw, r10.xyzw, l(0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000)
  dp4 r0.z, r10.xyzw, r15.xyzw
  sample_l_indexable(texture2d)(float,float,float,float) r0.w, r7.xyxx, t16.yzwx, s2, l(0.000000)
  add r0.w, -r0.w, l(1.000000)
  mul r0.z, r0.w, r0.z
else
  mov r0.z, l(1.000000)
endif
mad r7.xyz, r11.xyzx, r5.yyyy, cb1[33].xyzx
div r10.xy, r7.xyxx, r7.zzzz
add r10.xy, -r5.zxzz, r10.xyxx
mul r0.w, r9.z, r9.z
mad r0.w, r9.x, r9.y, -r0.w
mul r9.zw, r10.xxxy, r10.xxxy
mul r9.xy, r9.yxyy, r9.zwzz
add r1.z, r9.y, r9.x
div r4.w, l(0.500000), r0.w
mul r1.z, r1.z, r4.w
max r1.z, r1.z, l(-256.000000)
min r1.z, r1.z, l(256.000000)
mul r1.z, r1.z, l(-1.442695)
exp r1.z, r1.z
rsq r4.w, r0.w
mul r1.z, r1.z, r4.w
ge r0.w, l(0.000000), r0.w
ge r4.w, l(0.000000), r7.z
or r0.w, r0.w, r4.w
mul r1.z, r1.z, l(0.125000)
add r4.w, l(1.000000), -cb2[5].x
dp3_sat r5.w, r7.xyzx, r12.xyzx
add r5.w, -r5.w, l(1.000000)
mul r6.w, r5.w, r5.w
mul r6.w, r6.w, r6.w
mul r5.w, r5.w, r6.w
mad r5.w, r4.w, r5.w, cb2[5].x
mul r1.z, r1.z, r5.w
mul r7.xyz, r1.zzzz, cb1[45].xyzx
movc r7.xyz, r0.wwww, l(0,0,0,0), r7.xyzx
mul r7.xyz, r0.zzzz, r7.xyzx
add r9.xy, v1.xyxx, -cb1[32].xyxx
mul r9.xy, r9.xyxx, cb1[32].zwzz
ftou r9.xy, r9.xyxx
mov r9.zw, l(0,0,0,0)
ld_indexable(texture2d)(uint,uint,uint,uint) r9.xyzw, r9.xyzw, t9.xyzw
ult r10.xy, r9.xzxx, r9.ywyy
mul r0.w, r6.z, r6.z
mad r0.w, r6.x, r6.y, -r0.w
div r1.z, l(0.500000), r0.w
rsq r5.w, r0.w
mul r5.w, r5.w, l(0.500000)
ge r0.w, l(0.000000), r0.w
mov r15.xyz, r7.xyzx
mov r6.z, r10.x
mov r10.z, r9.x
loop
  breakc_z r6.z
  ld_structured_indexable(structured_buffer, stride=16)(mixed,mixed,mixed,mixed) r16.xyzw, r10.z, l(0), t13.xyzw
  iadd r10.zw, r10.zzzz, l(0, 0, 2, 1)
  ld_structured_indexable(structured_buffer, stride=16)(mixed,mixed,mixed,mixed) r17.xyzw, r10.w, l(0), t13.xyzw
  add r16.xyz, r16.xyzx, -v1.xyzx
  dp3 r6.w, r16.xyzx, r16.xyzx
  sqrt r7.w, r6.w
  div_sat r7.w, r7.w, r16.w
  add r7.w, -r7.w, l(1.000000)
  add r10.w, r17.w, l(0.010000)
  log r7.w, r7.w
  mul r7.w, r7.w, r10.w
  exp r7.w, r7.w
  lt r10.w, r17.x, l(0.000000)
  movc r10.w, r10.w, l(0), l(1.000000)
  mul r7.w, r7.w, r10.w
  rsq r6.w, r6.w
  mad r16.xyz, r16.xyzx, r6.wwww, r12.xyzx
  dp3 r6.w, r16.xyzx, r16.xyzx
  rsq r6.w, r6.w
  mul r16.xyz, r6.wwww, r16.xyzx
  div r18.xy, r16.xyxx, r16.zzzz
  add r18.xy, -r5.zxzz, r18.xyxx
  mul r18.xy, r18.xyxx, r18.xyxx
  mul r18.xy, r6.yxyy, r18.xyxx
  add r6.w, r18.y, r18.x
  mul r6.w, r1.z, r6.w
  max r6.w, r6.w, l(-256.000000)
  min r6.w, r6.w, l(256.000000)
  mul r6.w, r6.w, l(-1.442695)
  exp r6.w, r6.w
  ge r10.w, l(0.000000), r16.z
  or r10.w, r0.w, r10.w
  mul r6.w, r5.w, r6.w
  mul r6.w, r6.w, l(0.250000)
  movc r6.w, r10.w, l(0), r6.w
  dp3_sat r10.w, r16.xyzx, r12.xyzx
  add r10.w, -r10.w, l(1.000000)
  mul r11.w, r10.w, r10.w
  mul r11.w, r11.w, r11.w
  mul r10.w, r10.w, r11.w
  mad r10.w, r4.w, r10.w, cb2[5].x
  mul r16.xyz, r6.wwww, r17.xyzx
  mul r16.xyz, r10.wwww, r16.xyzx
  mad r15.xyz, r16.xyzx, r7.wwww, r15.xyzx
  ult r6.z, r10.z, r9.y
endloop
mov r7.xyz, r15.xyzx
mov r6.z, r10.y
mov r16.x, r9.z
loop
  breakc_z r6.z
  ld_structured_indexable(structured_buffer, stride=16)(mixed,mixed,mixed,mixed) r17.xyzw, r16.x, l(0), t13.xyzw
  iadd r16.xyzw, r16.xxxx, l(4, 1, 2, 3)
  ld_structured_indexable(structured_buffer, stride=16)(mixed,mixed,mixed,mixed) r18.xyzw, r16.y, l(0), t13.xyzw
  add r10.xzw, r17.xxyz, -v1.xxyz
  dp3 r6.w, r10.xzwx, r10.xzwx
  sqrt r7.w, r6.w
  div_sat r7.w, r7.w, r17.w
  add r7.w, -r7.w, l(1.000000)
  add r9.x, r18.w, l(0.010000)
  log r7.w, r7.w
  mul r7.w, r7.w, r9.x
  exp r7.w, r7.w
  lt r9.x, r18.x, l(0.000000)
  movc r9.x, r9.x, l(0), l(1.000000)
  mul r7.w, r7.w, r9.x
  rsq r6.w, r6.w
  mul r10.xzw, r6.wwww, r10.xxzw
  ld_structured_indexable(structured_buffer, stride=16)(mixed,mixed,mixed,mixed) r17.xyzw, r16.z, l(0), t13.xyzw
  ld_structured_indexable(structured_buffer, stride=16)(mixed,mixed,mixed,mixed) r6.w, r16.w, l(0), t13.xxxx
  dp3 r9.x, r17.xyzx, r10.xzwx
  mov_sat r9.x, -r9.x
  mad_sat r6.w, r9.x, r17.w, r6.w
  mul r6.w, r6.w, r7.w
  mad r10.xzw, r11.xxyz, r5.yyyy, r10.xxzw
  dp3 r7.w, r10.xzwx, r10.xzwx
  rsq r7.w, r7.w
  mul r10.xzw, r7.wwww, r10.xxzw
  div r9.xy, r10.xzxx, r10.wwww
  add r9.xy, -r5.zxzz, r9.xyxx
  mul r9.xy, r9.xyxx, r9.xyxx
  mul r9.xy, r6.yxyy, r9.xyxx
  add r7.w, r9.y, r9.x
  mul r7.w, r1.z, r7.w
  max r7.w, r7.w, l(-256.000000)
  min r7.w, r7.w, l(256.000000)
  mul r7.w, r7.w, l(-1.442695)
  exp r7.w, r7.w
  ge r9.x, l(0.000000), r10.w
  or r9.x, r0.w, r9.x
  mul r7.w, r5.w, r7.w
  mul r7.w, r7.w, l(0.250000)
  movc r7.w, r9.x, l(0), r7.w
  dp3_sat r9.x, r10.xzwx, r12.xyzx
  add r9.x, -r9.x, l(1.000000)
  mul r9.y, r9.x, r9.x
  mul r9.y, r9.y, r9.y
  mul r9.x, r9.y, r9.x
  mad r9.x, r4.w, r9.x, cb2[5].x
  mul r10.xzw, r7.wwww, r18.xxyz
  mul r10.xzw, r9.xxxx, r10.xxzw
  mad r7.xyz, r10.xzwx, r6.wwww, r7.xyzx
  ult r6.z, r16.x, r9.w
endloop
mul r6.xyz, r8.xyxx, r8.xyzx
mad r9.y, r6.y, l(3.000000), l(-1.000000)
mul r9.xz, r8.yyyy, r8.xxzx
mad r9.w, r8.z, r8.z, -r6.x
mov r8.w, r6.z
dp4 r0.w, cb1[46].xyzw, r8.xyzw
add r0.w, r0.w, cb1[52].x
dp4 r1.z, cb1[47].xyzw, r9.xyzw
add r6.x, r0.w, r1.z
dp4 r0.w, cb1[48].xyzw, r8.xyzw
add r0.w, r0.w, cb1[52].y
dp4 r1.z, cb1[49].xyzw, r9.xyzw
add r6.y, r0.w, r1.z
dp4 r0.w, cb1[50].xyzw, r8.xyzw
add r0.w, r0.w, cb1[52].z
dp4 r1.z, cb1[51].xyzw, r9.xyzw
add r6.z, r0.w, r1.z
max r6.xyz, r6.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
mul_sat r0.w, r2.w, l(-0.200000)
mad r0.z, r0.z, l(0.500000), l(-0.500000)
mad r0.z, r0.w, r0.z, l(1.000000)
dp3 r0.w, r8.zxyz, r12.xyzx
add_sat r0.w, -r0.w, l(1.000000)
log r0.w, r0.w
mul r0.w, r0.w, cb2[5].y
exp r0.w, r0.w
mad r0.w, r4.w, r0.w, cb2[5].x
mul r4.xyz, r4.xyzx, r6.xyzx
mad r4.xyz, r13.xyzx, r14.xyzx, r4.xyzx
mul r4.xyz, r0.zzzz, r4.xyzx
add r0.z, -r0.w, l(1.000000)
mad r4.xyz, r4.xyzx, r0.zzzz, r7.xyzx
log r0.z, r8.y
mul r0.z, r0.z, l(512.000000)
exp r0.z, r0.z
log r0.w, r1.w
mul r0.w, r0.w, cb2[3].z
exp r0.w, r0.w
mul r0.z, r0.w, r0.z
mul r0.z, r0.z, r2.z
mad r4.xyz, r0.zzzz, r6.xyzx, r4.xyzx
mul r4.xyz, r4.xyzx, cb1[38].wwww
max r0.z, r3.x, r3.y
lt r0.z, l(0.000000), r0.z
if_nz r0.z
  mul r0.zw, v1.xxxy, l(0.000000, 0.000000, 1.000000, -1.000000)
  dp2 r3.x, cb2[1].xyxx, r0.zwzz
  dp2 r3.y, cb2[1].zwzz, r0.zwzz
  sample_indexable(texture2d)(float,float,float,float) r6.xyz, r3.xyxx, t17.xyzw, s4
  sample_indexable(texture2d)(float,float,float,float) r7.xyz, r3.xyxx, t15.xyzw, s4
  add r6.xyz, r6.xyzx, -r7.xyzx
  mad r3.xyz, r3.zzzz, r6.xyzx, r7.xyzx
  dp2 r6.x, cb1[62].xyxx, r0.zwzz
  dp2 r6.y, cb1[62].zwzz, r0.zwzz
  sample_indexable(texture2d)(float,float,float,float) r6.xyz, r6.xyxx, t20.xyzw, s4
  mul r0.zw, v1.xxxy, cb1[64].wwww
  sample_indexable(texture2d)(float,float,float,float) r0.z, r0.zwzz, t22.yzxw, s0
  mul r0.z, r0.z, cb1[65].w
  max r0.z, r0.z, l(0.000000)
  min r0.z, r0.z, l(0.950000)
  mad r1.zw, r2.yyyx, r1.yyyx, -r0.zzzz
  add r2.zw, r1.zzzw, l(0.000000, 0.000000, -0.010000, -0.010000)
  mul_sat r2.zw, r2.zzzw, l(0.000000, 0.000000, 50.000000, 50.000000)
  mad r3.xyz, r3.xyzx, cb1[64].xyzx, -r4.xyzx
  mad r3.xyz, r2.zzzz, r3.xyzx, r4.xyzx
  add r0.w, -r0.z, l(1.000000)
  div r0.w, l(1.000000, 1.000000, 1.000000, 1.000000), r0.w
  mul_sat r0.w, r0.w, r1.z
  mad r1.z, r0.w, l(-2.000000), l(3.000000)
  mul r0.w, r0.w, r0.w
  mul r0.w, r0.w, r1.z
  mad r1.x, r2.x, r1.x, -r2.w
  mad r0.w, r0.w, r1.x, r2.w
  mad r1.xzw, r6.xxyz, cb1[64].xxyz, -r3.xxyz
  mad r1.xzw, r0.wwww, r1.xxzw, r3.xxyz
  add r0.z, r0.z, l(-0.020000)
  add r0.w, -r0.z, l(1.000000)
  mad r0.z, r2.y, r1.y, -r0.z
  div r0.w, l(1.000000, 1.000000, 1.000000, 1.000000), r0.w
  mul_sat r0.z, r0.w, r0.z
  mad r0.w, r0.z, l(-2.000000), l(3.000000)
  mul r0.z, r0.z, r0.z
  mul r1.y, r0.z, r0.w
  log r1.y, r1.y
  mul r1.y, r1.y, l(0.100000)
  exp r1.y, r1.y
  mad r0.z, -r0.w, r0.z, l(1.000000)
  mul r0.z, r0.z, r1.y
  mad r2.xyz, cb1[65].xyzx, r1.xzwx, -r1.xzwx
  mad r4.xyz, r0.zzzz, r2.xyzx, r1.xzwx
endif
mul r0.zw, r5.xxxx, cb1[21].xxxy
mad r0.zw, r5.zzzz, cb1[20].xxxy, r0.zzzw
mad r0.xy, r0.zwzz, cb2[5].wwww, r0.xyxx
sample_indexable(texture2d)(float,float,float,float) r0.xyzw, r0.xyxx, t1.xyzw, s5
if_nz cb1[37].x
  sqrt r1.x, r3.w
  mul r1.x, r1.x, l(0.001000)
  min r1.x, r1.x, l(1.000000)
  add r1.x, -r1.x, l(1.000000)
  mul r1.y, r1.x, cb2[5].z
  mul r1.x, r1.y, r1.x
  mul r1.yz, r5.xxxx, cb1[9].xxyx
  mad r1.yz, r5.zzzz, cb1[8].xxyx, r1.yyzy
  mul r1.xy, r1.xxxx, r1.yzyy
  mad r1.xy, v0.xyxx, cb1[34].zwzz, r1.xyxx
  sample_indexable(texture2d)(float,float,float,float) r1.xyzw, r1.xyxx, t6.xyzw, s5
  add r0.xyzw, r0.xyzw, r1.xyzw
  mov_sat r0.w, r0.w
endif
add r0.w, -r0.w, l(1.000000)
mad r0.xyz, r4.xyzx, r0.wwww, r0.xyzx
if_nz cb2[8].z
  mul r1.xy, v0.xyxx, cb2[9].zwzz
  sample_indexable(texture2d)(float,float,float,float) r0.w, r1.xyxx, t14.yzwx, s6
  add r0.w, r0.w, r0.w
  mad r1.xyz, r0.xyzx, l(1024.000000, 1024.000000, 1024.000000, 0.000000), r0.wwww
  round_ni r1.xyz, r1.xyzx
  mul r0.xyz, r1.xyzx, l(0.000976562500, 0.000976562500, 0.000976562500, 0.000000)
endif
mul o0.xyz, r0.xyzx, cb1[39].yyyy
mov o0.w, l(0)
ret
// Approximately 605 instruction slots used

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
