// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
//
//
// Buffer Definitions: 
//
// cbuffer SceneBuffer
// {
//
//   float4x4 g_View;                   // Offset:    0 Size:    64 [unused]
//   float4x4 g_Proj;                   // Offset:   64 Size:    64 [unused]
//   float4x4 g_ViewProjection;         // Offset:  128 Size:    64 [unused]
//   float4x4 g_ViewInverseMatrix;      // Offset:  192 Size:    64
//
// }
//
// cbuffer HPixel_Buffer
// {
//
//   float4 g_TargetUvParam;            // Offset:    0 Size:    16
//
// }
//
// cbuffer CamParam_HPixel_Buffer
// {
//
//   float4 g_CameraParam;              // Offset:    0 Size:    16
//   float4 g_CameraVec;                // Offset:   16 Size:    16 [unused]
//
// }
//
// cbuffer EffectParameterIndex
// {
//
//   uint g_EffectParameterIndex;       // Offset:    0 Size:     4
//
// }
//
// Resource bind info for g_EffectPixelCategoryBuffers
// {
//
//   struct EffectPixelCategoryBuffer
//   {
//       
//       float4 m_Category00;           // Offset:    0
//       float4 m_Category01;           // Offset:   16
//       float4 m_Category02;           // Offset:   32
//       float4 m_Category03;           // Offset:   48
//       float4 m_Category04;           // Offset:   64
//       float4 m_Category05;           // Offset:   80
//       float4 m_Category06;           // Offset:   96
//       float4 m_Category07;           // Offset:  112
//
//   } $Element;                        // Offset:    0 Size:   128
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// g_ColorTextureSampler             sampler      NA          NA    0        1
// g_MaskTextureSampler              sampler      NA          NA    2        1
// g_ColorTexture                    texture  float4          2d    0        1
// g_MaskTexture                     texture  float4          2d    2        1
// g_ZTexture                        texture  float4          2d   13        1
// g_EffectPixelCategoryBuffers      texture  struct         r/o   30        1
// SceneBuffer                       cbuffer      NA          NA    0        1
// EffectParameterIndex              cbuffer      NA          NA    1        1
// HPixel_Buffer                     cbuffer      NA          NA   12        1
// CamParam_HPixel_Buffer            cbuffer      NA          NA   13        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float   xy  
// TEXCOORD                 1   xyzw        1     NONE   float   xyzw
//
//
// 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 cb0[15], immediateIndexed
dcl_constantbuffer cb12[1], immediateIndexed
dcl_constantbuffer cb13[1], immediateIndexed
dcl_constantbuffer cb1[1], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s2, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_texture2d (float,float,float,float) t2
dcl_resource_texture2d (float,float,float,float) t13
dcl_resource_structured t30, 128 
dcl_input_ps_siv linear noperspective v0.xy, position
dcl_input_ps linear v1.xyzw
dcl_output o0.xyzw

dcl_resource_texture2d (float,float,float,float) t125
dcl_temps 6

ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r0.xyzw, cb1[0].x, l(16), t30.xyzw
resinfo_indexable(texture2d)(float,float,float,float) r1.xy, l(0), t13.xyzw
mul r1.zw, v0.xxxy, cb12[0].xxxy
add r2.xy, r1.zwzz, r1.zwzz
mad r1.zw, r1.zzzw, l(0.000000, 0.000000, 4.000000, -4.000000), l(0.000000, 0.000000, -1.000000, 1.000000)
mul r1.xy, r1.xyxx, r2.xyxx
sample_indexable(texture2d)(float,float,float,float) r2.xyzw, r2.xyxx, t0.xyzw, s0
ftoi r3.xy, r1.xyxx
mov r3.zw, l(0,0,0,0)
ld_indexable(texture2d)(float,float,float,float) r1.x, r3.xyzw, t13.xyzw
mad r1.x, r1.x, cb13[0].y, cb13[0].x
mul r1.yz, r1.xxxx, r1.zzwz
mov r3.z, -r1.x
mul r3.xy, r1.yzyy, cb13[0].zwzz
mov r3.w, l(1.000000)


ld_indexable(texture2d)(float,float,float,float) r5.xyzw, l(0, 0, 0, 0), t125.xyzw
add r5.y, r3.z, r5.y
mul r5.x, r5.x, r5.y
rcp r5.w, cb0[4].x
mul r5.x, r5.x, r5.w
add r3.x, r3.x, r5.x

dp4 r1.x, r3.xyzw, cb0[12].xyzw
dp4 r1.y, r3.xyzw, cb0[13].xyzw
dp4 r1.z, r3.xyzw, cb0[14].xyzw

mov r1.w, l(1.000000)
dp4 r0.y, r1.xyzw, r0.xyzw
ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r3.xyzw, cb1[0].x, l(0), t30.xyzw
dp4 r0.x, r1.xyzw, r3.xyzw
add r3.xyzw, r0.xyxy, l(1.000000, 1.000000, 0.500000, 0.500000)
add r0.zw, r0.xxxy, l(0.000000, 0.000000, 0.500000, 0.500000)
add r0.xy, r0.xwxx, l(0.500000, 0.000000, 0.000000, 0.000000)
dp2 r0.x, r0.zwzz, r0.xyxx
sqrt r0.x, r0.x
add r0.y, -r0.x, l(1.000000)
ge r0.zw, l(0.000000, 0.000000, 0.000000, 0.000000), r3.xxxy
discard_nz r0.z
discard_nz r0.w
ge r0.zw, r3.xxxy, l(0.000000, 0.000000, 1.000000, 1.000000)
discard_nz r0.z
discard_nz r0.w
max r0.z, |r3.z|, |r3.w|
div r0.z, l(1.000000, 1.000000, 1.000000, 1.000000), r0.z
min r0.w, |r3.z|, |r3.w|
mul r0.z, r0.z, r0.w
mul r0.w, r0.z, r0.z
mad r1.w, r0.w, l(0.020835), l(-0.085133)
mad r1.w, r0.w, r1.w, l(0.180141)
mad r1.w, r0.w, r1.w, l(-0.330299)
mad r0.w, r0.w, r1.w, l(0.999866)
mul r1.w, r0.w, r0.z
mad r1.w, r1.w, l(-2.000000), l(1.570796)
lt r3.x, |r3.z|, |r3.w|
and r1.w, r1.w, r3.x
mad r0.z, r0.z, r0.w, r1.w
lt r0.w, r3.z, -r3.z
and r0.w, r0.w, l(0xc0490fdb)
add r0.z, r0.w, r0.z
min r0.w, r3.z, r3.w
max r1.w, r3.z, r3.w
ge r1.w, r1.w, -r1.w
lt r0.w, r0.w, -r0.w
and r0.w, r1.w, r0.w
movc r0.z, r0.w, -r0.z, r0.z
mul r0.z, r0.z, l(0.159155)
mov r0.x, |r0.z|
ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r3.xyzw, cb1[0].x, l(64), t30.xyzw
mad r0.xy, r0.xyxx, r3.xyxx, r3.zwzz
sample_indexable(texture2d)(float,float,float,float) r0.xyzw, r0.xyxx, t2.xyzw, s2
ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r3.xyzw, cb1[0].x, l(32), t30.xyzw
add r1.xyz, -r1.xyzx, r3.xyzx
dp3 r1.x, r1.xyzx, r1.xyzx
sqrt r1.x, r1.x
ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r4.xyzw, cb1[0].x, l(48), t30.xyzw
mad r1.y, -r1.x, r4.x, l(1.000000)
mad r1.x, r1.x, r4.x, -r4.y
mad r1.x, -|r1.x|, r4.z, l(1.000000)
ge r1.x, r1.x, l(0.000000)
and r1.x, r1.x, l(0x3f800000)
mul r1.x, r4.w, r1.x
ge r1.x, r1.x, l(0.000010)
and r1.x, r1.x, l(0x3f800000)
mul r1.y, r1.y, l(5.000000)
max r1.y, r1.y, l(0.000000)
min r1.y, r1.y, l(0.300000)
mul r2.xyzw, r1.yyyy, r2.xyzw
mad r0.xyzw, -r2.xyzw, r3.wwww, r0.xyzw
mul r2.xyzw, r3.wwww, r2.xyzw
mad r0.xyzw, r1.xxxx, r0.xyzw, r2.xyzw
add r1.x, r0.w, l(-0.000100)
mul r0.xyzw, r0.xyzw, v1.xyzw
lt r1.x, r1.x, l(0.000000)
discard_nz r1.x
mov_sat o0.w, r0.w
mov o0.xyz, r0.xyzx
ret 
// Approximately 89 instruction slots used

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


/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HLSL errors ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:\SteamLibrary\steamapps\common\NieRAutomata\ShaderCache\9be08a058ee6a1c2-ps_replace.txt(32,18-45): error X3000: syntax error: unexpected token 'g_EffectPixelCategoryBuffers'
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
