//causing sky halos
//VS 1d35fa6a8e3613e8
// ---- Created with 3Dmigoto v1.2.67 on Tue Nov 28 11:34:57 2017

Texture2DMS<float,8> depthTexToResolve : 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,
  out float oDepth : SV_Depth)
{
  float4 r0,r1;
  uint4 bitmask, uiDest;
  float4 fDest;

discard;
  r0.xy = (int2)v0.xy;
  r0.zw = float2(0,0);
  r1.xy = float2(0,0);
  while (true) {
    r1.z = cmp((int)r1.y >= 8);
    if (r1.z != 0) break;
    r1.z = depthTexToResolve.Load(r0.xy, r1.y).x;
    r1.x = max(r1.x, r1.z);
    r1.y = (int)r1.y + 1;
  }
  oDepth = r1.x;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
//
//   using 3Dmigoto v1.2.67 on Tue Nov 28 11:34:57 2017
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// depthTexToResolve                 texture   float       2dMS8    0        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float   xy  
// TEXCOORD                 0   xy          1     NONE   float       
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Depth                 0    N/A   oDepth    DEPTH   float    YES
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_resource_texture2dms(8) (float,float,float,float) t0
dcl_input_ps_siv linear noperspective v0.xy, position
dcl_output oDepth
dcl_temps 2
ftoi r0.xy, v0.xyxx
mov r0.zw, l(0,0,0,0)
mov r1.xy, l(0,0,0,0)
loop 
  ige r1.z, r1.y, l(8)
  breakc_nz r1.z
  ldms_indexable(texture2dms)(float,float,float,float) r1.z, r0.xyzw, t0.yzxw, r1.y
  max r1.x, r1.z, r1.x
  iadd r1.y, r1.y, l(1)
endloop 
mov oDepth, r1.x
ret 
// Approximately 12 instruction slots used

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