// Mirror Reflections 2
// Generated by Microsoft (R) HLSL Shader Compiler 10.0.10011.16384
//
//   using 3Dmigoto v1.3.11 on Fri Nov 16 12:51:11 2018
//
//
// Buffer Definitions:
//
// cbuffer $Globals
// {
//
//   float1 ConstantVector1D_12_Value;  // Offset:    0 Size:     4
//   float2 ConstantVector2D_07_Value;  // Offset:    4 Size:     8
//   float3 ConstantColorRGB_03_Value;  // Offset:   16 Size:    12
//   float1 ConstantVector1D_33_Value;  // Offset:   28 Size:     4
//   float1 ConstantVector1D_57_Value;  // Offset:   32 Size:     4
//   float1 ConstantVector1D_20_Value;  // Offset:   36 Size:     4
//   float1 ConstantVector1D_24_Value;  // Offset:   40 Size:     4
//   float1 ConstantVector1D_32_Value;  // Offset:   44 Size:     4
//   float1 ConstantVector1D_15_Value;  // Offset:   48 Size:     4
//   float1 ConstantVector1D_14_Value;  // Offset:   52 Size:     4
//   float1 ConstantVector1D_34_Value;  // Offset:   56 Size:     4
//   float1 ConstantVector1D_65_Value;  // Offset:   60 Size:     4
//   float1 ConstantVector1D_06_Value;  // Offset:   64 Size:     4
//   float1 ConstantVector1D_40_Value;  // Offset:   68 Size:     4
//   float1 ConstantVector1D_13_Value;  // Offset:   72 Size:     4
//   float1 ConstantVector1D_58_Value;  // Offset:   76 Size:     4
//   float2 ConstantVector2D_08_Value;  // Offset:   80 Size:     8
//   float1 ConstantVector1D_22_Value;  // Offset:   88 Size:     4
//   float1 ConstantVector1D_30_Value;  // Offset:   92 Size:     4
//   float3 ConstantColorRGB_01_Value;  // Offset:   96 Size:    12
//   float3 ConstantColorRGB_06_Value;  // Offset:  112 Size:    12
//   float1 ConstantVector1D_50_Value;  // Offset:  124 Size:     4
//   float2 ConstantVector2D_04_Value;  // Offset:  128 Size:     8
//   float1 ConstantVector1D_62_Value;  // Offset:  136 Size:     4
//   float1 ConstantVector1D_18_Value;  // Offset:  140 Size:     4
//   float1 ConstantVector1D_60_Value;  // Offset:  144 Size:     4
//   float2 ConstantVector2D_03_Value;  // Offset:  148 Size:     8
//   float1 ConstantVector1D_19_Value;  // Offset:  156 Size:     4
//   float2 ConstantVector2D_05_Value;  // Offset:  160 Size:     8
//   float1 ConstantVector1D_05_Value;  // Offset:  168 Size:     4
//   float1 ConstantVector1D_09_Value;  // Offset:  172 Size:     4
//   float1 ConstantVector1D_07_Value;  // Offset:  176 Size:     4
//   float2 ConstantVector2D_01_Value;  // Offset:  180 Size:     8
//   float1 ConstantVector1D_11_Value;  // Offset:  188 Size:     4
//   float1 ConstantVector1D_01_Value;  // Offset:  192 Size:     4
//   float1 ConstantVector1D_27_Value;  // Offset:  196 Size:     4 [unused]
//   float1 ConstantVector1D_25_Value;  // Offset:  200 Size:     4 [unused]
//   float1 ConstantVector1D_28_Value;  // Offset:  204 Size:     4 [unused]
//   float1 ConstantVector1D_31_Value;  // Offset:  208 Size:     4 [unused]
//   float3 ConstantVector3D_04_Value;  // Offset:  212 Size:    12 [unused]
//   float3 ConstantVector3D_02_Value;  // Offset:  224 Size:    12 [unused]
//   float1 ConstantVector1D_48_Value;  // Offset:  236 Size:     4 [unused]
//   float1 ConstantVector1D_46_Value;  // Offset:  240 Size:     4 [unused]
//
// }
//
// cbuffer _cbPerObject
// {
//
//   struct S_cbPerObject
//   {
//
//       row_major float4x4 go_mObjectToView;// Offset:    0
//       row_major float4x4 go_mObjectToViewPrev;// Offset:   64
//       float4 go_vPosScale;           // Offset:  128
//       float4 go_vPosBias;            // Offset:  144
//       float4 go_vTexScaleBias;       // Offset:  160
//       float4 go_vObjectId;           // Offset:  176
//       float4 go_Tesselation;         // Offset:  192
//       float4 go_Flags;               // Offset:  208
//       float4 go_vSimpleColor;        // Offset:  224
//
//   } cbPerObject;                     // Offset:    0 Size:   240
//
// }
//
// cbuffer _cbSharedPerViewData
// {
//
//   struct S_cbSharedPerViewData
//   {
//
//       row_major float4x4 mProjection;// Offset:    0
//       row_major float4x4 mProjectionPrev;// Offset:   64
//       row_major float4x4 mViewToViewport;// Offset:  128
//       row_major float4x4 mViewToWorld;// Offset:  192
//       row_major float4x4 mViewToWorldPrev;// Offset:  256
//       row_major float4x4 mFxWorldToSampleSpace;// Offset:  320
//       float4 vViewRemap;             // Offset:  384
//       float4 vViewDepthRemap;        // Offset:  400
//       float4 vEyeVectorUL;           // Offset:  416
//       float4 vEyeVectorLR;           // Offset:  432
//       float4 vEyeVectorDelta;        // Offset:  448
//       float4 vPixelToEyeVectorScaleBias;// Offset:  464
//       float4 vViewSpaceUpVector;     // Offset:  480
//       float4 vViewportSize;          // Offset:  496
//       float4 vTesselationEnabled;    // Offset:  512
//       float4 vEngineTime;            // Offset:  528
//       uint nFrameCounter;            // Offset:  544
//       float4 vShaderColor0;          // Offset:  560
//       float4 vShaderColor1;          // Offset:  576
//       float4 vShaderColor2;          // Offset:  592
//       float4 vShaderColor3;          // Offset:  608
//       float4 vShaderColor4;          // Offset:  624
//       float4 vClipPlane;             // Offset:  640
//       float4 vClipPlane0;            // Offset:  656
//       float4 vClipPlane1;            // Offset:  672
//       float4 vClipPlane2;            // Offset:  688
//       float4 vClipPlane3;            // Offset:  704
//       float4 vClipPlane4;            // Offset:  720
//       float4 vClipPlane5;            // Offset:  736
//       float4 vMippedDepthRemap;      // Offset:  752
//       float4 vSpecularOcclusionSettings;// Offset:  768
//       float4 vSaturatedAmbientOcclusionSettings;// Offset:  784
//       float4 vLightModelSettings;    // Offset:  800
//       float4 vHDRScale;              // Offset:  816
//       float4 vTweakableShaderParams; // Offset:  832
//       float4 vAtmosphericScatteringParameters;// Offset:  848
//       float4 vAtmosphericScatteringParameters2;// Offset:  864
//       float4 vAtmosphericScatteringParameters3;// Offset:  880
//       float3 vAtmosphericScatteringMieBeta;// Offset:  896
//       float3 vAtmosphericScatteringRayleighBeta;// Offset:  912
//       float3 vAtmosphericScatteringShadowedMieBeta;// Offset:  928
//       float3 vAtmosphericScatteringShadowedRayleighBeta;// Offset:  944
//       float3 vAttenuatedSunColor;    // Offset:  960
//       float3 vSunDirectionVS;        // Offset:  976
//       row_major float4x4 mViewToGlobalShadowVSPT;// Offset:  992
//       float4 vWindDirectionAndStrength;// Offset: 1056
//       float4 vWindDirectionAndStrengthPrev;// Offset: 1072
//       float4 vWindInitialDirectionAndStrength;// Offset: 1088
//       float4 vFxFadeParameters;      // Offset: 1104
//       float2 vFxSize;                // Offset: 1120
//       int nEnableGBufferSpecPowerAdjustment;// Offset: 1128
//       int nNumCSMCascades;           // Offset: 1132
//       float fCSMFadeAdd;             // Offset: 1136
//       int nEnableClothBias;          // Offset: 1140
//       int2 viNumTiles;               // Offset: 1144
//       int nLightTileDebugFlags;      // Offset: 1152
//       int nEnableBoxReflections;     // Offset: 1156
//       int nSelectedBoxReflectionId;  // Offset: 1160
//       int nEnableAtmosphericScatteringBackdrop;// Offset: 1164
//       int nEnableSampleFromUICameraBackbuffer;// Offset: 1168
//       int nFallbackRoomMask;         // Offset: 1172
//       float4 vClearColor;            // Offset: 1184
//       float3 vGlobalLightDirectionVS;// Offset: 1200
//       float3 vGlobalLightFrontColor; // Offset: 1216
//       float3 vGlobalLightBackColor;  // Offset: 1232
//       float4 vShadowAtlasSize;       // Offset: 1248
//       float2 vShadowPoissonScale;    // Offset: 1264
//       int nShadowSpotKernel;         // Offset: 1272
//       int nShadowCSMKernel;          // Offset: 1276
//       float4 vJitter;                // Offset: 1280
//       float4 vUnjitter;              // Offset: 1296
//       int nHashedAlphaPeriod;        // Offset: 1312
//       int nIsRenderingOffscreen;     // Offset: 1316
//
//   } cbSharedPerViewData;             // Offset:    0 Size:  1320
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// samplerPointClamp                 sampler      NA          NA    0        1
// samplerLinearClamp                sampler      NA          NA    4        1
// samplerLinearWrap                 sampler      NA          NA    5        1
// samplerLinearBorderBlack          sampler      NA          NA    6        1
// samplerAnisotropicWrap            sampler      NA          NA    9        1
// mapTexture2D_02                   texture  float4          2d    0        1
// mapTexture2D_01                   texture  float4          2d    1        1
// mapTexture2DNormal_01             texture  float4          2d    2        1
// mapTexture2DNormal_02             texture  float4          2d    3        1
// srvParticleFx                     texture  float4     2darray   16        1
// srvBoxReflectionCubeDiffuse       texture  float4   cubearray   36        1
// srvBoxReflectionCubeDiffuse2      texture  float4   cubearray   38        1
// srvReflection2D                   texture  float4          2d   39        1
// srvRefraction2D                   texture  float4          2d   40        1
// mapDeferred0                      texture  float4          2d   42        1
// $Globals                          cbuffer      NA          NA    0        1
// _cbPerObject                      cbuffer      NA          NA    1        1
// _cbSharedPerViewData              cbuffer      NA          NA    2        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float
// TEXCOORD                 0   xyzw        1     NONE   float   xyzw
// TEXCOORD                 1   xyzw        2     NONE   float   xyz
// TEXCOORD                 2   xyzw        3     NONE   float   xyzw
// TEXCOORD                 3   xyzw        4     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[13], immediateIndexed
dcl_constantbuffer cb1[14], immediateIndexed
dcl_constantbuffer cb2[70], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s4, mode_default
dcl_sampler s5, mode_default
dcl_sampler s6, mode_default
dcl_sampler s9, mode_default
dcl_resource_texture2d (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) t16
dcl_resource_texturecubearray (float,float,float,float) t36
dcl_resource_texturecubearray (float,float,float,float) t38
dcl_resource_texture2d (float,float,float,float) t39
dcl_resource_texture2d (float,float,float,float) t40
dcl_resource_texture2d (float,float,float,float) t42
dcl_input_ps linear v1.xyzw
dcl_input_ps linear v2.xyz
dcl_input_ps linear v3.xyzw
dcl_input_ps linear v4.x
dcl_output o0.xyzw
//dcl_temps 11

dcl_temps 37

// stereo2mono:
dcl_resource_texture2d (float,float,float,float) t100

dcl_resource_texture2d (float,float,float,float) t125
ld_indexable(texture2d)(float,float,float,float) r37.xyzw, l(0, 0, 0, 0), t125.xyzw

mul r0.xyz, v1.yyyy, cb2[13].xyzx
mad r0.xyz, v1.xxxx, cb2[12].xyzx, r0.xyzx
mad r0.xyz, v1.zzzz, cb2[14].xyzx, r0.xyzx
add r0.xyz, r0.xyzx, cb2[15].xyzx
mul r1.xy, cb0[0].yzyy, cb2[33].xxxx
frc r1.xy, r1.xyxx
mad r1.xy, r0.xyxx, cb0[10].xyxx, r1.xyxx
mul r0.w, cb0[10].z, cb0[11].x
mul r0.w, r0.w, l(0.300000)
mul r1.zw, r0.xxxy, cb0[11].yyyz
mul r2.xyzw, r1.zwzw, l(1.337000, 1.337000, 0.937000, 0.937000)
add r3.xyz, -v2.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000)
add r3.xyz, r3.xyzx, r3.xyzx
mul r4.xyz, r3.yyyy, cb1[1].xyzx
mad r3.xyw, r3.xxxx, cb1[0].xyxz, r4.xyxz
mad r3.xyz, r3.zzzz, cb1[2].xyzx, r3.xywx
mul r3.yw, r3.yyyy, cb2[13].xxxy
mad r3.xy, r3.xxxx, cb2[12].xyxx, r3.ywyy
mad r3.xy, r3.zzzz, cb2[14].xyxx, r3.xyxx
mad r3.zw, r3.xxxy, l(0.000000, 0.000000, 0.500000, 0.500000), l(0.000000, 0.000000, 0.500000, 0.500000)
mul r4.x, cb0[10].z, cb2[33].x
mul r4.y, r4.x, l(1.337000)
mad r3.zw, r3.zzzw, l(0.000000, 0.000000, 2.000000, 2.000000), l(0.000000, 0.000000, -1.000000, -1.000000)
mul r3.zw, r3.zzzw, l(0.000000, 0.000000, 0.330000, 0.330000)
mad r4.x, r4.x, l(1.337000), l(0.500000)
frc r4.xy, r4.xyxx
mad r4.zw, r4.yyyy, r3.zzzw, r1.zzzw
mad r2.xy, r4.xxxx, r3.zwzz, r2.xyxx
add r3.z, r4.y, l(-0.500000)
add r3.z, r3.z, r3.z
add r3.x, |r3.y|, |r3.x|
mad r3.x, -r3.x, l(0.500000), l(1.000000)
max r3.y, r3.x, l(0.000000)
add r3.y, -r3.y, l(1.000000)
mul r3.y, r3.y, cb0[12].x
sample_b_indexable(texture2d)(float,float,float,float) r4.xy, r4.zwzz, t3.xyzw, s5, cb0[11].w
mad r4.xy, r4.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
mul r4.xy, r3.yyyy, r4.xyxx
dp2 r3.w, r4.xyxx, r4.xyxx
add r3.w, -r3.w, l(1.000000)
max r3.w, r3.w, l(0.000000)
sqrt r4.zw, r3.wwww
sample_b_indexable(texture2d)(float,float,float,float) r2.xy, r2.xyxx, t3.xyzw, s5, cb0[11].w
mad r2.xy, r2.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
mul r5.xy, r3.yyyy, r2.xyxx
dp2 r2.x, r5.xyxx, r5.xyxx
add r2.x, -r2.x, l(1.000000)
max r2.x, r2.x, l(0.000000)
sqrt r5.zw, r2.xxxx
add r5.xyzw, -r4.xyww, r5.xyzw
mad r4.xyzw, |r3.zzzz|, r5.xyzw, r4.xyzw
mul r2.x, cb0[11].x, cb2[33].x
mul r2.y, r2.x, l(0.600000)
mad r2.yz, r2.yyyy, cb2[68].xxyx, r2.zzwz
mul r2.w, |r3.x|, |r3.x|
mul r2.w, r2.w, cb0[10].w
sample_b_indexable(texture2d)(float,float,float,float) r2.yz, r2.yzyy, t3.zxyw, s5, cb0[11].w
mad r2.yz, r2.yyzy, l(0.000000, 2.000000, 2.000000, 0.000000), l(0.000000, -1.000000, -1.000000, 0.000000)
mul r2.yz, r2.wwww, r2.yyzy
dp2 r3.x, r2.yzyy, r2.yzyy
add r3.x, -r3.x, l(1.000000)
max r3.x, r3.x, l(0.000000)
sqrt r3.x, r3.x
mul r3.yz, r2.xxxx, cb2[68].xxyx
mad r1.zw, r1.zzzw, l(0.000000, 0.000000, 1.173000, 1.173000), -r3.yyyz
sample_b_indexable(texture2d)(float,float,float,float) r1.zw, r1.zwzz, t3.zwxy, s5, cb0[11].w
mad r1.zw, r1.zzzw, l(0.000000, 0.000000, 2.000000, 2.000000), l(0.000000, 0.000000, -1.000000, -1.000000)
mul r1.zw, r2.wwww, r1.zzzw
dp2 r2.x, r1.zwzz, r1.zwzz
add r2.x, -r2.x, l(1.000000)
max r2.x, r2.x, l(0.000000)
sqrt r2.x, r2.x
mul r1.zw, r3.xxxx, r1.zzzw
mad r5.zw, r2.yyyz, r2.xxxx, r1.zzzw
mul r5.xy, r2.xxxx, r3.xxxx
dp3 r1.z, r5.yzwy, r5.yzwy
rsq r1.z, r1.z
mul r2.xyzw, r1.zzzz, r5.xyzw
mul r3.xyzw, r2.xyzw, r4.xyzw
add r3.xy, r3.zwzz, r3.xyxx
mul r3.z, r2.y, r4.w
dp3 r1.z, r3.xyzx, r3.xyzx
rsq r1.z, r1.z
mul r2.xyz, r1.zzzz, r3.zxyz
mul r3.xyz, r0.yyyy, cb2[21].xywx
mad r3.xyz, r0.xxxx, cb2[20].xywx, r3.xyzx
mad r3.xyz, r0.zzzz, cb2[22].xywx, r3.xyzx
add r3.xyz, r3.xyzx, cb2[23].xywx
div r3.xy, r3.xyxx, r3.zzzz
mov r3.z, l(1.000000)
sample_l_indexable(texture2darray)(float,float,float,float) r4.xyz, r3.xyzx, t16.xyzw, s6, l(0.000000)
lt r0.z, l(0.00390625000), r4.z
and r0.z, r0.z, l(0x3f800000)
add r1.zw, -r0.xxxy, cb2[15].xxxy
dp2 r1.z, r1.zwzz, r1.zwzz
mov_sat r3.xy, r3.xyxx
add r3.zw, -r3.xxxy, l(0.000000, 0.000000, 1.000000, 1.000000)
max r3.xy, r3.zwzz, r3.xyxx
max r1.w, r3.y, r3.x
mad_sat r1.w, cb2[69].w, r1.w, cb2[69].z
mul r1.w, r1.w, r1.w
lt r1.z, r1.z, cb2[69].y
and r1.z, r1.z, l(0x3f800000)
max r1.z, r1.w, r1.z
mul r0.z, r0.z, r1.z
mad r1.zw, r4.xxxy, l(0.000000, 0.000000, 2.000000, 2.000000), l(0.000000, 0.000000, -1.010000, -1.010000)
mul r1.zw, r0.zzzz, r1.zzzw
mul r0.z, r4.z, r0.z
mul r1.zw, r1.zzzw, r0.zzzz
mul r3.xy, r1.zwzz, l(0.100000, 0.100000, 0.000000, 0.000000)
mad r3.zw, r0.wwww, r2.yyyz, r3.xxxy
mad r1.xy, r3.zwzz, cb0[9].xxxx, r1.xyxx
sample_indexable(texture2d)(float,float,float,float) r3.zw, r1.xyxx, t2.zwxy, s5
mad r3.zw, r3.zzzw, l(0.000000, 0.000000, 2.000000, 2.000000), l(0.000000, 0.000000, -1.000000, -1.000000)
mul r4.xy, r3.zwzz, cb0[3].zzzz
dp2 r0.w, r4.xyxx, r4.xyxx
add r0.w, -r0.w, l(1.000000)
max r0.w, r0.w, l(0.000000)
sqrt r4.z, r0.w
add r5.xyz, v1.xyzx, -cb1[3].xyzx
dp3 r6.x, cb1[0].xyzx, r5.xyzx
dp3 r6.y, cb1[1].xyzx, r5.xyzx
mul r3.zw, cb0[9].yyyz, l(0.000000, 0.000000, 0.500000, 0.500000)
mad r3.zw, r6.xxxy, l(0.000000, 0.000000, 1.000000, -1.000000), r3.zzzw
add r3.zw, -r0.xxxy, r3.zzzw
mad r0.xy, cb0[8].zzzz, r3.zwzz, r0.xyxx
mul r0.w, cb0[8].w, l(25.000000)
mad r0.xy, cb0[8].xyxx, l(-1.000000, 1.000000, 0.000000, 0.000000), r0.xyxx
div r0.xy, r0.xyxx, cb0[9].yzyy
mad r0.xy, cb0[9].wwww, r3.xyxx, r0.xyxx
sample_indexable(texture2d)(float,float,float,float) r0.xy, r0.xyxx, t1.xyzw, s4
add r3.x, -cb0[1].w, cb0[2].x
add r0.x, r0.x, -cb0[1].w
div r3.x, l(1.000000, 1.000000, 1.000000, 1.000000), r3.x
mul_sat r0.x, r0.x, r3.x
mad r3.x, r0.x, l(-2.000000), l(3.000000)
mad r0.z, cb0[2].y, r0.z, l(-0.500000)
add_sat r0.z, r0.z, r0.z
mad r3.y, r0.z, l(-2.000000), l(3.000000)
mul r0.xz, r0.xxzx, r0.xxzx
mul r0.z, r0.z, r3.y
mad r0.x, r3.x, r0.x, r0.z
min r0.x, r0.x, l(1.000000)
sample_indexable(texture2d)(float,float,float,float) r3.xyzw, r1.xyxx, t0.xyzw, s9
add r1.x, -cb0[2].z, cb0[2].w
add r1.y, r3.w, -cb0[2].z
div r1.x, l(1.000000, 1.000000, 1.000000, 1.000000), r1.x
mul_sat r1.x, r1.x, r1.y
mad r1.y, r1.x, l(-2.000000), l(3.000000)
mul r1.x, r1.x, r1.x
mul r1.x, r1.x, r1.y
mul r1.y, r0.x, r1.x
add r5.xyzw, r4.xyzz, l(-0.000000, -0.000000, -1.000000, -1.000000)
mad r5.xyzw, r1.yyyy, r5.xyzw, l(0.000000, 0.000000, 1.000000, 1.000000)
mul r6.xyz, v3.yyyy, cb2[13].xyzx
mad r6.xyz, v3.xxxx, cb2[12].xyzx, r6.xyzx
mad r6.xyz, v3.zzzz, cb2[14].xyzx, r6.xyzx
mov r2.w, l(1.000000)
mul r7.xyz, r2.wxww, r6.xyzx
mul r8.xyz, r2.yzxy, r7.zzzz
mov r2.y, l(-1.000000)
mad r8.xy, r7.xyxx, r2.xyxx, r8.xyxx
dp3 r2.x, r8.xyzx, r8.xyzx
rsq r2.x, r2.x
mul r2.yzw, r2.xxxx, r8.xxyz
mad r7.xyz, r8.xyzx, r2.xxxx, l(-0.000000, -0.000000, -1.000000, 0.000000)
mad r7.xyz, v2.zzzz, r7.xyzx, l(0.000000, 0.000000, 1.000000, 0.000000)
mad r8.zw, r1.zzzw, r7.zzzz, r7.xxxy
mov r8.xy, r7.zzzz
dp3 r2.x, r8.yzwy, r8.yzwy
rsq r2.x, r2.x
mul r7.xyzw, r2.xxxx, r8.xyzw
mul r8.xyzw, r5.xyzw, r7.xyzw
add r5.xy, r8.zwzz, r8.xyxx
mul r5.z, r5.w, r7.y
dp3 r2.x, r5.xyzx, r5.xyzx
rsq r2.x, r2.x
mul r7.xyz, r2.xxxx, r5.xyzx
mad r4.xyz, -r5.xyzx, r2.xxxx, r4.xyzx
mad r4.xyz, r1.yyyy, r4.xyzx, r7.xyzx
mov r4.w, -r4.y
dp3 r5.x, cb2[12].xzyx, r4.xzwx
dp3 r5.y, cb2[13].xzyx, r4.xzwx
dp3 r5.z, cb2[14].xzyx, r4.xzwx
add r7.xyzw, r5.xyzz, -v3.xyzw
add r7.xyzw, r7.xyzw, v1.xyzw
add r2.x, r4.y, r4.x
mul r3.w, r2.x, cb0[3].w
mad r2.x, -r2.x, cb0[3].w, cb0[4].y
mad r2.x, r1.y, r2.x, r3.w
mul r4.xyz, r7.yyyy, cb2[9].xywx
mad r4.xyz, r7.xxxx, cb2[8].xywx, r4.xyzx
mad r4.xyz, r7.zzzz, cb2[10].xywx, r4.xyzx


mad r4.xyz, r7.wwww, cb2[11].xywx, r4.xyzx
div r4.xy, r4.xyxx, r4.zzzz
add r4.z, -r4.x, l(1.000000)

// Swap reflection eyes from stereo2mono reflection copy.
// Mip-maps disabled as the reverse stereo blit only copies them in one eye
mov r15.xyzw, r4.xyzw
mul r15.z, r15.z, l(0.5)
eq r37.w, r37.z, l(-1.0)
if_nz r37.w
  add r15.z, r15.z, l(0.5)
endif

sample_l_indexable(texture2d)(float,float,float,float) r35.xyz, r4.zyzz, t39.xyzw, s4, r2.x
sample_l_indexable(texture2d)(float,float,float,float) r4.xyz, r15.zyzz, t100.xyzw, s4, r2.x



mul r4.xyz, r4.xyzx, cb2[51].xxxx


dp3 r2.x, -v1.xyzx, -v1.xyzx
rsq r2.x, r2.x
mul r7.xyz, r2.xxxx, -v1.xyzx
dp3 r2.x, r5.xyzx, r5.xyzx
rsq r2.x, r2.x
mul r5.xyz, r2.xxxx, r5.xyzx
dp3_sat r2.x, r7.xyzx, r5.xyzx
mad r3.w, r0.x, r1.x, r0.x
min r3.w, r3.w, l(1.000000)
add r4.w, -cb0[4].x, cb0[7].w
mad_sat r3.w, r3.w, r4.w, cb0[4].x
add r2.x, -r2.x, l(1.000000)
mul r4.w, r2.x, r2.x
mul r4.w, r4.w, r4.w
mul r2.x, r2.x, r4.w
add r4.w, -r3.w, l(1.000000)
mad r2.x, r2.x, r4.w, r3.w

mul r4.xyz, r2.xxxx, r4.xyzx
mul r5.xyz, v1.yyyy, cb2[9].xywx
mad r5.xyz, v1.xxxx, cb2[8].xywx, r5.xyzx
mad r5.xyz, v1.zzzz, cb2[10].xywx, r5.xyzx

//fix 
add r37.w, r5.z, -r37.y
mul r37.w, r37.x, r37.w
div r37.w, r37.w, l(2.0)
add r5.x, r5.x, r37.w

mad r5.xyz, v1.wwww, cb2[11].xywx, r5.xyzx
div r5.xy, r5.xyxx, r5.zzzz


sample_l_indexable(texture2d)(float,float,float,float) r2.x, r5.xyxx, t42.xyzw, s0, l(0.000000)




mad r2.x, cb2[25].z, r2.x, -cb2[25].y
div r2.x, -cb2[25].x, r2.x
div r3.w, v1.z, v1.w
add r2.x, -r2.x, r3.w
mul_sat r2.x, r2.x, l(5.000000)
mad r0.x, r0.x, r1.x, r2.x
min r0.x, r0.x, l(1.000000)
mad r2.yz, r1.zzwz, r2.wwww, r2.yyzy
dp3 r1.x, r2.yzwy, r2.yzwy
rsq r1.x, r1.x
mul r1.xzw, r1.xxxx, r2.yyzw
mad r1.xzw, r1.xxzw, l(20.000000, 0.000000, 20.000000, 1.000000), l(-0.000000, 0.000000, -0.000000, -1.000000)
mad r1.xzw, r2.xxxx, r1.xxzw, l(0.000000, 0.000000, 0.000000, 1.000000)
dp3 r7.x, cb2[12].xyzx, r1.xzwx
dp3 r7.y, cb2[13].xyzx, r1.xzwx
add r1.x, cb0[0].x, l(-1.000000)
mad r1.x, v4.x, r1.x, l(1.000000)
mul r1.xz, r1.xxxx, -r7.xxyx
mad r1.xz, -r1.xxzx, cb2[31].xxyx, r5.xxyx
sample_l_indexable(texture2d)(float,float,float,float) r2.yzw, r1.xzxx, t40.wxyz, s0, l(0.000000)
lt r2.yzw, l(0.000000, 0.000000, 0.000000, 0.000000), r2.yyzw
or r1.w, r2.z, r2.y
or r1.w, r2.w, r1.w
movc r1.xz, r1.wwww, r1.xxzx, r5.xxyx
sample_l_indexable(texture2d)(float,float,float,float) r1.w, r1.xzxx, t42.yzwx, s0, l(0.000000)
mad r1.w, cb2[24].z, r1.w, -cb2[24].y
div r1.w, l(1.000000, 1.000000, 1.000000, 1.000000), r1.w
add r1.w, r1.w, v1.z
add r1.w, r1.w, -cb0[3].x
add r2.y, -cb0[3].x, cb0[4].z
div_sat r1.w, r1.w, r2.y
add r1.w, -r1.w, l(1.000000)
log r1.w, r1.w
mul r1.w, r1.w, cb0[3].y
exp r1.w, r1.w
add r2.yz, -cb0[5].yywy, cb0[5].xxzx
mad r2.y, r1.w, r2.y, cb0[5].y
mad r0.z, r0.z, r2.x, r2.y
sample_l_indexable(texture2d)(float,float,float,float) r7.xyz, r1.xzxx, t40.xyzw, s4, r0.z
mul r7.xyz, r7.xyzx, cb2[51].xxxx
mul r8.xyz, r7.xyzx, cb0[4].wwww
min r0.z, r1.w, l(1.000000)
add r1.xzw, cb0[6].xxyz, -cb0[7].xxyz
mad r1.xzw, r0.zzzz, r1.xxzw, cb0[7].xxyz
ftoi r2.y, cb1[11].z
ige r2.y, r2.y, l(0)
if_nz r2.y
  round_z r9.w, cb1[11].z
  add r10.w, r9.w, l(-341.000000)
  mul r10.xyz, r6.xyzx, l(-1.000000, 1.000000, 1.000000, 0.000000)
  sample_l_indexable(texturecubearray)(float,float,float,float) r6.xyz, r10.xyzw, t38.xyzw, s4, l(0.000000)
  mov r9.xyz, r10.xyzx
  sample_l_indexable(texturecubearray)(float,float,float,float) r9.xyz, r9.xyzw, t36.xyzw, s4, l(0.000000)
  ge r2.y, r9.w, l(341.000000)
  and r2.y, r2.y, l(0x3f800000)
  add r6.xyz, r6.xyzx, -r9.xyzx
  mad r6.xyz, r2.yyyy, r6.xyzx, r9.xyzx
else
  mov r6.xyz, l(0,0,0,0)
endif
mul r6.xyz, r6.xyzx, cb2[51].xxxx
mad r2.y, r0.z, r2.z, cb0[5].w
mad r1.xzw, r1.xxzw, r6.xxyz, -r8.xxyz
mad r1.xzw, r2.yyyy, r1.xxzw, r8.xxyz
mad r2.yzw, r7.xxyz, cb0[4].wwww, -r1.xxzw
mad r1.xzw, r0.zzzz, r2.yyzw, r1.xxzw
mul r2.yzw, r3.xxyz, cb0[1].xxyz
mad r2.yzw, r2.yyzw, l(0.000000, 2.000000, 2.000000, 2.000000), -r1.xxzw
mad r1.xyz, r1.yyyy, r2.yzwy, r1.xzwx

//mad r1.xyz, r0.xxxx, r4.xyzx, r1.xyzx
mad r1.xyz, r0.xxxx, r35.xyzx, r1.xyzx


div r2.yzw, v1.xxyz, -v1.zzzz
mul r0.x, -r2.z, cb2[13].z
mad r0.x, -r2.y, cb2[12].z, r0.x
mad r0.x, -r2.w, cb2[14].z, r0.x
mul r0.x, r0.x, -v1.z
add r0.z, cb2[15].z, cb2[53].x
mul r2.yz, r0.xxxx, -cb2[53].wwzw
mul r0.xz, r0.zzzz, -cb2[53].wwzw
ge r3.xy, r2.yzyy, l(0.000000, 0.000000, 0.000000, 0.000000)
movc r3.xy, r3.xyxx, l(1.000000,1.000000,0,0), l(-1.000000,-1.000000,0,0)
add r2.yz, |r2.yyzy|, l(0.000000, 0.000010, 0.000010, 0.000000)
mul r2.yz, r2.yyzy, r3.xxyx
mul r1.w, -v1.z, cb2[55].z
exp r0.xz, r0.xxzx
exp r3.xy, r2.yzyy
add r3.xy, r3.xyxx, l(-1.000000, -1.000000, 0.000000, 0.000000)
mul r0.xz, r0.xxzx, r3.xxyx
div r0.xz, r0.xxzx, r2.yyzy
mul r0.z, r0.z, l(1.100000)
mul r2.yzw, r0.zzzz, cb2[56].xxyz
mad r2.yzw, cb2[57].xxyz, r0.xxxx, r2.yyzw
mul r0.x, r1.w, l(2.081369)
mul r2.yzw, r0.xxxx, r2.yyzw
exp r2.yzw, -r2.yyzw
mul r1.xyz, r1.xyzx, r2.yzwy
mul r1.xyz, r1.xyzx, cb1[13].yyyy
mul r1.xyz, r1.xyzx, cb2[51].yyyy
min o0.xyz, r1.xyzx, l(7936.000000, 7936.000000, 7936.000000, 0.000000)
add r0.x, r0.y, l(-1.000000)
mad r0.x, r0.w, r0.x, l(1.000000)
mul r0.y, r2.x, l(20.000000)
min r0.y, r0.y, l(1.000000)
mul r0.zw, r5.xxxy, cb2[31].zzzw
ftou r0.zw, r0.zzzw
and r1.xy, r0.zwzz, l(3, 3, 0, 0)
xor r0.z, r1.y, r1.x
bfi r1.xy, l(1, 1, 0, 0), l(3, 2, 0, 0), r0.zwzz, l(0, 0, 0, 0)
iadd r1.x, r1.x, r1.y
and r0.z, r0.z, l(2)
iadd r0.z, r1.x, r0.z
ubfe r0.w, l(1), l(1), r0.w
iadd r0.z, r0.z, r0.w
iadd r0.z, r0.z, l(1)
utof r0.z, r0.z
mul r0.z, r0.z, l(0.062500)
mad r0.x, r0.x, r0.y, -r0.z
lt r0.x, r0.x, l(0.000000)
discard_nz r0.x
mov o0.w, l(1.000000)
ret
// Approximately 342 instruction slots used

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