//Moon lighting VS. Light shafts.
// ---- Created with 3Dmigoto v1.3.12 on Fri Dec 14 21:55:40 2018

cbuffer _Globals : register(b0)
{
  float2 _sp_texel_center : packoffset(c0);
  float2 _sp_aspect : packoffset(c0.z);
}



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


void main(
  float4 v0 : POSITION0,
  float2 v1 : TEXCOORD0,
  out float4 o0 : SV_Position0,
  out float3 o1 : TEXCOORD0)
{
  float4 r0,r10;
  uint4 bitmask, uiDest;
  float4 fDest;
  
  float4 stereo = StereoParams.Load(0);
  float4 iniparams = IniParams.Load(0);
  
  o0.xyzw = v0.xyzw;
  r0.xy = _sp_texel_center.xy + -v1.xy;
  r10=r0;
  r10.x+=stereo.x*0.5;
  r0.xy = _sp_aspect.xy * r10.xy;
  r0.x = dot(r0.xy, r0.xy);
  o1.z = sqrt(r0.x);
  o1.xy = v1.xy;
  //o0.x+=stereo.x*o0.w;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.20789
//
//   using 3Dmigoto v1.3.12 on Fri Dec 14 21:55:40 2018
//
//
// Buffer Definitions:
//
// cbuffer $Globals
// {
//
//   float2 _sp_texel_center;           // Offset:    0 Size:     8
//   float2 _sp_aspect;                 // Offset:    8 Size:     8
//
// }
//
//
// 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   xyzw        0     NONE   float   xyzw
// TEXCOORD                 0   xy          1     NONE   float   xy
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position              0   xyzw        0      POS   float   xyzw
// TEXCOORD                 0   xyz         1     NONE   float   xyz
//
vs_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[1], immediateIndexed
dcl_input v0.xyzw
dcl_input v1.xy
dcl_output_siv o0.xyzw, position
dcl_output o1.xyz
dcl_temps 1
mov o0.xyzw, v0.xyzw
add r0.xy, -v1.xyxx, cb0[0].xyxx
mul r0.xy, r0.xyxx, cb0[0].zwzz
dp2 r0.x, r0.xyxx, r0.xyxx
sqrt o1.z, r0.x
mov o1.xy, v1.xyxx
ret
// Approximately 7 instruction slots used

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