// HDR NEW
// Generated by Microsoft (R) HLSL Shader Compiler 10.0.10011.16384
//
//   using 3Dmigoto v1.3.11 on Tue Dec 18 14:35:22 2018
//
//
// Buffer Definitions:
//
// cbuffer _cbGlareDownsample
// {
//
//   struct S_cbGlareDownsample
//   {
//
//       float4 vHighResPixelToUV;      // Offset:    0
//       float fBrightPassThreshold;    // Offset:   16
//
//   } cbGlareDownsample;               // Offset:    0 Size:    20
//
// }
//
// Resource bind info for srvHDRAdaptationState
// {
//
//   struct SHDRAdaptationState
//   {
//
//       float m_fLuminanceGeometricMean;// Offset:    0
//       float m_fAdaptedMiddleGray;    // Offset:    4
//       float m_fAdaptedBloomPoint;    // Offset:    8
//       float m_fAdaptedBloomPointThreshold;// Offset:   12
//       float m_fAdaptedLuminance;     // Offset:   16
//       float m_fAdaptedExposure;      // Offset:   20
//       float m_fAdaptedBrightPassThreshold;// Offset:   24
//
//   } $Element;                        // Offset:    0 Size:    28
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// samplerPointClamp                 sampler      NA          NA    0        1
// mapInputBuffer                    texture  float4          2d    0        1
// srvHDRAdaptationState             texture  struct         r/o    1        1
// uavOutput                             UAV  float3          2d    0        1
// _cbGlareDownsample                cbuffer      NA          NA    5        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// no Input
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// no Output
cs_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb5[1], immediateIndexed
dcl_sampler s0, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_structured t1, 28
dcl_uav_typed_texture2d (float,float,float,float) u0
dcl_input vThreadID.xy
dcl_temps 3
dcl_thread_group 8, 8, 1
ishl r0.xy, vThreadID.xyxx, l(1, 1, 0, 0)
itof r0.xy, r0.xyxx

// remove HDR.
//mov r0.x, l(0.000000)
//mov r0.y, l(0.000000)

mad r0.xy, r0.xyxx, cb5[0].xyxx, cb5[0].zwzz
sample_l_aoffimmi_indexable(0,1,0)(texture2d)(float,float,float,float) r1.xyz, r0.xyxx, t0.xyzw, s0, l(0.000000)
dp3 r0.z, r1.xyzx, l(0.212600, 0.715200, 0.072200, 0.000000)
add r0.z, r0.z, l(0.000001)
ld_structured_indexable(structured_buffer, stride=28)(mixed,mixed,mixed,mixed) r0.w, l(0), l(24), t1.xxxx
div r0.z, r0.w, r0.z
add_sat r0.z, -r0.z, l(1.000000)
mul r1.xyzw, r1.xyzx, r0.zzzz
sample_l_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r2.xyz, r0.xyxx, t0.xyzw, s0, l(0.000000)
dp3 r0.z, r2.xyzx, l(0.212600, 0.715200, 0.072200, 0.000000)
add r0.z, r0.z, l(0.000001)
div r0.z, r0.w, r0.z
add_sat r0.z, -r0.z, l(1.000000)
mad r1.xyzw, r0.zzzz, r2.xyzx, r1.xyzw
sample_l_aoffimmi_indexable(1,0,0)(texture2d)(float,float,float,float) r2.xyz, r0.xyxx, t0.xyzw, s0, l(0.000000)
dp3 r0.z, r2.xyzx, l(0.212600, 0.715200, 0.072200, 0.000000)
add r0.z, r0.z, l(0.000001)
div r0.z, r0.w, r0.z
add_sat r0.z, -r0.z, l(1.000000)
mad r1.xyzw, r0.zzzz, r2.xyzx, r1.xyzw
sample_l_aoffimmi_indexable(1,1,0)(texture2d)(float,float,float,float) r2.xyz, r0.xyxx, t0.xyzw, s0, l(0.000000)
dp3 r0.z, r2.xyzx, l(0.212600, 0.715200, 0.072200, 0.000000)
add r0.z, r0.z, l(0.000001)
div r0.z, r0.w, r0.z
add_sat r0.z, -r0.z, l(1.000000)
mad r1.xyzw, r0.zzzz, r2.xyzx, r1.xyzw
mul r1.xyzw, r1.xyzw, l(0.250000, 0.250000, 0.250000, 0.250000)
mul r0.z, r0.y, r0.x
add r0.xy, -r0.xyxx, l(1.000000, 1.000000, 0.000000, 0.000000)
mul r0.x, r0.x, r0.z
mul r0.x, r0.y, r0.x
mul r0.x, r0.x, l(16.000000)
mul r0.xyzw, r0.xxxx, r1.xyzw
dp3 r1.x, r0.wyzw, l(1.000000, 1.000000, 1.000000, 0.000000)
and r1.x, r1.x, l(0x7f800000)
ine r1.x, r1.x, l(0x7f800000)
and r0.xyzw, r0.xyzw, r1.xxxx
store_uav_typed u0.xyzw, vThreadID.xyyy, r0.xyzw
ret
// Approximately 41 instruction slots used
