//Ceiling lamp light PS.
// ---- Created with 3Dmigoto v1.3.14 on Thu Feb 07 22:38:16 2019
//
//struct InstanceWorld
//{
//    row_major float3x4 worldMat;   // Offset:    0
//    row_major float3x4 prevWorldMat;// Offset:   48
//    uint jointOffset;              // Offset:   96
//    uint prevJointOffset;          // Offset:  100
//    uint rev[2];                   // Offset:  104
//};
//
//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 EnvironmentInfo : register(b1)
//{
//  uint timeMillisecond : packoffset(c0);
//  uint frameCount : packoffset(c0.y);
//  uint isOddFrame : packoffset(c0.z);
//  uint reserveEnvironmentInfo : packoffset(c0.w);
//  row_major float4x4 userGlobalParams : packoffset(c1);
//  float breakingPBRSpecularIntensity : packoffset(c5);
//  float breakingPBRIBLReflectanceBias : packoffset(c5.y);
//  float breakingPBRIBLIntensity : packoffset(c5.z);
//  float breakingPBR_Reserved : packoffset(c5.w);
//}
//
//cbuffer GBufferType : register(b2)
//{
//  float gbufferTypeFlag : packoffset(c0);
//  float gbufferTypeReserve0 : packoffset(c0.y);
//  float gbufferTypeReserve1 : packoffset(c0.z);
//  float gbufferTypeReserve2 : packoffset(c0.w);
//}
//
//cbuffer RootConstant : register(b3)
//{
//  uint constant32Bits : packoffset(c0);
//}
//
//cbuffer UserMaterial : register(b4)
//{
//  float4 VAR_BaseColor : packoffset(c0);
//  float4 VAR_EmissiveColor : packoffset(c1);
//  float4 VAR_Bulb_Color : packoffset(c2);
//  float4 VAR_LampShade_Color : packoffset(c3);
//  float4 VAR_Rainfall_Color : packoffset(c4);
//  float VAR_EmissiveIntensity : packoffset(c5);
//  float VAR_EmissiveRate : packoffset(c5.y);
//  float VAR_EmissiveRateGamma : packoffset(c5.z);
//  float VAR_Metallic : packoffset(c5.w);
//  float VAR_Roughness : packoffset(c6);
//  float VAR_Translucency : packoffset(c6.y);
//  float VAR_UV_Select : packoffset(c6.z);
//  float VAR_use_Bulb : packoffset(c6.w);
//  float VAR_Bulb_Intensity : packoffset(c7);
//  float VAR_Bulb_Pow_Rate : packoffset(c7.y);
//  float VAR_Bulb_Levels_min : packoffset(c7.z);
//  float VAR_Bulb_Levels_max : packoffset(c7.w);
//  float VAR_use_LampShade : packoffset(c8);
//  float VAR_LampShade_Intensity : packoffset(c8.y);
//  float VAR_LampShade_Scale : packoffset(c8.z);
//  float VAR_LampShade_Smoothness : packoffset(c8.w);
//  float VAR_LampShader_HightOffset : packoffset(c9);
//  float VAR_Rainfall_Use : packoffset(c9.y);
//  float VAR_Rainfall_Angle : packoffset(c9.z);
//  float VAR_Rainfall_Amount : packoffset(c9.w);
//  float VAR_Rainfall_Depth : packoffset(c10);
//  float VAR_Rainfall_Scale_U : packoffset(c10.y);
//  float VAR_Rainfall_Scale_V : packoffset(c10.z);
//  float VAR_Rainfall_Speed : packoffset(c10.w);
//  float VAR_Rainfall_DepthdDfferenceSpeed : packoffset(c11);
//  float VAR_RainWet_Use : packoffset(c11.y);
//  float VAR_RainWet_BlendRate : packoffset(c11.z);
//  float VAR_RainWet_drop_Amount : packoffset(c11.w);
//  float VAR_RainWet_down_Amount : packoffset(c12);
//  float VAR_RainWet_drop_U_Scale : packoffset(c12.y);
//  float VAR_RainWet_drop_V_Scale : packoffset(c12.z);
//  float VAR_RainWet_down_U_Scale : packoffset(c12.w);
//  float VAR_RainWet_down_V_Scale : packoffset(c13);
//  float VAR_RainWet_down_Speed : packoffset(c13.y);
//  float VAR_FakeSphereMap_Use : packoffset(c13.z);
//  float VAR_FakeSphereMap_Intensity : packoffset(c13.w);
//  float VAR_FakeSphereMap_Gamma : packoffset(c14);
//  float CAPCOM_MATERIAL_RESERVE0 : packoffset(c14.y);
//  float CAPCOM_MATERIAL_RESERVE1 : packoffset(c14.z);
//  float CAPCOM_MATERIAL_RESERVE2 : packoffset(c14.w);
//}
//
//SamplerState BilinearWrap_s : register(s0);
//SamplerState AutomaticWrap_s : register(s1);
//StructuredBuffer<InstanceWorld> InstanceWorldInfo : register(t0);
//Texture2D<float4> BaseMetalMap : register(t1);
//Texture2D<float4> NormalRoughnessMap : register(t2);
//Texture2D<float4> EmissiveMap : register(t3);
//Texture2D<float4> RainFall_Map : register(t4);
//Texture2D<float4> RainWet_drop_Map : register(t5);
//Texture2D<float4> RainWet_down_Map : register(t6);
//Texture2D<float4> FakeSphereMap : register(t7);
//Texture2D<float4> FakeSphere_AreaMap : register(t8);
//
//
//// 3Dmigoto declarations
//#define cmp -
//Texture1D<float4> IniParams : register(t120);
//Texture2D<float4> StereoParams : register(t125);
//
//
//void main(
//  float4 v0 : SV_POSITION0,
//  float4 v1 : INTERPOLATOR0,
//  float4 v2 : INTERPOLATOR1,
//  float4 v3 : INTERPOLATOR2,
//  float4 v4 : INTERPOLATOR3,
//  float v5 : INTERPOLATOR4,
//  out float4 o0 : SV_TARGET0,
//  out float4 o1 : SV_TARGET1,
//  out float4 o2 : SV_TARGET2,
//  out float4 o3 : SV_TARGET3)
//{
//  float4 r0,r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11,r12,r13;
//  uint4 bitmask, uiDest;
//  float4 fDest;
//
//  r0.x = dot(v1.xyz, v1.xyz);
//  r0.x = rsqrt(r0.x);
//  r0.xyz = v1.xzy * r0.xxx;
//  r1.x = v2.w;
//  r1.yz = v3.yx;
//  r0.w = dot(r1.xyz, r1.xyz);
//  r0.w = rsqrt(r0.w);
//  r1.xyz = r1.xyz * r0.www;
//  r2.xyz = r1.zxy * r0.yzx;
//  r2.xyz = r0.zxy * r1.yzx + -r2.xyz;
//  r0.w = cmp(v3.z < 0);
//  r2.xyz = r0.www ? -r2.xyz : r2.xyz;
//  r3.xy = screenInverseSize.xy * v0.xy;
//  r3.xy = r3.xy * float2(2,-2) + float2(-1,1);
//  r4.y = -transposeViewInvMat._m03;
//  r4.z = -transposeViewInvMat._m13;
//  r4.x = -transposeViewInvMat._m23;
//  r5.y = v3.w;
//  r5.xz = v4.yx;
//  r4.xyz = r5.xyz + r4.xyz;
//  r0.w = dot(r4.xyz, r4.xyz);
//  r0.w = rsqrt(r0.w);
//  r4.xyz = r4.xyz * r0.www;
//  r3.zw = v4.zw / v5.xx;
//  o3.yz = r3.zw + -r3.xy;
//  r0.w = InstanceWorldInfo[constant32Bits].worldMat._m01;
//  r1.w = InstanceWorldInfo[constant32Bits].worldMat._m12;
//  r2.w = InstanceWorldInfo[constant32Bits].worldMat._m23;
//  r1.w = VAR_LampShader_HightOffset + r1.w;
//  r3.xyz = viewProjMat._m10_m11_m13 * r1.www;
//  r3.xyz = r0.www * viewProjMat._m00_m01_m03 + r3.xyz;
//  r3.xyz = r2.www * viewProjMat._m20_m21_m23 + r3.xyz;
//  r3.xyz = viewProjMat._m30_m31_m33 + r3.xyz;
//  r3.xy = r3.xy / r3.zz;
//  r3.xy = r3.xy * float2(0.5,-0.5) + float2(0.5,0.5);
//  r5.x = screenSize.x * screenInverseSize.y;
//  r3.xy = -v0.xy * screenInverseSize.xy + r3.xy;
//  r0.w = VAR_LampShade_Scale * screenSize.x;
//  r0.w = 0.00124999997 * r0.w;
//  r5.y = 1;
//  r3.xy = r5.xy * r3.xy;
//  r1.w = dot(r3.xy, r3.xy);
//  r1.w = sqrt(r1.w);
//  r2.w = dot(-r4.yxz, r0.xyz);
//  r0.w = r0.w / v0.w;
//  r0.w = 1 / r0.w;
//  r0.w = saturate(r1.w * r0.w);
//  r1.w = r0.w * -2 + 3;
//  r0.w = r0.w * r0.w;
//  r2.w = max(9.99999997e-007, r2.w);
//  r2.w = log2(r2.w);
//  r2.w = VAR_Bulb_Pow_Rate * r2.w;
//  r2.w = exp2(r2.w);
//  r3.x = v1.w;
//  r3.y = v2.x;
//  r3.zw = v2.yz + -r3.xy;
//  r3.zw = VAR_UV_Select * r3.zw + r3.xy;
//  r4.w = max(9.99999997e-007, VAR_EmissiveRate);
//  r4.w = log2(r4.w);
//  r4.w = VAR_EmissiveRateGamma * r4.w;
//  r4.w = exp2(r4.w);
//  r2.w = -VAR_Bulb_Levels_min + r2.w;
//  r5.x = VAR_Bulb_Levels_max + -VAR_Bulb_Levels_min;
//  r2.w = saturate(r2.w / r5.x);
//  r0.w = -r1.w * r0.w + 1;
//  r5.xyz = EmissiveMap.Sample(AutomaticWrap_s, r3.zw).xyz;
//  r6.xyz = VAR_EmissiveColor.xyz * r4.www;
//  r7.xyz = VAR_Bulb_Color.xyz * r2.www;
//  r5.xyz = r6.xyz * r5.xyz;
//  r6.xyz = r5.xyz * r2.www;
//  r8.xyzw = BaseMetalMap.Sample(AutomaticWrap_s, r3.xy).xyzw;
//  r9.xyz = VAR_Bulb_Intensity * r7.xyz;
//  r10.xyzw = NormalRoughnessMap.Sample(AutomaticWrap_s, r3.xy).xyzw;
//  r0.w = max(9.99999997e-007, r0.w);
//  r0.w = log2(r0.w);
//  r0.w = VAR_LampShade_Smoothness * r0.w;
//  r0.w = exp2(r0.w);
//  r11.xyz = cmp(r6.xyz < float3(0.5,0.5,0.5));
//  r6.xyz = r9.xyz * r6.xyz;
//  r6.xyz = r6.xyz + r6.xyz;
//  r9.xyz = -r5.xyz * r2.www + float3(1,1,1);
//  r9.xyz = r9.xyz + r9.xyz;
//  r7.xyz = -r7.xyz * VAR_Bulb_Intensity + float3(1,1,1);
//  r7.xyz = -r9.xyz * r7.xyz + float3(1,1,1);
//  r6.xyz = r11.xyz ? r6.xyz : r7.xyz;
//  r7.xyz = VAR_BaseColor.xyz * r8.xyz;
//  r0.w = VAR_LampShade_Intensity * r0.w;
//  r1.w = VAR_Roughness * r10.w;
//  r8.xyz = r0.www * VAR_LampShade_Color.xyz + r5.xyz;
//  r3.zw = ddy_coarse(r3.xy);
//  r5.xyz = VAR_use_Bulb * r6.xyz + r5.xyz;
//  r6.xy = ddx_coarse(r3.xy);
//  r0.w = cmp(0 < VAR_Rainfall_Use);
//  if (r0.w != 0) {
//    r0.w = VAR_Rainfall_DepthdDfferenceSpeed * VAR_Rainfall_DepthdDfferenceSpeed;
//    r2.w = VAR_Rainfall_Angle * 0.600000024 + -0.300000012;
//    r4.w = 400 / VAR_Rainfall_Speed;
//    r5.w = VAR_Rainfall_DepthdDfferenceSpeed * r0.w;
//    r0.w = r4.w * r0.w;
//    r5.w = r5.w * r4.w;
//    r2.w = -6.28318453 * r2.w;
//    sincos(r2.w, r9.x, r11.x);
//    r12.x = -r9.x;
//    r12.y = r11.x;
//    r12.z = r9.x;
//    r2.w = dot(r3.xy, r12.yz);
//    r3.x = dot(r3.xy, r12.xy);
//    r3.y = VAR_Rainfall_DepthdDfferenceSpeed * r4.w;
//    r3.y = userGlobalParams._m10 / r3.y;
//    r3.y = frac(r3.y);
//    r4.w = userGlobalParams._m10 / r4.w;
//    r9.y = frac(r4.w);
//    r0.w = userGlobalParams._m10 / r0.w;
//    r0.w = frac(r0.w);
//    r4.w = userGlobalParams._m10 / r5.w;
//    r4.w = frac(r4.w);
//    r11.x = VAR_Rainfall_Scale_U * r2.w;
//    r12.w = 0.75 + r0.w;
//    r11.y = VAR_Rainfall_Scale_V * r3.x;
//    r12.y = 0.5 + r3.y;
//    r9.w = 0.25 + r4.w;
//    r12.xz = float2(0,0.5);
//    r12.xyzw = -r12.xyzw + r11.xyxy;
//    r9.xz = float2(0.25,0.75);
//    r9.xyzw = r11.xyxy + -r9.xyzw;
//    r11.xyzw = float4(0.800000012,0.600000024,0.400000006,0.200000003) * VAR_Rainfall_Depth;
//    r3.x = dot(r1.yxz, r4.xyz);
//    r3.y = dot(r2.yxz, r4.xyz);
//    r13.xyzw = r11.wwxx * r3.xyxy;
//    r9.xyzw = -r13.xyzw * float4(-1,1,-1,1) + r9.zwxy;
//    r11.xyzw = r11.yyzz * r3.xyxy;
//    r11.xyzw = -r11.xyzw * float4(-1,1,-1,1) + r12.xyzw;
//    r0.w = RainFall_Map.SampleGrad(BilinearWrap_s, r9.xy, r6.x, r3.z).x;
//    r2.w = RainFall_Map.SampleGrad(BilinearWrap_s, r11.zw, r6.x, r3.z).x;
//    r3.x = RainFall_Map.SampleGrad(BilinearWrap_s, r11.xy, r6.x, r3.z).x;
//    r3.y = RainFall_Map.SampleGrad(BilinearWrap_s, r9.zw, r6.y, r3.w).x;
//    r0.w = r2.w + r0.w;
//    r2.w = r3.y + r3.x;
//    r0.w = saturate(r2.w + r0.w);
//    r2.w = 1 + -VAR_Rainfall_Amount;
//    r3.x = 1 + -r2.w;
//    r0.w = -r2.w + r0.w;
//    r2.w = 1 / r3.x;
//    r0.w = saturate(r2.w * r0.w);
//    r2.w = r0.w * -2 + 3;
//    r0.w = r0.w * r0.w;
//    r0.w = r2.w * r0.w;
//    r7.xyz = saturate(VAR_Rainfall_Color.xyz * r0.www + r7.xyz);
//  }
//  r8.xyz = r8.xyz + -r5.xyz;
//  r5.xyz = VAR_use_LampShade * r8.xyz + r5.xyz;
//  r0.w = cmp(0 < VAR_RainWet_Use);
//  if (r0.w != 0) {
//    r0.w = 100000 / VAR_RainWet_down_Speed;
//    r9.z = VAR_RainWet_down_V_Scale * v2.x;
//    r9.xy = VAR_RainWet_down_U_Scale * v1.ww;
//    r0.w = userGlobalParams._m10 / r0.w;
//    r0.w = frac(r0.w);
//    r3.xy = r9.xz + r9.xz;
//    r9.w = VAR_RainWet_drop_U_Scale * v2.x;
//    r11.xyzw = r0.wwww * float4(1,-2,-5,-30) + r9.xzxz;
//    r8.xyz = RainWet_down_Map.SampleGrad(BilinearWrap_s, r11.xy, r6.xyx, r3.zwz).xyz;
//    r0.w = RainWet_down_Map.SampleGrad(BilinearWrap_s, r3.xy, r6.x, r3.z).w;
//    r2.w = RainWet_down_Map.SampleGrad(BilinearWrap_s, r11.zw, r6.x, r3.z).w;
//    r3.xy = float2(0.5,0.5) * r9.yw;
//    r4.w = 0.699999988 * VAR_RainWet_drop_Amount;
//    r5.w = 0.449999988 * VAR_RainWet_down_Amount;
//    r9.xyz = RainWet_drop_Map.SampleGrad(BilinearWrap_s, r3.xy, r6.xyx, r3.zwz).xyz;
//    r3.x = max(9.99999975e-005, r5.w);
//    r3.x = 1 + -r3.x;
//    r3.y = 1.14999998 * r3.x;
//    r3.x = r3.x * 1.14999998 + -0.150000006;
//    r3.y = saturate(r3.y);
//    r3.x = max(-9.99999975e-005, r3.x);
//    r0.w = r0.w * r8.z;
//    r4.w = max(9.99999975e-005, r4.w);
//    r4.w = 1 + -r4.w;
//    r5.w = 1.29999995 * r4.w;
//    r4.w = r4.w * 1.29999995 + -0.300000012;
//    r5.w = saturate(r5.w);
//    r4.w = max(-9.99999975e-005, r4.w);
//    r3.y = r3.y + -r3.x;
//    r2.w = -r3.x + r2.w;
//    r3.x = 1 / r3.y;
//    r2.w = saturate(r3.x * r2.w);
//    r3.x = r2.w * -2 + 3;
//    r2.w = r2.w * r2.w;
//    r2.w = r3.x * r2.w;
//    r3.x = r5.w + -r4.w;
//    r3.y = r9.z + -r4.w;
//    r3.x = 1 / r3.x;
//    r3.x = saturate(r3.y * r3.x);
//    r3.y = r3.x * -2 + 3;
//    r3.x = r3.x * r3.x;
//    r3.x = r3.y * r3.x;
//    r0.w = saturate(2.22222233 * r0.w);
//    r3.y = r0.w * -2 + 3;
//    r0.w = r0.w * r0.w;
//    r0.w = r3.y * r0.w;
//    r0.w = r0.w * r2.w;
//    r0.w = 100 * r0.w;
//    r0.w = min(1, r0.w);
//    r2.w = r0.w * -2 + 3;
//    r0.w = r0.w * r0.w;
//    r3.y = r2.w * r0.w;
//    r3.x = 20 * r3.x;
//    r3.x = min(1, r3.x);
//    r4.w = r3.x * -2 + 3;
//    r3.x = r3.x * r3.x;
//    r3.x = r4.w * r3.x;
//    r6.zw = float2(-0.501960814,-0.501960814) + r8.xy;
//    r6.zw = r3.yy * r6.zw + float2(0.501960814,0.501960814);
//    r8.xy = float2(-0.501960814,-0.501960814) + r9.xy;
//    r8.xy = r3.xx * r8.xy + float2(0.501960814,0.501960814);
//    r9.xy = cmp(r6.zw < float2(0.5,0.5));
//    r9.zw = r8.xy * r6.zw;
//    r9.zw = r9.zw + r9.zw;
//    r6.zw = float2(1,1) + -r6.zw;
//    r6.zw = r6.zw + r6.zw;
//    r8.xy = float2(1,1) + -r8.xy;
//    r6.zw = -r6.zw * r8.xy + float2(1,1);
//    r6.zw = r9.xy ? r9.zw : r6.zw;
//    r6.zw = float2(-0.5,-0.5) + r6.zw;
//    r6.zw = VAR_RainWet_BlendRate * r6.zw + float2(0.5,0.5);
//    r8.xy = cmp(r10.xy < float2(0.5,0.5));
//    r9.xy = r6.zw * r10.xy;
//    r9.zw = float2(1,1) + -r10.xy;
//    r9.xyzw = r9.xyzw + r9.xyzw;
//    r6.zw = float2(1,1) + -r6.zw;
//    r6.zw = -r9.zw * r6.zw + float2(1,1);
//    r10.xy = r8.xy ? r9.xy : r6.zw;
//    r0.w = r2.w * r0.w + r3.x;
//    r0.w = min(1, r0.w);
//    r0.w = -VAR_RainWet_BlendRate * r0.w + 1;
//    o2.z = r1.w * r0.w;
//  } else {
//    o2.z = r1.w;
//  }
//  r8.xyz = r10.xyz * float3(2,2,2) + float3(-1,-1,-1);
//  r0.w = dot(r2.xyz, r2.xyz);
//  r0.w = rsqrt(r0.w);
//  r2.xyz = r2.xyz * r0.www;
//  r2.xyz = r8.yyy * r2.xyz;
//  r1.xyz = r8.xxx * r1.xyz + r2.xyz;
//  r0.xyz = r8.zzz * r0.xyz + r1.xyz;
//  r0.w = dot(r0.xyz, r0.xyz);
//  r0.w = rsqrt(r0.w);
//  r0.xyz = r0.xyz * r0.www;
//  r0.w = VAR_Metallic * r8.w;
//  r1.x = cmp(0 < VAR_FakeSphereMap_Use);
//  if (r1.x != 0) {
//    r1.x = dot(r4.yxz, r0.xyz);
//    r1.x = r1.x + r1.x;
//    r1.xyz = -r1.xxx * r0.yxz + r4.xyz;
//    r1.w = min(abs(r1.x), abs(r1.y));
//    r2.x = max(abs(r1.x), abs(r1.y));
//    r2.x = 1 / r2.x;
//    r1.w = r2.x * r1.w;
//    r2.x = r1.w * r1.w;
//    r2.y = r2.x * 0.0208350997 + -0.0851330012;
//    r2.y = r2.x * r2.y + 0.180141002;
//    r2.y = r2.x * r2.y + -0.330299497;
//    r2.x = r2.x * r2.y + 0.999866009;
//    r2.y = r2.x * r1.w;
//    r2.z = cmp(abs(r1.y) < abs(r1.x));
//    r2.y = r2.y * -2 + 1.57079637;
//    r2.y = r2.z ? r2.y : 0;
//    r1.w = r1.w * r2.x + r2.y;
//    r2.xy = cmp(r1.yz < -r1.yz);
//    r2.x = r2.x ? -3.141593 : 0;
//    r1.w = r2.x + r1.w;
//    r2.x = min(r1.x, r1.y);
//    r1.x = max(r1.x, r1.y);
//    r1.y = cmp(r2.x < -r2.x);
//    r1.x = cmp(r1.x >= -r1.x);
//    r1.x = r1.x ? r1.y : 0;
//    r1.x = r1.x ? -r1.w : r1.w;
//    r1.x = 0.159154937 * r1.x;
//    r1.x = frac(r1.x);
//    r1.w = 1 + -abs(r1.z);
//    r1.w = sqrt(r1.w);
//    r2.x = abs(r1.z) * -0.0187292993 + 0.0742610022;
//    r2.x = r2.x * abs(r1.z) + -0.212114394;
//    r1.z = r2.x * abs(r1.z) + 1.57072878;
//    r2.x = r1.z * r1.w;
//    r2.x = r2.x * -2 + 3.14159274;
//    r2.x = r2.y ? r2.x : 0;
//    r1.z = r1.z * r1.w + r2.x;
//    r1.y = 0.318309873 * r1.z;
//    r1.z = FakeSphere_AreaMap.SampleGrad(BilinearWrap_s, v2.yz, r6.x, r3.z).x;
//    r1.xyw = FakeSphereMap.SampleGrad(BilinearWrap_s, r1.xy, r6.xyx, r3.zwz).xyz;
//    r1.xyz = r1.xyw * r1.zzz;
//    r1.xyz = max(float3(9.99999997e-007,9.99999997e-007,9.99999997e-007), r1.xyz);
//    r1.xyz = log2(r1.xyz);
//    r1.xyz = VAR_FakeSphereMap_Gamma * r1.xyz;
//    r1.xyz = exp2(r1.xyz);
//    r1.xyz = VAR_FakeSphereMap_Intensity * r1.xyz;
//  } else {
//    r1.xyz = float3(0,0,0);
//  }
//  o0.xyz = VAR_EmissiveIntensity * r5.xyz + r1.xyz;
//  r1.x = cmp(0 < r0.w);
//  r1.y = cmp(0 >= VAR_Translucency);
//  r1.x = (int)r1.y | (int)r1.x;
//  if (r1.x != 0) {
//    r7.w = max(0.0399999991, r0.w);
//    r0.w = 0.666666985;
//  } else {
//    r1.x = VAR_Translucency * 15.4899998 + 0.5;
//    r1.x = floor(r1.x);
//    r7.w = r1.x * 0.0627451017 + 0.0313725509;
//    r0.w = 0;
//  }
//  r1.x = abs(r0.x) + abs(r0.y);
//  r1.x = r1.x + abs(r0.z);
//  r1.x = 1 / r1.x;
//  r0.xy = r1.xx * r0.xy;
//  r0.z = cmp(0 >= r0.z);
//  r1.xy = float2(1,1) + -abs(r0.yx);
//  r1.zw = cmp(r0.xy >= float2(0,0));
//  r1.xy = r1.zw ? r1.xy : -r1.xy;
//  r0.xy = r0.zz ? r1.xy : r0.xy;
//  o2.xy = r0.xy * float2(0.5,0.5) + float2(0.5,0.5);
//  o2.w = gbufferTypeFlag * 0.333333343 + r0.w;
//  o0.w = 0;
//  o1.xyzw = r7.xyzw;
//  o3.xw = float2(1,1);
//  return;
//}
//
///*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
//
//   using 3Dmigoto v1.3.14 on Thu Feb 07 22:38:16 2019
//
//
// Buffer Definitions:
//
// cbuffer SceneInfo
// {
//
//   row_major float4x4 viewProjMat;    // Offset:    0 Size:    64
//   row_major float3x4 transposeViewMat;// Offset:   64 Size:    48 [unused]
//   row_major float3x4 transposeViewInvMat;// Offset:  112 Size:    48
//   float4 projElement[2];             // Offset:  160 Size:    32 [unused]
//   float4 projInvElements[2];         // Offset:  192 Size:    32 [unused]
//   row_major float4x4 viewProjInvMat; // Offset:  224 Size:    64 [unused]
//   row_major float4x4 prevViewProjMat;// Offset:  288 Size:    64 [unused]
//   float3 ZToLinear;                  // Offset:  352 Size:    12 [unused]
//   float subdivisionLevel;            // Offset:  364 Size:     4 [unused]
//   float2 screenSize;                 // Offset:  368 Size:     8
//   float2 screenInverseSize;          // Offset:  376 Size:     8
//   float2 cullingHelper;              // Offset:  384 Size:     8 [unused]
//   float cameraNearPlane;             // Offset:  392 Size:     4 [unused]
//   float cameraFarPlane;              // Offset:  396 Size:     4 [unused]
//   float4 viewFrustum[6];             // Offset:  400 Size:    96 [unused]
//   float4 clipplane;                  // Offset:  496 Size:    16 [unused]
//
// }
//
// cbuffer EnvironmentInfo
// {
//
//   uint timeMillisecond;              // Offset:    0 Size:     4 [unused]
//   uint frameCount;                   // Offset:    4 Size:     4 [unused]
//   uint isOddFrame;                   // Offset:    8 Size:     4 [unused]
//   uint reserveEnvironmentInfo;       // Offset:   12 Size:     4 [unused]
//   row_major float4x4 userGlobalParams;// Offset:   16 Size:    64
//   float breakingPBRSpecularIntensity;// Offset:   80 Size:     4 [unused]
//   float breakingPBRIBLReflectanceBias;// Offset:   84 Size:     4 [unused]
//   float breakingPBRIBLIntensity;     // Offset:   88 Size:     4 [unused]
//   float breakingPBR_Reserved;        // Offset:   92 Size:     4 [unused]
//
// }
//
// cbuffer GBufferType
// {
//
//   float gbufferTypeFlag;             // Offset:    0 Size:     4
//   float gbufferTypeReserve0;         // Offset:    4 Size:     4 [unused]
//   float gbufferTypeReserve1;         // Offset:    8 Size:     4 [unused]
//   float gbufferTypeReserve2;         // Offset:   12 Size:     4 [unused]
//
// }
//
// cbuffer RootConstant
// {
//
//   uint constant32Bits;               // Offset:    0 Size:     4
//
// }
//
// cbuffer UserMaterial
// {
//
//   float4 VAR_BaseColor;              // Offset:    0 Size:    16
//   float4 VAR_EmissiveColor;          // Offset:   16 Size:    16
//   float4 VAR_Bulb_Color;             // Offset:   32 Size:    16
//   float4 VAR_LampShade_Color;        // Offset:   48 Size:    16
//   float4 VAR_Rainfall_Color;         // Offset:   64 Size:    16
//   float VAR_EmissiveIntensity;       // Offset:   80 Size:     4
//   float VAR_EmissiveRate;            // Offset:   84 Size:     4
//   float VAR_EmissiveRateGamma;       // Offset:   88 Size:     4
//   float VAR_Metallic;                // Offset:   92 Size:     4
//   float VAR_Roughness;               // Offset:   96 Size:     4
//   float VAR_Translucency;            // Offset:  100 Size:     4
//   float VAR_UV_Select;               // Offset:  104 Size:     4
//   float VAR_use_Bulb;                // Offset:  108 Size:     4
//   float VAR_Bulb_Intensity;          // Offset:  112 Size:     4
//   float VAR_Bulb_Pow_Rate;           // Offset:  116 Size:     4
//   float VAR_Bulb_Levels_min;         // Offset:  120 Size:     4
//   float VAR_Bulb_Levels_max;         // Offset:  124 Size:     4
//   float VAR_use_LampShade;           // Offset:  128 Size:     4
//   float VAR_LampShade_Intensity;     // Offset:  132 Size:     4
//   float VAR_LampShade_Scale;         // Offset:  136 Size:     4
//   float VAR_LampShade_Smoothness;    // Offset:  140 Size:     4
//   float VAR_LampShader_HightOffset;  // Offset:  144 Size:     4
//   float VAR_Rainfall_Use;            // Offset:  148 Size:     4
//   float VAR_Rainfall_Angle;          // Offset:  152 Size:     4
//   float VAR_Rainfall_Amount;         // Offset:  156 Size:     4
//   float VAR_Rainfall_Depth;          // Offset:  160 Size:     4
//   float VAR_Rainfall_Scale_U;        // Offset:  164 Size:     4
//   float VAR_Rainfall_Scale_V;        // Offset:  168 Size:     4
//   float VAR_Rainfall_Speed;          // Offset:  172 Size:     4
//   float VAR_Rainfall_DepthdDfferenceSpeed;// Offset:  176 Size:     4
//   float VAR_RainWet_Use;             // Offset:  180 Size:     4
//   float VAR_RainWet_BlendRate;       // Offset:  184 Size:     4
//   float VAR_RainWet_drop_Amount;     // Offset:  188 Size:     4
//   float VAR_RainWet_down_Amount;     // Offset:  192 Size:     4
//   float VAR_RainWet_drop_U_Scale;    // Offset:  196 Size:     4
//   float VAR_RainWet_drop_V_Scale;    // Offset:  200 Size:     4
//   float VAR_RainWet_down_U_Scale;    // Offset:  204 Size:     4
//   float VAR_RainWet_down_V_Scale;    // Offset:  208 Size:     4
//   float VAR_RainWet_down_Speed;      // Offset:  212 Size:     4
//   float VAR_FakeSphereMap_Use;       // Offset:  216 Size:     4
//   float VAR_FakeSphereMap_Intensity; // Offset:  220 Size:     4
//   float VAR_FakeSphereMap_Gamma;     // Offset:  224 Size:     4
//   float CAPCOM_MATERIAL_RESERVE0;    // Offset:  228 Size:     4 [unused]
//   float CAPCOM_MATERIAL_RESERVE1;    // Offset:  232 Size:     4 [unused]
//   float CAPCOM_MATERIAL_RESERVE2;    // Offset:  236 Size:     4 [unused]
//
// }
//
// Resource bind info for InstanceWorldInfo
// {
//
//   struct InstanceWorld
//   {
//
//       row_major float3x4 worldMat;   // Offset:    0
//       row_major float3x4 prevWorldMat;// Offset:   48
//       uint jointOffset;              // Offset:   96
//       uint prevJointOffset;          // Offset:  100
//       uint rev[2];                   // Offset:  104
//
//   } $Element;                        // Offset:    0 Size:   112
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// BilinearWrap                      sampler      NA          NA    0        1
// AutomaticWrap                     sampler      NA          NA    1        1
// InstanceWorldInfo                 texture  struct         r/o    0        1
// BaseMetalMap                      texture  float4          2d    1        1
// NormalRoughnessMap                texture  float4          2d    2        1
// EmissiveMap                       texture  float4          2d    3        1
// RainFall_Map                      texture  float4          2d    4        1
// RainWet_drop_Map                  texture  float4          2d    5        1
// RainWet_down_Map                  texture  float4          2d    6        1
// FakeSphereMap                     texture  float4          2d    7        1
// FakeSphere_AreaMap                texture  float4          2d    8        1
// SceneInfo                         cbuffer      NA          NA    0        1
// EnvironmentInfo                   cbuffer      NA          NA    1        1
// GBufferType                       cbuffer      NA          NA    2        1
// RootConstant                      cbuffer      NA          NA    3        1
// UserMaterial                      cbuffer      NA          NA    4        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float   xy w
// INTERPOLATOR             0   xyzw        1     NONE   float   xyzw
// INTERPOLATOR             1   xyzw        2     NONE   float   xyzw
// INTERPOLATOR             2   xyzw        3     NONE   float   xyzw
// INTERPOLATOR             3   xyzw        4     NONE   float   xyzw
// INTERPOLATOR             4   x           5     NONE   float   x
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_TARGET                0   xyzw        0   TARGET   float   xyzw
// SV_TARGET                1   xyzw        1   TARGET   float   xyzw
// SV_TARGET                2   xyzw        2   TARGET   float   xyzw
// SV_TARGET                3   xyzw        3   TARGET   float   xyzw
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[24], immediateIndexed
dcl_constantbuffer cb1[3], immediateIndexed
dcl_constantbuffer cb2[1], immediateIndexed
dcl_constantbuffer cb3[1], immediateIndexed
dcl_constantbuffer cb4[15], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s1, mode_default
dcl_resource_structured t0, 112
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_texture2d (float,float,float,float) t4
dcl_resource_texture2d (float,float,float,float) t5
dcl_resource_texture2d (float,float,float,float) t6
dcl_resource_texture2d (float,float,float,float) t7
dcl_resource_texture2d (float,float,float,float) t8
dcl_input_ps_siv linear noperspective v0.xyw, position
dcl_input_ps linear v1.xyzw
dcl_input_ps linear v2.xyzw
dcl_input_ps linear v3.xyzw
dcl_input_ps linear v4.xyzw
dcl_input_ps linear v5.x
dcl_output o0.xyzw
dcl_output o1.xyzw
dcl_output o2.xyzw
dcl_output o3.xyzw
dcl_temps 38
dcl_resource_texture2d (float,float,float,float) t125
dcl_resource_texture1d (float,float,float,float) t120
ld_indexable(texture2d)(float,float,float,float) r21.xyzw, l(0, 0, 0, 0), t125.xyzw
dp3 r0.x, v1.xyzx, v1.xyzx
rsq r0.x, r0.x
mul r0.xyz, r0.xxxx, v1.xzyx
mov r1.x, v2.w
mov r1.yz, v3.yyxy
dp3 r0.w, r1.xyzx, r1.xyzx
rsq r0.w, r0.w
mul r1.xyz, r0.wwww, r1.xyzx
mul r2.xyz, r0.yzxy, r1.zxyz
mad r2.xyz, r0.zxyz, r1.yzxy, -r2.xyzx
lt r0.w, v3.z, l(0.000000)
movc r2.xyz, r0.wwww, -r2.xyzx, r2.xyzx
mul r3.xy, v0.xyxx, cb0[23].zwzz
mad r3.xy, r3.xyxx, l(2.000000, -2.000000, 0.000000, 0.000000), l(-1.000000, 1.000000, 0.000000, 0.000000)
mov r4.y, -cb0[7].w
mov r4.z, -cb0[8].w
mov r4.x, -cb0[9].w
mov r5.y, v3.w
mov r5.xz, v4.yyxy
add r4.xyz, r4.xyzx, r5.xyzx
dp3 r0.w, r4.xyzx, r4.xyzx
rsq r0.w, r0.w
mul r4.xyz, r0.wwww, r4.xyzx

//TAA fix.
mov r24.xyzw, v4.xyzw
mad r24.z, -r21.x, r21.y, r24.z

div r3.zw, r24.zzzw, v5.xxxx
add o3.yz, -r3.xxyx, r3.zzwz
ld_structured_indexable(structured_buffer, stride=112)(mixed,mixed,mixed,mixed) r0.w, cb3[0].x, l(12), t0.xxxx
ld_structured_indexable(structured_buffer, stride=112)(mixed,mixed,mixed,mixed) r1.w, cb3[0].x, l(28), t0.xxxx
ld_structured_indexable(structured_buffer, stride=112)(mixed,mixed,mixed,mixed) r2.w, cb3[0].x, l(44), t0.xxxx
add r1.w, r1.w, cb4[9].x


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

mul r3.xyz, r1.wwww, cb0[1].xywx
mad r3.xyz, r0.wwww, cb0[0].xywx, r3.xyzx
mad r3.xyz, r2.wwww, cb0[2].xywx, r3.xyzx
add r3.xyz, r3.xyzx, cb0[3].xywx

//Fix here.
add r21.w, r3.z, -r21.y
mad r3.x, r21.x, r21.w, r3.x

div r3.xy, r3.xyxx, r3.zzzz
mad r3.xy, r3.xyxx, l(0.500000, -0.500000, 0.000000, 0.000000), l(0.500000, 0.500000, 0.000000, 0.000000)
mul r5.x, cb0[23].w, cb0[23].x
mad r3.xy, -v0.xyxx, cb0[23].zwzz, r3.xyxx
mul r0.w, cb0[23].x, cb4[8].z
mul r0.w, r0.w, l(0.001250)
mov r5.y, l(1.000000)
mul r3.xy, r3.xyxx, r5.xyxx
dp2 r1.w, r3.xyxx, r3.xyxx
sqrt r1.w, r1.w
dp3 r2.w, -r4.yxzy, r0.xyzx
div r0.w, r0.w, v0.w
div r0.w, l(1.000000, 1.000000, 1.000000, 1.000000), r0.w
mul_sat r0.w, r0.w, r1.w
mad r1.w, r0.w, l(-2.000000), l(3.000000)
mul r0.w, r0.w, r0.w
max r2.w, r2.w, l(0.000001)
log r2.w, r2.w
mul r2.w, r2.w, cb4[7].y
exp r2.w, r2.w
mov r3.x, v1.w
mov r3.y, v2.x
add r3.zw, -r3.xxxy, v2.yyyz
mad r3.zw, cb4[6].zzzz, r3.zzzw, r3.xxxy
max r4.w, cb4[5].y, l(0.000001)
log r4.w, r4.w
mul r4.w, r4.w, cb4[5].z
exp r4.w, r4.w
add r2.w, r2.w, -cb4[7].z
add r5.x, -cb4[7].z, cb4[7].w
div_sat r2.w, r2.w, r5.x
mad r0.w, -r1.w, r0.w, l(1.000000)
sample_indexable(texture2d)(float,float,float,float) r5.xyz, r3.zwzz, t3.xyzw, s1
mul r6.xyz, r4.wwww, cb4[1].xyzx
mul r7.xyz, r2.wwww, cb4[2].xyzx
mul r5.xyz, r5.xyzx, r6.xyzx
mul r6.xyz, r2.wwww, r5.xyzx
sample_indexable(texture2d)(float,float,float,float) r8.xyzw, r3.xyxx, t1.xyzw, s1
mul r9.xyz, r7.xyzx, cb4[7].xxxx
sample_indexable(texture2d)(float,float,float,float) r10.xyzw, r3.xyxx, t2.xyzw, s1
max r0.w, r0.w, l(0.000001)
log r0.w, r0.w
mul r0.w, r0.w, cb4[8].w
exp r0.w, r0.w
lt r11.xyz, r6.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000)
mul r6.xyz, r6.xyzx, r9.xyzx
add r6.xyz, r6.xyzx, r6.xyzx
mad r9.xyz, -r5.xyzx, r2.wwww, l(1.000000, 1.000000, 1.000000, 0.000000)
add r9.xyz, r9.xyzx, r9.xyzx
mad r7.xyz, -r7.xyzx, cb4[7].xxxx, l(1.000000, 1.000000, 1.000000, 0.000000)
mad r7.xyz, -r9.xyzx, r7.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
movc r6.xyz, r11.xyzx, r6.xyzx, r7.xyzx
mul r7.xyz, r8.xyzx, cb4[0].xyzx
mul r0.w, r0.w, cb4[8].y
mul r1.w, r10.w, cb4[6].x
mad r8.xyz, r0.wwww, cb4[3].xyzx, r5.xyzx
deriv_rty_coarse r3.zw, r3.xxxy
mad r5.xyz, cb4[6].wwww, r6.xyzx, r5.xyzx
deriv_rtx_coarse r6.xy, r3.xyxx
lt r0.w, l(0.000000), cb4[9].y
if_nz r0.w
  mul r0.w, cb4[11].x, cb4[11].x
  mad r2.w, cb4[9].z, l(0.600000), l(-0.300000)
  div r4.w, l(400.000000), cb4[10].w
  mul r5.w, r0.w, cb4[11].x
  mul r0.w, r0.w, r4.w
  mul r5.w, r4.w, r5.w
  mul r2.w, r2.w, l(-6.28318453)
  sincos r9.x, r11.x, r2.w
  mov r12.x, -r9.x
  mov r12.y, r11.x
  mov r12.z, r9.x
  dp2 r2.w, r3.xyxx, r12.yzyy
  dp2 r3.x, r3.xyxx, r12.xyxx
  mul r3.y, r4.w, cb4[11].x
  div r3.y, cb1[2].x, r3.y
  frc r3.y, r3.y
  div r4.w, cb1[2].x, r4.w
  frc r9.y, r4.w
  div r0.w, cb1[2].x, r0.w
  frc r0.w, r0.w
  div r4.w, cb1[2].x, r5.w
  frc r4.w, r4.w
  mul r11.x, r2.w, cb4[10].y
  add r12.w, r0.w, l(0.750000)
  mul r11.y, r3.x, cb4[10].z
  add r12.y, r3.y, l(0.500000)
  add r9.w, r4.w, l(0.250000)
  mov r12.xz, l(0,0,0.500000,0)
  add r12.xyzw, r11.xyxy, -r12.xyzw
  mov r9.xz, l(0.250000,0,0.750000,0)
  add r9.xyzw, -r9.xyzw, r11.xyxy
  mul r11.xyzw, cb4[10].xxxx, l(0.800000, 0.600000, 0.400000, 0.200000)
  dp3 r3.x, r1.yxzy, r4.xyzx
  dp3 r3.y, r2.yxzy, r4.xyzx
  mul r13.xyzw, r3.xyxy, r11.wwxx
  mad r9.xyzw, -r13.xyzw, l(-1.000000, 1.000000, -1.000000, 1.000000), r9.zwxy
  mul r11.xyzw, r3.xyxy, r11.yyzz
  mad r11.xyzw, -r11.xyzw, l(-1.000000, 1.000000, -1.000000, 1.000000), r12.xyzw
  sample_d_indexable(texture2d)(float,float,float,float) r0.w, r9.xyxx, t4.yzwx, s0, r6.xyxx, r3.zwzz
  sample_d_indexable(texture2d)(float,float,float,float) r2.w, r11.zwzz, t4.yzwx, s0, r6.xyxx, r3.zwzz
  sample_d_indexable(texture2d)(float,float,float,float) r3.x, r11.xyxx, t4.xyzw, s0, r6.xyxx, r3.zwzz
  sample_d_indexable(texture2d)(float,float,float,float) r3.y, r9.zwzz, t4.yxzw, s0, r6.xyxx, r3.zwzz
  add r0.w, r0.w, r2.w
  add r2.w, r3.x, r3.y
  add_sat r0.w, r0.w, r2.w
  add r2.w, -cb4[9].w, l(1.000000)
  add r3.x, -r2.w, l(1.000000)
  add r0.w, r0.w, -r2.w
  div r2.w, l(1.000000, 1.000000, 1.000000, 1.000000), r3.x
  mul_sat r0.w, r0.w, r2.w
  mad r2.w, r0.w, l(-2.000000), l(3.000000)
  mul r0.w, r0.w, r0.w
  mul r0.w, r0.w, r2.w
  mad_sat r7.xyz, cb4[4].xyzx, r0.wwww, r7.xyzx
endif
add r8.xyz, -r5.xyzx, r8.xyzx
mad r5.xyz, cb4[8].xxxx, r8.xyzx, r5.xyzx
lt r0.w, l(0.000000), cb4[11].y
if_nz r0.w
  div r0.w, l(100000.000000), cb4[13].y
  mul r9.z, v2.x, cb4[13].x
  mul r9.xy, v1.wwww, cb4[12].wzww
  div r0.w, cb1[2].x, r0.w
  frc r0.w, r0.w
  add r3.xy, r9.xzxx, r9.xzxx
  mul r9.w, v2.x, cb4[12].y
  mad r11.xyzw, r0.wwww, l(1.000000, -2.000000, -5.000000, -30.000000), r9.xzxz
  sample_d_indexable(texture2d)(float,float,float,float) r8.xyz, r11.xyxx, t6.xyzw, s0, r6.xyxx, r3.zwzz
  sample_d_indexable(texture2d)(float,float,float,float) r0.w, r3.xyxx, t6.xyzw, s0, r6.xyxx, r3.zwzz
  sample_d_indexable(texture2d)(float,float,float,float) r2.w, r11.zwzz, t6.xyzw, s0, r6.xyxx, r3.zwzz
  mul r3.xy, r9.ywyy, l(0.500000, 0.500000, 0.000000, 0.000000)
  mul r4.w, cb4[11].w, l(0.700000)
  mul r5.w, cb4[12].x, l(0.450000)
  sample_d_indexable(texture2d)(float,float,float,float) r9.xyz, r3.xyxx, t5.xyzw, s0, r6.xyxx, r3.zwzz
  max r3.x, r5.w, l(0.000100)
  add r3.x, -r3.x, l(1.000000)
  mul r3.y, r3.x, l(1.150000)
  mad r3.x, r3.x, l(1.150000), l(-0.150000)
  mov_sat r3.y, r3.y
  max r3.x, r3.x, l(-0.000100)
  mul r0.w, r8.z, r0.w
  max r4.w, r4.w, l(0.000100)
  add r4.w, -r4.w, l(1.000000)
  mul r5.w, r4.w, l(1.300000)
  mad r4.w, r4.w, l(1.300000), l(-0.300000)
  mov_sat r5.w, r5.w
  max r4.w, r4.w, l(-0.000100)
  add r3.y, -r3.x, r3.y
  add r2.w, r2.w, -r3.x
  div r3.x, l(1.000000, 1.000000, 1.000000, 1.000000), r3.y
  mul_sat r2.w, r2.w, r3.x
  mad r3.x, r2.w, l(-2.000000), l(3.000000)
  mul r2.w, r2.w, r2.w
  mul r2.w, r2.w, r3.x
  add r3.x, -r4.w, r5.w
  add r3.y, -r4.w, r9.z
  div r3.x, l(1.000000, 1.000000, 1.000000, 1.000000), r3.x
  mul_sat r3.x, r3.x, r3.y
  mad r3.y, r3.x, l(-2.000000), l(3.000000)
  mul r3.x, r3.x, r3.x
  mul r3.x, r3.x, r3.y
  mul_sat r0.w, r0.w, l(2.22222233)
  mad r3.y, r0.w, l(-2.000000), l(3.000000)
  mul r0.w, r0.w, r0.w
  mul r0.w, r0.w, r3.y
  mul r0.w, r2.w, r0.w
  mul r0.w, r0.w, l(100.000000)
  min r0.w, r0.w, l(1.000000)
  mad r2.w, r0.w, l(-2.000000), l(3.000000)
  mul r0.w, r0.w, r0.w
  mul r3.y, r0.w, r2.w
  mul r3.x, r3.x, l(20.000000)
  min r3.x, r3.x, l(1.000000)
  mad r4.w, r3.x, l(-2.000000), l(3.000000)
  mul r3.x, r3.x, r3.x
  mul r3.x, r3.x, r4.w
  add r6.zw, r8.xxxy, l(0.000000, 0.000000, -0.501960814, -0.501960814)
  mad r6.zw, r3.yyyy, r6.zzzw, l(0.000000, 0.000000, 0.501960814, 0.501960814)
  add r8.xy, r9.xyxx, l(-0.501960814, -0.501960814, 0.000000, 0.000000)
  mad r8.xy, r3.xxxx, r8.xyxx, l(0.501960814, 0.501960814, 0.000000, 0.000000)
  lt r9.xy, r6.zwzz, l(0.500000, 0.500000, 0.000000, 0.000000)
  mul r9.zw, r6.zzzw, r8.xxxy
  add r9.zw, r9.zzzw, r9.zzzw
  add r6.zw, -r6.zzzw, l(0.000000, 0.000000, 1.000000, 1.000000)
  add r6.zw, r6.zzzw, r6.zzzw
  add r8.xy, -r8.xyxx, l(1.000000, 1.000000, 0.000000, 0.000000)
  mad r6.zw, -r6.zzzw, r8.xxxy, l(0.000000, 0.000000, 1.000000, 1.000000)
  movc r6.zw, r9.xxxy, r9.zzzw, r6.zzzw
  add r6.zw, r6.zzzw, l(0.000000, 0.000000, -0.500000, -0.500000)
  mad r6.zw, cb4[11].zzzz, r6.zzzw, l(0.000000, 0.000000, 0.500000, 0.500000)
  lt r8.xy, r10.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
  mul r9.xy, r10.xyxx, r6.zwzz
  add r9.zw, -r10.xxxy, l(0.000000, 0.000000, 1.000000, 1.000000)
  add r9.xyzw, r9.xyzw, r9.xyzw
  add r6.zw, -r6.zzzw, l(0.000000, 0.000000, 1.000000, 1.000000)
  mad r6.zw, -r9.zzzw, r6.zzzw, l(0.000000, 0.000000, 1.000000, 1.000000)
  movc r10.xy, r8.xyxx, r9.xyxx, r6.zwzz
  mad r0.w, r2.w, r0.w, r3.x
  min r0.w, r0.w, l(1.000000)
  mad r0.w, -cb4[11].z, r0.w, l(1.000000)
  mul o2.z, r0.w, r1.w
else
  mov o2.z, r1.w
endif
mad r8.xyz, r10.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(-1.000000, -1.000000, -1.000000, 0.000000)
dp3 r0.w, r2.xyzx, r2.xyzx
rsq r0.w, r0.w
mul r2.xyz, r0.wwww, r2.xyzx
mul r2.xyz, r2.xyzx, r8.yyyy
mad r1.xyz, r8.xxxx, r1.xyzx, r2.xyzx
mad r0.xyz, r8.zzzz, r0.xyzx, r1.xyzx
dp3 r0.w, r0.xyzx, r0.xyzx
rsq r0.w, r0.w
mul r0.xyz, r0.wwww, r0.xyzx
mul r0.w, r8.w, cb4[5].w
lt r1.x, l(0.000000), cb4[13].z
if_nz r1.x
  dp3 r1.x, r4.yxzy, r0.xyzx
  add r1.x, r1.x, r1.x
  mad r1.xyz, -r1.xxxx, r0.yxzy, r4.xyzx
  min r1.w, |r1.y|, |r1.x|
  max r2.x, |r1.y|, |r1.x|
  div r2.x, l(1.000000, 1.000000, 1.000000, 1.000000), r2.x
  mul r1.w, r1.w, r2.x
  mul r2.x, r1.w, r1.w
  mad r2.y, r2.x, l(0.0208350997), l(-0.085133)
  mad r2.y, r2.x, r2.y, l(0.180141)
  mad r2.y, r2.x, r2.y, l(-0.330299497)
  mad r2.x, r2.x, r2.y, l(0.999866)
  mul r2.y, r1.w, r2.x
  lt r2.z, |r1.y|, |r1.x|
  mad r2.y, r2.y, l(-2.000000), l(1.57079637)
  and r2.y, r2.z, r2.y
  mad r1.w, r1.w, r2.x, r2.y
  lt r2.xy, r1.yzyy, -r1.yzyy
  and r2.x, r2.x, l(0xc0490fdb)
  add r1.w, r1.w, r2.x
  min r2.x, r1.y, r1.x
  max r1.x, r1.y, r1.x
  lt r1.y, r2.x, -r2.x
  ge r1.x, r1.x, -r1.x
  and r1.x, r1.x, r1.y
  movc r1.x, r1.x, -r1.w, r1.w
  mul r1.x, r1.x, l(0.159154937)
  frc r1.x, r1.x
  add r1.w, -|r1.z|, l(1.000000)
  sqrt r1.w, r1.w
  mad r2.x, |r1.z|, l(-0.0187292993), l(0.074261)
  mad r2.x, r2.x, |r1.z|, l(-0.212114394)
  mad r1.z, r2.x, |r1.z|, l(1.57072878)
  mul r2.x, r1.w, r1.z
  mad r2.x, r2.x, l(-2.000000), l(3.14159274)
  and r2.x, r2.y, r2.x
  mad r1.z, r1.z, r1.w, r2.x
  mul r1.y, r1.z, l(0.318309873)
  sample_d_indexable(texture2d)(float,float,float,float) r1.z, v2.yzyy, t8.yzxw, s0, r6.xyxx, r3.zwzz
  sample_d_indexable(texture2d)(float,float,float,float) r1.xyw, r1.xyxx, t7.xywz, s0, r6.xyxx, r3.zwzz
  mul r1.xyz, r1.zzzz, r1.xywx
  max r1.xyz, r1.xyzx, l(0.000001, 0.000001, 0.000001, 0.000000)
  log r1.xyz, r1.xyzx
  mul r1.xyz, r1.xyzx, cb4[14].xxxx
  exp r1.xyz, r1.xyzx
  mul r1.xyz, r1.xyzx, cb4[13].wwww
else
  mov r1.xyz, l(0,0,0,0)
endif
mad o0.xyz, cb4[5].xxxx, r5.xyzx, r1.xyzx
lt r1.x, l(0.000000), r0.w
ge r1.y, l(0.000000), cb4[6].y
or r1.x, r1.y, r1.x
if_nz r1.x
  max r7.w, r0.w, l(0.040000)
  mov r0.w, l(0.666667)
else
  mad r1.x, cb4[6].y, l(15.490000), l(0.500000)
  round_ni r1.x, r1.x
  mad r7.w, r1.x, l(0.0627451017), l(0.0313725509)
  mov r0.w, l(0)
endif
add r1.x, |r0.y|, |r0.x|
add r1.x, |r0.z|, r1.x
div r1.x, l(1.000000, 1.000000, 1.000000, 1.000000), r1.x
mul r0.xy, r0.xyxx, r1.xxxx
ge r0.z, l(0.000000), r0.z
add r1.xy, -|r0.yxyy|, l(1.000000, 1.000000, 0.000000, 0.000000)
ge r1.zw, r0.xxxy, l(0.000000, 0.000000, 0.000000, 0.000000)
movc r1.xy, r1.zwzz, r1.xyxx, -r1.xyxx
movc r0.xy, r0.zzzz, r1.xyxx, r0.xyxx
mad o2.xy, r0.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000), l(0.500000, 0.500000, 0.000000, 0.000000)
mad o2.w, cb2[0].x, l(0.333333343), r0.w
mov o0.w, l(0)
mov o1.xyzw, r7.xyzw
mov o3.xw, l(1.000000,0,0,1.000000)
ret
// Approximately 328 instruction slots used

