// ---- Created with 3Dmigoto v1.2.35 on Tue Apr 26 22:30:54 2016

cbuffer cbTextureTilingScale : register(b1)
{
  float4 FC_TextureTilingScale[25] : packoffset(c0);
}

cbuffer cbMatDynParam : register(b2)
{
  bool FC_isDitherAlpha : packoffset(c0);
  float FC_TranslucencyScale : packoffset(c1);
  float4 FC_EmissiveColor : packoffset(c2);
  float4 FC_BlendMaskParam : packoffset(c3);
  float FC_PomHeightScale : packoffset(c4);
  float FC_PomHeightBias : packoffset(c4.y);
  float FC_PomMinSamples : packoffset(c4.z);
  float FC_PomMaxSamples : packoffset(c4.w);
  float FC_PomShadowSoftening : packoffset(c5);
  bool FC_bPomDisplayShadows : packoffset(c5.y);
  float4 FC_ParallaxParam : packoffset(c6);
  float FC_Pom2HeightScale : packoffset(c7);
  float FC_Pom2HeightBias : packoffset(c7.y);
  float FC_Pom2MinSamples : packoffset(c7.z);
  float FC_Pom2MaxSamples : packoffset(c7.w);
  bool VC_isEnableCloth : packoffset(c8);
  float FC_EnvMapDolBlendRate : packoffset(c9);
  float4 FC_SnowMaskParam : packoffset(c10);
  float FC_FROZEN_THRESHOLD : packoffset(c11);
  float FC_FROZEN_POW : packoffset(c11.y);
  float FC_BlendRate : packoffset(c12);
  float4 FC_FlowMapUvTiling : packoffset(c13);
  float4 FC_FlowMapIntencity : packoffset(c14);
  float FC_SoftVolume : packoffset(c15);
  float FC_PointCloudRate : packoffset(c16);
  float4 FC_WaterNormalUvScrollSpeed : packoffset(c17);
  float4 FC_WaterDiffuseUvScrollSpeed : packoffset(c18);
  float4 FC_WaterMiddleUvScrollSpeed : packoffset(c19);
  float4 FC_WaterFogParam0 : packoffset(c20);
  float4 FC_WaterFogParam1 : packoffset(c21);
  float4 FC_WaterFresnel : packoffset(c22);
  float4 FC_WaterFadeParam : packoffset(c23);
  float4 FC_DynamicDiffuseColor : packoffset(c24);
  float FC_SSS_ID : packoffset(c25);
  float4 FC_PhantomEdgeColor : packoffset(c26);
  float4 FC_PhantomFrontColor : packoffset(c27);
  float4 FC_PhantomDiffColor : packoffset(c28);
  float4 FC_PhantomSpecColor : packoffset(c29);
  float4 FC_PhantomLightColor : packoffset(c30);
  float VC_VelocityOffset : packoffset(c31);
  float4 FC_DamagedNormalParam : packoffset(c32);
  float4 FC_DamagedNormalUvTiling : packoffset(c33);
  float4 FC_DamagedNormal2UvTiling : packoffset(c34);
  float4 FC_WetDiffuseColor : packoffset(c35);
  float4 FC_WetParam1 : packoffset(c36);
  float4 FC_WetRefrectanceColor : packoffset(c37);
  float4 FC_WetParam2 : packoffset(c38);
}

cbuffer cbMtdParam : register(b3)
{
  float4 FC_DifMapMulCol : packoffset(c0);
  float4 FC_SpcMapMulCol : packoffset(c1);
  float4 FC_SpcParam : packoffset(c2);
  float4 FC_SSAOParam : packoffset(c3);
  float3 FC_CDRFParam : packoffset(c4);
  float4 FC_AlphaRef : packoffset(c5);
  float FC_BloodAmount : packoffset(c6);
  float4 old_FC_ParallaxParam : packoffset(c7);
  float FC_IOR : packoffset(c8);
  float4 FC_GlowScale : packoffset(c9);
  float4 FC_GhostEdgeColor : packoffset(c10);
  float4 FC_GhostEdgeParam : packoffset(c11);
  float4 FC_BmpBlendParam0 : packoffset(c12);
  float4 FC_BmpBlendParam1 : packoffset(c13);
  float FC_UNUSED_SSS_ID : packoffset(c14);
  float4 FC_HairSpecularParam0 : packoffset(c20);
  float4 FC_HairSpecularParam1 : packoffset(c21);
  float4 FC_HairSpecularParam2 : packoffset(c22);
  float4 FC_RimLightingParam : packoffset(c23);
}

cbuffer cbInstanceData : register(b4)
{

  struct
  {
    float4x3 mWorld;
    float4 atlasUvScaleOffset;
    float4 userClipPlane;
    uint4 matricesData;
    uint envData;
    bool dynamicLightDisable;
    uint2 envPad;
    float4 mulCol;
    float4 aSh[3];
    float4 ShLightMask;
    float4 vDominantRotateParam;
    float4 parallaxCorrectedCubemapOrigin_envMapInterpRatio;
    float4 parallaxCorrectedCubemapAabbMin_envMapColorScale0;
    float4 parallaxCorrectedCubemapAabbMax_envMapColorScale1;
    float ditherFadeAlpha;
  } VC_InstanceData[2] : packoffset(c0);

}

cbuffer cbModelParam : register(b7)
{
  float4 FC_DifColMul : packoffset(c0);
  float FC_EnvMapInterpRatio : packoffset(c1);
  float FC_EnvMapColorScale0 : packoffset(c1.y);
  float FC_EnvMapColorScale1 : packoffset(c1.z);
  float FC_DitherEnable : packoffset(c2);
  float FC_FROZEN_RATE : packoffset(c2.w);
  float FC_Perlin_Freq : packoffset(c3);
  float FC_Perlin_Amp : packoffset(c3.y);
  float FC_Perlin_Lacunarity : packoffset(c3.z);
  float FC_Perlin_Gain : packoffset(c3.w);
  float FC_SnowRate : packoffset(c4);
  float FC_SnowMinDot : packoffset(c4.y);
  float FC_SnowMaxDot : packoffset(c4.z);
  float FC_SparkleExponent : packoffset(c5);
  float FC_SparkleThreshold : packoffset(c5.y);
  float FC_SparkleMul : packoffset(c5.z);
  float FC_SparkleMaskExponent : packoffset(c5.w);
  float4 FC_SkinMatchColor : packoffset(c6);
  int FC_EnvId : packoffset(c7);
  float4 FC_ParallaxCorrectedCubemapOriginA : packoffset(c8);
  float4 FC_ParallaxCorrectedCubemapOriginB : packoffset(c9);
  float4x4 FC_ParallaxCorrectedCubemapObbA : packoffset(c10);
  float4x4 FC_ParallaxCorrectedCubemapInvObbA : packoffset(c14);
  float4x4 FC_ParallaxCorrectedCubemapObbB : packoffset(c18);
  float4x4 FC_ParallaxCorrectedCubemapInvObbB : packoffset(c22);
  float FC_ParallaxCorrectedCubemapObbAEnable : packoffset(c26);
  float FC_ParallaxCorrectedCubemapObbBEnable : packoffset(c26.y);
}

SamplerState SS_DiffuseMap_s : register(s0);
SamplerState SS_SpecularMap_s : register(s1);
SamplerState SS_BumpMap_s : register(s2);
Texture2D<float4> g_DiffuseTexture : register(t0);
Texture2D<float4> g_SpecularTexture : register(t1);
Texture2D<float4> g_BumpmapTexture : register(t3);
Texture2D<float4> g_DecalDiffuseTexture : register(t41);
Texture2D<float4> g_DecalSpecularTexture : register(t42);


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


void main( 
  float4 v0 : SV_Position0,
  float4 v1 : TEXCOORD1,
  float4 v2 : TEXCOORD3,
  float4 v3 : COLOR1,
  float4 v4 : TEXCOORD5,
  uint v5 : SV_IsFrontFace0,
  out float4 o0 : SV_Target0,
  out float4 o1 : SV_Target1,
  out float4 o2 : SV_Target2,
  out float4 o3 : SV_Target3,
  out float4 o4 : SV_Target4)
{
  float4 r0,r1,r2,r3,r4,r5,r6;
  uint4 bitmask, uiDest;
  float4 fDest;

  r0.x = dot(v1.xyz, v1.xyz);
  r0.x = rsqrt(r0.x);
  r0.xyz = v1.xyz * r0.xxx;
  r0.xyz = v5.xxx ? r0.xyz : -r0.xyz;
  r1.xyz = v2.yzx * v1.zxy;
  r1.xyz = v1.yzx * v2.zxy + -r1.xyz;
  r1.xyz = v2.www * r1.xyz;
  r0.w = dot(r1.xyz, r1.xyz);
  r0.w = rsqrt(r0.w);
  r1.xyz = r1.xyz * r0.www;
  r0.w = dot(v2.xyz, v2.xyz);
  r0.w = rsqrt(r0.w);
  r2.xyz = v2.xyz * r0.www;
  r3.xy = v4.xy * FC_TextureTilingScale[3].xy + FC_TextureTilingScale[3].zw;
  r3.xyw = g_BumpmapTexture.Sample(SS_BumpMap_s, r3.xy).xyz;
  r4.xy = r3.xy * float2(2,2) + float2(-1,-1);
  r2.xyz = r4.yyy * r2.xyz;
  r1.xyz = r4.xxx * r1.xyz + r2.xyz;
  r0.w = dot(r4.xy, r4.xy);
  r0.w = min(1, r0.w);
  r0.w = 1 + -r0.w;
  r0.w = sqrt(r0.w);
  r0.xyz = r0.www * r0.xyz + r1.xyz;
  r0.w = dot(r0.xyz, r0.xyz);
  r0.w = rsqrt(r0.w);
  r0.xyz = r0.xyz * r0.www;
  o0.xyz = r0.xyz * float3(0.5,0.5,0.5) + float3(0.500488758,0.500488758,0.500488758);
  r1.xw = g_DecalSpecularTexture.Sample(SS_SpecularMap_s, v4.zw).yx;
  r1.xyz = r1.xxx * r1.xxx;
  r2.xy = v4.xy * FC_TextureTilingScale[1].xy + FC_TextureTilingScale[1].zw;
  r3.xyz = g_SpecularTexture.Sample(SS_SpecularMap_s, r2.xy).xyz;
  r2.xyzw = g_DecalDiffuseTexture.Sample(SS_DiffuseMap_s, v4.zw).xyzw;
  r1.xyzw = r3.xyzw * r2.wwww + r1.xyzw;
  r1.xyzw = r1.xyzw + -r3.xyzw;
  r1.xyzw = FC_BloodAmount * r1.xyzw + r3.xyzw;
  r3.x = dot(r1.xyz, float3(0.298909992,0.586610019,0.114480004));
  r3.y = FC_WetParam1.y + -FC_WetParam1.x;
  r3.x = r3.x * r3.y + FC_WetParam1.x;
  r3.x = r3.x * 1.20000005 + -v3.z;
  r3.x = saturate(10 * r3.x);
  r3.y = FC_WetDiffuseColor.w * r3.x;
  r3.zw = v4.xy * FC_TextureTilingScale[0].xy + FC_TextureTilingScale[0].zw;
  r4.xyzw = g_DiffuseTexture.Sample(SS_DiffuseMap_s, r3.zw).xyzw;
  r5.xyz = sqrt(r4.xyz);
  r5.xyz = saturate(FC_SkinMatchColor.xyz + r5.xyz);
  r6.xyz = r5.xyz * r5.xyz;
  r5.xyz = -r5.xyz * r5.xyz + FC_WetDiffuseColor.xyz;
  r3.yzw = r3.yyy * r5.xyz + r6.xyz;
  r2.xyz = r3.yzw * r2.www + r2.xyz;
  r2.xyz = r2.xyz + -r3.yzw;
  r4.xyz = FC_BloodAmount * r2.xyz + r3.yzw;
  r2.x = 1;
  r2.w = v3.w;
  r2.xyzw = r4.xyzw * r2.xxxw;
  r3.y = round(v1.w);
  r3.y = (uint)r3.y;
  r3.y = (int)r3.y * 17;
  r2.w = VC_InstanceData[r3.y].mulCol.w * r2.w;
  o2.xyz = FC_DifMapMulCol.xyz * r2.xyz;
  r2.x = cmp(0 != FC_AlphaRef.z);
  r4.xz = float2(0,1);
  r2.y = (uint7)VC_InstanceData[r3.y].envData;
  r4.y = 0.00392156886 * r2.y;
  r4.xyw = r2.xxx ? r2.www : r4.yzx;
  o2.w = r2.w;
  o0.w = r4.w;
  o1.w = r4.w;
  r2.x = FC_WetParam2.z * r3.x;
  r2.y = FC_WetRefrectanceColor.w * r3.x;
  r2.z = FC_SpcParam.x * 0.00390625;
  r2.w = r2.z * r1.w;
  r1.w = -r1.w * r2.z + FC_WetParam2.x;
  r1.w = r2.x * r1.w + r2.w;
  o1.x = r2.z * r1.w;
  o1.y = 0;
  o1.z = VC_InstanceData[r3.y].ShLightMask.x;
  r2.xzw = FC_WetRefrectanceColor.xyz + -r1.xyz;
  r1.xyz = r2.yyy * r2.xzw + r1.xyz;
  o3.xyz = sqrt(r1.xyz);
  r1.xyz = float3(1,1,1) + -r1.xyz;
  o3.w = r4.x;
  o4.w = r4.y;
  r0.w = 1;
  r2.x = dot(r0.xyzw, VC_InstanceData[r3.y].aSh[0].xyzw);
  r2.y = dot(r0.xyzw, VC_InstanceData[r3.y].aSh[1].xyzw);
  r2.z = dot(r0.xyzw, VC_InstanceData[r3.y].aSh[2].xyzw);
  r0.xyz = max(float3(0,0,0), r2.xyz);
  o4.xyz = r0.xyz * r1.xyz;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Original ASM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.20546
//
//
// Buffer Definitions: 
//
// cbuffer cbTextureTilingScale
// {
//
//   float4 FC_TextureTilingScale[25];  // Offset:    0 Size:   400
//
// }
//
// cbuffer cbMatDynParam
// {
//
//   bool FC_isDitherAlpha;             // Offset:    0 Size:     4 [unused]
//   float FC_TranslucencyScale;        // Offset:   16 Size:     4 [unused]
//   float4 FC_EmissiveColor;           // Offset:   32 Size:    16 [unused]
//   float4 FC_BlendMaskParam;          // Offset:   48 Size:    16 [unused]
//   float FC_PomHeightScale;           // Offset:   64 Size:     4 [unused]
//   float FC_PomHeightBias;            // Offset:   68 Size:     4 [unused]
//   float FC_PomMinSamples;            // Offset:   72 Size:     4 [unused]
//   float FC_PomMaxSamples;            // Offset:   76 Size:     4 [unused]
//   float FC_PomShadowSoftening;       // Offset:   80 Size:     4 [unused]
//   bool FC_bPomDisplayShadows;        // Offset:   84 Size:     4 [unused]
//   float4 FC_ParallaxParam;           // Offset:   96 Size:    16 [unused]
//   float FC_Pom2HeightScale;          // Offset:  112 Size:     4 [unused]
//   float FC_Pom2HeightBias;           // Offset:  116 Size:     4 [unused]
//   float FC_Pom2MinSamples;           // Offset:  120 Size:     4 [unused]
//   float FC_Pom2MaxSamples;           // Offset:  124 Size:     4 [unused]
//   bool VC_isEnableCloth;             // Offset:  128 Size:     4 [unused]
//   float FC_EnvMapDolBlendRate;       // Offset:  144 Size:     4 [unused]
//   float4 FC_SnowMaskParam;           // Offset:  160 Size:    16 [unused]
//   float FC_FROZEN_THRESHOLD;         // Offset:  176 Size:     4 [unused]
//   float FC_FROZEN_POW;               // Offset:  180 Size:     4 [unused]
//   float FC_BlendRate;                // Offset:  192 Size:     4 [unused]
//   float4 FC_FlowMapUvTiling;         // Offset:  208 Size:    16 [unused]
//   float4 FC_FlowMapIntencity;        // Offset:  224 Size:    16 [unused]
//   float FC_SoftVolume;               // Offset:  240 Size:     4 [unused]
//   float FC_PointCloudRate;           // Offset:  256 Size:     4 [unused]
//   float4 FC_WaterNormalUvScrollSpeed;// Offset:  272 Size:    16 [unused]
//   float4 FC_WaterDiffuseUvScrollSpeed;// Offset:  288 Size:    16 [unused]
//   float4 FC_WaterMiddleUvScrollSpeed;// Offset:  304 Size:    16 [unused]
//   float4 FC_WaterFogParam0;          // Offset:  320 Size:    16 [unused]
//   float4 FC_WaterFogParam1;          // Offset:  336 Size:    16 [unused]
//   float4 FC_WaterFresnel;            // Offset:  352 Size:    16 [unused]
//   float4 FC_WaterFadeParam;          // Offset:  368 Size:    16 [unused]
//   float4 FC_DynamicDiffuseColor;     // Offset:  384 Size:    16 [unused]
//   float FC_SSS_ID;                   // Offset:  400 Size:     4 [unused]
//   float4 FC_PhantomEdgeColor;        // Offset:  416 Size:    16 [unused]
//   float4 FC_PhantomFrontColor;       // Offset:  432 Size:    16 [unused]
//   float4 FC_PhantomDiffColor;        // Offset:  448 Size:    16 [unused]
//   float4 FC_PhantomSpecColor;        // Offset:  464 Size:    16 [unused]
//   float4 FC_PhantomLightColor;       // Offset:  480 Size:    16 [unused]
//   float VC_VelocityOffset;           // Offset:  496 Size:     4 [unused]
//   float4 FC_DamagedNormalParam;      // Offset:  512 Size:    16 [unused]
//   float4 FC_DamagedNormalUvTiling;   // Offset:  528 Size:    16 [unused]
//   float4 FC_DamagedNormal2UvTiling;  // Offset:  544 Size:    16 [unused]
//   float4 FC_WetDiffuseColor;         // Offset:  560 Size:    16
//   float4 FC_WetParam1;               // Offset:  576 Size:    16
//   float4 FC_WetRefrectanceColor;     // Offset:  592 Size:    16
//   float4 FC_WetParam2;               // Offset:  608 Size:    16
//
// }
//
// cbuffer cbMtdParam
// {
//
//   float4 FC_DifMapMulCol;            // Offset:    0 Size:    16
//   float4 FC_SpcMapMulCol;            // Offset:   16 Size:    16 [unused]
//   float4 FC_SpcParam;                // Offset:   32 Size:    16
//   float4 FC_SSAOParam;               // Offset:   48 Size:    16 [unused]
//   float3 FC_CDRFParam;               // Offset:   64 Size:    12 [unused]
//   float4 FC_AlphaRef;                // Offset:   80 Size:    16
//   float FC_BloodAmount;              // Offset:   96 Size:     4
//   float4 old_FC_ParallaxParam;       // Offset:  112 Size:    16 [unused]
//   float FC_IOR;                      // Offset:  128 Size:     4 [unused]
//   float4 FC_GlowScale;               // Offset:  144 Size:    16 [unused]
//   float4 FC_GhostEdgeColor;          // Offset:  160 Size:    16 [unused]
//   float4 FC_GhostEdgeParam;          // Offset:  176 Size:    16 [unused]
//   float4 FC_BmpBlendParam0;          // Offset:  192 Size:    16 [unused]
//   float4 FC_BmpBlendParam1;          // Offset:  208 Size:    16 [unused]
//   float FC_UNUSED_SSS_ID;            // Offset:  224 Size:     4 [unused]
//   float4 FC_HairSpecularParam0;      // Offset:  320 Size:    16 [unused]
//   float4 FC_HairSpecularParam1;      // Offset:  336 Size:    16 [unused]
//   float4 FC_HairSpecularParam2;      // Offset:  352 Size:    16 [unused]
//   float4 FC_RimLightingParam;        // Offset:  368 Size:    16 [unused]
//
// }
//
// cbuffer cbInstanceData
// {
//
//   struct PerInstanceData
//   {
//       
//       float4x3 mWorld;               // Offset:    0
//       float4 atlasUvScaleOffset;     // Offset:   48
//       float4 userClipPlane;          // Offset:   64
//       uint4 matricesData;            // Offset:   80
//       uint envData;                  // Offset:   96
//       bool dynamicLightDisable;      // Offset:  100
//       uint2 envPad;                  // Offset:  104
//       float4 mulCol;                 // Offset:  112
//       float4 aSh[3];                 // Offset:  128
//       float4 ShLightMask;            // Offset:  176
//       float4 vDominantRotateParam;   // Offset:  192
//       float4 parallaxCorrectedCubemapOrigin_envMapInterpRatio;// Offset:  208
//       float4 parallaxCorrectedCubemapAabbMin_envMapColorScale0;// Offset:  224
//       float4 parallaxCorrectedCubemapAabbMax_envMapColorScale1;// Offset:  240
//       float ditherFadeAlpha;         // Offset:  256
//
//   } VC_InstanceData[2];              // Offset:    0 Size:   532
//
// }
//
// cbuffer cbModelParam
// {
//
//   float4 FC_DifColMul;               // Offset:    0 Size:    16 [unused]
//   float FC_EnvMapInterpRatio;        // Offset:   16 Size:     4 [unused]
//   float FC_EnvMapColorScale0;        // Offset:   20 Size:     4 [unused]
//   float FC_EnvMapColorScale1;        // Offset:   24 Size:     4 [unused]
//   float FC_DitherEnable;             // Offset:   32 Size:     4 [unused]
//   float FC_FROZEN_RATE;              // Offset:   44 Size:     4 [unused]
//   float FC_Perlin_Freq;              // Offset:   48 Size:     4 [unused]
//   float FC_Perlin_Amp;               // Offset:   52 Size:     4 [unused]
//   float FC_Perlin_Lacunarity;        // Offset:   56 Size:     4 [unused]
//   float FC_Perlin_Gain;              // Offset:   60 Size:     4 [unused]
//   float FC_SnowRate;                 // Offset:   64 Size:     4 [unused]
//   float FC_SnowMinDot;               // Offset:   68 Size:     4 [unused]
//   float FC_SnowMaxDot;               // Offset:   72 Size:     4 [unused]
//   float FC_SparkleExponent;          // Offset:   80 Size:     4 [unused]
//   float FC_SparkleThreshold;         // Offset:   84 Size:     4 [unused]
//   float FC_SparkleMul;               // Offset:   88 Size:     4 [unused]
//   float FC_SparkleMaskExponent;      // Offset:   92 Size:     4 [unused]
//   float4 FC_SkinMatchColor;          // Offset:   96 Size:    16
//   int FC_EnvId;                      // Offset:  112 Size:     4 [unused]
//   float4 FC_ParallaxCorrectedCubemapOriginA;// Offset:  128 Size:    16 [unused]
//   float4 FC_ParallaxCorrectedCubemapOriginB;// Offset:  144 Size:    16 [unused]
//   float4x4 FC_ParallaxCorrectedCubemapObbA;// Offset:  160 Size:    64 [unused]
//   float4x4 FC_ParallaxCorrectedCubemapInvObbA;// Offset:  224 Size:    64 [unused]
//   float4x4 FC_ParallaxCorrectedCubemapObbB;// Offset:  288 Size:    64 [unused]
//   float4x4 FC_ParallaxCorrectedCubemapInvObbB;// Offset:  352 Size:    64 [unused]
//   float FC_ParallaxCorrectedCubemapObbAEnable;// Offset:  416 Size:     4 [unused]
//   float FC_ParallaxCorrectedCubemapObbBEnable;// Offset:  420 Size:     4 [unused]
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// SS_DiffuseMap                     sampler      NA          NA    0        1
// SS_SpecularMap                    sampler      NA          NA    1        1
// SS_BumpMap                        sampler      NA          NA    2        1
// g_DiffuseTexture                  texture  float4          2d    0        1
// g_SpecularTexture                 texture  float4          2d    1        1
// g_BumpmapTexture                  texture  float4          2d    3        1
// g_DecalDiffuseTexture             texture  float4          2d   41        1
// g_DecalSpecularTexture            texture  float4          2d   42        1
// cbTextureTilingScale              cbuffer      NA          NA    1        1
// cbMatDynParam                     cbuffer      NA          NA    2        1
// cbMtdParam                        cbuffer      NA          NA    3        1
// cbInstanceData                    cbuffer      NA          NA    4        1
// cbModelParam                      cbuffer      NA          NA    7        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position              0   xyzw        0      POS   float       
// TEXCOORD                 1   xyzw        1     NONE   float   xyzw
// TEXCOORD                 3   xyzw        2     NONE   float   xyzw
// COLOR                    1   xyzw        3     NONE   float     zw
// TEXCOORD                 5   xyzw        4     NONE   float   xyzw
// SV_IsFrontFace           0   x           5    FFACE    uint   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
// SV_Target                4   xyzw        4   TARGET   float   xyzw
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb1[4], immediateIndexed
dcl_constantbuffer cb2[39], immediateIndexed
dcl_constantbuffer cb3[7], immediateIndexed
dcl_constantbuffer cb4[34], dynamicIndexed
dcl_constantbuffer cb7[7], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s1, mode_default
dcl_sampler s2, 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) t3
dcl_resource_texture2d (float,float,float,float) t41
dcl_resource_texture2d (float,float,float,float) t42
dcl_input_ps linear v1.xyzw
dcl_input_ps linear v2.xyzw
dcl_input_ps linear v3.zw
dcl_input_ps linear v4.xyzw
dcl_input_ps_sgv v5.x, is_front_face
dcl_output o0.xyzw
dcl_output o1.xyzw
dcl_output o2.xyzw
dcl_output o3.xyzw
dcl_output o4.xyzw
dcl_temps 7
dp3 r0.x, v1.xyzx, v1.xyzx
rsq r0.x, r0.x
mul r0.xyz, r0.xxxx, v1.xyzx
movc r0.xyz, v5.xxxx, r0.xyzx, -r0.xyzx
mul r1.xyz, v1.zxyz, v2.yzxy
mad r1.xyz, v1.yzxy, v2.zxyz, -r1.xyzx
mul r1.xyz, r1.xyzx, v2.wwww
dp3 r0.w, r1.xyzx, r1.xyzx
rsq r0.w, r0.w
mul r1.xyz, r0.wwww, r1.xyzx
dp3 r0.w, v2.xyzx, v2.xyzx
rsq r0.w, r0.w
mul r2.xyz, r0.wwww, v2.xyzx
mad r3.xy, v4.xyxx, cb1[3].xyxx, cb1[3].zwzz
sample_indexable(texture2d)(float,float,float,float) r3.xyw, r3.xyxx, t3.xywz, s2
mad r4.xy, r3.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
mul r2.xyz, r2.xyzx, r4.yyyy
mad r1.xyz, r4.xxxx, r1.xyzx, r2.xyzx
dp2 r0.w, r4.xyxx, r4.xyxx
min r0.w, r0.w, l(1.000000)
add r0.w, -r0.w, l(1.000000)
sqrt r0.w, r0.w
mad r0.xyz, r0.wwww, r0.xyzx, r1.xyzx
dp3 r0.w, r0.xyzx, r0.xyzx
rsq r0.w, r0.w
mul r0.xyz, r0.wwww, r0.xyzx
mad o0.xyz, r0.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000), l(0.500489, 0.500489, 0.500489, 0.000000)
sample_indexable(texture2d)(float,float,float,float) r1.xw, v4.zwzz, t42.yzwx, s1
mul r1.xyz, r1.xxxx, r1.xxxx
mad r2.xy, v4.xyxx, cb1[1].xyxx, cb1[1].zwzz
sample_indexable(texture2d)(float,float,float,float) r3.xyz, r2.xyxx, t1.xyzw, s1
sample_indexable(texture2d)(float,float,float,float) r2.xyzw, v4.zwzz, t41.xyzw, s0
mad r1.xyzw, r3.xyzw, r2.wwww, r1.xyzw
add r1.xyzw, -r3.xyzw, r1.xyzw
mad r1.xyzw, cb3[6].xxxx, r1.xyzw, r3.xyzw
dp3 r3.x, r1.xyzx, l(0.298910, 0.586610, 0.114480, 0.000000)
add r3.y, -cb2[36].x, cb2[36].y
mad r3.x, r3.x, r3.y, cb2[36].x
mad r3.x, r3.x, l(1.200000), -v3.z
mul_sat r3.x, r3.x, l(10.000000)
mul r3.y, r3.x, cb2[35].w
mad r3.zw, v4.xxxy, cb1[0].xxxy, cb1[0].zzzw
sample_indexable(texture2d)(float,float,float,float) r4.xyzw, r3.zwzz, t0.xyzw, s0
sqrt r5.xyz, r4.xyzx
add_sat r5.xyz, r5.xyzx, cb7[6].xyzx
mul r6.xyz, r5.xyzx, r5.xyzx
mad r5.xyz, -r5.xyzx, r5.xyzx, cb2[35].xyzx
mad r3.yzw, r3.yyyy, r5.xxyz, r6.xxyz
mad r2.xyz, r3.yzwy, r2.wwww, r2.xyzx
add r2.xyz, -r3.yzwy, r2.xyzx
mad r4.xyz, cb3[6].xxxx, r2.xyzx, r3.yzwy
mov r2.x, l(1.000000)
mov r2.w, v3.w
mul r2.xyzw, r2.xxxw, r4.xyzw
round_ne r3.y, v1.w
ftou r3.y, r3.y
imul null, r3.y, r3.y, l(17)
mul r2.w, r2.w, cb4[r3.y + 7].w
mul o2.xyz, r2.xyzx, cb3[0].xyzx
ne r2.x, l(0.000000, 0.000000, 0.000000, 0.000000), cb3[5].z
mov r4.xz, l(0,0,1.000000,0)
utof r2.y, cb4[r3.y + 6].x
mul r4.y, r2.y, l(0.003922)
movc r4.xyw, r2.xxxx, r2.wwww, r4.yzyx
mov o2.w, r2.w
mov o0.w, r4.w
mov o1.w, r4.w
mul r2.x, r3.x, cb2[38].z
mul r2.y, r3.x, cb2[37].w
mul r2.z, l(0.003906), cb3[2].x
mul r2.w, r1.w, r2.z
mad r1.w, -r1.w, r2.z, cb2[38].x
mad r1.w, r2.x, r1.w, r2.w
mul o1.x, r1.w, r2.z
mov o1.y, l(0)
mov o1.z, cb4[r3.y + 11].x
add r2.xzw, -r1.xxyz, cb2[37].xxyz
mad r1.xyz, r2.yyyy, r2.xzwx, r1.xyzx
sqrt o3.xyz, r1.xyzx
add r1.xyz, -r1.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
mov o3.w, r4.x
mov o4.w, r4.y
mov r0.w, l(1.000000)
dp4 r2.x, r0.xyzw, cb4[r3.y + 8].xyzw
dp4 r2.y, r0.xyzw, cb4[r3.y + 9].xyzw
dp4 r2.z, r0.xyzw, cb4[r3.y + 10].xyzw
max r0.xyz, r2.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
mul o4.xyz, r1.xyzx, r0.xyzx
ret 
// Approximately 89 instruction slots used

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