//Cutscene disco effect like shadows.
// ---- Created with 3Dmigoto v1.3.16 on Sat May 11 00:12:09 2019
Texture2D<float4> t5 : register(t5);

Texture2D<float4> t4 : register(t4);

TextureCube<float4> t3 : register(t3);

Texture2D<float4> t2 : register(t2);

Texture2D<float4> t1 : register(t1);

Texture2D<float4> t0 : register(t0);

SamplerState s5_s : register(s5);

SamplerState s4_s : register(s4);

SamplerState s3_s : register(s3);

SamplerState s1_s : register(s1);

SamplerState s0_s : register(s0);

cbuffer cb0 : register(b0)
{
  float4 cb0[19];
}

cbuffer cb13 : register(b13)
{
  float4 cb13[1];
}

cbuffer cb12 : register(b12)
{
  float4 cb12[1];
}


// 3Dmigoto declarations
#define cmp -
Texture1D<float4> IniParams : register(t120);
Texture2D<float4> StereoParams : register(t125);


void main(
  float4 v0 : TEXCOORD0,
  float3 v1 : TEXCOORD1,
  out float4 o0 : SV_Target0)
{
  float4 r0,r1,r2,r3,r4,r5,r6,r7;
  uint4 bitmask, uiDest;
  float4 fDest;

  float4 stereo = StereoParams.Load(0);
  float4 iniparams = IniParams.Load(0);

  r0.xy = int2(1,2) & asint(cb13[0].xx);
  if (r0.x != 0) {
    r0.x = t5.Sample(s5_s, v0.xy).w;
    r0.z = -0.00392156886 + r0.x;
    r0.z = cmp(r0.z < 0);
    if (r0.z != 0) discard;
  } else {
    r0.x = 1;
  }
  r0.z = t0.Sample(s0_s, v0.xy).x;
  r0.z = cb0[0].x + r0.z;
  r0.z = -cb0[0].y / r0.z;
  r1.xyz = v1.xyz * -r0.zzz;
  
  r1.x+=stereo.x*(r0.z+stereo.y)/cb12[0].x;
  
  r0.y = cmp((int)r0.y != 0);
  r1.w = 1;
  
  
  
  r0.z = dot(cb0[16].xyzw, r1.xyzw);
  r0.w = dot(cb0[17].xyzw, r1.xyzw);
  r2.x = dot(cb0[18].xyzw, r1.xyzw);
  r2.y = cmp(r0.z < -1);
  r0.z = cmp(1 < r0.z);
  r0.z = (int)r0.z | (int)r2.y;
  r2.y = cmp(r0.w < -1);
  r0.z = (int)r0.z | (int)r2.y;
  r0.w = cmp(1 < r0.w);
  r0.z = (int)r0.w | (int)r0.z;
  r0.w = cmp(r2.x < -1);
  r0.z = (int)r0.w | (int)r0.z;
  r0.w = cmp(1 < r2.x);
  r0.z = (int)r0.w | (int)r0.z;
  r0.y = r0.z ? r0.y : 0;
  if (r0.y != 0) discard;
  r0.yz = t1.Sample(s1_s, v0.xy).xy;
  r0.yz = float2(4,4) * r0.yz;
  r0.w = dot(r0.yz, r0.yz);
  r2.zw = -r0.ww * float2(0.25,0.5) + float2(1,1);
  r0.w = max(0, r2.z);
  r0.w = sqrt(r0.w);
  r2.xy = r0.yz * r0.ww;
  r3.x = dot(cb0[1].xyzw, r1.xyzw);
  r3.y = dot(cb0[2].xyzw, r1.xyzw);
  r3.z = dot(cb0[3].xyzw, r1.xyzw);
  r1.x = dot(cb0[1].xyz, r2.xyw);
  r1.y = dot(cb0[2].xyz, r2.xyw);
  r1.z = dot(cb0[3].xyz, r2.xyw);
  r0.y = dot(r3.xyz, r3.xyz);
  r0.z = dot(cb0[9].xyz, r3.xyz);
  r0.w = dot(cb0[9].xyz, cb0[9].xyz);
  r1.w = -r0.z * 2 + r0.y;
  r1.w = r1.w + r0.w;
  r2.x = r0.w * r0.y;
  r2.x = r1.w * cb0[4].w + -r2.x;
  r2.x = r0.z * r0.z + r2.x;
  r2.x = sqrt(r2.x);
  r0.z = r2.x + -r0.z;
  r0.z = r0.z + r0.w;
  r2.xyz = -cb0[9].xyz + r3.xyz;
  r2.xyz = r0.zzz * r2.xyz + cb0[9].xyz;
  r2.xyz = r2.xyz / r1.www;
  r0.z = dot(r2.xyz, r2.xyz);
  r0.z = rsqrt(r0.z);
  r4.xyz = r2.xyz * r0.zzz;
  r0.z = dot(r4.xz, r4.xz);
  r0.z = rsqrt(r0.z);
  r0.zw = r4.xz * r0.zz;
  r1.w = 1 + -abs(r4.y);
  r0.zw = r1.ww * r0.zw;
  r0.zw = r0.zw * float2(0.5,0.5) + float2(0.5,0.5);
  t2.GetDimensions(0, fDest.x, fDest.y, fDest.z);
  r4.xz = fDest.xy;
  r5.xy = r4.xz * r0.zw;
  r5.xy = (int2)r5.xy;
  r5.zw = float2(0,0);
  r5.xyzw = t2.Load(r5.xyz).xyzw;
  r1.w = 1 + -r5.y;
  r2.w = cmp(r4.y >= 0);
  r2.w = r2.w ? 1.000000 : 0;
  r3.w = r5.y + -r1.w;
  r5.y = r2.w * r3.w + r1.w;
  r0.zw = cb0[8].xy * r0.zw;
  r0.zw = frac(r0.zw);
  r1.w = -0.200000048 * r5.w;
  r0.zw = float2(-0.5,-0.5) + r0.zw;
  r0.z = dot(r0.zw, r0.zw);
  r0.z = sqrt(r0.z);
  r0.z = -r5.w * 1.10000002 + r0.z;
  r0.w = 1 / r1.w;
  r0.z = saturate(r0.z * r0.w);
  r0.w = r0.z * -2 + 3;
  r0.z = r0.z * r0.z;
  r0.z = r0.w * r0.z;
  r5.xyz = r5.xyz * float3(2,2,2) + float3(-1,-1,-1);
  r2.xyz = r2.xyz + -r3.xyz;
  r0.w = dot(r2.xyz, r2.xyz);
  r0.w = rsqrt(r0.w);
  r2.xyz = r2.xyz * r0.www;
  r0.w = dot(r2.xyz, r5.xyz);
  r1.w = r0.w + r0.w;
  r5.xyz = -r5.xyz * r1.www + r2.xyz;
  r6.x = dot(cb0[5].xyz, r5.xyz);
  r6.y = dot(cb0[6].xyz, r5.xyz);
  r6.z = dot(cb0[7].xyz, r5.xyz);
  r5.xyz = float3(-1,1,1) * r6.xyz;
  r5.xyz = t3.SampleLevel(s3_s, r5.xyz, 0).xyz;
  r0.w = min(1, abs(r0.w));
  r5.xyz = r5.xyz * r0.www;
  r0.w = saturate(dot(r2.xyz, r1.xyz));
  r2.xyz = r5.xyz * r0.www;
  r2.xyz = r2.xyz * r0.zzz;
  r0.z = dot(cb0[10].xyz, r3.xyz);
  r0.w = dot(cb0[10].xyz, cb0[10].xyz);
  r1.w = -r0.z * 2 + r0.y;
  r1.w = r1.w + r0.w;
  r2.w = r0.w * r0.y;
  r2.w = r1.w * cb0[4].w + -r2.w;
  r2.w = r0.z * r0.z + r2.w;
  r2.w = sqrt(r2.w);
  r0.z = r2.w + -r0.z;
  r0.z = r0.z + r0.w;
  r5.xyz = -cb0[10].xyz + r3.xyz;
  r5.xyz = r0.zzz * r5.xyz + cb0[10].xyz;
  r5.xyz = r5.xyz / r1.www;
  r0.z = dot(r5.xyz, r5.xyz);
  r0.z = rsqrt(r0.z);
  r6.xyz = r5.xyz * r0.zzz;
  r0.z = dot(r6.xz, r6.xz);
  r0.z = rsqrt(r0.z);
  r0.zw = r6.xz * r0.zz;
  r1.w = 1 + -abs(r6.y);
  r0.zw = r1.ww * r0.zw;
  r0.zw = r0.zw * float2(0.5,0.5) + float2(0.5,0.5);
  r4.yw = r0.zw * r4.xz;
  r7.xy = (int2)r4.yw;
  r7.zw = float2(0,0);
  r7.xyzw = t2.Load(r7.xyz).xyzw;
  r1.w = 1 + -r7.y;
  r2.w = cmp(r6.y >= 0);
  r2.w = r2.w ? 1.000000 : 0;
  r3.w = r7.y + -r1.w;
  r7.y = r2.w * r3.w + r1.w;
  r0.zw = cb0[8].xy * r0.zw;
  r0.zw = frac(r0.zw);
  r1.w = -0.200000048 * r7.w;
  r0.zw = float2(-0.5,-0.5) + r0.zw;
  r0.z = dot(r0.zw, r0.zw);
  r0.z = sqrt(r0.z);
  r0.z = -r7.w * 1.10000002 + r0.z;
  r0.w = 1 / r1.w;
  r0.z = saturate(r0.z * r0.w);
  r0.w = r0.z * -2 + 3;
  r0.z = r0.z * r0.z;
  r0.z = r0.w * r0.z;
  r6.xyz = r7.xyz * float3(2,2,2) + float3(-1,-1,-1);
  r5.xyz = r5.xyz + -r3.xyz;
  r0.w = dot(r5.xyz, r5.xyz);
  r0.w = rsqrt(r0.w);
  r5.xyz = r5.xyz * r0.www;
  r0.w = dot(r5.xyz, r6.xyz);
  r1.w = r0.w + r0.w;
  r6.xyz = -r6.xyz * r1.www + r5.xyz;
  r7.x = dot(cb0[5].xyz, r6.xyz);
  r7.y = dot(cb0[6].xyz, r6.xyz);
  r7.z = dot(cb0[7].xyz, r6.xyz);
  r6.xyz = float3(-1,1,1) * r7.xyz;
  r6.xyz = t3.SampleLevel(s3_s, r6.xyz, 0).xyz;
  r0.w = min(1, abs(r0.w));
  r6.xyz = r6.xyz * r0.www;
  r0.w = saturate(dot(r5.xyz, r1.xyz));
  r5.xyz = r6.xyz * r0.www;
  r5.xyz = r5.xyz * r0.zzz;
  r5.xyz = cb0[10].www * r5.xyz;
  r0.z = dot(cb0[11].xyz, r3.xyz);
  r0.w = dot(cb0[11].xyz, cb0[11].xyz);
  r1.w = -r0.z * 2 + r0.y;
  r1.w = r1.w + r0.w;
  r2.w = r0.w * r0.y;
  r2.w = r1.w * cb0[4].w + -r2.w;
  r2.w = r0.z * r0.z + r2.w;
  r2.w = sqrt(r2.w);
  r0.z = r2.w + -r0.z;
  r0.z = r0.z + r0.w;
  r6.xyz = -cb0[11].xyz + r3.xyz;
  r6.xyz = r0.zzz * r6.xyz + cb0[11].xyz;
  r6.xyz = r6.xyz / r1.www;
  r0.z = dot(r6.xyz, r6.xyz);
  r0.z = rsqrt(r0.z);
  r7.xyz = r6.xyz * r0.zzz;
  r0.z = dot(r7.xz, r7.xz);
  r0.z = rsqrt(r0.z);
  r0.zw = r7.xz * r0.zz;
  r1.w = 1 + -abs(r7.y);
  r0.zw = r1.ww * r0.zw;
  r0.zw = r0.zw * float2(0.5,0.5) + float2(0.5,0.5);
  r4.xy = r0.zw * r4.xz;
  r4.xy = (int2)r4.xy;
  r4.zw = float2(0,0);
  r4.xyzw = t2.Load(r4.xyz).xyzw;
  r1.w = 1 + -r4.y;
  r2.w = cmp(r7.y >= 0);
  r2.w = r2.w ? 1.000000 : 0;
  r3.w = r4.y + -r1.w;
  r4.y = r2.w * r3.w + r1.w;
  r0.zw = cb0[8].xy * r0.zw;
  r0.zw = frac(r0.zw);
  r1.w = -0.200000048 * r4.w;
  r0.zw = float2(-0.5,-0.5) + r0.zw;
  r0.z = dot(r0.zw, r0.zw);
  r0.z = sqrt(r0.z);
  r0.z = -r4.w * 1.10000002 + r0.z;
  r0.w = 1 / r1.w;
  r0.z = saturate(r0.z * r0.w);
  r0.w = r0.z * -2 + 3;
  r0.z = r0.z * r0.z;
  r0.z = r0.w * r0.z;
  r4.xyz = r4.xyz * float3(2,2,2) + float3(-1,-1,-1);
  r6.xyz = r6.xyz + -r3.xyz;
  r0.w = dot(r6.xyz, r6.xyz);
  r0.w = rsqrt(r0.w);
  r6.xyz = r6.xyz * r0.www;
  r0.w = dot(r6.xyz, r4.xyz);
  r1.w = r0.w + r0.w;
  r4.xyz = -r4.xyz * r1.www + r6.xyz;
  r7.x = dot(cb0[5].xyz, r4.xyz);
  r7.y = dot(cb0[6].xyz, r4.xyz);
  r7.z = dot(cb0[7].xyz, r4.xyz);
  r4.xyz = float3(-1,1,1) * r7.xyz;
  r4.xyz = t3.SampleLevel(s3_s, r4.xyz, 0).xyz;
  r0.w = min(1, abs(r0.w));
  r4.xyz = r4.xyz * r0.www;
  r0.w = saturate(dot(r6.xyz, r1.xyz));
  r4.xyz = r4.xyz * r0.www;
  r4.xyz = r4.xyz * r0.zzz;
  r2.xyz = r2.xyz * cb0[9].www + r5.xyz;
  r2.xyz = r4.xyz * cb0[11].www + r2.xyz;
  r4.x = dot(cb0[5].xyz, r3.xyz);
  r4.y = dot(cb0[6].xyz, r3.xyz);
  r4.z = dot(cb0[7].xyz, r3.xyz);
  r4.xyz = float3(-1,1,1) * r4.xyz;
  r4.xyz = t3.SampleLevel(s3_s, r4.xyz, cb0[12].x).xyz;
  r0.z = dot(r3.xyz, r1.xyz);
  r0.z = cb0[12].y * r0.z;
  r0.z = max(0, r0.z);
  r0.w = sqrt(r0.y);
  r0.z = r0.z / r0.w;
  r1.xyz = r4.xyz * r0.zzz + r2.xyz;
  r0.z = cb0[13].y * r0.y + cb0[13].x;
  r0.z = 1 / r0.z;
  r1.xyz = r1.xyz * r0.zzz;
  r0.y = cmp(r0.y >= cb0[4].w);
  r0.y = r0.y ? 1.000000 : 0;
  r0.yzw = r0.yyy * r1.xyz;
  r1.x = t4.Sample(s4_s, v0.xy).z;
  r1.x = f32tof16(r1.x);
  r1.x = (uint)r1.x >> 7;
  r1.x = (int)r1.x ^ 383;
  r1.x = (int)r1.x & 2;
  r1.yzw = cb0[14].yyy * r0.yzw;
  r0.yzw = cb0[14].xxx * r0.yzw;
  r0.yzw = r1.xxx ? r1.yzw : r0.yzw;
  r1.xyz = cb0[15].xxx + r0.yzw;
  r1.xyz = max(float3(0,0,0), r1.xyz);
  o0.xyz = r1.xyz * r0.xxx;
  r0.x = dot(r0.yzw, float3(1,1,1));
  r0.x = -0.00392156886 + r0.x;
  r0.x = cmp(r0.x < 0);
  if (r0.x != 0) discard;
  o0.w = 0;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v1.3.16 on Sat May 11 00:12:09 2019
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// TEXCOORD                 0   xy          0     NONE   float   xy
// TEXCOORD                 1   xyz         1     NONE   float   xyz
//
//
// 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 cb13[1], immediateIndexed
dcl_constantbuffer cb0[19], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s1, mode_default
dcl_sampler s3, mode_default
dcl_sampler s4, mode_default
dcl_sampler s5, 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_texturecube (float,float,float,float) t3
dcl_resource_texture2d (float,float,float,float) t4
dcl_resource_texture2d (float,float,float,float) t5
dcl_input_ps linear v0.xy
dcl_input_ps linear v1.xyz
dcl_output o0.xyzw
dcl_temps 8
and r0.xy, l(1, 2, 0, 0), cb13[0].xxxx
if_nz r0.x
  sample_indexable(texture2d)(float,float,float,float) r0.x, v0.xyxx, t5.wxyz, s5
  add r0.z, r0.x, l(-0.00392156886)
  lt r0.z, r0.z, l(0.000000)
  discard_nz r0.z
else
  mov r0.x, l(1.000000)
endif
sample_indexable(texture2d)(float,float,float,float) r0.z, v0.xyxx, t0.yzxw, s0
add r0.z, r0.z, cb0[0].x
div r0.z, -cb0[0].y, r0.z
mul r1.xyz, -r0.zzzz, v1.xyzx
ine r0.y, r0.y, l(0)
mov r1.w, l(1.000000)
dp4 r0.z, cb0[16].xyzw, r1.xyzw
dp4 r0.w, cb0[17].xyzw, r1.xyzw
dp4 r2.x, cb0[18].xyzw, r1.xyzw
lt r2.y, r0.z, l(-1.000000)
lt r0.z, l(1.000000), r0.z
or r0.z, r0.z, r2.y
lt r2.y, r0.w, l(-1.000000)
or r0.z, r0.z, r2.y
lt r0.w, l(1.000000), r0.w
or r0.z, r0.w, r0.z
lt r0.w, r2.x, l(-1.000000)
or r0.z, r0.w, r0.z
lt r0.w, l(1.000000), r2.x
or r0.z, r0.w, r0.z
and r0.y, r0.z, r0.y
discard_nz r0.y
sample_indexable(texture2d)(float,float,float,float) r0.yz, v0.xyxx, t1.zxyw, s1
mul r0.yz, r0.yyzy, l(0.000000, 4.000000, 4.000000, 0.000000)
dp2 r0.w, r0.yzyy, r0.yzyy
mad r2.zw, -r0.wwww, l(0.000000, 0.000000, 0.250000, 0.500000), l(0.000000, 0.000000, 1.000000, 1.000000)
max r0.w, r2.z, l(0.000000)
sqrt r0.w, r0.w
mul r2.xy, r0.wwww, r0.yzyy
dp4 r3.x, cb0[1].xyzw, r1.xyzw
dp4 r3.y, cb0[2].xyzw, r1.xyzw
dp4 r3.z, cb0[3].xyzw, r1.xyzw
dp3 r1.x, cb0[1].xyzx, r2.xywx
dp3 r1.y, cb0[2].xyzx, r2.xywx
dp3 r1.z, cb0[3].xyzx, r2.xywx
dp3 r0.y, r3.xyzx, r3.xyzx
dp3 r0.z, cb0[9].xyzx, r3.xyzx
dp3 r0.w, cb0[9].xyzx, cb0[9].xyzx
mad r1.w, -r0.z, l(2.000000), r0.y
add r1.w, r0.w, r1.w
mul r2.x, r0.y, r0.w
mad r2.x, r1.w, cb0[4].w, -r2.x
mad r2.x, r0.z, r0.z, r2.x
sqrt r2.x, r2.x
add r0.z, -r0.z, r2.x
add r0.z, r0.w, r0.z
add r2.xyz, r3.xyzx, -cb0[9].xyzx
mad r2.xyz, r0.zzzz, r2.xyzx, cb0[9].xyzx
div r2.xyz, r2.xyzx, r1.wwww
dp3 r0.z, r2.xyzx, r2.xyzx
rsq r0.z, r0.z
mul r4.xyz, r0.zzzz, r2.xyzx
dp2 r0.z, r4.xzxx, r4.xzxx
rsq r0.z, r0.z
mul r0.zw, r0.zzzz, r4.xxxz
add r1.w, -|r4.y|, l(1.000000)
mul r0.zw, r0.zzzw, r1.wwww
mad r0.zw, r0.zzzw, l(0.000000, 0.000000, 0.500000, 0.500000), l(0.000000, 0.000000, 0.500000, 0.500000)
resinfo_indexable(texture2d)(float,float,float,float) r4.xz, l(0), t2.xzyw
mul r5.xy, r0.zwzz, r4.xzxx
ftoi r5.xy, r5.xyxx
mov r5.zw, l(0,0,0,0)
ld_indexable(texture2d)(float,float,float,float) r5.xyzw, r5.xyzw, t2.xyzw
add r1.w, -r5.y, l(1.000000)
ge r2.w, r4.y, l(0.000000)
and r2.w, r2.w, l(0x3f800000)
add r3.w, -r1.w, r5.y
mad r5.y, r2.w, r3.w, r1.w
mul r0.zw, r0.zzzw, cb0[8].xxxy
frc r0.zw, r0.zzzw
mul r1.w, r5.w, l(-0.200000048)
add r0.zw, r0.zzzw, l(0.000000, 0.000000, -0.500000, -0.500000)
dp2 r0.z, r0.zwzz, r0.zwzz
sqrt r0.z, r0.z
mad r0.z, -r5.w, l(1.100000), r0.z
div r0.w, l(1.000000, 1.000000, 1.000000, 1.000000), r1.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 r0.z, r0.z, r0.w
mad r5.xyz, r5.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(-1.000000, -1.000000, -1.000000, 0.000000)
add r2.xyz, -r3.xyzx, r2.xyzx
dp3 r0.w, r2.xyzx, r2.xyzx
rsq r0.w, r0.w
mul r2.xyz, r0.wwww, r2.xyzx
dp3 r0.w, r2.xyzx, r5.xyzx
add r1.w, r0.w, r0.w
mad r5.xyz, -r5.xyzx, r1.wwww, r2.xyzx
dp3 r6.x, cb0[5].xyzx, r5.xyzx
dp3 r6.y, cb0[6].xyzx, r5.xyzx
dp3 r6.z, cb0[7].xyzx, r5.xyzx
mul r5.xyz, r6.xyzx, l(-1.000000, 1.000000, 1.000000, 0.000000)
sample_l_indexable(texturecube)(float,float,float,float) r5.xyz, r5.xyzx, t3.xyzw, s3, l(0.000000)
min r0.w, |r0.w|, l(1.000000)
mul r5.xyz, r0.wwww, r5.xyzx
dp3_sat r0.w, r2.xyzx, r1.xyzx
mul r2.xyz, r0.wwww, r5.xyzx
mul r2.xyz, r0.zzzz, r2.xyzx
dp3 r0.z, cb0[10].xyzx, r3.xyzx
dp3 r0.w, cb0[10].xyzx, cb0[10].xyzx
mad r1.w, -r0.z, l(2.000000), r0.y
add r1.w, r0.w, r1.w
mul r2.w, r0.y, r0.w
mad r2.w, r1.w, cb0[4].w, -r2.w
mad r2.w, r0.z, r0.z, r2.w
sqrt r2.w, r2.w
add r0.z, -r0.z, r2.w
add r0.z, r0.w, r0.z
add r5.xyz, r3.xyzx, -cb0[10].xyzx
mad r5.xyz, r0.zzzz, r5.xyzx, cb0[10].xyzx
div r5.xyz, r5.xyzx, r1.wwww
dp3 r0.z, r5.xyzx, r5.xyzx
rsq r0.z, r0.z
mul r6.xyz, r0.zzzz, r5.xyzx
dp2 r0.z, r6.xzxx, r6.xzxx
rsq r0.z, r0.z
mul r0.zw, r0.zzzz, r6.xxxz
add r1.w, -|r6.y|, l(1.000000)
mul r0.zw, r0.zzzw, r1.wwww
mad r0.zw, r0.zzzw, l(0.000000, 0.000000, 0.500000, 0.500000), l(0.000000, 0.000000, 0.500000, 0.500000)
mul r4.yw, r4.xxxz, r0.zzzw
ftoi r7.xy, r4.ywyy
mov r7.zw, l(0,0,0,0)
ld_indexable(texture2d)(float,float,float,float) r7.xyzw, r7.xyzw, t2.xyzw
add r1.w, -r7.y, l(1.000000)
ge r2.w, r6.y, l(0.000000)
and r2.w, r2.w, l(0x3f800000)
add r3.w, -r1.w, r7.y
mad r7.y, r2.w, r3.w, r1.w
mul r0.zw, r0.zzzw, cb0[8].xxxy
frc r0.zw, r0.zzzw
mul r1.w, r7.w, l(-0.200000048)
add r0.zw, r0.zzzw, l(0.000000, 0.000000, -0.500000, -0.500000)
dp2 r0.z, r0.zwzz, r0.zwzz
sqrt r0.z, r0.z
mad r0.z, -r7.w, l(1.100000), r0.z
div r0.w, l(1.000000, 1.000000, 1.000000, 1.000000), r1.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 r0.z, r0.z, r0.w
mad r6.xyz, r7.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(-1.000000, -1.000000, -1.000000, 0.000000)
add r5.xyz, -r3.xyzx, r5.xyzx
dp3 r0.w, r5.xyzx, r5.xyzx
rsq r0.w, r0.w
mul r5.xyz, r0.wwww, r5.xyzx
dp3 r0.w, r5.xyzx, r6.xyzx
add r1.w, r0.w, r0.w
mad r6.xyz, -r6.xyzx, r1.wwww, r5.xyzx
dp3 r7.x, cb0[5].xyzx, r6.xyzx
dp3 r7.y, cb0[6].xyzx, r6.xyzx
dp3 r7.z, cb0[7].xyzx, r6.xyzx
mul r6.xyz, r7.xyzx, l(-1.000000, 1.000000, 1.000000, 0.000000)
sample_l_indexable(texturecube)(float,float,float,float) r6.xyz, r6.xyzx, t3.xyzw, s3, l(0.000000)
min r0.w, |r0.w|, l(1.000000)
mul r6.xyz, r0.wwww, r6.xyzx
dp3_sat r0.w, r5.xyzx, r1.xyzx
mul r5.xyz, r0.wwww, r6.xyzx
mul r5.xyz, r0.zzzz, r5.xyzx
mul r5.xyz, r5.xyzx, cb0[10].wwww
dp3 r0.z, cb0[11].xyzx, r3.xyzx
dp3 r0.w, cb0[11].xyzx, cb0[11].xyzx
mad r1.w, -r0.z, l(2.000000), r0.y
add r1.w, r0.w, r1.w
mul r2.w, r0.y, r0.w
mad r2.w, r1.w, cb0[4].w, -r2.w
mad r2.w, r0.z, r0.z, r2.w
sqrt r2.w, r2.w
add r0.z, -r0.z, r2.w
add r0.z, r0.w, r0.z
add r6.xyz, r3.xyzx, -cb0[11].xyzx
mad r6.xyz, r0.zzzz, r6.xyzx, cb0[11].xyzx
div r6.xyz, r6.xyzx, r1.wwww
dp3 r0.z, r6.xyzx, r6.xyzx
rsq r0.z, r0.z
mul r7.xyz, r0.zzzz, r6.xyzx
dp2 r0.z, r7.xzxx, r7.xzxx
rsq r0.z, r0.z
mul r0.zw, r0.zzzz, r7.xxxz
add r1.w, -|r7.y|, l(1.000000)
mul r0.zw, r0.zzzw, r1.wwww
mad r0.zw, r0.zzzw, l(0.000000, 0.000000, 0.500000, 0.500000), l(0.000000, 0.000000, 0.500000, 0.500000)
mul r4.xy, r4.xzxx, r0.zwzz
ftoi r4.xy, r4.xyxx
mov r4.zw, l(0,0,0,0)
ld_indexable(texture2d)(float,float,float,float) r4.xyzw, r4.xyzw, t2.xyzw
add r1.w, -r4.y, l(1.000000)
ge r2.w, r7.y, l(0.000000)
and r2.w, r2.w, l(0x3f800000)
add r3.w, -r1.w, r4.y
mad r4.y, r2.w, r3.w, r1.w
mul r0.zw, r0.zzzw, cb0[8].xxxy
frc r0.zw, r0.zzzw
mul r1.w, r4.w, l(-0.200000048)
add r0.zw, r0.zzzw, l(0.000000, 0.000000, -0.500000, -0.500000)
dp2 r0.z, r0.zwzz, r0.zwzz
sqrt r0.z, r0.z
mad r0.z, -r4.w, l(1.100000), r0.z
div r0.w, l(1.000000, 1.000000, 1.000000, 1.000000), r1.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 r0.z, r0.z, r0.w
mad r4.xyz, r4.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(-1.000000, -1.000000, -1.000000, 0.000000)
add r6.xyz, -r3.xyzx, r6.xyzx
dp3 r0.w, r6.xyzx, r6.xyzx
rsq r0.w, r0.w
mul r6.xyz, r0.wwww, r6.xyzx
dp3 r0.w, r6.xyzx, r4.xyzx
add r1.w, r0.w, r0.w
mad r4.xyz, -r4.xyzx, r1.wwww, r6.xyzx
dp3 r7.x, cb0[5].xyzx, r4.xyzx
dp3 r7.y, cb0[6].xyzx, r4.xyzx
dp3 r7.z, cb0[7].xyzx, r4.xyzx
mul r4.xyz, r7.xyzx, l(-1.000000, 1.000000, 1.000000, 0.000000)
sample_l_indexable(texturecube)(float,float,float,float) r4.xyz, r4.xyzx, t3.xyzw, s3, l(0.000000)
min r0.w, |r0.w|, l(1.000000)
mul r4.xyz, r0.wwww, r4.xyzx
dp3_sat r0.w, r6.xyzx, r1.xyzx
mul r4.xyz, r0.wwww, r4.xyzx
mul r4.xyz, r0.zzzz, r4.xyzx
mad r2.xyz, r2.xyzx, cb0[9].wwww, r5.xyzx
mad r2.xyz, r4.xyzx, cb0[11].wwww, r2.xyzx
dp3 r4.x, cb0[5].xyzx, r3.xyzx
dp3 r4.y, cb0[6].xyzx, r3.xyzx
dp3 r4.z, cb0[7].xyzx, r3.xyzx
mul r4.xyz, r4.xyzx, l(-1.000000, 1.000000, 1.000000, 0.000000)
sample_l_indexable(texturecube)(float,float,float,float) r4.xyz, r4.xyzx, t3.xyzw, s3, cb0[12].x
dp3 r0.z, r3.xyzx, r1.xyzx
mul r0.z, r0.z, cb0[12].y
max r0.z, r0.z, l(0.000000)
sqrt r0.w, r0.y
div r0.z, r0.z, r0.w
mad r1.xyz, r4.xyzx, r0.zzzz, r2.xyzx
mad r0.z, cb0[13].y, r0.y, cb0[13].x
div r0.z, l(1.000000, 1.000000, 1.000000, 1.000000), r0.z
mul r1.xyz, r0.zzzz, r1.xyzx
ge r0.y, r0.y, cb0[4].w
and r0.y, r0.y, l(0x3f800000)
mul r0.yzw, r1.xxyz, r0.yyyy
sample_indexable(texture2d)(float,float,float,float) r1.x, v0.xyxx, t4.zxyw, s4
f32tof16 r1.x, r1.x
ushr r1.x, r1.x, l(7)
xor r1.x, r1.x, l(383)
and r1.x, r1.x, l(2)
mul r1.yzw, r0.yyzw, cb0[14].yyyy
mul r0.yzw, r0.yyzw, cb0[14].xxxx
movc r0.yzw, r1.xxxx, r1.yyzw, r0.yyzw
add r1.xyz, r0.yzwy, cb0[15].xxxx
max r1.xyz, r1.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
mul o0.xyz, r0.xxxx, r1.xyzx
dp3 r0.x, r0.yzwy, l(1.000000, 1.000000, 1.000000, 0.000000)
add r0.x, r0.x, l(-0.00392156886)
lt r0.x, r0.x, l(0.000000)
discard_nz r0.x
mov o0.w, l(0)
ret
// Approximately 0 instruction slots used

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