//
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
//
//   using 3Dmigoto v1.3.16 on Fri Mar 20 22:12:34 2020
//
//
// Buffer Definitions:
//
// cbuffer SceneInfo
// {
//
//   row_major float4x4 viewProjMat;    // Index:    0 1 2 3          Components:    16 [unused]
//   row_major float3x4 transposeViewMat;// Index:    4 5 6            Components:    12 [unused]
//   row_major float3x4 transposeViewInvMat;// Index:    7 8 9            Components:    12 [unused]
//   float4 projElement[2];             // Index:   10 11             Components:     8 [unused]
//   float4 projInvElements[2];         // Index:   12 13             Components:     8 [unused]
//   row_major float4x4 viewProjInvMat; // Index:   14 15 16 17       Components:    16 [unused]
//   row_major float4x4 prevViewProjMat;// Index:   18 19 20 21       Components:    16 [unused]
//   float3 ZToLinear;                  // Index:   22.xyz            Components:     3 [unused]
//   float subdivisionLevel;            // Index:   22.w              Components:     1 [unused]
//   float2 screenSize;                 // Index:   23.xy             Components:     2
//   float2 screenInverseSize;          // Index:   23.zw             Components:     2
//   float2 cullingHelper;              // Index:   24.xy             Components:     2 [unused]
//   float cameraNearPlane;             // Index:   24.z              Components:     1 [unused]
//   float cameraFarPlane;              // Index:   24.w              Components:     1 [unused]
//   float4 viewFrustum[6];             // Index:   25-30             Components:    24 [unused]
//   float4 clipplane;                  // Index:   31.xyzw           Components:     4 [unused]
//
// }
//
// cbuffer CameraKerare
// {
//
//   float kerare_scale;                // Index:    0.x              Components:     1
//   float kerare_offset;               // Index:    0.y              Components:     1
//
// }
//
// cbuffer TonemapParam
// {
//
//   float contrast;                    // Index:    0.x              Components:     1
//   float linearBegin;                 // Index:    0.y              Components:     1
//   float linearLength;                // Index:    0.z              Components:     1 [unused]
//   float toe;                         // Index:    0.w              Components:     1
//   float maxNit;                      // Index:    1.x              Components:     1
//   float linearStart;                 // Index:    1.y              Components:     1
//   float displayMaxNitSubContrastFactor;// Index:    1.z              Components:     1
//   float contrastFactor;              // Index:    1.w              Components:     1
//   float mulLinearStartContrastFactor;// Index:    2.x              Components:     1
//   float invLinearBegin;              // Index:    2.y              Components:     1
//   float madLinearStartContrastFactor;// Index:    2.z              Components:     1
//
// }
//
// cbuffer LensDistortionParam
// {
//
//   float fDistortionCoef;             // Index:    0.x              Components:     1
//   float fRefraction;                 // Index:    0.y              Components:     1
//   uint aberrationEnable;             // Index:    0.z              Components:     1
//   uint reserved;                     // Index:    0.w              Components:     1 [unused]
//
// }
//
// cbuffer RadialBlurRenderParam
// {
//
//   float4 cbRadialColor;              // Index:    0.xyzw           Components:     4
//   float2 cbRadialScreenPos;          // Index:    1.xy             Components:     2
//   float2 cbRadialMaskSmoothstep;     // Index:    1.zw             Components:     2
//   float2 cbRadialMaskRate;           // Index:    2.xy             Components:     2
//   float cbRadialBlurPower;           // Index:    2.z              Components:     1
//   float cbRadialSharpRange;          // Index:    2.w              Components:     1
//   uint cbRadialBlurFlags;            // Index:    3.x              Components:     1
//   float cbRadialReserve0;            // Index:    3.y              Components:     1 [unused]
//   float cbRadialReserve1;            // Index:    3.z              Components:     1 [unused]
//   float cbRadialReserve2;            // Index:    3.w              Components:     1 [unused]
//
// }
//
// cbuffer FilmGrainParam
// {
//
//   float2 fNoisePower;                // Index:    0.xy             Components:     2
//   float2 fNoiseUVOffset;             // Index:    0.zw             Components:     2
//   float fNoiseDensity;               // Index:    1.x              Components:     1
//   float fNoiseContrast;              // Index:    1.y              Components:     1
//   float fBlendRate;                  // Index:    1.z              Components:     1
//   float fReverseNoiseSize;           // Index:    1.w              Components:     1
//
// }
//
// cbuffer ColorCorrectTexture
// {
//
//   float fTextureSize;                // Index:    0.x              Components:     1 [unused]
//   float fTextureBlendRate;           // Index:    0.y              Components:     1
//   float fTextureBlendRate2;          // Index:    0.z              Components:     1
//   float fTextureInverseSize;         // Index:    0.w              Components:     1
//   row_major float4x4 fColorMatrix;   // Index:    1 2 3 4          Components:    16
//
// }
//
// cbuffer ColorDeficientTable
// {
//
//   float4 cvdR;                       // Index:    0.xyzw           Components:     4
//   float4 cvdG;                       // Index:    1.xyzw           Components:     4
//   float4 cvdB;                       // Index:    2.xyzw           Components:     4
//
// }
//
// cbuffer ImagePlaneParam
// {
//
//   float4 ColorParam;                 // Index:    0.xyzw           Components:     4
//   float Levels_Rate;                 // Index:    1.x              Components:     1
//   float Levels_Range;                // Index:    1.y              Components:     1
//   uint Blend_Type;                   // Index:    1.z              Components:     1 [unused]
//
// }
//
// cbuffer CBControl
// {
//
//   uint cPassEnabled;                 // Index:    0.x              Components:     1
//
// }
//
// Resource bind info for ComputeResultSRV
// {
//
//   struct RadialBlurComputeResult
//   {
//
//       float computeAlpha;            // Index:    0
//
//   } $Element;                        // Index:    0.x              Components:     1
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// BilinearClamp                     sampler      NA          NA    0        1
// TrilinearClamp                    sampler      NA          NA    1        1
// SourceImage                       texture  float4          2d    0        1
// ComputeResultSRV                  texture  struct         r/o    1        1
// tTextureMap0                      texture  float4          3d    2        1
// tTextureMap1                      texture  float4          3d    3        1
// tTextureMap2                      texture  float4          3d    4        1
// ImagePlameBase                    texture  float4          2d    5        1
// ImagePlameAlpha                   texture   float          2d    6        1
// SceneInfo                         cbuffer      NA          NA    0        1
// CameraKerare                      cbuffer      NA          NA    1        1
// TonemapParam                      cbuffer      NA          NA    2        1
// LensDistortionParam               cbuffer      NA          NA    3        1
// RadialBlurRenderParam             cbuffer      NA          NA    4        1
// FilmGrainParam                    cbuffer      NA          NA    5        1
// ColorCorrectTexture               cbuffer      NA          NA    6        1
// ColorDeficientTable               cbuffer      NA          NA    7        1
// ImagePlaneParam                   cbuffer      NA          NA    8        1
// CBControl                         cbuffer      NA          NA    9        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position              0   xyzw        0      POS   float   xy
// Kerare                   0   xyzw        1     NONE   float   xyzw
// Exposure                 0   x           2     NONE   float   x
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target                0   xyzw        0   TARGET   float   xyzw
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[24], immediateIndexed
dcl_constantbuffer cb1[1], immediateIndexed
dcl_constantbuffer cb2[3], immediateIndexed
dcl_constantbuffer cb3[1], immediateIndexed
dcl_constantbuffer cb4[4], immediateIndexed
dcl_constantbuffer cb5[2], immediateIndexed
dcl_constantbuffer cb6[5], immediateIndexed
dcl_constantbuffer cb7[3], immediateIndexed
dcl_constantbuffer cb8[2], immediateIndexed
dcl_constantbuffer cb9[1], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s1, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_structured t1, 4
dcl_resource_texture3d (float,float,float,float) t2
dcl_resource_texture3d (float,float,float,float) t3
dcl_resource_texture3d (float,float,float,float) t4
dcl_resource_texture2d (float,float,float,float) t5
dcl_resource_texture2d (float,float,float,float) t6
dcl_input_ps_siv linear noperspective v0.xy, position
dcl_input_ps linear v1.xyzw
dcl_input_ps linear v2.x
dcl_output o0.xyzw
dcl_temps 30

dcl_resource_texture1d (float,float,float,float) t120
ld_indexable(texture1d)(float,float,float,float) r20.xyzw, l(0, 0, 0, 0), t120.xyzw

and r0.xyzw, cb9[0].xxxx, l(1, 32, 2, 4)
if_nz r0.x
  mad r1.xy, v0.xyxx, cb0[23].zwzz, l(-0.500000, -0.500000, 0.000000, 0.000000)
  mad r1.z, cb3[0].x, l(0.500000), l(1.000000)
  max r1.z, r1.z, l(1.000000)
  rcp r1.z, r1.z
  dp2 r1.w, r1.xyxx, r1.xyxx
  mad r2.x, cb3[0].x, r1.w, l(1.000000)
  mul r2.xy, r1.xyxx, r2.xxxx
  mad r2.xy, r2.xyxx, r1.zzzz, l(0.500000, 0.500000, 0.000000, 0.000000)
  if_z cb3[0].z
    sample_indexable(texture2d)(float,float,float,float) r3.xyz, r2.xyxx, t0.xyzw, s0
    mul r3.xyz, r3.xyzx, v2.xxxx
    max r2.z, r3.y, r3.x
    max r2.z, r3.z, r2.z
    and r2.z, r2.z, l(0x7f800000)
    ieq r2.z, r2.z, l(0x7f800000)
    if_nz r2.z
      mov r4.xyz, l(1.000000,1.000000,1.000000,0)
    endif
    if_z r2.z
      mul r5.xyz, r3.xyzx, cb2[2].yyyy
      ge r6.xyz, r3.xyzx, cb2[0].yyyy
      mul r7.xyz, r5.xyzx, r5.xyzx
      mad r8.xyz, -r5.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(3.000000, 3.000000, 3.000000, 0.000000)
      mul r7.xyz, r7.xyzx, r8.xyzx
      movc r6.xyz, r6.xyzx, l(1.000000,1.000000,1.000000,0), r7.xyzx
      add r6.xyz, -r6.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
      ge r7.xyz, cb2[1].yyyy, r3.xyzx
      movc r7.xyz, r7.xyzx, l(0,0,0,0), l(1.000000,1.000000,1.000000,0)
      add r8.xyz, -r6.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
      add r8.xyz, -r7.xyzx, r8.xyzx
      log r5.xyz, r5.xyzx
      mul r5.xyz, r5.xyzx, cb2[0].wwww
      exp r5.xyz, r5.xyzx
      mul r5.xyz, r5.xyzx, cb2[0].yyyy
      mad r9.xyz, cb2[0].xxxx, r3.xyzx, cb2[2].zzzz
      mul r8.xyz, r8.xyzx, r9.xyzx
      mad r5.xyz, r5.xyzx, r6.xyzx, r8.xyzx
      mad r3.xyz, cb2[1].wwww, r3.xyzx, cb2[2].xxxx
      exp r3.xyz, r3.xyzx
      mad r3.xyz, -cb2[1].zzzz, r3.xyzx, cb2[1].xxxx
      mad r4.xyz, r3.xyzx, r7.xyzx, r5.xyzx
    endif
    mov_sat r4.xyz, r4.xyzx
  else
    add r1.w, r1.w, cb3[0].y
    mad r2.z, cb3[0].x, r1.w, l(1.000000)
    mul r2.zw, r1.xxxy, r2.zzzz
    mad r2.zw, r2.zzzw, r1.zzzz, l(0.000000, 0.000000, 0.500000, 0.500000)
    add r1.w, r1.w, cb3[0].y
    mad r1.w, cb3[0].x, r1.w, l(1.000000)
    mul r1.xy, r1.wwww, r1.xyxx
    mad r1.xy, r1.xyxx, r1.zzzz, l(0.500000, 0.500000, 0.000000, 0.000000)
    sample_indexable(texture2d)(float,float,float,float) r3.xyz, r2.xyxx, t0.xyzw, s0
    mul r3.xyz, r3.xyzx, v2.xxxx
    max r1.w, r3.y, r3.x
    max r1.w, r3.z, r1.w
    and r1.w, r1.w, l(0x7f800000)
    ieq r1.w, r1.w, l(0x7f800000)
    if_nz r1.w
      mov r4.x, l(1.000000)
    endif
    if_z r1.w
      mul r1.w, r3.x, cb2[2].y
      ge r2.x, r3.x, cb2[0].y
      mul r2.y, r1.w, r1.w
      mad r3.y, -r1.w, l(2.000000), l(3.000000)
      mad r2.y, -r2.y, r3.y, l(1.000000)
      movc r2.x, r2.x, l(0), r2.y
      ge r2.y, cb2[1].y, r3.x
      add r3.y, -r2.x, l(1.000000)
      movc r3.zw, r2.yyyy, l(0,0,0,-0.000000), l(0,0,1.000000,-1.000000)
      add r2.y, r3.w, r3.y
      log r1.w, r1.w
      mul r1.w, r1.w, cb2[0].w
      exp r1.w, r1.w
      mul r1.w, r1.w, cb2[0].y
      mad r3.y, cb2[0].x, r3.x, cb2[2].z
      mul r2.y, r2.y, r3.y
      mad r1.w, r1.w, r2.x, r2.y
      mad r2.x, cb2[1].w, r3.x, cb2[2].x
      exp r2.x, r2.x
      mad r2.x, -cb2[1].z, r2.x, cb2[1].x
      mad r4.x, r2.x, r3.z, r1.w
    endif
    sample_indexable(texture2d)(float,float,float,float) r2.xyz, r2.zwzz, t0.xyzw, s0
    mul r2.xyz, r2.xyzx, v2.xxxx
    max r1.w, r2.y, r2.x
    max r1.w, r2.z, r1.w
    and r1.w, r1.w, l(0x7f800000)
    ieq r1.w, r1.w, l(0x7f800000)
    if_nz r1.w
      mov r4.y, l(1.000000)
    endif
    if_z r1.w
      mul r1.w, r2.y, cb2[2].y
      ge r2.x, r2.y, cb2[0].y
      mul r2.z, r1.w, r1.w
      mad r2.w, -r1.w, l(2.000000), l(3.000000)
      mad r2.z, -r2.z, r2.w, l(1.000000)
      movc r2.x, r2.x, l(0), r2.z
      ge r2.z, cb2[1].y, r2.y
      add r2.w, -r2.x, l(1.000000)
      movc r3.xy, r2.zzzz, l(0,-0.000000,0,0), l(1.000000,-1.000000,0,0)
      add r2.z, r2.w, r3.y
      log r1.w, r1.w
      mul r1.w, r1.w, cb2[0].w
      exp r1.w, r1.w
      mul r1.w, r1.w, cb2[0].y
      mad r2.w, cb2[0].x, r2.y, cb2[2].z
      mul r2.z, r2.z, r2.w
      mad r1.w, r1.w, r2.x, r2.z
      mad r2.x, cb2[1].w, r2.y, cb2[2].x
      exp r2.x, r2.x
      mad r2.x, -cb2[1].z, r2.x, cb2[1].x
      mad r4.y, r2.x, r3.x, r1.w
    endif
    sample_indexable(texture2d)(float,float,float,float) r1.xyw, r1.xyxx, t0.xywz, s0
    mul r1.xyw, r1.xyxw, v2.xxxx
    max r1.x, r1.y, r1.x
    max r1.x, r1.w, r1.x
    and r1.x, r1.x, l(0x7f800000)
    ieq r1.x, r1.x, l(0x7f800000)
    if_nz r1.x
      mov r4.z, l(1.000000)
    endif
    if_z r1.x
      mul r1.x, r1.w, cb2[2].y
      ge r1.y, r1.w, cb2[0].y
      mul r2.x, r1.x, r1.x
      mad r2.y, -r1.x, l(2.000000), l(3.000000)
      mad r2.x, -r2.x, r2.y, l(1.000000)
      movc r1.y, r1.y, l(0), r2.x
      ge r2.x, cb2[1].y, r1.w
      add r2.y, -r1.y, l(1.000000)
      movc r2.xz, r2.xxxx, l(0,0,-0.000000,0), l(1.000000,0,-1.000000,0)
      add r2.y, r2.z, r2.y
      log r1.x, r1.x
      mul r1.x, r1.x, cb2[0].w
      exp r1.x, r1.x
      mul r1.x, r1.x, cb2[0].y
      mad r2.z, cb2[0].x, r1.w, cb2[2].z
      mul r2.y, r2.y, r2.z
      mad r1.x, r1.x, r1.y, r2.y
      mad r1.y, cb2[1].w, r1.w, cb2[2].x
      exp r1.y, r1.y
      mad r1.y, -cb2[1].z, r1.y, cb2[1].x
      mad r4.z, r1.y, r2.x, r1.x
    endif
    mov_sat r4.xyz, r4.xyzx
  endif
  mov r1.x, cb3[0].x
else
  ftou r2.xy, v0.xyxx
  mov r2.zw, l(0,0,0,0)
  ld_indexable(texture2d)(float,float,float,float) r2.xyz, r2.xyzw, t0.xyzw
  mul r2.xyz, r2.xyzx, v2.xxxx
  max r1.y, r2.y, r2.x
  max r1.y, r2.z, r1.y
  and r1.y, r1.y, l(0x7f800000)
  ieq r1.y, r1.y, l(0x7f800000)
  if_nz r1.y
    mov r4.xyz, l(1.000000,1.000000,1.000000,0)
  endif
  if_z r1.y
    mul r3.xyz, r2.xyzx, cb2[2].yyyy
    ge r5.xyz, r2.xyzx, cb2[0].yyyy
    mul r6.xyz, r3.xyzx, r3.xyzx
    mad r7.xyz, -r3.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(3.000000, 3.000000, 3.000000, 0.000000)
    mul r6.xyz, r6.xyzx, r7.xyzx
    movc r5.xyz, r5.xyzx, l(1.000000,1.000000,1.000000,0), r6.xyzx
    add r5.xyz, -r5.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
    ge r6.xyz, cb2[1].yyyy, r2.xyzx
    movc r6.xyz, r6.xyzx, l(0,0,0,0), l(1.000000,1.000000,1.000000,0)
    add r7.xyz, -r5.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
    add r7.xyz, -r6.xyzx, r7.xyzx
    log r3.xyz, r3.xyzx
    mul r3.xyz, r3.xyzx, cb2[0].wwww
    exp r3.xyz, r3.xyzx
    mul r3.xyz, r3.xyzx, cb2[0].yyyy
    mad r8.xyz, cb2[0].xxxx, r2.xyzx, cb2[2].zzzz
    mul r7.xyz, r7.xyzx, r8.xyzx
    mad r3.xyz, r3.xyzx, r5.xyzx, r7.xyzx
    mad r2.xyz, cb2[1].wwww, r2.xyzx, cb2[2].xxxx
    exp r2.xyz, r2.xyzx
    mad r2.xyz, -cb2[1].zzzz, r2.xyzx, cb2[1].xxxx
    mad r4.xyz, r2.xyzx, r6.xyzx, r3.xyzx
  endif
  mov_sat r4.xyz, r4.xyzx
  mov r1.xz, l(0,0,1.000000,0)
endif
if_nz r0.y
  and r0.y, cb4[3].x, l(2)
  movc r1.yw, r0.yyyy, l(0,1.000000,0,0), l(0,0,0,1.000000)
  ld_structured_indexable(structured_buffer, stride=4)(mixed,mixed,mixed,mixed) r0.y, l(0), l(0), t1.xxxx
  mad r0.y, r0.y, r1.y, r1.w
  mul r0.y, r0.y, cb4[0].w
  eq r1.y, r0.y, l(0.000000)
  if_nz r1.y
    mov r2.xyz, r4.xyzx
  endif
  if_z r1.y
    movc r0.x, r0.x, l(1), l(0)
    mul r1.yw, v0.xxxy, cb0[23].zzzw
    mad r3.xy, v0.xyxx, cb0[23].zwzz, l(-0.500000, -0.500000, 0.000000, 0.000000)
    add r3.xy, r3.xyxx, -cb4[1].xyxx
    lt r3.zw, r3.xxxy, l(0.000000, 0.000000, 0.000000, 0.000000)
    mad r5.xy, -v0.xyxx, cb0[23].zwzz, l(1.000000, 1.000000, 0.000000, 0.000000)
    movc r1.yw, r3.zzzw, r5.xxxy, r1.yyyw
    and r2.w, cb4[3].x, l(1)
    dp2 r3.z, r3.xyxx, r3.xyxx
    rsq r3.w, r3.z
    mul r5.xy, r3.wwww, r3.xyxx
    mul r5.xy, r5.xyxx, cb4[2].wwww
    ftou r5.xy, |r5.xyxx|
    iadd r3.w, r5.y, r5.x
    xor r4.w, r3.w, l(61)
    ushr r3.w, r3.w, l(16)
    xor r3.w, r3.w, r4.w
    imul null, r3.w, r3.w, l(9)
    ushr r4.w, r3.w, l(4)
    xor r3.w, r3.w, r4.w
    imul null, r3.w, r3.w, l(0x27d4eb2d)
    ushr r4.w, r3.w, l(15)
    xor r3.w, r3.w, r4.w
    utof r3.w, r3.w
    mul r3.w, r3.w, l(2.328306437E-010)
    movc r2.w, r2.w, r3.w, l(1.000000)
    if_nz r0.x
      sqrt r0.x, r3.z
      max r0.x, r0.x, l(1.000000)
      div r0.x, l(1.000000, 1.000000, 1.000000, 1.000000), r0.x
      mul r5.xy, r1.ywyy, -cb4[2].zzzz
      mul r5.xy, r0.xxxx, r5.xyxx
      mul r5.xy, r2.wwww, r5.xyxx
      mad r6.xyzw, r5.xyxy, l(0.00111111114, 0.00111111114, 0.010000, 0.010000), l(1.000000, 1.000000, 1.000000, 1.000000)
      mad r6.xyzw, r3.xyxy, r6.xyzw, cb4[1].xyxy
      dp2 r0.x, r6.xyxx, r6.xyxx
      mad r0.x, r1.x, r0.x, l(1.000000)
      mul r5.zw, r0.xxxx, r6.xxxy
      mad r5.zw, r5.zzzw, r1.zzzz, l(0.000000, 0.000000, 0.500000, 0.500000)
      sample_l_indexable(texture2d)(float,float,float,float) r7.xyz, r5.zwzz, t0.xyzw, s0, l(0.000000)
      mad r8.xyzw, r5.xyxy, l(0.00222222228, 0.00222222228, 0.00333333341, 0.00333333341), l(1.000000, 1.000000, 1.000000, 1.000000)
      mad r8.xyzw, r3.xyxy, r8.xyzw, cb4[1].xyxy
      dp2 r0.x, r8.xyxx, r8.xyxx
      mad r0.x, r1.x, r0.x, l(1.000000)
      mul r5.zw, r0.xxxx, r8.xxxy
      mad r5.zw, r5.zzzw, r1.zzzz, l(0.000000, 0.000000, 0.500000, 0.500000)
      sample_l_indexable(texture2d)(float,float,float,float) r9.xyz, r5.zwzz, t0.xyzw, s0, l(0.000000)
      mul r9.xyz, r9.xyzx, l(0.100000, 0.100000, 0.100000, 0.000000)
      mad r7.xyz, r7.xyzx, l(0.100000, 0.100000, 0.100000, 0.000000), r9.xyzx
      dp2 r0.x, r8.zwzz, r8.zwzz
      mad r0.x, r1.x, r0.x, l(1.000000)
      mul r5.zw, r0.xxxx, r8.zzzw
      mad r5.zw, r5.zzzw, r1.zzzz, l(0.000000, 0.000000, 0.500000, 0.500000)
      sample_l_indexable(texture2d)(float,float,float,float) r8.xyz, r5.zwzz, t0.xyzw, s0, l(0.000000)
      mad r7.xyz, r8.xyzx, l(0.100000, 0.100000, 0.100000, 0.000000), r7.xyzx
      mad r8.xyzw, r5.xyxy, l(0.00444444455, 0.00444444455, 0.00555555569, 0.00555555569), l(1.000000, 1.000000, 1.000000, 1.000000)
      mad r8.xyzw, r3.xyxy, r8.xyzw, cb4[1].xyxy
      dp2 r0.x, r8.xyxx, r8.xyxx
      mad r0.x, r1.x, r0.x, l(1.000000)
      mul r5.zw, r0.xxxx, r8.xxxy
      mad r5.zw, r5.zzzw, r1.zzzz, l(0.000000, 0.000000, 0.500000, 0.500000)
      sample_l_indexable(texture2d)(float,float,float,float) r9.xyz, r5.zwzz, t0.xyzw, s0, l(0.000000)
      mad r7.xyz, r9.xyzx, l(0.100000, 0.100000, 0.100000, 0.000000), r7.xyzx
      dp2 r0.x, r8.zwzz, r8.zwzz
      mad r0.x, r1.x, r0.x, l(1.000000)
      mul r5.zw, r0.xxxx, r8.zzzw
      mad r5.zw, r5.zzzw, r1.zzzz, l(0.000000, 0.000000, 0.500000, 0.500000)
      sample_l_indexable(texture2d)(float,float,float,float) r8.xyz, r5.zwzz, t0.xyzw, s0, l(0.000000)
      mad r7.xyz, r8.xyzx, l(0.100000, 0.100000, 0.100000, 0.000000), r7.xyzx
      mad r8.xyzw, r5.xyxy, l(0.00666666683, 0.00666666683, 0.00777777797, 0.00777777797), l(1.000000, 1.000000, 1.000000, 1.000000)
      mad r8.xyzw, r3.xyxy, r8.xyzw, cb4[1].xyxy
      dp2 r0.x, r8.xyxx, r8.xyxx
      mad r0.x, r1.x, r0.x, l(1.000000)
      mul r5.zw, r0.xxxx, r8.xxxy
      mad r5.zw, r5.zzzw, r1.zzzz, l(0.000000, 0.000000, 0.500000, 0.500000)
      sample_l_indexable(texture2d)(float,float,float,float) r9.xyz, r5.zwzz, t0.xyzw, s0, l(0.000000)
      mad r7.xyz, r9.xyzx, l(0.100000, 0.100000, 0.100000, 0.000000), r7.xyzx
      dp2 r0.x, r8.zwzz, r8.zwzz
      mad r0.x, r1.x, r0.x, l(1.000000)
      mul r5.zw, r0.xxxx, r8.zzzw
      mad r5.zw, r5.zzzw, r1.zzzz, l(0.000000, 0.000000, 0.500000, 0.500000)
      sample_l_indexable(texture2d)(float,float,float,float) r8.xyz, r5.zwzz, t0.xyzw, s0, l(0.000000)
      mad r7.xyz, r8.xyzx, l(0.100000, 0.100000, 0.100000, 0.000000), r7.xyzx
      mad r5.xy, r5.xyxx, l(0.00888888910, 0.00888888910, 0.000000, 0.000000), l(1.000000, 1.000000, 0.000000, 0.000000)
      mad r5.xy, r3.xyxx, r5.xyxx, cb4[1].xyxx
      dp2 r0.x, r5.xyxx, r5.xyxx
      mad r0.x, r1.x, r0.x, l(1.000000)
      mul r5.xy, r0.xxxx, r5.xyxx
      mad r5.xy, r5.xyxx, r1.zzzz, l(0.500000, 0.500000, 0.000000, 0.000000)
      sample_l_indexable(texture2d)(float,float,float,float) r5.xyz, r5.xyxx, t0.xyzw, s0, l(0.000000)
      mad r5.xyz, r5.xyzx, l(0.100000, 0.100000, 0.100000, 0.000000), r7.xyzx
      dp2 r0.x, r6.zwzz, r6.zwzz
      mad r0.x, r1.x, r0.x, l(1.000000)
      mul r6.xy, r0.xxxx, r6.zwzz
      mad r1.xz, r6.xxyx, r1.zzzz, l(0.500000, 0.000000, 0.500000, 0.000000)
      sample_l_indexable(texture2d)(float,float,float,float) r6.xyz, r1.xzxx, t0.xyzw, s0, l(0.000000)
      mad r5.xyz, r6.xyzx, l(0.100000, 0.100000, 0.100000, 0.000000), r5.xyzx
      mul r5.xyz, r5.xyzx, cb4[0].xyzx
      mul r5.xyz, r5.xyzx, v2.xxxx
      max r0.x, r5.y, r5.x
      max r0.x, r5.z, r0.x
      and r0.x, r0.x, l(0x7f800000)
      ieq r0.x, r0.x, l(0x7f800000)
      if_nz r0.x
        mov r6.xyz, l(1.000000,1.000000,1.000000,0)
      endif
      if_z r0.x
        mul r7.xyz, r5.xyzx, cb2[2].yyyy
        ge r8.xyz, r5.xyzx, cb2[0].yyyy
        mul r9.xyz, r7.xyzx, r7.xyzx
        mad r10.xyz, -r7.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(3.000000, 3.000000, 3.000000, 0.000000)
        mul r9.xyz, r9.xyzx, r10.xyzx
        movc r8.xyz, r8.xyzx, l(1.000000,1.000000,1.000000,0), r9.xyzx
        add r8.xyz, -r8.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
        ge r9.xyz, cb2[1].yyyy, r5.xyzx
        movc r9.xyz, r9.xyzx, l(0,0,0,0), l(1.000000,1.000000,1.000000,0)
        add r10.xyz, -r8.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
        add r10.xyz, -r9.xyzx, r10.xyzx
        log r7.xyz, r7.xyzx
        mul r7.xyz, r7.xyzx, cb2[0].wwww
        exp r7.xyz, r7.xyzx
        mul r7.xyz, r7.xyzx, cb2[0].yyyy
        mad r11.xyz, cb2[0].xxxx, r5.xyzx, cb2[2].zzzz
        mul r10.xyz, r10.xyzx, r11.xyzx
        mad r7.xyz, r7.xyzx, r8.xyzx, r10.xyzx
        mad r5.xyz, cb2[1].wwww, r5.xyzx, cb2[2].xxxx
        exp r5.xyz, r5.xyzx
        mad r5.xyz, -cb2[1].zzzz, r5.xyzx, cb2[1].xxxx
        mad r6.xyz, r5.xyzx, r9.xyzx, r7.xyzx
      endif
      mov_sat r6.xyz, r6.xyzx
      mul r5.xyz, r4.xyzx, cb4[0].xyzx
      mad r5.xyz, r5.xyzx, l(0.100000, 0.100000, 0.100000, 0.000000), r6.xyzx
    else
      sqrt r0.x, r3.z
      max r0.x, r0.x, l(1.000000)
      div r0.x, l(1.000000, 1.000000, 1.000000, 1.000000), r0.x
      mul r1.xy, r1.ywyy, -cb4[2].zzzz
      mul r1.xy, r0.xxxx, r1.xyxx
      mul r1.xy, r2.wwww, r1.xyxx
      mad r6.xyzw, r1.xyxy, l(0.00111111114, 0.00111111114, 0.010000, 0.010000), l(1.000000, 1.000000, 1.000000, 1.000000)
      mad r6.xyzw, r3.xyxy, r6.xyzw, cb4[1].xyxy
      add r6.xyzw, r6.xyzw, l(0.500000, 0.500000, 0.500000, 0.500000)
      sample_l_indexable(texture2d)(float,float,float,float) r7.xyz, r6.xyxx, t0.xyzw, s0, l(0.000000)
      mad r8.xyzw, r1.xyxy, l(0.00222222228, 0.00222222228, 0.00333333341, 0.00333333341), l(1.000000, 1.000000, 1.000000, 1.000000)
      mad r8.xyzw, r3.xyxy, r8.xyzw, cb4[1].xyxy
      add r8.xyzw, r8.xyzw, l(0.500000, 0.500000, 0.500000, 0.500000)
      sample_l_indexable(texture2d)(float,float,float,float) r9.xyz, r8.xyxx, t0.xyzw, s0, l(0.000000)
      mul r9.xyz, r9.xyzx, l(0.100000, 0.100000, 0.100000, 0.000000)
      mad r7.xyz, r7.xyzx, l(0.100000, 0.100000, 0.100000, 0.000000), r9.xyzx
      sample_l_indexable(texture2d)(float,float,float,float) r8.xyz, r8.zwzz, t0.xyzw, s0, l(0.000000)
      mad r7.xyz, r8.xyzx, l(0.100000, 0.100000, 0.100000, 0.000000), r7.xyzx
      mad r8.xyzw, r1.xyxy, l(0.00444444455, 0.00444444455, 0.00555555569, 0.00555555569), l(1.000000, 1.000000, 1.000000, 1.000000)
      mad r8.xyzw, r3.xyxy, r8.xyzw, cb4[1].xyxy
      add r8.xyzw, r8.xyzw, l(0.500000, 0.500000, 0.500000, 0.500000)
      sample_l_indexable(texture2d)(float,float,float,float) r9.xyz, r8.xyxx, t0.xyzw, s0, l(0.000000)
      mad r7.xyz, r9.xyzx, l(0.100000, 0.100000, 0.100000, 0.000000), r7.xyzx
      sample_l_indexable(texture2d)(float,float,float,float) r8.xyz, r8.zwzz, t0.xyzw, s0, l(0.000000)
      mad r7.xyz, r8.xyzx, l(0.100000, 0.100000, 0.100000, 0.000000), r7.xyzx
      mad r8.xyzw, r1.xyxy, l(0.00666666683, 0.00666666683, 0.00777777797, 0.00777777797), l(1.000000, 1.000000, 1.000000, 1.000000)
      mad r8.xyzw, r3.xyxy, r8.xyzw, cb4[1].xyxy
      add r8.xyzw, r8.xyzw, l(0.500000, 0.500000, 0.500000, 0.500000)
      sample_l_indexable(texture2d)(float,float,float,float) r9.xyz, r8.xyxx, t0.xyzw, s0, l(0.000000)
      mad r7.xyz, r9.xyzx, l(0.100000, 0.100000, 0.100000, 0.000000), r7.xyzx
      sample_l_indexable(texture2d)(float,float,float,float) r8.xyz, r8.zwzz, t0.xyzw, s0, l(0.000000)
      mad r7.xyz, r8.xyzx, l(0.100000, 0.100000, 0.100000, 0.000000), r7.xyzx
      mad r1.xy, r1.xyxx, l(0.00888888910, 0.00888888910, 0.000000, 0.000000), l(1.000000, 1.000000, 0.000000, 0.000000)
      mad r1.xy, r3.xyxx, r1.xyxx, cb4[1].xyxx
      add r1.xy, r1.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
      sample_l_indexable(texture2d)(float,float,float,float) r1.xyz, r1.xyxx, t0.xyzw, s0, l(0.000000)
      mad r1.xyz, r1.xyzx, l(0.100000, 0.100000, 0.100000, 0.000000), r7.xyzx
      sample_l_indexable(texture2d)(float,float,float,float) r3.xyw, r6.zwzz, t0.xywz, s0, l(0.000000)
      mad r1.xyz, r3.xywx, l(0.100000, 0.100000, 0.100000, 0.000000), r1.xyzx
      mul r1.xyz, r1.xyzx, cb4[0].xyzx
      mul r1.xyz, r1.xyzx, v2.xxxx
      max r0.x, r1.y, r1.x
      max r0.x, r1.z, r0.x
      and r0.x, r0.x, l(0x7f800000)
      ieq r0.x, r0.x, l(0x7f800000)
      if_nz r0.x
        mov r3.xyw, l(1.000000,1.000000,0,1.000000)
      endif
      if_z r0.x
        mul r6.xyz, r1.xyzx, cb2[2].yyyy
        ge r7.xyz, r1.xyzx, cb2[0].yyyy
        mul r8.xyz, r6.xyzx, r6.xyzx
        mad r9.xyz, -r6.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(3.000000, 3.000000, 3.000000, 0.000000)
        mul r8.xyz, r8.xyzx, r9.xyzx
        movc r7.xyz, r7.xyzx, l(1.000000,1.000000,1.000000,0), r8.xyzx
        add r7.xyz, -r7.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
        ge r8.xyz, cb2[1].yyyy, r1.xyzx
        movc r8.xyz, r8.xyzx, l(0,0,0,0), l(1.000000,1.000000,1.000000,0)
        add r9.xyz, -r7.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
        add r9.xyz, -r8.xyzx, r9.xyzx
        log r6.xyz, r6.xyzx
        mul r6.xyz, r6.xyzx, cb2[0].wwww
        exp r6.xyz, r6.xyzx
        mul r6.xyz, r6.xyzx, cb2[0].yyyy
        mad r10.xyz, cb2[0].xxxx, r1.xyzx, cb2[2].zzzz
        mul r9.xyz, r9.xyzx, r10.xyzx
        mad r6.xyz, r6.xyzx, r7.xyzx, r9.xyzx
        mad r1.xyz, cb2[1].wwww, r1.xyzx, cb2[2].xxxx
        exp r1.xyz, r1.xyzx
        mad r1.xyz, -cb2[1].zzzz, r1.xyzx, cb2[1].xxxx
        mad r3.xyw, r1.xyxz, r8.xyxz, r6.xyxz
      endif
      mov_sat r3.xyw, r3.xyxw
      mul r1.xyz, r4.xyzx, cb4[0].xyzx
      mad r5.xyz, r1.xyzx, l(0.100000, 0.100000, 0.100000, 0.000000), r3.xywx
    endif
    lt r0.x, l(0.000000), cb4[2].x
    if_nz r0.x
      sqrt r0.x, r3.z
      mad_sat r0.x, r0.x, cb4[1].z, cb4[1].w
      mul r1.x, r0.x, r0.x
      mad r0.x, -r0.x, l(2.000000), l(3.000000)
      mul r0.x, r0.x, r1.x
      mad r0.x, cb4[2].x, r0.x, cb4[2].y
      add r1.xyz, -r4.xyzx, r5.xyzx
      mad r5.xyz, r0.xxxx, r1.xyzx, r4.xyzx
    endif
    add r1.xyz, -r4.xyzx, r5.xyzx
    mad r4.xyz, r0.yyyy, r1.xyzx, r4.xyzx
  else
    mov r4.xyz, r2.xyzx
  endif
endif
div r1.xyz, v1.xyzx, v1.wwww
dp3 r0.x, r1.xyzx, r1.xyzx
rsq r0.x, r0.x
mul r0.x, r0.x, r1.z
mad_sat r0.y, |r0.x|, cb1[0].x, cb1[0].y

ieq r21.x, r20.x, l(0.000000)
if_nz r21.x
	add r0.y, -r0.y, l(100.000000)
else
	add r0.y, -r0.y, l(1.000000)
endif

mul r0.x, |r0.x|, |r0.x|
mul r0.x, r0.x, r0.x
mul r0.x, r0.y, r0.x
min r0.x, r0.x, l(1.000000)
mul r1.xyz, r0.xxxx, r4.xyzx
if_nz r0.z
  mad r0.yz, cb5[0].zzwz, cb0[23].xxyx, v0.xxyx
  mul r0.yz, r0.yyzy, cb5[1].wwww
  round_ni r0.yz, r0.yyzy
  dp2 r1.w, r0.yzyy, l(0.0671105608, 0.00583714992, 0.000000, 0.000000)
  frc r1.w, r1.w
  mul r1.w, r1.w, l(52.982918)
  frc r1.w, r1.w
  lt r2.x, r1.w, cb5[1].x
  if_nz r2.x
    mul r0.y, r0.z, r0.y
    ftou r0.y, r0.y
    xor r0.y, r0.y, l(0x00bc602f)
    imul null, r0.y, r0.y, l(0x003779b9)
    ishl r0.z, r0.y, l(6)
    ushr r2.x, r0.y, l(26)
    xor r0.y, r0.y, r0.z
    xor r0.y, r0.y, r2.x
    utof r0.y, r0.y
    mul r0.y, r0.y, l(2.328306437E-010)
  else
    mov r0.y, l(0)
  endif
  mul r0.z, r1.w, l(757.484680)
  frc r0.z, r0.z
  lt r1.w, r0.z, cb5[1].x
  if_nz r1.w
    xor r1.w, r0.z, l(0x00bc602f)
    imul null, r1.w, r1.w, l(0x003779b9)
    ishl r2.x, r1.w, l(6)
    ushr r2.y, r1.w, l(26)
    xor r1.w, r1.w, r2.x
    xor r1.w, r1.w, r2.y
    utof r1.w, r1.w
    mad r1.w, r1.w, l(2.328306437E-010), l(-0.500000)
  else
    mov r1.w, l(0)
  endif
  mul r0.z, r0.z, l(757.484680)
  frc r0.z, r0.z
  lt r2.x, r0.z, cb5[1].x
  if_nz r2.x
    xor r0.z, r0.z, l(0x00bc602f)
    imul null, r0.z, r0.z, l(0x003779b9)
    ishl r2.x, r0.z, l(6)
    ushr r2.y, r0.z, l(26)
    xor r0.z, r0.z, r2.x
    xor r0.z, r0.z, r2.y
    utof r0.z, r0.z
    mad r0.z, r0.z, l(2.328306437E-010), l(-0.500000)
  else
    mov r0.z, l(0)
  endif
  mul r2.xy, r0.yzyy, cb5[0].xyxx
  mul r2.z, r1.w, cb5[0].y
  dp2 r3.x, r2.xzxx, l(1.000000, 1.402000, 0.000000, 0.000000)
  dp3 r3.y, r2.xyzx, l(1.000000, -0.344000, -0.714000, 0.000000)
  dp2 r3.z, r2.xyxx, l(1.000000, 1.772000, 0.000000, 0.000000)
  dp3_sat r0.y, r1.xyzx, l(0.299000, -0.169000, 0.500000, 0.000000)
  add r0.y, -r0.y, l(1.000000)
  log r0.y, r0.y
  mul r0.y, r0.y, cb5[1].y
  exp r0.y, r0.y
  mul r0.y, r0.y, cb5[1].z
  mad r2.xyz, -r4.xyzx, r0.xxxx, r3.xyzx
  mad r1.xyz, r0.yyyy, r2.xyzx, r1.xyzx
endif
if_nz r0.w
  mov_sat r1.xyz, r1.xyzx
  mul r0.x, cb6[0].w, l(0.500000)
  ge r0.yzw, l(0.000000, 0.00313080009, 0.00313080009, 0.00313080009), r1.xxyz
  mul r2.xyz, r1.xyzx, l(12.920000, 12.920000, 12.920000, 0.000000)
  log r3.xyz, r1.xyzx
  mul r3.xyz, r3.xyzx, l(0.416666657, 0.416666657, 0.416666657, 0.000000)
  exp r3.xyz, r3.xyzx
  mad r3.xyz, r3.xyzx, l(1.055000, 1.055000, 1.055000, 0.000000), l(-0.055000, -0.055000, -0.055000, 0.000000)
  movc r0.yzw, r0.yyzw, r2.xxyz, r3.xxyz
  add r1.w, -cb6[0].w, l(1.000000)
  mad r0.xyz, r0.yzwy, r1.wwww, r0.xxxx
  lt r2.xy, l(0.000000, 0.000000, 0.000000, 0.000000), cb6[0].yzyy
  and r0.w, r2.y, r2.x
  if_nz r0.w
    sample_l_indexable(texture3d)(float,float,float,float) r3.xyz, r0.xyzx, t2.xyzw, s1, l(0.000000)
    sample_l_indexable(texture3d)(float,float,float,float) r4.xyz, r0.xyzx, t3.xyzw, s1, l(0.000000)
    add r4.xyz, -r3.xyzx, r4.xyzx
    mad r3.xyz, cb6[0].yyyy, r4.xyzx, r3.xyzx
    ge r4.xyz, l(0.00313080009, 0.00313080009, 0.00313080009, 0.000000), r3.xyzx
    mul r5.xyz, r3.xyzx, l(12.920000, 12.920000, 12.920000, 0.000000)
    log r6.xyz, r3.xyzx
    mul r6.xyz, r6.xyzx, l(0.416666657, 0.416666657, 0.416666657, 0.000000)
    exp r6.xyz, r6.xyzx
    mad r6.xyz, r6.xyzx, l(1.055000, 1.055000, 1.055000, 0.000000), l(-0.055000, -0.055000, -0.055000, 0.000000)
    movc r4.xyz, r4.xyzx, r5.xyzx, r6.xyzx
    sample_l_indexable(texture3d)(float,float,float,float) r4.xyz, r4.xyzx, t4.xyzw, s1, l(0.000000)
    add r4.xyz, -r3.xyzx, r4.xyzx
    mad r3.xyz, cb6[0].zzzz, r4.xyzx, r3.xyzx
  else
    if_nz r2.x
      sample_l_indexable(texture3d)(float,float,float,float) r2.xzw, r0.xyzx, t2.xwyz, s1, l(0.000000)
      sample_l_indexable(texture3d)(float,float,float,float) r4.xyz, r0.xyzx, t3.xyzw, s1, l(0.000000)
      add r4.xyz, -r2.xzwx, r4.xyzx
      mad r3.xyz, cb6[0].yyyy, r4.xyzx, r2.xzwx
    else
      if_nz r2.y
        sample_l_indexable(texture3d)(float,float,float,float) r2.xyz, r0.xyzx, t2.xyzw, s1, l(0.000000)
        ge r4.xyz, l(0.00313080009, 0.00313080009, 0.00313080009, 0.000000), r2.xyzx
        mul r5.xyz, r2.xyzx, l(12.920000, 12.920000, 12.920000, 0.000000)
        log r6.xyz, r2.xyzx
        mul r6.xyz, r6.xyzx, l(0.416666657, 0.416666657, 0.416666657, 0.000000)
        exp r6.xyz, r6.xyzx
        mad r6.xyz, r6.xyzx, l(1.055000, 1.055000, 1.055000, 0.000000), l(-0.055000, -0.055000, -0.055000, 0.000000)
        movc r4.xyz, r4.xyzx, r5.xyzx, r6.xyzx
        sample_l_indexable(texture3d)(float,float,float,float) r4.xyz, r4.xyzx, t4.xyzw, s1, l(0.000000)
        add r4.xyz, -r2.xyzx, r4.xyzx
        mad r3.xyz, cb6[0].zzzz, r4.xyzx, r2.xyzx
      else
        sample_l_indexable(texture3d)(float,float,float,float) r3.xyz, r0.xyzx, t2.xyzw, s1, l(0.000000)
      endif
    endif
  endif
  mul r0.xyz, r3.yyyy, cb6[2].xyzx
  mad r0.xyz, r3.xxxx, cb6[1].xyzx, r0.xyzx
  mad r0.xyz, r3.zzzz, cb6[3].xyzx, r0.xyzx
  add r1.xyz, r0.xyzx, cb6[4].xyzx
endif
and r0.xy, cb9[0].xxxx, l(8, 16, 0, 0)
if_nz r0.x
  dp3_sat r2.x, r1.xyzx, cb7[0].xyzx
  dp3_sat r2.y, r1.xyzx, cb7[1].xyzx
  dp3_sat r2.z, r1.xyzx, cb7[2].xyzx
  mov r1.xyz, r2.xyzx
endif
if_nz r0.y
  mul r0.xy, v0.xyxx, cb0[23].zwzz
  sample_l_indexable(texture2d)(float,float,float,float) r2.xyzw, r0.xyxx, t5.xyzw, s0, l(0.000000)
  mul r3.xyzw, r2.xyzw, cb8[0].xyzw
  sample_l_indexable(texture2d)(float,float,float,float) r0.x, r0.xyxx, t6.xyzw, s0, l(0.000000)
  mad_sat r0.x, r0.x, cb8[1].x, cb8[1].y
  mul r0.x, r3.w, r0.x
  lt r0.yzw, r3.xxyz, l(0.000000, 0.500000, 0.500000, 0.500000)
  mul r3.xyz, r1.xyzx, r3.xyzx
  add r3.xyz, r3.xyzx, r3.xyzx
  mad r2.xyz, -r2.xyzx, cb8[0].xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
  add r2.xyz, r2.xyzx, r2.xyzx
  add r4.xyz, -r1.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
  mad r2.xyz, -r2.xyzx, r4.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
  movc r0.yzw, r0.yyzw, r3.xxyz, r2.xxyz
  add r0.yzw, -r1.xxyz, r0.yyzw
  mad r1.xyz, r0.xxxx, r0.yzwy, r1.xyzx
endif
mov o0.xyz, r1.xyzx
mov o0.w, l(0)
ret
// Approximately 594 instruction slots used

///////////////////////////////// HLSL Code /////////////////////////////////
// // ---- Created with 3Dmigoto v1.3.16 on Fri Mar 20 22:12:34 2020
//
// struct RadialBlurComputeResult
// {
//     float computeAlpha;            // Offset:    0
// };
//
// cbuffer SceneInfo : register(b0)
// {
//   row_major float4x4 viewProjMat : packoffset(c0);
//   row_major float3x4 transposeViewMat : packoffset(c4);
//   row_major float3x4 transposeViewInvMat : packoffset(c7);
//   float4 projElement[2] : packoffset(c10);
//   float4 projInvElements[2] : packoffset(c12);
//   row_major float4x4 viewProjInvMat : packoffset(c14);
//   row_major float4x4 prevViewProjMat : packoffset(c18);
//   float3 ZToLinear : packoffset(c22);
//   float subdivisionLevel : packoffset(c22.w);
//   float2 screenSize : packoffset(c23);
//   float2 screenInverseSize : packoffset(c23.z);
//   float2 cullingHelper : packoffset(c24);
//   float cameraNearPlane : packoffset(c24.z);
//   float cameraFarPlane : packoffset(c24.w);
//   float4 viewFrustum[6] : packoffset(c25);
//   float4 clipplane : packoffset(c31);
// }
//
// cbuffer CameraKerare : register(b1)
// {
//   float kerare_scale : packoffset(c0);
//   float kerare_offset : packoffset(c0.y);
// }
//
// cbuffer TonemapParam : register(b2)
// {
//   float contrast : packoffset(c0);
//   float linearBegin : packoffset(c0.y);
//   float linearLength : packoffset(c0.z);
//   float toe : packoffset(c0.w);
//   float maxNit : packoffset(c1);
//   float linearStart : packoffset(c1.y);
//   float displayMaxNitSubContrastFactor : packoffset(c1.z);
//   float contrastFactor : packoffset(c1.w);
//   float mulLinearStartContrastFactor : packoffset(c2);
//   float invLinearBegin : packoffset(c2.y);
//   float madLinearStartContrastFactor : packoffset(c2.z);
// }
//
// cbuffer LensDistortionParam : register(b3)
// {
//   float fDistortionCoef : packoffset(c0);
//   float fRefraction : packoffset(c0.y);
//   uint aberrationEnable : packoffset(c0.z);
//   uint reserved : packoffset(c0.w);
// }
//
// cbuffer RadialBlurRenderParam : register(b4)
// {
//   float4 cbRadialColor : packoffset(c0);
//   float2 cbRadialScreenPos : packoffset(c1);
//   float2 cbRadialMaskSmoothstep : packoffset(c1.z);
//   float2 cbRadialMaskRate : packoffset(c2);
//   float cbRadialBlurPower : packoffset(c2.z);
//   float cbRadialSharpRange : packoffset(c2.w);
//   uint cbRadialBlurFlags : packoffset(c3);
//   float cbRadialReserve0 : packoffset(c3.y);
//   float cbRadialReserve1 : packoffset(c3.z);
//   float cbRadialReserve2 : packoffset(c3.w);
// }
//
// cbuffer FilmGrainParam : register(b5)
// {
//   float2 fNoisePower : packoffset(c0);
//   float2 fNoiseUVOffset : packoffset(c0.z);
//   float fNoiseDensity : packoffset(c1);
//   float fNoiseContrast : packoffset(c1.y);
//   float fBlendRate : packoffset(c1.z);
//   float fReverseNoiseSize : packoffset(c1.w);
// }
//
// cbuffer ColorCorrectTexture : register(b6)
// {
//   float fTextureSize : packoffset(c0);
//   float fTextureBlendRate : packoffset(c0.y);
//   float fTextureBlendRate2 : packoffset(c0.z);
//   float fTextureInverseSize : packoffset(c0.w);
//   row_major float4x4 fColorMatrix : packoffset(c1);
// }
//
// cbuffer ColorDeficientTable : register(b7)
// {
//   float4 cvdR : packoffset(c0);
//   float4 cvdG : packoffset(c1);
//   float4 cvdB : packoffset(c2);
// }
//
// cbuffer ImagePlaneParam : register(b8)
// {
//   float4 ColorParam : packoffset(c0);
//   float Levels_Rate : packoffset(c1);
//   float Levels_Range : packoffset(c1.y);
//   uint Blend_Type : packoffset(c1.z);
// }
//
// cbuffer CBControl : register(b9)
// {
//   uint cPassEnabled : packoffset(c0);
// }
//
// SamplerState BilinearClamp_s : register(s0);
// SamplerState TrilinearClamp_s : register(s1);
// Texture2D<float4> SourceImage : register(t0);
// StructuredBuffer<RadialBlurComputeResult> ComputeResultSRV : register(t1);
// Texture3D<float4> tTextureMap0 : register(t2);
// Texture3D<float4> tTextureMap1 : register(t3);
// Texture3D<float4> tTextureMap2 : register(t4);
// Texture2D<float4> ImagePlameBase : register(t5);
// Texture2D<float> ImagePlameAlpha : register(t6);
//
//
// // 3Dmigoto declarations
// #define cmp -
// Texture1D<float4> IniParams : register(t120);
// Texture2D<float4> StereoParams : register(t125);
//
//
// void main(
//   float4 v0 : SV_Position0,
//   float4 v1 : Kerare0,
//   float v2 : Exposure0,
//   out float4 o0 : SV_Target0)
// {
//   float4 r0,r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11;
//   uint4 bitmask, uiDest;
//   float4 fDest;
//
//   r0.xyzw = cPassEnabled & int4(1,32,2,4);
//   if (r0.x != 0) {
//     r1.xy = v0.xy * screenInverseSize.xy + float2(-0.5,-0.5);
//     r1.z = fDistortionCoef * 0.5 + 1;
//     r1.z = max(1, r1.z);
//     r1.z = rcp(r1.z);
//     r1.w = dot(r1.xy, r1.xy);
//     r2.x = fDistortionCoef * r1.w + 1;
//     r2.xy = r2.xx * r1.xy;
//     r2.xy = r2.xy * r1.zz + float2(0.5,0.5);
//     if (aberrationEnable == 0) {
//       r3.xyz = SourceImage.Sample(BilinearClamp_s, r2.xy).xyz;
//       r3.xyz = v2.xxx * r3.xyz;
//       r2.z = max(r3.x, r3.y);
//       r2.z = max(r2.z, r3.z);
//       r2.z = (int)r2.z & 0x7f800000;
//       r2.z = cmp((int)r2.z == 0x7f800000);
//       if (r2.z != 0) {
//         r4.xyz = float3(1,1,1);
//       }
//       if (r2.z == 0) {
//         r5.xyz = invLinearBegin * r3.xyz;
//         r6.xyz = cmp(r3.xyz >= linearBegin);
//         r7.xyz = r5.xyz * r5.xyz;
//         r8.xyz = -r5.xyz * float3(2,2,2) + float3(3,3,3);
//         r7.xyz = r8.xyz * r7.xyz;
//         r6.xyz = r6.xyz ? float3(1,1,1) : r7.xyz;
//         r6.xyz = float3(1,1,1) + -r6.xyz;
//         r7.xyz = cmp(linearStart >= r3.xyz);
//         r7.xyz = r7.xyz ? float3(0,0,0) : float3(1,1,1);
//         r8.xyz = float3(1,1,1) + -r6.xyz;
//         r8.xyz = r8.xyz + -r7.xyz;
//         r5.xyz = log2(r5.xyz);
//         r5.xyz = toe * r5.xyz;
//         r5.xyz = exp2(r5.xyz);
//         r5.xyz = linearBegin * r5.xyz;
//         r9.xyz = contrast * r3.xyz + madLinearStartContrastFactor;
//         r8.xyz = r9.xyz * r8.xyz;
//         r5.xyz = r5.xyz * r6.xyz + r8.xyz;
//         r3.xyz = contrastFactor * r3.xyz + mulLinearStartContrastFactor;
//         r3.xyz = exp2(r3.xyz);
//         r3.xyz = -displayMaxNitSubContrastFactor * r3.xyz + maxNit;
//         r4.xyz = r3.xyz * r7.xyz + r5.xyz;
//       }
//       r4.xyz = saturate(r4.xyz);
//     } else {
//       r1.w = fRefraction + r1.w;
//       r2.z = fDistortionCoef * r1.w + 1;
//       r2.zw = r2.zz * r1.xy;
//       r2.zw = r2.zw * r1.zz + float2(0.5,0.5);
//       r1.w = fRefraction + r1.w;
//       r1.w = fDistortionCoef * r1.w + 1;
//       r1.xy = r1.xy * r1.ww;
//       r1.xy = r1.xy * r1.zz + float2(0.5,0.5);
//       r3.xyz = SourceImage.Sample(BilinearClamp_s, r2.xy).xyz;
//       r3.xyz = v2.xxx * r3.xyz;
//       r1.w = max(r3.x, r3.y);
//       r1.w = max(r1.w, r3.z);
//       r1.w = (int)r1.w & 0x7f800000;
//       r1.w = cmp((int)r1.w == 0x7f800000);
//       if (r1.w != 0) {
//         r4.x = 1;
//       }
//       if (r1.w == 0) {
//         r1.w = invLinearBegin * r3.x;
//         r2.x = cmp(r3.x >= linearBegin);
//         r2.y = r1.w * r1.w;
//         r3.y = -r1.w * 2 + 3;
//         r2.y = -r2.y * r3.y + 1;
//         r2.x = r2.x ? 0 : r2.y;
//         r2.y = cmp(linearStart >= r3.x);
//         r3.y = 1 + -r2.x;
//         r3.zw = r2.yy ? float2(0,-0) : float2(1,-1);
//         r2.y = r3.y + r3.w;
//         r1.w = log2(r1.w);
//         r1.w = toe * r1.w;
//         r1.w = exp2(r1.w);
//         r1.w = linearBegin * r1.w;
//         r3.y = contrast * r3.x + madLinearStartContrastFactor;
//         r2.y = r3.y * r2.y;
//         r1.w = r1.w * r2.x + r2.y;
//         r2.x = contrastFactor * r3.x + mulLinearStartContrastFactor;
//         r2.x = exp2(r2.x);
//         r2.x = -displayMaxNitSubContrastFactor * r2.x + maxNit;
//         r4.x = r2.x * r3.z + r1.w;
//       }
//       r2.xyz = SourceImage.Sample(BilinearClamp_s, r2.zw).xyz;
//       r2.xyz = v2.xxx * r2.xyz;
//       r1.w = max(r2.x, r2.y);
//       r1.w = max(r1.w, r2.z);
//       r1.w = (int)r1.w & 0x7f800000;
//       r1.w = cmp((int)r1.w == 0x7f800000);
//       if (r1.w != 0) {
//         r4.y = 1;
//       }
//       if (r1.w == 0) {
//         r1.w = invLinearBegin * r2.y;
//         r2.x = cmp(r2.y >= linearBegin);
//         r2.z = r1.w * r1.w;
//         r2.w = -r1.w * 2 + 3;
//         r2.z = -r2.z * r2.w + 1;
//         r2.x = r2.x ? 0 : r2.z;
//         r2.z = cmp(linearStart >= r2.y);
//         r2.w = 1 + -r2.x;
//         r3.xy = r2.zz ? float2(0,-0) : float2(1,-1);
//         r2.z = r3.y + r2.w;
//         r1.w = log2(r1.w);
//         r1.w = toe * r1.w;
//         r1.w = exp2(r1.w);
//         r1.w = linearBegin * r1.w;
//         r2.w = contrast * r2.y + madLinearStartContrastFactor;
//         r2.z = r2.w * r2.z;
//         r1.w = r1.w * r2.x + r2.z;
//         r2.x = contrastFactor * r2.y + mulLinearStartContrastFactor;
//         r2.x = exp2(r2.x);
//         r2.x = -displayMaxNitSubContrastFactor * r2.x + maxNit;
//         r4.y = r2.x * r3.x + r1.w;
//       }
//       r1.xyw = SourceImage.Sample(BilinearClamp_s, r1.xy).xyz;
//       r1.xyw = v2.xxx * r1.xyw;
//       r1.x = max(r1.x, r1.y);
//       r1.x = max(r1.x, r1.w);
//       r1.x = (int)r1.x & 0x7f800000;
//       r1.x = cmp((int)r1.x == 0x7f800000);
//       if (r1.x != 0) {
//         r4.z = 1;
//       }
//       if (r1.x == 0) {
//         r1.x = invLinearBegin * r1.w;
//         r1.y = cmp(r1.w >= linearBegin);
//         r2.x = r1.x * r1.x;
//         r2.y = -r1.x * 2 + 3;
//         r2.x = -r2.x * r2.y + 1;
//         r1.y = r1.y ? 0 : r2.x;
//         r2.x = cmp(linearStart >= r1.w);
//         r2.y = 1 + -r1.y;
//         r2.xz = r2.xx ? float2(0,-0) : float2(1,-1);
//         r2.y = r2.y + r2.z;
//         r1.x = log2(r1.x);
//         r1.x = toe * r1.x;
//         r1.x = exp2(r1.x);
//         r1.x = linearBegin * r1.x;
//         r2.z = contrast * r1.w + madLinearStartContrastFactor;
//         r2.y = r2.z * r2.y;
//         r1.x = r1.x * r1.y + r2.y;
//         r1.y = contrastFactor * r1.w + mulLinearStartContrastFactor;
//         r1.y = exp2(r1.y);
//         r1.y = -displayMaxNitSubContrastFactor * r1.y + maxNit;
//         r4.z = r1.y * r2.x + r1.x;
//       }
//       r4.xyz = saturate(r4.xyz);
//     }
//     r1.x = fDistortionCoef;
//   } else {
//     r2.xy = (uint2)v0.xy;
//     r2.zw = float2(0,0);
//     r2.xyz = SourceImage.Load(r2.xyz).xyz;
//     r2.xyz = v2.xxx * r2.xyz;
//     r1.y = max(r2.x, r2.y);
//     r1.y = max(r1.y, r2.z);
//     r1.y = (int)r1.y & 0x7f800000;
//     r1.y = cmp((int)r1.y == 0x7f800000);
//     if (r1.y != 0) {
//       r4.xyz = float3(1,1,1);
//     }
//     if (r1.y == 0) {
//       r3.xyz = invLinearBegin * r2.xyz;
//       r5.xyz = cmp(r2.xyz >= linearBegin);
//       r6.xyz = r3.xyz * r3.xyz;
//       r7.xyz = -r3.xyz * float3(2,2,2) + float3(3,3,3);
//       r6.xyz = r7.xyz * r6.xyz;
//       r5.xyz = r5.xyz ? float3(1,1,1) : r6.xyz;
//       r5.xyz = float3(1,1,1) + -r5.xyz;
//       r6.xyz = cmp(linearStart >= r2.xyz);
//       r6.xyz = r6.xyz ? float3(0,0,0) : float3(1,1,1);
//       r7.xyz = float3(1,1,1) + -r5.xyz;
//       r7.xyz = r7.xyz + -r6.xyz;
//       r3.xyz = log2(r3.xyz);
//       r3.xyz = toe * r3.xyz;
//       r3.xyz = exp2(r3.xyz);
//       r3.xyz = linearBegin * r3.xyz;
//       r8.xyz = contrast * r2.xyz + madLinearStartContrastFactor;
//       r7.xyz = r8.xyz * r7.xyz;
//       r3.xyz = r3.xyz * r5.xyz + r7.xyz;
//       r2.xyz = contrastFactor * r2.xyz + mulLinearStartContrastFactor;
//       r2.xyz = exp2(r2.xyz);
//       r2.xyz = -displayMaxNitSubContrastFactor * r2.xyz + maxNit;
//       r4.xyz = r2.xyz * r6.xyz + r3.xyz;
//     }
//     r4.xyz = saturate(r4.xyz);
//     r1.xz = float2(0,1);
//   }
//   if (r0.y != 0) {
//     r0.y = asint(cbRadialBlurFlags) & 2;
//     r1.yw = r0.yy ? float2(1,0) : float2(0,1);
//     r0.y = ComputeResultSRV[0].computeAlpha;
//     r0.y = r0.y * r1.y + r1.w;
//     r0.y = cbRadialColor.w * r0.y;
//     r1.y = cmp(r0.y == 0.000000);
//     if (r1.y != 0) {
//       r2.xyz = r4.xyz;
//     }
//     if (r1.y == 0) {
//       r0.x = r0.x ? 1 : 0;
//       r1.yw = screenInverseSize.xy * v0.xy;
//       r3.xy = v0.xy * screenInverseSize.xy + float2(-0.5,-0.5);
//       r3.xy = -cbRadialScreenPos.xy + r3.xy;
//       r3.zw = cmp(r3.xy < float2(0,0));
//       r5.xy = -v0.xy * screenInverseSize.xy + float2(1,1);
//       r1.yw = r3.zw ? r5.xy : r1.yw;
//       r2.w = asint(cbRadialBlurFlags) & 1;
//       r3.z = dot(r3.xy, r3.xy);
//       r3.w = rsqrt(r3.z);
//       r5.xy = r3.xy * r3.ww;
//       r5.xy = cbRadialSharpRange * r5.xy;
//       r5.xy = (uint3)abs(r5.xy);
//       r3.w = (int)r5.y + (int)r5.x;
//       r4.w = (int)r3.w ^ 61;
//       r3.w = (uint)r3.w >> 16;
//       r3.w = (int)r3.w ^ (int)r4.w;
//       r3.w = (int)r3.w * 9;
//       r4.w = (uint)r3.w >> 4;
//       r3.w = (int)r3.w ^ (int)r4.w;
//       r3.w = (int)r3.w * 0x27d4eb2d;
//       r4.w = (uint)r3.w >> 15;
//       r3.w = (int)r3.w ^ (int)r4.w;
//       r3.w = (uint)r3.w;
//       r3.w = 2.32830644e-010 * r3.w;
//       r2.w = r2.w ? r3.w : 1;
//       if (r0.x != 0) {
//         r0.x = sqrt(r3.z);
//         r0.x = max(1, r0.x);
//         r0.x = 1 / r0.x;
//         r5.xy = -cbRadialBlurPower * r1.yw;
//         r5.xy = r5.xy * r0.xx;
//         r5.xy = r5.xy * r2.ww;
//         r6.xyzw = r5.xyxy * float4(0.00111111114,0.00111111114,0.00999999978,0.00999999978) + float4(1,1,1,1);
//         r6.xyzw = r3.xyxy * r6.xyzw + cbRadialScreenPos.xyxy;
//         r0.x = dot(r6.xy, r6.xy);
//         r0.x = r1.x * r0.x + 1;
//         r5.zw = r6.xy * r0.xx;
//         r5.zw = r5.zw * r1.zz + float2(0.5,0.5);
//         r7.xyz = SourceImage.SampleLevel(BilinearClamp_s, r5.zw, 0).xyz;
//         r8.xyzw = r5.xyxy * float4(0.00222222228,0.00222222228,0.00333333341,0.00333333341) + float4(1,1,1,1);
//         r8.xyzw = r3.xyxy * r8.xyzw + cbRadialScreenPos.xyxy;
//         r0.x = dot(r8.xy, r8.xy);
//         r0.x = r1.x * r0.x + 1;
//         r5.zw = r8.xy * r0.xx;
//         r5.zw = r5.zw * r1.zz + float2(0.5,0.5);
//         r9.xyz = SourceImage.SampleLevel(BilinearClamp_s, r5.zw, 0).xyz;
//         r9.xyz = float3(0.100000001,0.100000001,0.100000001) * r9.xyz;
//         r7.xyz = r7.xyz * float3(0.100000001,0.100000001,0.100000001) + r9.xyz;
//         r0.x = dot(r8.zw, r8.zw);
//         r0.x = r1.x * r0.x + 1;
//         r5.zw = r8.zw * r0.xx;
//         r5.zw = r5.zw * r1.zz + float2(0.5,0.5);
//         r8.xyz = SourceImage.SampleLevel(BilinearClamp_s, r5.zw, 0).xyz;
//         r7.xyz = r8.xyz * float3(0.100000001,0.100000001,0.100000001) + r7.xyz;
//         r8.xyzw = r5.xyxy * float4(0.00444444455,0.00444444455,0.00555555569,0.00555555569) + float4(1,1,1,1);
//         r8.xyzw = r3.xyxy * r8.xyzw + cbRadialScreenPos.xyxy;
//         r0.x = dot(r8.xy, r8.xy);
//         r0.x = r1.x * r0.x + 1;
//         r5.zw = r8.xy * r0.xx;
//         r5.zw = r5.zw * r1.zz + float2(0.5,0.5);
//         r9.xyz = SourceImage.SampleLevel(BilinearClamp_s, r5.zw, 0).xyz;
//         r7.xyz = r9.xyz * float3(0.100000001,0.100000001,0.100000001) + r7.xyz;
//         r0.x = dot(r8.zw, r8.zw);
//         r0.x = r1.x * r0.x + 1;
//         r5.zw = r8.zw * r0.xx;
//         r5.zw = r5.zw * r1.zz + float2(0.5,0.5);
//         r8.xyz = SourceImage.SampleLevel(BilinearClamp_s, r5.zw, 0).xyz;
//         r7.xyz = r8.xyz * float3(0.100000001,0.100000001,0.100000001) + r7.xyz;
//         r8.xyzw = r5.xyxy * float4(0.00666666683,0.00666666683,0.00777777797,0.00777777797) + float4(1,1,1,1);
//         r8.xyzw = r3.xyxy * r8.xyzw + cbRadialScreenPos.xyxy;
//         r0.x = dot(r8.xy, r8.xy);
//         r0.x = r1.x * r0.x + 1;
//         r5.zw = r8.xy * r0.xx;
//         r5.zw = r5.zw * r1.zz + float2(0.5,0.5);
//         r9.xyz = SourceImage.SampleLevel(BilinearClamp_s, r5.zw, 0).xyz;
//         r7.xyz = r9.xyz * float3(0.100000001,0.100000001,0.100000001) + r7.xyz;
//         r0.x = dot(r8.zw, r8.zw);
//         r0.x = r1.x * r0.x + 1;
//         r5.zw = r8.zw * r0.xx;
//         r5.zw = r5.zw * r1.zz + float2(0.5,0.5);
//         r8.xyz = SourceImage.SampleLevel(BilinearClamp_s, r5.zw, 0).xyz;
//         r7.xyz = r8.xyz * float3(0.100000001,0.100000001,0.100000001) + r7.xyz;
//         r5.xy = r5.xy * float2(0.0088888891,0.0088888891) + float2(1,1);
//         r5.xy = r3.xy * r5.xy + cbRadialScreenPos.xy;
//         r0.x = dot(r5.xy, r5.xy);
//         r0.x = r1.x * r0.x + 1;
//         r5.xy = r5.xy * r0.xx;
//         r5.xy = r5.xy * r1.zz + float2(0.5,0.5);
//         r5.xyz = SourceImage.SampleLevel(BilinearClamp_s, r5.xy, 0).xyz;
//         r5.xyz = r5.xyz * float3(0.100000001,0.100000001,0.100000001) + r7.xyz;
//         r0.x = dot(r6.zw, r6.zw);
//         r0.x = r1.x * r0.x + 1;
//         r6.xy = r6.zw * r0.xx;
//         r1.xz = r6.xy * r1.zz + float2(0.5,0.5);
//         r6.xyz = SourceImage.SampleLevel(BilinearClamp_s, r1.xz, 0).xyz;
//         r5.xyz = r6.xyz * float3(0.100000001,0.100000001,0.100000001) + r5.xyz;
//         r5.xyz = cbRadialColor.xyz * r5.xyz;
//         r5.xyz = v2.xxx * r5.xyz;
//         r0.x = max(r5.x, r5.y);
//         r0.x = max(r0.x, r5.z);
//         r0.x = (int)r0.x & 0x7f800000;
//         r0.x = cmp((int)r0.x == 0x7f800000);
//         if (r0.x != 0) {
//           r6.xyz = float3(1,1,1);
//         }
//         if (r0.x == 0) {
//           r7.xyz = invLinearBegin * r5.xyz;
//           r8.xyz = cmp(r5.xyz >= linearBegin);
//           r9.xyz = r7.xyz * r7.xyz;
//           r10.xyz = -r7.xyz * float3(2,2,2) + float3(3,3,3);
//           r9.xyz = r10.xyz * r9.xyz;
//           r8.xyz = r8.xyz ? float3(1,1,1) : r9.xyz;
//           r8.xyz = float3(1,1,1) + -r8.xyz;
//           r9.xyz = cmp(linearStart >= r5.xyz);
//           r9.xyz = r9.xyz ? float3(0,0,0) : float3(1,1,1);
//           r10.xyz = float3(1,1,1) + -r8.xyz;
//           r10.xyz = r10.xyz + -r9.xyz;
//           r7.xyz = log2(r7.xyz);
//           r7.xyz = toe * r7.xyz;
//           r7.xyz = exp2(r7.xyz);
//           r7.xyz = linearBegin * r7.xyz;
//           r11.xyz = contrast * r5.xyz + madLinearStartContrastFactor;
//           r10.xyz = r11.xyz * r10.xyz;
//           r7.xyz = r7.xyz * r8.xyz + r10.xyz;
//           r5.xyz = contrastFactor * r5.xyz + mulLinearStartContrastFactor;
//           r5.xyz = exp2(r5.xyz);
//           r5.xyz = -displayMaxNitSubContrastFactor * r5.xyz + maxNit;
//           r6.xyz = r5.xyz * r9.xyz + r7.xyz;
//         }
//         r6.xyz = saturate(r6.xyz);
//         r5.xyz = cbRadialColor.xyz * r4.xyz;
//         r5.xyz = r5.xyz * float3(0.100000001,0.100000001,0.100000001) + r6.xyz;
//       } else {
//         r0.x = sqrt(r3.z);
//         r0.x = max(1, r0.x);
//         r0.x = 1 / r0.x;
//         r1.xy = -cbRadialBlurPower * r1.yw;
//         r1.xy = r1.xy * r0.xx;
//         r1.xy = r1.xy * r2.ww;
//         r6.xyzw = r1.xyxy * float4(0.00111111114,0.00111111114,0.00999999978,0.00999999978) + float4(1,1,1,1);
//         r6.xyzw = r3.xyxy * r6.xyzw + cbRadialScreenPos.xyxy;
//         r6.xyzw = float4(0.5,0.5,0.5,0.5) + r6.xyzw;
//         r7.xyz = SourceImage.SampleLevel(BilinearClamp_s, r6.xy, 0).xyz;
//         r8.xyzw = r1.xyxy * float4(0.00222222228,0.00222222228,0.00333333341,0.00333333341) + float4(1,1,1,1);
//         r8.xyzw = r3.xyxy * r8.xyzw + cbRadialScreenPos.xyxy;
//         r8.xyzw = float4(0.5,0.5,0.5,0.5) + r8.xyzw;
//         r9.xyz = SourceImage.SampleLevel(BilinearClamp_s, r8.xy, 0).xyz;
//         r9.xyz = float3(0.100000001,0.100000001,0.100000001) * r9.xyz;
//         r7.xyz = r7.xyz * float3(0.100000001,0.100000001,0.100000001) + r9.xyz;
//         r8.xyz = SourceImage.SampleLevel(BilinearClamp_s, r8.zw, 0).xyz;
//         r7.xyz = r8.xyz * float3(0.100000001,0.100000001,0.100000001) + r7.xyz;
//         r8.xyzw = r1.xyxy * float4(0.00444444455,0.00444444455,0.00555555569,0.00555555569) + float4(1,1,1,1);
//         r8.xyzw = r3.xyxy * r8.xyzw + cbRadialScreenPos.xyxy;
//         r8.xyzw = float4(0.5,0.5,0.5,0.5) + r8.xyzw;
//         r9.xyz = SourceImage.SampleLevel(BilinearClamp_s, r8.xy, 0).xyz;
//         r7.xyz = r9.xyz * float3(0.100000001,0.100000001,0.100000001) + r7.xyz;
//         r8.xyz = SourceImage.SampleLevel(BilinearClamp_s, r8.zw, 0).xyz;
//         r7.xyz = r8.xyz * float3(0.100000001,0.100000001,0.100000001) + r7.xyz;
//         r8.xyzw = r1.xyxy * float4(0.00666666683,0.00666666683,0.00777777797,0.00777777797) + float4(1,1,1,1);
//         r8.xyzw = r3.xyxy * r8.xyzw + cbRadialScreenPos.xyxy;
//         r8.xyzw = float4(0.5,0.5,0.5,0.5) + r8.xyzw;
//         r9.xyz = SourceImage.SampleLevel(BilinearClamp_s, r8.xy, 0).xyz;
//         r7.xyz = r9.xyz * float3(0.100000001,0.100000001,0.100000001) + r7.xyz;
//         r8.xyz = SourceImage.SampleLevel(BilinearClamp_s, r8.zw, 0).xyz;
//         r7.xyz = r8.xyz * float3(0.100000001,0.100000001,0.100000001) + r7.xyz;
//         r1.xy = r1.xy * float2(0.0088888891,0.0088888891) + float2(1,1);
//         r1.xy = r3.xy * r1.xy + cbRadialScreenPos.xy;
//         r1.xy = float2(0.5,0.5) + r1.xy;
//         r1.xyz = SourceImage.SampleLevel(BilinearClamp_s, r1.xy, 0).xyz;
//         r1.xyz = r1.xyz * float3(0.100000001,0.100000001,0.100000001) + r7.xyz;
//         r3.xyw = SourceImage.SampleLevel(BilinearClamp_s, r6.zw, 0).xyz;
//         r1.xyz = r3.xyw * float3(0.100000001,0.100000001,0.100000001) + r1.xyz;
//         r1.xyz = cbRadialColor.xyz * r1.xyz;
//         r1.xyz = v2.xxx * r1.xyz;
//         r0.x = max(r1.x, r1.y);
//         r0.x = max(r0.x, r1.z);
//         r0.x = (int)r0.x & 0x7f800000;
//         r0.x = cmp((int)r0.x == 0x7f800000);
//         if (r0.x != 0) {
//           r3.xyw = float3(1,1,1);
//         }
//         if (r0.x == 0) {
//           r6.xyz = invLinearBegin * r1.xyz;
//           r7.xyz = cmp(r1.xyz >= linearBegin);
//           r8.xyz = r6.xyz * r6.xyz;
//           r9.xyz = -r6.xyz * float3(2,2,2) + float3(3,3,3);
//           r8.xyz = r9.xyz * r8.xyz;
//           r7.xyz = r7.xyz ? float3(1,1,1) : r8.xyz;
//           r7.xyz = float3(1,1,1) + -r7.xyz;
//           r8.xyz = cmp(linearStart >= r1.xyz);
//           r8.xyz = r8.xyz ? float3(0,0,0) : float3(1,1,1);
//           r9.xyz = float3(1,1,1) + -r7.xyz;
//           r9.xyz = r9.xyz + -r8.xyz;
//           r6.xyz = log2(r6.xyz);
//           r6.xyz = toe * r6.xyz;
//           r6.xyz = exp2(r6.xyz);
//           r6.xyz = linearBegin * r6.xyz;
//           r10.xyz = contrast * r1.xyz + madLinearStartContrastFactor;
//           r9.xyz = r10.xyz * r9.xyz;
//           r6.xyz = r6.xyz * r7.xyz + r9.xyz;
//           r1.xyz = contrastFactor * r1.xyz + mulLinearStartContrastFactor;
//           r1.xyz = exp2(r1.xyz);
//           r1.xyz = -displayMaxNitSubContrastFactor * r1.xyz + maxNit;
//           r3.xyw = r1.xyz * r8.xyz + r6.xyz;
//         }
//         r3.xyw = saturate(r3.xyw);
//         r1.xyz = cbRadialColor.xyz * r4.xyz;
//         r5.xyz = r1.xyz * float3(0.100000001,0.100000001,0.100000001) + r3.xyw;
//       }
//       r0.x = cmp(0 < cbRadialMaskRate.x);
//       if (r0.x != 0) {
//         r0.x = sqrt(r3.z);
//         r0.x = saturate(r0.x * cbRadialMaskSmoothstep.x + cbRadialMaskSmoothstep.y);
//         r1.x = r0.x * r0.x;
//         r0.x = -r0.x * 2 + 3;
//         r0.x = r1.x * r0.x;
//         r0.x = cbRadialMaskRate.x * r0.x + cbRadialMaskRate.y;
//         r1.xyz = r5.xyz + -r4.xyz;
//         r5.xyz = r0.xxx * r1.xyz + r4.xyz;
//       }
//       r1.xyz = r5.xyz + -r4.xyz;
//       r4.xyz = r0.yyy * r1.xyz + r4.xyz;
//     } else {
//       r4.xyz = r2.xyz;
//     }
//   }
//   r1.xyz = v1.xyz / v1.www;
//   r0.x = dot(r1.xyz, r1.xyz);
//   r0.x = rsqrt(r0.x);
//   r0.x = r1.z * r0.x;
//   r0.y = saturate(abs(r0.x) * kerare_scale + kerare_offset);
//   r0.y = 1 + -r0.y;
//   r0.x = abs(r0.x) * abs(r0.x);
//   r0.x = r0.x * r0.x;
//   r0.x = r0.x * r0.y;
//   r0.x = min(1, r0.x);
//   r1.xyz = r4.xyz * r0.xxx;
//   if (r0.z != 0) {
//     r0.yz = fNoiseUVOffset.xy * screenSize.xy + v0.xy;
//     r0.yz = fReverseNoiseSize * r0.yz;
//     r0.yz = floor(r0.yz);
//     r1.w = dot(r0.yz, float2(0.0671105608,0.00583714992));
//     r1.w = frac(r1.w);
//     r1.w = 52.9829178 * r1.w;
//     r1.w = frac(r1.w);
//     r2.x = cmp(r1.w < fNoiseDensity);
//     if (r2.x != 0) {
//       r0.y = r0.y * r0.z;
//       r0.y = (uint)r0.y;
//       r0.y = (int)r0.y ^ 0x00bc602f;
//       r0.y = (int)r0.y * 0x003779b9;
//       r0.z = (uint)r0.y << 6;
//       r2.x = (uint)r0.y >> 26;
//       r0.y = (int)r0.y ^ (int)r0.z;
//       r0.y = (int)r0.y ^ (int)r2.x;
//       r0.y = (uint)r0.y;
//       r0.y = 2.32830644e-010 * r0.y;
//     } else {
//       r0.y = 0;
//     }
//     r0.z = 757.48468 * r1.w;
//     r0.z = frac(r0.z);
//     r1.w = cmp(r0.z < fNoiseDensity);
//     if (r1.w != 0) {
//       r1.w = (int)r0.z ^ 0x00bc602f;
//       r1.w = (int)r1.w * 0x003779b9;
//       r2.x = (uint)r1.w << 6;
//       r2.y = (uint)r1.w >> 26;
//       r1.w = (int)r1.w ^ (int)r2.x;
//       r1.w = (int)r1.w ^ (int)r2.y;
//       r1.w = (uint)r1.w;
//       r1.w = r1.w * 2.32830644e-010 + -0.5;
//     } else {
//       r1.w = 0;
//     }
//     r0.z = 757.48468 * r0.z;
//     r0.z = frac(r0.z);
//     r2.x = cmp(r0.z < fNoiseDensity);
//     if (r2.x != 0) {
//       r0.z = (int)r0.z ^ 0x00bc602f;
//       r0.z = (int)r0.z * 0x003779b9;
//       r2.x = (uint)r0.z << 6;
//       r2.y = (uint)r0.z >> 26;
//       r0.z = (int)r0.z ^ (int)r2.x;
//       r0.z = (int)r0.z ^ (int)r2.y;
//       r0.z = (uint)r0.z;
//       r0.z = r0.z * 2.32830644e-010 + -0.5;
//     } else {
//       r0.z = 0;
//     }
//     r2.xy = fNoisePower.xy * r0.yz;
//     r2.z = fNoisePower.y * r1.w;
//     r3.x = dot(r2.xz, float2(1,1.40199995));
//     r3.y = dot(r2.xyz, float3(1,-0.344000012,-0.713999987));
//     r3.z = dot(r2.xy, float2(1,1.77199996));
//     r0.y = saturate(dot(r1.xyz, float3(0.298999995,-0.169,0.5)));
//     r0.y = 1 + -r0.y;
//     r0.y = log2(r0.y);
//     r0.y = fNoiseContrast * r0.y;
//     r0.y = exp2(r0.y);
//     r0.y = fBlendRate * r0.y;
//     r2.xyz = -r4.xyz * r0.xxx + r3.xyz;
//     r1.xyz = r0.yyy * r2.xyz + r1.xyz;
//   }
//   if (r0.w != 0) {
//     r1.xyz = saturate(r1.xyz);
//     r0.x = 0.5 * fTextureInverseSize;
//     r0.yzw = cmp(float3(0.00313080009,0.00313080009,0.00313080009) >= r1.xyz);
//     r2.xyz = float3(12.9200001,12.9200001,12.9200001) * r1.xyz;
//     r3.xyz = log2(r1.xyz);
//     r3.xyz = float3(0.416666657,0.416666657,0.416666657) * r3.xyz;
//     r3.xyz = exp2(r3.xyz);
//     r3.xyz = r3.xyz * float3(1.05499995,1.05499995,1.05499995) + float3(-0.0549999997,-0.0549999997,-0.0549999997);
//     r0.yzw = r0.yzw ? r2.xyz : r3.xyz;
//     r1.w = 1 + -fTextureInverseSize;
//     r0.xyz = r0.yzw * r1.www + r0.xxx;
//     r2.xy = cmp(float2(0,0) < fTextureBlendRate);
//     r0.w = r2.y ? r2.x : 0;
//     if (r0.w != 0) {
//       r3.xyz = tTextureMap0.SampleLevel(TrilinearClamp_s, r0.xyz, 0).xyz;
//       r4.xyz = tTextureMap1.SampleLevel(TrilinearClamp_s, r0.xyz, 0).xyz;
//       r4.xyz = r4.xyz + -r3.xyz;
//       r3.xyz = fTextureBlendRate * r4.xyz + r3.xyz;
//       r4.xyz = cmp(float3(0.00313080009,0.00313080009,0.00313080009) >= r3.xyz);
//       r5.xyz = float3(12.9200001,12.9200001,12.9200001) * r3.xyz;
//       r6.xyz = log2(r3.xyz);
//       r6.xyz = float3(0.416666657,0.416666657,0.416666657) * r6.xyz;
//       r6.xyz = exp2(r6.xyz);
//       r6.xyz = r6.xyz * float3(1.05499995,1.05499995,1.05499995) + float3(-0.0549999997,-0.0549999997,-0.0549999997);
//       r4.xyz = r4.xyz ? r5.xyz : r6.xyz;
//       r4.xyz = tTextureMap2.SampleLevel(TrilinearClamp_s, r4.xyz, 0).xyz;
//       r4.xyz = r4.xyz + -r3.xyz;
//       r3.xyz = fTextureBlendRate2 * r4.xyz + r3.xyz;
//     } else {
//       if (r2.x != 0) {
//         r2.xzw = tTextureMap0.SampleLevel(TrilinearClamp_s, r0.xyz, 0).xyz;
//         r4.xyz = tTextureMap1.SampleLevel(TrilinearClamp_s, r0.xyz, 0).xyz;
//         r4.xyz = r4.xyz + -r2.xzw;
//         r3.xyz = fTextureBlendRate * r4.xyz + r2.xzw;
//       } else {
//         if (r2.y != 0) {
//           r2.xyz = tTextureMap0.SampleLevel(TrilinearClamp_s, r0.xyz, 0).xyz;
//           r4.xyz = cmp(float3(0.00313080009,0.00313080009,0.00313080009) >= r2.xyz);
//           r5.xyz = float3(12.9200001,12.9200001,12.9200001) * r2.xyz;
//           r6.xyz = log2(r2.xyz);
//           r6.xyz = float3(0.416666657,0.416666657,0.416666657) * r6.xyz;
//           r6.xyz = exp2(r6.xyz);
//           r6.xyz = r6.xyz * float3(1.05499995,1.05499995,1.05499995) + float3(-0.0549999997,-0.0549999997,-0.0549999997);
//           r4.xyz = r4.xyz ? r5.xyz : r6.xyz;
//           r4.xyz = tTextureMap2.SampleLevel(TrilinearClamp_s, r4.xyz, 0).xyz;
//           r4.xyz = r4.xyz + -r2.xyz;
//           r3.xyz = fTextureBlendRate2 * r4.xyz + r2.xyz;
//         } else {
//           r3.xyz = tTextureMap0.SampleLevel(TrilinearClamp_s, r0.xyz, 0).xyz;
//         }
//       }
//     }
//     r0.xyz = fColorMatrix._m10_m11_m12 * r3.yyy;
//     r0.xyz = r3.xxx * fColorMatrix._m00_m01_m02 + r0.xyz;
//     r0.xyz = r3.zzz * fColorMatrix._m20_m21_m22 + r0.xyz;
//     r1.xyz = fColorMatrix._m30_m31_m32 + r0.xyz;
//   }
//   r0.xy = cPassEnabled & int2(8,16);
//   if (r0.x != 0) {
//     r2.x = saturate(dot(r1.xyz, cvdR.xyz));
//     r2.y = saturate(dot(r1.xyz, cvdG.xyz));
//     r2.z = saturate(dot(r1.xyz, cvdB.xyz));
//     r1.xyz = r2.xyz;
//   }
//   if (r0.y != 0) {
//     r0.xy = screenInverseSize.xy * v0.xy;
//     r2.xyzw = ImagePlameBase.SampleLevel(BilinearClamp_s, r0.xy, 0).xyzw;
//     r3.xyzw = ColorParam.xyzw * r2.xyzw;
//     r0.x = ImagePlameAlpha.SampleLevel(BilinearClamp_s, r0.xy, 0).x;
//     r0.x = saturate(r0.x * Levels_Rate + Levels_Range);
//     r0.x = r0.x * r3.w;
//     r0.yzw = cmp(r3.xyz < float3(0.5,0.5,0.5));
//     r3.xyz = r3.xyz * r1.xyz;
//     r3.xyz = r3.xyz + r3.xyz;
//     r2.xyz = -r2.xyz * ColorParam.xyz + float3(1,1,1);
//     r2.xyz = r2.xyz + r2.xyz;
//     r4.xyz = float3(1,1,1) + -r1.xyz;
//     r2.xyz = -r2.xyz * r4.xyz + float3(1,1,1);
//     r0.yzw = r0.yzw ? r3.xyz : r2.xyz;
//     r0.yzw = r0.yzw + -r1.xyz;
//     r1.xyz = r0.xxx * r0.yzw + r1.xyz;
//   }
//   o0.xyz = r1.xyz;
//   o0.w = 0;
//   return;
// }
//////////////////////////////// HLSL Errors ////////////////////////////////
// D:\Steam\steamapps\common\RE3DEMO\Shaders\4e6662139da7de72-ps_replace.txt(153,18-40): warning X3203: signed/unsigned mismatch, unsigned assumed
// D:\Steam\steamapps\common\RE3DEMO\Shaders\4e6662139da7de72-ps_replace.txt(196,18-40): warning X3203: signed/unsigned mismatch, unsigned assumed
// D:\Steam\steamapps\common\RE3DEMO\Shaders\4e6662139da7de72-ps_replace.txt(228,18-40): warning X3203: signed/unsigned mismatch, unsigned assumed
// D:\Steam\steamapps\common\RE3DEMO\Shaders\4e6662139da7de72-ps_replace.txt(260,18-40): warning X3203: signed/unsigned mismatch, unsigned assumed
// D:\Steam\steamapps\common\RE3DEMO\Shaders\4e6662139da7de72-ps_replace.txt(298,16-38): warning X3203: signed/unsigned mismatch, unsigned assumed
// D:\Steam\steamapps\common\RE3DEMO\Shaders\4e6662139da7de72-ps_replace.txt(352,15-31): error X3017: cannot convert from 'const float2' to 'uint3'
/////////////////////////////////////////////////////////////////////////////
