// ---- Created with 3Dmigoto v1.3.16 on Sun Apr 07 14:16:48 2019

cbuffer _Globals : register(b0)
{
  float3 g_RedShift : packoffset(c4);
  float2 g_GreenShift : packoffset(c5);
  float2 g_BlueShift : packoffset(c6);
}

SamplerState _sampler_s0_s : register(s0);
Texture2D<float4> _texture_s0 : 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 float4 o0 : SV_Target0)
{
  float4 r0;
  uint4 bitmask, uiDest;
  float4 fDest;

  r0.xy = float2(-0.5,-0.5) + v1.xy;
  r0.xy = g_RedShift.zz * r0.xy;
  r0.zw = -g_RedShift.xy * r0.xy + v1.xy;
  r0.z = _texture_s0.Sample(_sampler_s0_s, r0.zw).x;
  o0.x = r0.z;
  r0.zw = -g_GreenShift.xy * r0.xy + v1.xy;
  r0.xy = -g_BlueShift.xy * r0.xy + v1.xy;
  r0.x = _texture_s0.Sample(_sampler_s0_s, r0.xy).z;
  o0.z = r0.x;
  r0.x = _texture_s0.Sample(_sampler_s0_s, r0.zw).y;
  o0.y = r0.x;
  o0.w = 0;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
//
//   using 3Dmigoto v1.3.16 on Sun Apr 07 14:16:48 2019
//
//
// Buffer Definitions:
//
// cbuffer $Globals
// {
//
//   float3 g_RedShift;                 // Offset:   64 Size:    12
//   float2 g_GreenShift;               // Offset:   80 Size:     8
//   float2 g_BlueShift;                // Offset:   96 Size:     8
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// _sampler_s0                       sampler      NA          NA    0        1
// _texture_s0                       texture  float4          2d    0        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[7], immediateIndexed
dcl_sampler s0, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_input_ps linear v1.xy
dcl_output o0.xyzw
dcl_temps 1
add r0.xy, v1.xyxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
mul r0.xy, r0.xyxx, cb0[4].zzzz
mad r0.zw, -cb0[4].xxxy, r0.xxxy, v1.xxxy
sample_indexable(texture2d)(float,float,float,float) r0.z, r0.zwzz, t0.yzxw, s0
mov o0.x, r0.z
mad r0.zw, -cb0[5].xxxy, r0.xxxy, v1.xxxy
mad r0.xy, -cb0[6].xyxx, r0.xyxx, v1.xyxx
sample_indexable(texture2d)(float,float,float,float) r0.x, r0.xyxx, t0.zxyw, s0
mov o0.z, r0.x
sample_indexable(texture2d)(float,float,float,float) r0.x, r0.zwzz, t0.yxzw, s0
mov o0.y, r0.x
mov o0.w, l(0)
ret
// Approximately 13 instruction slots used

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