//vignette seems to be this

cbuffer _Globals : register(b0)
{
  bool PhyreMaterialSwitches : packoffset(c0);
  bool PhyreContextSwitches : packoffset(c0.y);
  float4x4 World : packoffset(c1);
  float4 DiffuseTint : packoffset(c5) = {1,1,1,1};
  float AlphaScale : packoffset(c6) = {1};
}

cbuffer SceneWideParameterConstantBuffer : register(b1)
{
  float4x4 ViewProjection : packoffset(c0);
  float4x4 ViewProjectionPrev : packoffset(c4);
  float4x4 View : packoffset(c8);
  float4x4 Projection : packoffset(c12);
  float4x4 ViewInverse : packoffset(c16);
  float4x4 ProjInverse : packoffset(c20);
  float3 EyePosition : packoffset(c24);
  float cameraNearTimesFar : packoffset(c24.w);
  float cameraFarMinusNear : packoffset(c25);
  float time : packoffset(c25.y);
  float2 cameraNearFar : packoffset(c25.z);
  float2 ViewportWidthHeight : packoffset(c26);
  float2 screenWidthHeightInv : packoffset(c26.z);
  float2 screenWidthHeight : packoffset(c27);
  float2 ProjectionJitter : packoffset(c27.z);
  float2 ProjectionJitterPrev : packoffset(c28);
  uint checkerBoardID : packoffset(c28.z);
  float m_pad : packoffset(c28.w);
  uint PointLightCount : packoffset(c29);
  uint SpotLightCount : packoffset(c29.y);
  uint FoliageSpheresCount : packoffset(c29.z);
  uint m_padExtra : packoffset(c29.w);
  float4 FogParameters0 : packoffset(c30);
  float4 FogParameters1 : packoffset(c31);
  float4 FogParameters2 : packoffset(c32);
  float4 FogParameters3 : packoffset(c33);
  float4 FogPlanes : packoffset(c34);
  float3 CubeSunDir : packoffset(c35);
  float CamExposure : packoffset(c35.w);
  float3 CubeSunColor : packoffset(c36);
  float padding1 : packoffset(c36.w);
  float2 WindDirection : packoffset(c37);
  float2 CubeFadeValues : packoffset(c37.z);
}



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


void main(
  float4 v0 : SV_POSITION0,
  float4 v1 : TEXCOORD0,
  float4 v2 : TEXCOORD2,
  out float4 o0 : SV_TARGET0)
{
  float4 r0;
  uint4 bitmask, uiDest;
  float4 fDest;

  r0.xyz = CamExposure * DiffuseTint.xyz;
  r0.xyz = r0.xyz * v2.xyz + float3(1,1,1);
  r0.w = AlphaScale * DiffuseTint.w;
  o0.xyz = saturate(-r0.www * v2.www + r0.xyz);
  o0.w = 1;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384
//
//   using 3Dmigoto v1.3.11 on Tue Jun 26 17:22:27 2018
//
//
// Buffer Definitions:
//
// cbuffer $Globals
// {
//
//   bool PhyreMaterialSwitches;        // Offset:    0 Size:     4 [unused]
//   bool PhyreContextSwitches;         // Offset:    4 Size:     4 [unused]
//   float4x4 World;                    // Offset:   16 Size:    64 [unused]
//   float4 DiffuseTint;                // Offset:   80 Size:    16
//      = 0x3f800000 0x3f800000 0x3f800000 0x3f800000
//   float AlphaScale;                  // Offset:   96 Size:     4
//      = 0x3f800000
//
// }
//
// cbuffer SceneWideParameterConstantBuffer
// {
//
//   float4x4 ViewProjection;           // Offset:    0 Size:    64 [unused]
//   float4x4 ViewProjectionPrev;       // Offset:   64 Size:    64 [unused]
//   float4x4 View;                     // Offset:  128 Size:    64 [unused]
//   float4x4 Projection;               // Offset:  192 Size:    64 [unused]
//   float4x4 ViewInverse;              // Offset:  256 Size:    64 [unused]
//   float4x4 ProjInverse;              // Offset:  320 Size:    64 [unused]
//   float3 EyePosition;                // Offset:  384 Size:    12 [unused]
//   float cameraNearTimesFar;          // Offset:  396 Size:     4 [unused]
//   float cameraFarMinusNear;          // Offset:  400 Size:     4 [unused]
//   float time;                        // Offset:  404 Size:     4 [unused]
//   float2 cameraNearFar;              // Offset:  408 Size:     8 [unused]
//   float2 ViewportWidthHeight;        // Offset:  416 Size:     8 [unused]
//   float2 screenWidthHeightInv;       // Offset:  424 Size:     8 [unused]
//   float2 screenWidthHeight;          // Offset:  432 Size:     8 [unused]
//   float2 ProjectionJitter;           // Offset:  440 Size:     8 [unused]
//   float2 ProjectionJitterPrev;       // Offset:  448 Size:     8 [unused]
//   uint checkerBoardID;               // Offset:  456 Size:     4 [unused]
//   float m_pad;                       // Offset:  460 Size:     4 [unused]
//   uint PointLightCount;              // Offset:  464 Size:     4 [unused]
//   uint SpotLightCount;               // Offset:  468 Size:     4 [unused]
//   uint FoliageSpheresCount;          // Offset:  472 Size:     4 [unused]
//   uint m_padExtra;                   // Offset:  476 Size:     4 [unused]
//   float4 FogParameters0;             // Offset:  480 Size:    16 [unused]
//   float4 FogParameters1;             // Offset:  496 Size:    16 [unused]
//   float4 FogParameters2;             // Offset:  512 Size:    16 [unused]
//   float4 FogParameters3;             // Offset:  528 Size:    16 [unused]
//   float4 FogPlanes;                  // Offset:  544 Size:    16 [unused]
//   float3 CubeSunDir;                 // Offset:  560 Size:    12 [unused]
//   float CamExposure;                 // Offset:  572 Size:     4
//   float3 CubeSunColor;               // Offset:  576 Size:    12 [unused]
//   float padding1;                    // Offset:  588 Size:     4 [unused]
//   float2 WindDirection;              // Offset:  592 Size:     8 [unused]
//   float2 CubeFadeValues;             // Offset:  600 Size:     8 [unused]
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// $Globals                          cbuffer      NA          NA    0        1
// SceneWideParameterConstantBuffer    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
// TEXCOORD                 2   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[7], immediateIndexed
dcl_constantbuffer cb1[36], immediateIndexed
dcl_input_ps linear v2.xyzw
dcl_output o0.xyzw
dcl_temps 1
mul r0.xyz, cb0[5].xyzx, cb1[35].wwww
mad r0.xyz, r0.xyzx, v2.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
mul r0.w, cb0[5].w, cb0[6].x
mad_sat o0.xyz, -r0.wwww, v2.wwww, r0.xyzx
mov o0.w, l(1.000000)
ret
// Approximately 6 instruction slots used

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