//Turok plus lens flares from new gun PS.
// ---- Created with 3Dmigoto v1.3.11 on Mon Aug 13 21:59:57 2018

cbuffer _Globals : register(b0)
{
  float4 uDiffuseColor : packoffset(c0);
  float4 uEnvironmentColor : packoffset(c1);
  float4 uLightAmbience : packoffset(c2);
  float uFogNear : packoffset(c3);
  float uFogFar : packoffset(c3.y);
  float3 uFogColor : packoffset(c4);
  int uFullBright : packoffset(c4.w);
}

SamplerState uTexSample0_s : register(s0);
Texture2D<float4> uTex0 : 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,
  float4 v2 : COLOR0,
  out float4 o0 : SV_TARGET0)
{
  float4 r0;
  uint4 bitmask, uiDest;
  float4 fDest;

  float4 stereo = StereoParams.Load(0);
  //v1.x+=stereo.x*(v0.w-stereo.y);
  
  r0.xyzw = uTex0.SampleLevel(uTexSample0_s, v1.xy, 0).xyzw;
  r0.xyzw = uDiffuseColor.xyzw * r0.xyzw;
  o0.xyzw = v2.xyzw * r0.xyzw;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.18773
//
//   using 3Dmigoto v1.3.11 on Mon Aug 13 21:59:57 2018
//
//
// Buffer Definitions:
//
// cbuffer $Globals
// {
//
//   float4 uDiffuseColor;              // Offset:    0 Size:    16
//   float4 uEnvironmentColor;          // Offset:   16 Size:    16 [unused]
//   float4 uLightAmbience;             // Offset:   32 Size:    16 [unused]
//   float uFogNear;                    // Offset:   48 Size:     4 [unused]
//   float uFogFar;                     // Offset:   52 Size:     4 [unused]
//   float3 uFogColor;                  // Offset:   64 Size:    12 [unused]
//   int uFullBright;                   // Offset:   76 Size:     4 [unused]
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// uTexSample0                       sampler      NA          NA    0        1
// uTex0                             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
// COLOR                    0   xyzw        2     NONE   float   xyzw
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_TARGET                0   xyzw        0   TARGET   float   xyzw
//
ps_4_0
dcl_constantbuffer cb0[1], immediateIndexed
dcl_sampler s0, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_input_ps linear v1.xy
dcl_input_ps linear v2.xyzw
dcl_output o0.xyzw
dcl_temps 1
sample_l r0.xyzw, v1.xyxx, t0.xyzw, s0, l(0.000000)
mul r0.xyzw, r0.xyzw, cb0[0].xyzw
mul o0.xyzw, r0.xyzw, v2.xyzw
ret
// Approximately 4 instruction slots used

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