//
// Generated by Microsoft (R) HLSL Shader Compiler 10.0.10011.16384
//
//   using 3Dmigoto v1.3.16 on Tue Jan 18 18:00:17 2022
//
//
// Buffer Definitions:
//
// cbuffer ConstBuf__modelData
// {
//
//   struct ModelData
//   {
//
//       uint lightGroupID;             // Index:    0
//       uint modelFlags;               // Index:    0.y
//       float lodFade;                 // Index:    0.z
//       float displacementBlend;       // Index:    0.w
//       int turbulenceDataIdx;         // Index:    1
//       int instanceOffset;            // Index:    1.y
//       int characterFxIdx;            // Index:    1.z
//       uint debugRenderChannel;       // Index:    1.w
//       uint decayWriteOffset;         // Index:    2
//       uint decayWriteMaxCount;       // Index:    2.y
//       uint decayAtomicCounterIndex;  // Index:    2.z
//       float modelAlpha;              // Index:    2.w
//       float emissiveScale;           // Index:    3
//       float desaturationScale;       // Index:    3.y
//       float decayCoverageEstimation; // Index:    3.z
//       float3 quantScale;             // Index:    4
//       float3 quantBias;              // Index:    5
//
//   } resourceTables__modelData;       // Index:    0-5.z            Components:    23
                                        // Textures:  t15-t17
//
// }
//
// cbuffer ConstBuf__viewData
// {
//
//   struct ViewData
//   {
//
//       float4x4 view;                 // Index:    0
//       float4x4 invView;              // Index:    4
//       float4x4 proj;                 // Index:    8
//       float4x4 invViewProjNoZReproj; // Index:   12
//       float4x4 viewProj;             // Index:   16
//       float4x4 invViewProj;          // Index:   20
//       float4x4 previousViewProj;     // Index:   24
//       float4 prevLodEyePos;          // Index:   28
//       float4 lodEyePos;              // Index:   29
//       float4 viewDirDepthBias;       // Index:   30
//       float3 eyePos;                 // Index:   31
//       float2 viewportSize;           // Index:   32
//       float2 invViewportSize;        // Index:   32.z
//       float4 mirrorPlaneWS;          // Index:   33
//       float2 mirrorViewportSize;     // Index:   34
//       float2 opaqueRefractionViewportSize;// Index:   34.z
//       float windTime;                // Index:   35
//       float deltaTime;               // Index:   35.y
//       float depthReprojectScale;     // Index:   35.z
//       float depthReprojectBias;      // Index:   35.w
//       uint shadowViewType;           // Index:   36
//       float normalDepthBias;         // Index:   36.y
//       float noNormalAA;              // Index:   36.z
//       float noNormalFromAlpha;       // Index:   36.w
//       float noOpaqueTransparency;    // Index:   37
//       float translucentAmount;       // Index:   37.y
//       uint framePhase;               // Index:   37.z
//       float cameraAmbientExposure;   // Index:   37.w
//       float fxExposure;              // Index:   38
//       float fxAmbientExposure;       // Index:   38.y
//       uint checkerboardPhase;        // Index:   38.z
//       float sparkleIntensityScale;   // Index:   38.w
//
//   } resourceTables__viewData;        // Index:    0-38             Components:   156
//
// }
//
// cbuffer ConstBuf__materialData
// {
//
//   struct MaterialData
//   {
//
//       float3 material_vertexoffset_matU;// Index:    0
//       float3 material_vertexoffset_matV;// Index:    1
//       float3 material_dudv1_matU;    // Index:    2
//       float3 material_dudv1_matV;    // Index:    3
//       float3 LayerX_normal_matU;     // Index:    4
//       float3 LayerX_normal_matV;     // Index:    5
//       float3 LayerX_alpha_matU;      // Index:    6
//       float3 LayerX_alpha_matV;      // Index:    7
//       float3 Layer0_emissive_matU;   // Index:    8
//       float3 Layer0_emissive_matV;   // Index:    9
//       float3 Layer0_alpha_matU;      // Index:   10
//       float3 Layer0_alpha_matV;      // Index:   11
//       float LayerX_cst_AlphaBlendAmount;// Index:   11.w
//       float Layer0_cst_AlphaBlendAmount;// Index:   12
//       float Layer0_cst_AlphaReference;// Index:   12.y
//
//   } resourceTables__materialData;    // Index:    0-12.y           Components:    50
                                        // Texture:   t41
//
// }
//
// Resource bind info for resourceTables__modelData.instancingBuffer
// {
//
//   struct InstancingData
//   {
//
//       float4x3 transformCurrentFrame;// Index:    0
//       float4x3 transformPrevFrame;   // Index:    3
//       uint vertColOffset;            // Index:    6
//       uint packedLodFadeDisplacementTurbulenceIdx;// Index:    6.y
//
//   } $Element;                        // Index:    0-6.y            Components:    26
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// resourceTables__viewData__smpLinear    sampler      NA          NA    1        1
// resourceTables__modelData.instancingBuffer    texture  struct         r/o   17        1
// resourceTables__materialData.material_vertexoffset    texture  float4          2d   41        1
// ConstBuf__modelData               cbuffer      NA          NA    1        1
// ConstBuf__viewData                cbuffer      NA          NA    3        1
// ConstBuf__materialData            cbuffer      NA          NA    4        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xyzw        0     NONE   float   xyz
// TEXCOORD                 0   xy          1     NONE   float   xy
// NORMAL                   0   xyz         2     NONE   float   xyz
// TANGENT                  0   xyzw        3     NONE   float   xyzw
// TEXCOORD                 4   xyzw        4     NONE    uint   xyzw
// SV_InstanceID            0   x           5   INSTID    uint   x
// SV_VertexID              0   x           6   VERTID    uint   x
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float   xyzw
// VERT_ID                  0   x           1     NONE    uint   x
// TEXCOORD                 0   xy          2     NONE   float   xy
// NORMAL                   0   xyz         3     NONE   float   xyz
// TANGENT                  0   xyz         4     NONE   float   xyz
// BINORMAL                 0   xyz         5     NONE   float   xyz
// TEXCOORD                 5   xyzw        6     NONE   float   xyzw
// TEXCOORD                 8   xyz         7     NONE   float   xyz
//
vs_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb1[6], immediateIndexed
dcl_constantbuffer cb3[28], immediateIndexed
dcl_constantbuffer cb4[2], immediateIndexed
dcl_sampler s1, mode_default
dcl_resource_structured t17, 104
dcl_resource_texture2d (float,float,float,float) t41
dcl_input v0.xyz
dcl_input v1.xy
dcl_input v2.xyz
dcl_input v3.xyzw
dcl_input v4.xyzw
dcl_input_sgv v5.x, instance_id
dcl_input_sgv v6.x, vertex_id
dcl_output_siv o0.xyzw, position
dcl_output o1.x
dcl_output o2.xy
dcl_output o3.xyz
dcl_output o4.xyz
dcl_output o5.xyz
dcl_output o6.xyzw
dcl_output o7.xyz
dcl_temps 50
dcl_resource_texture2d (float,float,float,float) t125
ld_indexable(texture2d)(float,float,float,float) r40.xyzw, l(0, 0, 0, 0), t125.xyzw
mov r0.xy, v1.xyxx
mov r0.z, l(1.000000)
dp3 r1.x, cb4[0].xyzx, r0.xyzx
dp3 r1.y, cb4[1].xyzx, r0.xyzx
sample_l_indexable(texture2d)(float,float,float,float) r0.x, r1.xyxx, t41.xyzw, s1, l(0.000000)
mul r0.x, r0.x, l(0.050000)
iadd r0.y, v5.x, cb1[1].y
ld_structured_indexable(structured_buffer, stride=104)(mixed,mixed,mixed,mixed) r1.xyzw, r0.y, l(0), t17.xyzw
mov r2.x, r1.w
ld_structured_indexable(structured_buffer, stride=104)(mixed,mixed,mixed,mixed) r3.xyzw, r0.y, l(16), t17.xyzw
mov r2.y, r3.w
ld_structured_indexable(structured_buffer, stride=104)(mixed,mixed,mixed,mixed) r4.xyzw, r0.y, l(32), t17.xyzw
mov r2.z, r4.w
mad r5.xyz, v0.xyzx, cb1[4].xyzx, cb1[5].xyzx
dp3 r6.x, r5.xyzx, r1.xyzx
dp3 r6.y, r5.xyzx, r3.xyzx
dp3 r6.z, r5.xyzx, r4.xyzx
add r2.xyz, r2.xyzx, r6.xyzx
mad r6.xyz, v2.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(-1.000000, -1.000000, -1.000000, 0.000000)
dp3 r7.x, r6.xyzx, r1.xyzx
dp3 r7.y, r6.xyzx, r3.xyzx
dp3 r7.z, r6.xyzx, r4.xyzx
dp3 r0.z, r7.xyzx, r7.xyzx
rsq r0.z, r0.z
mul r6.xyz, r0.zzzz, r7.xyzx
mad r2.xyz, r6.xyzx, r0.xxxx, r2.xyzx
mov r2.w, l(1.000000)
dp4 r42.x, r2.xyzw, cb3[16].xyzw
dp4 r42.y, r2.xyzw, cb3[17].xyzw
dp4 r42.z, r2.xyzw, cb3[18].xyzw
dp4 r42.w, r2.xyzw, cb3[19].xyzw
ieq r41.x, r42.w, l(1.0)
if_nz r41.x
add r40.w, r42.w, -r40.y
mad r42.x, r40.x, r40.w, r42.x
endif
mov o0.xyzw, r42.xyzw
ld_structured_indexable(structured_buffer, stride=104)(mixed,mixed,mixed,mixed) r0.z, r0.y, l(100), t17.xxxx
bfi o1.x, l(24), l(0), v6.x, r0.z
mov o2.xy, v1.xyxx
mov o3.xyz, r6.xyzx
mad r2.xyzw, v3.xyzw, l(2.000000, 2.000000, 2.000000, 2.000000), l(-1.000000, -1.000000, -1.000000, -1.000000)
dp3 r1.x, r2.xyzx, r1.xyzx
dp3 r1.y, r2.xyzx, r3.xyzx
dp3 r1.z, r2.xyzx, r4.xyzx
dp3 r0.z, r1.xyzx, r1.xyzx
rsq r0.z, r0.z
mul r1.xyz, r0.zzzz, r1.xyzx
mov o4.xyz, r1.xyzx
mul r2.xyz, r1.yzxy, r6.zxyz
mad r1.xyz, r6.yzxy, r1.zxyz, -r2.xyzx
mul r1.xyz, r2.wwww, r1.xyzx
dp3 r0.z, r1.xyzx, r1.xyzx
rsq r0.z, r0.z
mul r1.xyz, r0.zzzz, r1.xyzx
and r0.z, l(16), cb1[0].y
movc r0.z, r0.z, l(-1.000000), l(1.000000)
mul o5.xyz, r1.xyzx, r0.zzzz
utof r1.xyzw, v4.xyzw
mul o6.xyzw, r1.xyzw, l(0.00392156886, 0.00392156886, 0.00392156886, 0.00392156886)
ld_structured_indexable(structured_buffer, stride=104)(mixed,mixed,mixed,mixed) r1.xyzw, r0.y, l(48), t17.wxyz
dp3 r2.x, r5.xyzx, r1.yzwy
ld_structured_indexable(structured_buffer, stride=104)(mixed,mixed,mixed,mixed) r3.xyzw, r0.y, l(64), t17.xyzw
ld_structured_indexable(structured_buffer, stride=104)(mixed,mixed,mixed,mixed) r4.xyzw, r0.y, l(80), t17.xyzw
mov r1.y, r3.w
dp3 r2.y, r5.xyzx, r3.xyzx
dp3 r2.z, r5.xyzx, r4.xyzx
mov r1.z, r4.w
add r0.yzw, r1.xxyz, r2.xxyz
mad r0.xyz, r6.xyzx, r0.xxxx, r0.yzwy
mov r0.w, l(1.000000)
dp4 o7.x, r0.xyzw, cb3[24].xyzw
dp4 o7.y, r0.xyzw, cb3[25].xyzw
dp4 o7.z, r0.xyzw, cb3[27].xyzw
ret
// Approximately 69 instruction slots used
