//Vignette.
// ---- Created with 3Dmigoto v1.2.64 on Fri Sep 08 20:32:16 2017

cbuffer _Globals : register(b0)
{
  float4 _image_color : packoffset(c0);
}

SamplerState _tex_rendertarget_samplerstate_s : register(s0);
SamplerState _tex_image_samplerstate_s : register(s1);
Texture2D<float4> _tex_rendertarget : register(t0);
Texture2D<float4> _tex_image : register(t1);


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


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

  float4 iniparams = IniParams.Load(0);
  if (iniparams.z==1)
  {
	discard;
  }
  
  r0.xyzw = _tex_image.Sample(_tex_image_samplerstate_s, v1.xy).xyzw;
  r1.xyzw = _tex_rendertarget.Sample(_tex_rendertarget_samplerstate_s, v1.xy).xyzw;
  r0.xyzw = saturate(r1.xyzw * r0.xyzw);
  r2.x = 1 + -_image_color.w;
  r1.xyzw = r2.xxxx * r1.xyzw;
  o0.xyzw = r0.xyzw * _image_color.wwww + r1.xyzw;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.20789
//
//   using 3Dmigoto v1.2.64 on Fri Sep 08 20:32:16 2017
//
//
// Buffer Definitions: 
//
// cbuffer $Globals
// {
//
//   float4 _image_color;               // Offset:    0 Size:    16
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// _tex_rendertarget_samplerstate    sampler      NA          NA    0        1
// _tex_image_samplerstate           sampler      NA          NA    1        1
// _tex_rendertarget                 texture  float4          2d    0        1
// _tex_image                        texture  float4          2d    1        1
// $Globals                          cbuffer      NA          NA    0        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position              0   xyzw        0      POS   float       
// TEXCOORD                 0   xy          1     NONE   float   xy  
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target                0   xyzw        0   TARGET   float   xyzw
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[1], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s1, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_texture2d (float,float,float,float) t1
dcl_input_ps linear v1.xy
dcl_output o0.xyzw
dcl_temps 3
sample_indexable(texture2d)(float,float,float,float) r0.xyzw, v1.xyxx, t1.xyzw, s1
sample_indexable(texture2d)(float,float,float,float) r1.xyzw, v1.xyxx, t0.xyzw, s0
mul_sat r0.xyzw, r0.xyzw, r1.xyzw
add r2.x, -cb0[0].w, l(1.000000)
mul r1.xyzw, r1.xyzw, r2.xxxx
mad o0.xyzw, r0.xyzw, cb0[0].wwww, r1.xyzw
ret 
// Approximately 7 instruction slots used

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