//fog 2 no fix here
// ---- Created with 3Dmigoto v1.3.11 on Tue Aug 07 20:51:15 2018

cbuffer cb_g_HDRPreProcess : register(b5)
{

  struct
  {
    float2 m_SurfaceSize;
  } g_HDRPreProcess : packoffset(c0);

}

Texture2DMS<float4,4> t_SourceTexture0 : register(t0);


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


void main(
  float4 v0 : SV_Position0,
  float2 v1 : TEXCOORD0,
  uint v2 : SV_SampleIndex0,
  out float4 o0 : SV_Target0)
{
  float4 r0,r1;
  uint4 bitmask, uiDest;
  float4 fDest;

  r0.xy = g_HDRPreProcess.m_SurfaceSize.xy * v1.xy;
  r0.xy = (uint2)r0.xy;
  r0.zw = float2(0,0);
  r0.xyzw = t_SourceTexture0.Load(r0.xy, v2.x).xyzw;
  r1.xyzw = r0.xyzw + -r0.xyzw;
  r1.x = dot(r1.xyzw, r1.xyzw);
  r1.x = cmp(r1.x != 0.000000);
  o0.xyzw = r1.xxxx ? float4(0,0,0,1) : r0.xyzw;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
//
//   using 3Dmigoto v1.3.11 on Tue Aug 07 20:51:15 2018
//
//
// Buffer Definitions:
//
// cbuffer cb_g_HDRPreProcess
// {
//
//   struct HDRPreProcessConsts
//   {
//
//       float2 m_SurfaceSize;          // Offset:    0
//
//   } g_HDRPreProcess;                 // Offset:    0 Size:     8
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// t_SourceTexture0                  texture  float4       2dMS4    0        1
// cb_g_HDRPreProcess                cbuffer      NA          NA    5        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position              0   xyzw        0      POS   float
// TEXCOORD                 0   xy          1     NONE   float   xy
// SV_SampleIndex           0   x           2   SAMPLE    uint   x
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target                0   xyzw        0   TARGET   float   xyzw
//
// Pixel Shader runs at sample frequency
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb5[1], immediateIndexed
dcl_resource_texture2dms(4) (float,float,float,float) t0
dcl_input_ps linear v1.xy
dcl_input_ps_sgv v2.x, sampleIndex
dcl_output o0.xyzw
dcl_temps 2
mul [precise(xy)] r0.xy, v1.xyxx, cb5[0].xyxx
ftou [precise(xy)] r0.xy, r0.xyxx
mov [precise(zw)] r0.zw, l(0,0,0,0)
ldms_indexable [precise](texture2dms)(float,float,float,float) r0.xyzw, r0.xyzw, t0.xyzw, v2.x
add [precise] r1.xyzw, -r0.xyzw, r0.xyzw
dp4 r1.x, r1.xyzw, r1.xyzw
ne r1.x, r1.x, l(0.000000)
movc o0.xyzw, r1.xxxx, l(0,0,0,1.000000), r0.xyzw
ret
// Approximately 9 instruction slots used

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