//ui-- black splotch
// ---- Created with 3Dmigoto v1.2.39 on Tue Jun 21 08:32:49 2016

cbuffer _Globals : register(b0)
{
  float4x4 ScreenToWorldMatrix : packoffset(c0);
  bool bDecompressSceneColor : packoffset(c4);
  float4 cxadd : packoffset(c5);
  float4 cxmul : packoffset(c6);
  float4 mvp[2] : packoffset(c7);
}



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


void main( 
  float2 v0 : TEXCOORD0,
  float4 v1 : POSITION0,
  out float4 o0 : TEXCOORD0,
  out float4 o1 : TEXCOORD1,
  out float2 o2 : TEXCOORD2,
  out float4 o3 : SV_Position0)
{
  o0.xyzw = cxadd.xyzw;
  o1.xyzw = cxmul.xyzw;
  o2.xy = v0.xy;
  o3.x = dot(v1.xyzw, mvp[0].xyzw);
  o3.y = dot(v1.xyzw, mvp[1].xyzw);
  o3.zw = float2(0,1);


float4 r0 = o3;
float4 stereo = StereoParams.Load(0);

  if(stereo.y > 85){
o3.x += stereo.x * 0.31;}

  if(stereo.y <= 85 && stereo.y > 55){
o3.x += stereo.x * 0.51;}

  if(stereo.y <= 55 && stereo.y > 25){
o3.x += stereo.x * 0.66;}

  if(stereo.y <= 25){
o3.x += stereo.x * 0.4;}

float4 iniParams = IniParams.Load(0);
if (iniParams.w == 1){
o3 = r0;}

  return;
}