//Yakuza 6 vignette?
// ---- Created with 3Dmigoto v1.3.16 on Sat Apr 03 19:29:10 2021

cbuffer _Globals : register(b0)
{
  float2 fParam_DepthCastScaleOffset : packoffset(c0) = {1,0};
  float4 fParam_DepthOfFieldFactorScaleOffset : packoffset(c1) = {0.5,0.5,2,-1};
  float4 fParam_HDRFormatFactor_LOGRGB : packoffset(c2);
  float4 fParam_HDRFormatFactor_RGBALUM : packoffset(c3);
  float4 fParam_HDRFormatFactor_REINHARDRGB : packoffset(c4);
  float2 fParam_ScreenSpaceScale : packoffset(c5) = {1,-1};
  float4x4 m44_ModelViewProject : packoffset(c6);
  float4 fParam_GammaCorrection : packoffset(c10) = {0.454545468,0.454545468,0.454545468,0.454545468};
  float4 fParam_DitherOffsetScale : packoffset(c11) = {0.00392156886,0.00392156886,-0.00392156886,0};
  float4 fParam_TonemapMaxMappingLuminance : packoffset(c12) = {1,1,1.015625,1};
  float4 fParam_BrightPass_LensDistortion : packoffset(c13);
  float4 afRGBA_Modulate[32] : packoffset(c14);
  float4 afRGBA_Offset[16] : packoffset(c46);
  float4 afUV_TexCoordOffsetV16[16] : packoffset(c62);
  float4x4 m44_ColorTransformMatrix : packoffset(c78);
  float4x4 m44_PreTonemapColorTransformMatrix : packoffset(c82);
  float4x4 m44_PreTonemapGlareColorTransformMatrix : packoffset(c86);
  float4 fParam_VignetteSimulate : packoffset(c90);
  float4 fParam_VignettePowerOfCosine : packoffset(c91);
  float4 afUVWQ_TexCoordScaleOffset[4] : packoffset(c92);
  float4 fParam_PerspectiveFactor : packoffset(c96);
  float fParam_FocusDistance : packoffset(c97);
  float4 fParam_DepthOfFieldConvertDepthFactor : packoffset(c98);
  float2 afXY_DepthOfFieldLevelBlendFactor16[16] : packoffset(c99);
  float fParam_DepthOfFieldLayerMaskThreshold : packoffset(c114.z) = {0.25};
  float fParam_DepthOfFieldFactorThreshold : packoffset(c114.w) = {0.00039999999};
  float4 afParam_TexCoordScaler8[8] : packoffset(c115);
  float4 fRGBA_Constant : packoffset(c123);
  float4 afRGBA_Constant[4] : packoffset(c124);
  float4x4 am44_TransformMatrix[8] : packoffset(c128);
  float4 afUV_TexCoordOffsetP32[96] : packoffset(c160);
}



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


void main(
  float2 v0 : POSITION0,
  float4 v1 : TEXCOORD0,
  float4 v2 : TEXCOORD1,
  float4 v3 : TEXCOORD2,
  float4 v4 : TEXCOORD3,
  float2 v5 : TEXCOORD4,
  out float4 o0 : TEXCOORD0,
  out float4 o1 : TEXCOORD1,
  out float4 o2 : TEXCOORD2,
  out float4 o3 : TEXCOORD3,
  out float2 o4 : TEXCOORD4,
  out float4 o5 : SV_POSITION0)
{
  float4 stereo = StereoParams.Load(0);
  //v1.x+=stereo.x*0.5;
  //v2.x+=stereo.x*0.5;
  //v3.x+=stereo.x*0.5;
  //v4.x+=stereo.x*0.5;
  //v5.x+=stereo.x*0.5;
  o0.xy = v1.xy;
  o1.xy = v2.xy;
  o2.xy = v3.xy;
  o3.xy = v4.xy;
  o4.xy = v5.xy;
  o5.xy = fParam_ScreenSpaceScale.xy * v0.xy;
  o5.zw = float2(0.100000001,1);
  //o5.x+=stereo.x*1.0;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
//
//   using 3Dmigoto v1.3.16 on Sat Apr 03 19:29:10 2021
//
//
// Buffer Definitions:
//
// cbuffer $Globals
// {
//
//   float2 fParam_DepthCastScaleOffset;// Offset:    0 Size:     8 [unused]
//      = 0x3f800000 0x00000000
//   float4 fParam_DepthOfFieldFactorScaleOffset;// Offset:   16 Size:    16 [unused]
//      = 0x3f000000 0x3f000000 0x40000000 0xbf800000
//   float4 fParam_HDRFormatFactor_LOGRGB;// Offset:   32 Size:    16 [unused]
//   float4 fParam_HDRFormatFactor_RGBALUM;// Offset:   48 Size:    16 [unused]
//   float4 fParam_HDRFormatFactor_REINHARDRGB;// Offset:   64 Size:    16 [unused]
//   float2 fParam_ScreenSpaceScale;    // Offset:   80 Size:     8
//      = 0x3f800000 0xbf800000
//   float4x4 m44_ModelViewProject;     // Offset:   96 Size:    64 [unused]
//   float4 fParam_GammaCorrection;     // Offset:  160 Size:    16 [unused]
//      = 0x3ee8ba2f 0x3ee8ba2f 0x3ee8ba2f 0x3ee8ba2f
//   float4 fParam_DitherOffsetScale;   // Offset:  176 Size:    16 [unused]
//      = 0x3b808081 0x3b808081 0xbb808081 0x00000000
//   float4 fParam_TonemapMaxMappingLuminance;// Offset:  192 Size:    16 [unused]
//      = 0x3f800000 0x3f800000 0x3f820000 0x3f800000
//   float4 fParam_BrightPass_LensDistortion;// Offset:  208 Size:    16 [unused]
//   float4 afRGBA_Modulate[32];        // Offset:  224 Size:   512 [unused]
//   float4 afRGBA_Offset[16];          // Offset:  736 Size:   256 [unused]
//   float4 afUV_TexCoordOffsetV16[16]; // Offset:  992 Size:   256 [unused]
//   float4x4 m44_ColorTransformMatrix; // Offset: 1248 Size:    64 [unused]
//   float4x4 m44_PreTonemapColorTransformMatrix;// Offset: 1312 Size:    64 [unused]
//   float4x4 m44_PreTonemapGlareColorTransformMatrix;// Offset: 1376 Size:    64 [unused]
//   float4 fParam_VignetteSimulate;    // Offset: 1440 Size:    16 [unused]
//   float4 fParam_VignettePowerOfCosine;// Offset: 1456 Size:    16 [unused]
//   float4 afUVWQ_TexCoordScaleOffset[4];// Offset: 1472 Size:    64 [unused]
//   float4 fParam_PerspectiveFactor;   // Offset: 1536 Size:    16 [unused]
//   float fParam_FocusDistance;        // Offset: 1552 Size:     4 [unused]
//   float4 fParam_DepthOfFieldConvertDepthFactor;// Offset: 1568 Size:    16 [unused]
//   float2 afXY_DepthOfFieldLevelBlendFactor16[16];// Offset: 1584 Size:   248 [unused]
//   float fParam_DepthOfFieldLayerMaskThreshold;// Offset: 1832 Size:     4 [unused]
//      = 0x3e800000
//   float fParam_DepthOfFieldFactorThreshold;// Offset: 1836 Size:     4 [unused]
//      = 0x39d1b717
//   float4 afParam_TexCoordScaler8[8]; // Offset: 1840 Size:   128 [unused]
//   float4 fRGBA_Constant;             // Offset: 1968 Size:    16 [unused]
//   float4 afRGBA_Constant[4];         // Offset: 1984 Size:    64 [unused]
//   float4x4 am44_TransformMatrix[8];  // Offset: 2048 Size:   512 [unused]
//   float4 afUV_TexCoordOffsetP32[96]; // Offset: 2560 Size:  1536 [unused]
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// $Globals                          cbuffer      NA          NA    0        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xy          0     NONE   float   xy
// TEXCOORD                 0   xy          1     NONE   float   xy
// TEXCOORD                 1   xy          2     NONE   float   xy
// TEXCOORD                 2   xy          3     NONE   float   xy
// TEXCOORD                 3   xy          4     NONE   float   xy
// TEXCOORD                 4   xy          5     NONE   float   xy
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// TEXCOORD                 0   xy          0     NONE   float   xy
// TEXCOORD                 1   xy          1     NONE   float   xy
// TEXCOORD                 2   xy          2     NONE   float   xy
// TEXCOORD                 3   xy          3     NONE   float   xy
// TEXCOORD                 4   xy          4     NONE   float   xy
// SV_POSITION              0   xyzw        5      POS   float   xyzw
//
vs_4_0
dcl_constantbuffer cb0[6], immediateIndexed
dcl_input v0.xy
dcl_input v1.xy
dcl_input v2.xy
dcl_input v3.xy
dcl_input v4.xy
dcl_input v5.xy
dcl_output o0.xy
dcl_output o1.xy
dcl_output o2.xy
dcl_output o3.xy
dcl_output o4.xy
dcl_output_siv o5.xyzw, position
mov o0.xy, v1.xyxx
mov o1.xy, v2.xyxx
mov o2.xy, v3.xyxx
mov o3.xy, v4.xyxx
mov o4.xy, v5.xyxx
mul o5.xy, v0.xyxx, cb0[5].xyxx
mov o5.zw, l(0,0,0.100000,1.000000)
ret
// Approximately 8 instruction slots used

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