// ---- Created with 3Dmigoto v1.2.35 on Tue Apr 26 22:30:28 2016

cbuffer cbSampleOffset : register(b1)
{
  float4 g_avSampleOffsets[16] : packoffset(c0);
}

SamplerState SS_WrapLinear_s : register(s1);
SamplerState SS_ClampLinear_s : register(s3);
Texture2D<float4> g_SourceTex : register(t0);
Texture2D<float4> g_RandomRotationTex : register(t2);


// 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;
  uint4 bitmask, uiDest;
  float4 fDest;

  r0.xyz = g_RandomRotationTex.SampleLevel(SS_WrapLinear_s, v1.xy, 0).xyz;
  r1.xyz = g_SourceTex.SampleLevel(SS_ClampLinear_s, v1.xy, 0).xyz;
  r0.xyz = -r1.xyz + r0.xyz;
  o0.xyz = g_avSampleOffsets[0].xxx * r0.xyz + r1.xyz;
  o0.w = 1;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Original ASM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.20546
//
//
// Buffer Definitions: 
//
// cbuffer cbSampleOffset
// {
//
//   float4 g_avSampleOffsets[16];      // Offset:    0 Size:   256
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// SS_WrapLinear                     sampler      NA          NA    1        1
// SS_ClampLinear                    sampler      NA          NA    3        1
// g_SourceTex                       texture  float4          2d    0        1
// g_RandomRotationTex               texture  float4          2d    2        1
// cbSampleOffset                    cbuffer      NA          NA    1        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 cb1[1], immediateIndexed
dcl_sampler s1, mode_default
dcl_sampler s3, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_texture2d (float,float,float,float) t2
dcl_input_ps linear v1.xy
dcl_output o0.xyzw
dcl_temps 2
sample_l_indexable(texture2d)(float,float,float,float) r0.xyz, v1.xyxx, t2.xyzw, s1, l(0.000000)
sample_l_indexable(texture2d)(float,float,float,float) r1.xyz, v1.xyxx, t0.xyzw, s3, l(0.000000)
add r0.xyz, r0.xyzx, -r1.xyzx
mad o0.xyz, cb1[0].xxxx, r0.xyzx, r1.xyzx
mov o0.w, l(1.000000)
ret 
// Approximately 6 instruction slots used

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