// Moon and smoke. Use partner filtering to only fix moon

cbuffer FrameConstants : register(b0)
{
  float4x4 g_xView : packoffset(c0);
  float4x4 g_xProj : packoffset(c4);
  float4x4 g_xViewProj : packoffset(c8);
  float4x4 g_xInvView : packoffset(c12);
  float4x4 g_xInvProj : packoffset(c16);
  float4x4 g_xInvViewProj : packoffset(c20);
  float3 g_xCamPos : packoffset(c24);
  float2 g_xRcpScreenDims : packoffset(c25);
  float2 g_xDepthProjViewUnpack : packoffset(c25.z);
  float4 g_axViewFrustumPlanes[6] : packoffset(c26);
}



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


void main( 
  float4 v0 : Position0,
  float4 v1 : COLOR0,
  float4 v2 : TEXCOORD0,
  float4 v3 : TEXCOORD1,
  float2 v4 : TEXCOORD2,
  out float4 o0 : SV_Position0,
  out float4 o1 : COLOR0,
  out float4 o2 : TEXCOORD0,
  out float4 o3 : TEXCOORD1)
{
  float4 r0;
  uint4 bitmask, uiDest;
  float4 fDest;

  r0.xyzw = g_xViewProj._m01_m11_m21_m31 * v0.yyyy;
  r0.xyzw = g_xViewProj._m00_m10_m20_m30 * v0.xxxx + r0.xyzw;
  r0.xyzw = g_xViewProj._m02_m12_m22_m32 * v0.zzzz + r0.xyzw;
  r0.xyzw = g_xViewProj._m03_m13_m23_m33 + r0.xyzw;
  o0.xyzw = r0.xyzw;
  o3.w = r0.w;
  o1.xyzw = v1.xyzw;
  o2.xy = v2.xy;
  o2.zw = v3.xy;
  o3.x = v0.w;
  o3.y = 0;
  o3.z = v4.x;
float4 stereo = StereoParams.Load(0);
float4 tex_filter = IniParams.Load(int2(2,0));

if(tex_filter.x==1)
{
	o0.x+=stereo.x*stereo.y;
}
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
//
//   using 3Dmigoto v1.2.43 on Mon Oct 24 04:37:11 2016
//
//
// Buffer Definitions: 
//
// cbuffer FrameConstants
// {
//
//   float4x4 g_xView;                  // Offset:    0 Size:    64 [unused]
//   float4x4 g_xProj;                  // Offset:   64 Size:    64 [unused]
//   float4x4 g_xViewProj;              // Offset:  128 Size:    64
//   float4x4 g_xInvView;               // Offset:  192 Size:    64 [unused]
//   float4x4 g_xInvProj;               // Offset:  256 Size:    64 [unused]
//   float4x4 g_xInvViewProj;           // Offset:  320 Size:    64 [unused]
//   float3 g_xCamPos;                  // Offset:  384 Size:    12 [unused]
//   float2 g_xRcpScreenDims;           // Offset:  400 Size:     8 [unused]
//   float2 g_xDepthProjViewUnpack;     // Offset:  408 Size:     8 [unused]
//   float4 g_axViewFrustumPlanes[6];   // Offset:  416 Size:    96 [unused]
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// FrameConstants                    cbuffer      NA          NA    0        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// Position                 0   xyzw        0     NONE   float   xyzw
// COLOR                    0   xyzw        1     NONE   float   xyzw
// TEXCOORD                 0   xy          2     NONE   float   xy  
// TEXCOORD                 1   xy          3     NONE   float   xy  
// TEXCOORD                 2   xy          4     NONE   float   x   
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position              0   xyzw        0      POS   float   xyzw
// COLOR                    0   xyzw        1     NONE   float   xyzw
// TEXCOORD                 0   xyzw        2     NONE   float   xyzw
// TEXCOORD                 1   xyzw        3     NONE   float   xyzw
//
vs_4_0
dcl_constantbuffer cb0[12], immediateIndexed
dcl_input v0.xyzw
dcl_input v1.xyzw
dcl_input v2.xy
dcl_input v3.xy
dcl_input v4.x
dcl_output_siv o0.xyzw, position
dcl_output o1.xyzw
dcl_output o2.xyzw
dcl_output o3.xyzw
dcl_temps 1
mul r0.xyzw, v0.yyyy, cb0[9].xyzw
mad r0.xyzw, cb0[8].xyzw, v0.xxxx, r0.xyzw
mad r0.xyzw, cb0[10].xyzw, v0.zzzz, r0.xyzw
add r0.xyzw, r0.xyzw, cb0[11].xyzw
mov o0.xyzw, r0.xyzw
mov o3.w, r0.w
mov o1.xyzw, v1.xyzw
mov o2.xy, v2.xyxx
mov o2.zw, v3.xxxy
mov o3.x, v0.w
mov o3.y, l(0)
mov o3.z, v4.x
ret 
// Approximately 13 instruction slots used

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