//Shadows VS. To monoize in ShaderFixesDM.
// ---- Created with geo-11 v0.6.193 on Mon May 20 00:33:12 2024

cbuffer CBShadowMask : register(b0)
{

  struct
  {
    row_major float4x4 unitMeshTransform;
    float4 vCamPos;
    row_major float4x4 ScreenToShadowBasis;
    row_major float4x4 NoiseProjection;
    float4 BlendTcNormalize;
    float4 fOneDivFarDist;
    float4 fDepthTestBias;
    float4 fKernelRadius;
    float4 vAdaption;
    float3 vInvShadowMapSize;
    float LG_SceneSelector;
    float4 fShadowFadingDist;
    row_major float4x4 BlendTexGen;
    float4 BlendInfo;
  } c_ShadowMaskConstants : packoffset(c0);

}



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


void main(
  float3 v0 : POSITION0,
  out float4 o0 : SV_Position0)
{
  float4 r0;
  uint4 bitmask, uiDest;
  float4 fDest;
  
  float4 stereo = StereoParams.Load(0);
  
  r0.xyzw = c_ShadowMaskConstants.unitMeshTransform._m10_m11_m12_m13 * v0.yyyy;
  r0.xyzw = v0.xxxx * c_ShadowMaskConstants.unitMeshTransform._m00_m01_m02_m03 + r0.xyzw;
  r0.xyzw = v0.zzzz * c_ShadowMaskConstants.unitMeshTransform._m20_m21_m22_m23 + r0.xyzw;
  o0.xyzw = c_ShadowMaskConstants.unitMeshTransform._m30_m31_m32_m33 + r0.xyzw;
  
  o0.x+=stereo.x*stereo.y;
  
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.0.10011.16384
//
//   using 3Dmigoto v0.6.193 on Mon May 20 00:33:12 2024
//
//
// Buffer Definitions:
//
// cbuffer CBShadowMask
// {
//
//   struct <unnamed>
//   {
//
//       row_major float4x4 unitMeshTransform;// Offset:    0
//       float4 vCamPos;                // Offset:   64
//       row_major float4x4 ScreenToShadowBasis;// Offset:   80
//       row_major float4x4 NoiseProjection;// Offset:  144
//       float4 BlendTcNormalize;       // Offset:  208
//       float4 fOneDivFarDist;         // Offset:  224
//       float4 fDepthTestBias;         // Offset:  240
//       float4 fKernelRadius;          // Offset:  256
//       float4 vAdaption;              // Offset:  272
//       float3 vInvShadowMapSize;      // Offset:  288
//       float LG_SceneSelector;        // Offset:  300
//       float4 fShadowFadingDist;      // Offset:  304
//       row_major float4x4 BlendTexGen;// Offset:  320
//       float4 BlendInfo;              // Offset:  384
//
//   } c_ShadowMaskConstants;           // Offset:    0 Size:   400
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// CBShadowMask                      cbuffer      NA          NA    0        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xyz         0     NONE   float   xyz
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position              0   xyzw        0      POS   float   xyzw
//
vs_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer CB0[4], immediateIndexed
dcl_input v0.xyz
dcl_output_siv o0.xyzw, position
dcl_temps 1
mul r0.xyzw, v0.yyyy, cb0[1].xyzw
mad r0.xyzw, v0.xxxx, cb0[0].xyzw, r0.xyzw
mad r0.xyzw, v0.zzzz, cb0[2].xyzw, r0.xyzw
add o0.xyzw, r0.xyzw, cb0[3].xyzw
ret
// Approximately 5 instruction slots used

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