//flickering shadows in animated leaders screen
// Generated by Microsoft (R) HLSL Shader Compiler 10.0.10011.16384
//
//   using 3Dmigoto v1.3.16 on Sun Aug 16 00:42:46 2020
//
//
// Buffer Definitions:
//
// cbuffer LeaderDynamics
// {
//
//   float g_std_dev;                   // Index:    0.x              Components:     1 [unused]
//   float3 g_weights;                  // Index:    0.yzw            Components:     3 [unused]
//   uint g_n_vertices;                 // Index:    1.x              Components:     1 [unused]
//   uint g_n_random_entries;           // Index:    1.y              Components:     1
//   uint g_n_hair_instances;           // Index:    1.z              Components:     1 [unused]
//   uint g_n_hair_segments;            // Index:    1.w              Components:     1
//   uint g_n_hair_segment_subdivisions;// Index:    2.x              Components:     1
//   uint g_n_strand_base_offset;       // Index:    2.y              Components:     1
//   float g_hair_width;                // Index:    2.z              Components:     1
//   float g_hair_taper_start_width;    // Index:    2.w              Components:     1
//   float g_hair_clump_width;          // Index:    3.x              Components:     1
//   float3 g_hair_basecolor;           // Index:    3.yzw            Components:     3 [unused]
//   float g_hair_accent_mix;           // Index:    4.x              Components:     1
//   float3 g_hair_basecolor2;          // Index:    4.yzw            Components:     3 [unused]
//   float g_hair_gloss_power;          // Index:    5.x              Components:     1 [unused]
//   float3 g_hair_basecolor_accent;    // Index:    5.yzw            Components:     3 [unused]
//   float g_hair_taper_start;          // Index:    6.x              Components:     1
//   float3 g_hair_basecolor_accent2;   // Index:    6.yzw            Components:     3 [unused]
//   float g_hair_diffuse_mix;          // Index:    7.x              Components:     1 [unused]
//   float3 g_translucency_color;       // Index:    7.yzw            Components:     3 [unused]
//   float4 g_clump_profile[2];         // Index:    8 9              Components:     8
//   uint g_bone_start;                 // Index:   10.x              Components:     1 [unused]
//   uint g_n_cps;                      // Index:   10.y              Components:     1 [unused]
//
// }
//
// cbuffer LeaderGlobals
// {
//
//   row_major float4x4 g_world;        // Index:    0 1 2 3          Components:    16 [unused]
//   row_major float4x4 g_world_invtrans;// Index:    4 5 6 7          Components:    16 [unused]
//   row_major float4x4 g_vp;           // Index:    8 9 10 11        Components:    16
//   float3 g_eye_pos;                  // Index:   12.xyz            Components:     3
//   float4 g_skin_window;              // Index:   13.xyzw           Components:     4 [unused]
//   float2 g_ortho_dims;               // Index:   14.xy             Components:     2
//   float2 g_filmgate;                 // Index:   14.zw             Components:     2 [unused]
//   float g_intermediate_exposure;     // Index:   15.x              Components:     1 [unused]
//   float4 g_light_colors[3];          // Index:   16 17 18          Components:    12 [unused]
//   float4 g_light_dirs[3];            // Index:   19 20 21          Components:    12 [unused]
//   row_major float4x4 g_ao_mat;       // Index:   22 23 24 25       Components:    16 [unused]
//   row_major float4x4 g_shadow_mats[3];// Index:   26-37             Components:    48 [unused]
//   row_major float4x4 g_inv_shadow_mats[3];// Index:   38-49             Components:    48 [unused]
//   float4 g_shadow_windows[3];        // Index:   50 51 52          Components:    12 [unused]
//   uint g_n_lights;                   // Index:   53.x              Components:     1 [unused]
//   bool g_b_dither;                   // Index:   53.y              Components:     1 [unused]
//   float2 g_dither_offset;            // Index:   53.zw             Components:     2 [unused]
//   float2 g_dither_inv_dims;          // Index:   54.xy             Components:     2 [unused]
//
// }
//
// cbuffer LeaderRenderTargetGlobals
// {
//
//   float2 g_rendertarget_dims;        // Index:    0.xy             Components:     2
//   float2 g_inv_rendertarget_dims;    // Index:    0.zw             Components:     2 [unused]
//   float g_vertical_pixel_scale;      // Index:    1.x              Components:     1 [unused]
//   uint g_rt_msaa_samples;            // Index:    1.y              Components:     1
//   float g_moblur_tile_size;          // Index:    1.z              Components:     1 [unused]
//   float g_moblur_timescale;          // Index:    1.w              Components:     1 [unused]
//
// }
//
// Resource bind info for tx_hair_random
// {
//
//   float $Element;                    // Index:    0.x              Components:     1
//
// }
//
// Resource bind info for tx_transformed_hair_cps
// {
//
//   struct HairCP_NoBones
//   {
//
//       float pos_x;                   // Index:    0
//       float pos_y;                   // Index:    0.y
//       float pos_z;                   // Index:    0.z
//       float tngt_x;                  // Index:    0.w
//       float tngt_y;                  // Index:    1
//       float tngt_z;                  // Index:    1.y
//       float nrml_x;                  // Index:    1.z
//       float nrml_y;                  // Index:    1.w
//       float nrml_z;                  // Index:    2
//
//   } $Element;                        // Index:    0-2.x            Components:     9
//
// }
//
// Resource bind info for tx_clump_positions
// {
//
//   float4 $Element;                   // Index:    0.xyzw           Components:     4
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// tx_hair_random                    texture  struct         r/o   14        1
// tx_transformed_hair_cps           texture  struct         r/o   18        1
// tx_clump_positions                texture  struct         r/o   22        1
// LeaderDynamics                    cbuffer      NA          NA    0        1
// LeaderGlobals                     cbuffer      NA          NA    1        1
// LeaderRenderTargetGlobals         cbuffer      NA          NA    2        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_VERTEXID              0   x           0   VERTID    uint   x
// SV_INSTANCEID            0   x           1   INSTID    uint   x
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float   xyzw
// TEXCOORD                 0   xyz         1     NONE   float   xyz
// TEXCOORD                 4      w        1     NONE   float      w
// TEXCOORD                 1   xyz         2     NONE   float   xyz
// TEXCOORD                 5      w        2     NONE   float      w
//
vs_5_0

dcl_constantbuffer cb12[0], immediateIndexed

dcl_globalFlags refactoringAllowed
dcl_immediateConstantBuffer { { 1.000000, 0, 0, 0},
                              { 0, 1.000000, 0, 0},
                              { 0, 0, 1.000000, 0},
                              { 0, 0, 0, 1.000000} }
dcl_constantbuffer cb0[10], dynamicIndexed
dcl_constantbuffer cb1[15], immediateIndexed
dcl_constantbuffer cb2[2], immediateIndexed
dcl_resource_structured t14, 4
dcl_resource_structured t18, 36
dcl_resource_structured t22, 16
dcl_input_sgv v0.x, vertex_id
dcl_input_sgv v1.x, instance_id
dcl_output_siv o0.xyzw, position
dcl_output o1.xyz
dcl_output o1.w
dcl_output o2.xyz
dcl_output o2.w
dcl_temps 11
dcl_indexableTemp x0[2], 4
mov x0[0].x, l(0.500000)
mov x0[1].x, l(-0.500000)
iadd r0.x, l(1), cb0[1].w
imad r0.x, v1.x, r0.x, cb0[2].y
ishl r0.y, cb0[2].x, l(1)
iadd r0.y, r0.y, l(4)
imul null, r0.z, r0.y, cb0[1].w
udiv r1.x, r2.x, v0.x, r0.z
xor r0.z, r0.y, r2.x
imax r0.y, r0.y, -r0.y
and r0.z, r0.z, l(0x80000000)
imax r0.w, r2.x, -r2.x
udiv r3.x, r4.x, r0.w, r0.y
ineg r0.y, r3.x
movc r0.y, r0.z, r0.y, r3.x
iadd r0.x, r0.y, r0.x
itof r0.y, r0.y
ld_structured_indexable(structured_buffer, stride=36)(mixed,mixed,mixed,mixed) r3.y, r0.x, l(32), t18.xxxx
iadd r0.z, r0.x, l(1)
ld_structured_indexable(structured_buffer, stride=36)(mixed,mixed,mixed,mixed) r5.y, r0.z, l(32), t18.xxxx
ld_structured_indexable(structured_buffer, stride=36)(mixed,mixed,mixed,mixed) r6.xyzw, r0.x, l(16), t18.zxyw
ld_structured_indexable(structured_buffer, stride=36)(mixed,mixed,mixed,mixed) r7.xyzw, r0.x, l(0), t18.xyzw
mov r3.xz, r6.wwxw
ld_structured_indexable(structured_buffer, stride=36)(mixed,mixed,mixed,mixed) r8.xyzw, r0.z, l(16), t18.zxyw
ld_structured_indexable(structured_buffer, stride=36)(mixed,mixed,mixed,mixed) r9.xyzw, r0.z, l(0), t18.xyzw
mov r5.xz, r8.wwxw
add r0.xzw, -r3.xxyz, r5.xxyz
and r1.y, r2.x, l(0x80000000)
ineg r1.z, r4.x
movc r1.y, r1.y, r1.z, r4.x
xor r1.z, r1.y, l(2)
imax r1.w, r1.y, -r1.y
ushr r2.x, r1.w, l(1)
and r1.yzw, r1.yyzw, l(0, 0x80000000, 0x80000000, 1)
ineg r2.y, r2.x
movc r1.z, r1.z, r2.y, r2.x
itof r1.z, r1.z
iadd r2.x, l(1), cb0[2].x
itof r2.x, r2.x
div r1.z, r1.z, r2.x
mad r0.xzw, r1.zzzz, r0.xxzw, r3.xxyz
mov r8.x, r9.w
mov r6.x, r7.w
mul r2.xy, r1.zzzz, l(6.000000, 4.000000, 0.000000, 0.000000)
mul r2.z, r1.z, r1.z
mad r2.yw, r2.zzzz, l(0.000000, 6.000000, 0.000000, 3.000000), -r2.xxxy
mad r2.x, r2.z, l(-6.000000), r2.x
add r2.w, r2.w, l(1.000000)
mul r3.xyz, r6.xyzx, r2.wwww
mad r3.xyz, r2.yyyy, r7.xyzx, r3.xyzx
mad r2.xyw, r2.xxxx, r9.xyxz, r3.xyxz
mul r3.x, r2.z, l(3.000000)
mad r3.y, -r1.z, l(2.000000), r3.x
mad r2.xyw, r3.yyyy, r8.xyxz, r2.xyxw
dp3 r3.y, r2.xywx, r2.xywx
rsq r3.y, r3.y
mul r2.xyw, r2.xyxw, r3.yyyy
mul r3.yzw, r0.xxzw, r2.wwxy
mad r0.xzw, r2.yywx, r0.zzwx, -r3.yyzw
dp3 r3.y, r0.xzwx, r0.xzwx
rsq r3.y, r3.y
mul r0.xzw, r0.xxzw, r3.yyyy
mul r3.yzw, r2.yywx, r0.wwxz
mad r3.yzw, r0.zzwx, r2.wwxy, -r3.yyzw
ld_structured_indexable(structured_buffer, stride=16)(mixed,mixed,mixed,mixed) r4.xy, r1.x, l(0), t22.xyxx
iadd r1.x, r1.x, l(1)
imul null, r1.x, r1.x, v1.x
udiv null, r1.x, r1.x, cb0[1].y
ld_structured_indexable(structured_buffer, stride=4)(mixed,mixed,mixed,mixed) r1.x, r1.x, l(0), t14.xxxx
udiv null, r4.z, v1.x, cb0[1].y
ld_structured_indexable(structured_buffer, stride=4)(mixed,mixed,mixed,mixed) r4.z, r4.z, l(0), t14.xxxx
mul r4.z, r4.z, l(6.283186)
sincos r5.z, null, -r4.z
sincos r5.x, r10.x, r4.z
mov r5.y, r10.x
dp2 r4.z, r4.xyxx, r5.xyxx
dp2 r4.x, r4.xyxx, r5.yzyy
mul r0.xzw, r0.xxzw, r4.xxxx
mad r0.xzw, r4.zzzz, r3.yyzw, r0.xxzw
mul r0.xzw, r0.xxzw, cb0[3].xxxx
add r0.y, r0.y, r1.z
utof r3.y, cb0[1].w
div r0.y, r0.y, r3.y
mad r3.y, r0.y, l(0.875000), l(0.062500)
mad r3.y, r3.y, l(8.000000), l(0.500000)
ge r3.z, r3.y, -r3.y
movc r3.z, r3.z, l(1.000000), l(-1.000000)
mul r3.w, r3.z, r3.y
round_ni r3.y, r3.y
ftou r3.y, r3.y
iadd r3.y, r3.y, l(-1)
umin r3.y, r3.y, l(7)
frc r3.w, r3.w
mul r3.z, r3.w, r3.z
and r3.w, r3.y, l(3)
ushr r4.x, r3.y, l(2)
iadd r3.y, r3.y, l(1)
umin r3.y, r3.y, l(7)
dp4 r3.w, cb0[r4.x + 8].xyzw, icb[r3.w + 0].xyzw
and r4.x, r3.y, l(3)
ushr r3.y, r3.y, l(2)
dp4 r3.y, cb0[r3.y + 8].xyzw, icb[r4.x + 0].xyzw
add r3.y, -r3.w, r3.y
mad r3.y, r3.z, r3.y, r3.w
mul r3.z, r1.z, r2.z
mad r3.w, -r2.z, l(2.000000), r3.z
mad r2.z, r2.z, r1.z, -r2.z
add r1.z, r1.z, r3.w
mul r4.xyz, r6.xyzx, r1.zzzz
mad r1.z, r3.z, l(2.000000), -r3.x
mad r3.x, r3.z, l(-2.000000), r3.x
add r1.z, r1.z, l(1.000000)
mad r4.xyz, r1.zzzz, r7.xyzx, r4.xyzx
add r5.xyz, -r7.yzxy, cb1[12].yzxy
mad r3.xzw, r3.xxxx, r9.xxyz, r4.xxyz
mad r3.xzw, r2.zzzz, r8.xxyz, r3.xxzw
mad r0.xzw, r0.xxzw, r3.yyyy, r3.xxzw
add r1.z, r0.y, -cb0[6].x
add r2.z, l(1.000000), -cb0[6].x
div r1.z, r1.z, r2.z
add r1.z, -r1.z, l(1.000000)
div_sat r2.z, r0.y, cb0[6].x
lt r0.y, cb0[6].x, r0.y
add r3.x, -cb0[2].z, cb0[2].w
mad r2.z, r2.z, r3.x, cb0[2].z
lt r3.x, l(0.000000), cb0[6].x
movc r2.z, r3.x, r2.z, cb0[2].w
mul r1.z, r1.z, r2.z
movc r0.y, r0.y, r1.z, r2.z
div r1.z, l(1.000000, 1.000000, 1.000000, 1.000000), cb2[0].y
mul r1.z, r1.z, cb1[14].y
utof r2.z, cb2[1].y
sqrt r2.z, r2.z
div r1.z, r1.z, r2.z
max r0.y, r0.y, r1.z
dp3 r1.z, r5.xyzx, r5.xyzx
rsq r1.z, r1.z
mul r3.xyz, r1.zzzz, r5.xyzx
mul r4.xyz, r2.wxyw, r3.xyzx
mad r3.xyz, r2.ywxy, r3.yzxy, -r4.xyzx
mov o1.xyz, r2.xywx
dp3 r1.z, r3.xyzx, r3.xyzx
rsq r1.z, r1.z
mul r2.xyz, r1.zzzz, r3.xyzx
mul r2.xyz, r0.yyyy, r2.xyzx
ineg r0.y, r1.w
movc r0.y, r1.y, r0.y, r1.w
mov r0.y, x0[r0.y + 0].x
mad r0.xyz, r2.xyzx, r0.yyyy, r0.xzwx
mul r2.xyzw, r0.yyyy, cb1[9].xyzw
mad r2.xyzw, r0.xxxx, cb1[8].xyzw, r2.xyzw
mad r2.xyzw, r0.zzzz, cb1[10].xyzw, r2.xyzw
mov o2.xyz, r0.xyzx
add o0.xyzw, r2.xyzw, cb1[11].xyzw
mov o1.w, l(1.000000)
add r0.x, l(1.000000), -cb0[4].x
add r0.y, -r0.x, r1.x
div r0.y, r0.y, cb0[4].x
add r0.y, r0.y, l(1.000000)
lt r0.z, r1.x, r0.x
div r0.w, r1.x, r0.x
div r1.x, r1.x, cb0[4].x
add r1.x, r1.x, l(1.000000)
lt r0.x, l(0.000000), r0.x
movc r0.y, r0.z, r0.w, r0.y
movc o2.w, r0.x, r0.y, r1.x
ret
// Approximately 167 instruction slots used
