//Sun Glow
cbuffer rage_matrices : register(b1)
{
  row_major float4x4 gWorld : packoffset(c0);
  row_major float4x4 gWorldView : packoffset(c4);
  row_major float4x4 gWorldViewProj : packoffset(c8);
  row_major float4x4 gViewInverse : packoffset(c12);
}

cbuffer misc_globals : register(b2)
{
  float4 globalFade : packoffset(c0);
  float globalHeightScale : packoffset(c1);
  float globalShaderQuality : packoffset(c1.y);
  float globalReuseMe00001 : packoffset(c1.z);
  float globalReuseMe00002 : packoffset(c1.w);
  float4 POMFlags : packoffset(c2);
  float4 g_Rage_Tessellation_CameraPosition : packoffset(c3);
  float4 g_Rage_Tessellation_CameraZAxis : packoffset(c4);
  float4 g_Rage_Tessellation_ScreenSpaceErrorParams : packoffset(c5);
  float4 g_Rage_Tessellation_LinearScale : packoffset(c6);
  float4 g_Rage_Tessellation_Frustum[4] : packoffset(c7);
  float4 g_Rage_Tessellation_Epsilons : packoffset(c11);
  float4 globalScalars : packoffset(c12);
  float4 globalScalars2 : packoffset(c13);
  float4 globalScalars3 : packoffset(c14);
  float4 globalScreenSize : packoffset(c15);
  uint4 gTargetAAParams : packoffset(c16);
  float4 colorize : packoffset(c17);
  float4 gGlobalParticleShadowBias : packoffset(c18);
  float gGlobalParticleDofAlphaScale : packoffset(c19);
  float gGlobalFogIntensity : packoffset(c19.y);
  float4 gPlayerLFootPos : packoffset(c20);
  float4 gPlayerRFootPos : packoffset(c21);
  float4 gStereoParams : packoffset(c22);
  float4 gStereoParams1 : packoffset(c23);
}
Texture2D<float4> StereoParmsTexture : register(t20);

Texture2D<float4> StereoParams : register(t125);
Texture1D<float4> IniParams : register(t120);

void main(
  float3 v0 : POSITION0,
  float3 v1 : COLOR0,
  float2 v2 : TEXCOORD0,
  out float4 o0 : SV_Position0,
  out float2 o1 : TEXCOORD0,
  out float3 o2 : TEXCOORD1)
{
  float4 r0,r1;
  uint4 bitmask, uiDest;
  float4 fDest;

  r0.xyzw = gWorldViewProj._m10_m11_m12_m13 * v0.yyyy;
  r0.xyzw = v0.xxxx * gWorldViewProj._m00_m01_m02_m03 + r0.xyzw;
  r0.xyzw = v0.zzzz * gWorldViewProj._m20_m21_m22_m23 + r0.xyzw;
  r0.xyzw = gWorldViewProj._m30_m31_m32_m33 + r0.xyzw;
  r1.xyzw = StereoParmsTexture.Load(float4(0.000000e+000,0.000000e+000,0.000000e+000,0.000000e+000)).xyzw;
  r1.y = -r1.y + r0.w;
  o0.x = r1.x * r1.y + r0.x;
  o0.yzw = r0.yzw;
  
  float4 stereoParams = StereoParams.Load(0);
  o0.x += stereoParams.x * stereoParams.y;
  
  o1.xy = v2.xy;
  r0.xyz = v1.xyz * v1.xyz;
  o2.xyz = globalScalars.www * r0.xyz;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
//
//
// Buffer Definitions: 
//
// cbuffer rage_matrices
// {
//
//   row_major float4x4 gWorld;         // Offset:    0 Size:    64 [unused]
//   row_major float4x4 gWorldView;     // Offset:   64 Size:    64 [unused]
//   row_major float4x4 gWorldViewProj; // Offset:  128 Size:    64
//   row_major float4x4 gViewInverse;   // Offset:  192 Size:    64 [unused]
//
// }
//
// cbuffer misc_globals
// {
//
//   float4 globalFade;                 // Offset:    0 Size:    16 [unused]
//   float globalHeightScale;           // Offset:   16 Size:     4 [unused]
//   float globalShaderQuality;         // Offset:   20 Size:     4 [unused]
//   float globalReuseMe00001;          // Offset:   24 Size:     4 [unused]
//   float globalReuseMe00002;          // Offset:   28 Size:     4 [unused]
//   float4 POMFlags;                   // Offset:   32 Size:    16 [unused]
//   float4 g_Rage_Tessellation_CameraPosition;// Offset:   48 Size:    16 [unused]
//   float4 g_Rage_Tessellation_CameraZAxis;// Offset:   64 Size:    16 [unused]
//   float4 g_Rage_Tessellation_ScreenSpaceErrorParams;// Offset:   80 Size:    16 [unused]
//   float4 g_Rage_Tessellation_LinearScale;// Offset:   96 Size:    16 [unused]
//   float4 g_Rage_Tessellation_Frustum[4];// Offset:  112 Size:    64 [unused]
//   float4 g_Rage_Tessellation_Epsilons;// Offset:  176 Size:    16 [unused]
//   float4 globalScalars;              // Offset:  192 Size:    16
//   float4 globalScalars2;             // Offset:  208 Size:    16 [unused]
//   float4 globalScalars3;             // Offset:  224 Size:    16 [unused]
//   float4 globalScreenSize;           // Offset:  240 Size:    16 [unused]
//   uint4 gTargetAAParams;             // Offset:  256 Size:    16 [unused]
//   float4 colorize;                   // Offset:  272 Size:    16 [unused]
//   float4 gGlobalParticleShadowBias;  // Offset:  288 Size:    16 [unused]
//   float gGlobalParticleDofAlphaScale;// Offset:  304 Size:     4 [unused]
//   float gGlobalFogIntensity;         // Offset:  308 Size:     4 [unused]
//   float4 gPlayerLFootPos;            // Offset:  320 Size:    16 [unused]
//   float4 gPlayerRFootPos;            // Offset:  336 Size:    16 [unused]
//   float4 gStereoParams;              // Offset:  352 Size:    16 [unused]
//   float4 gStereoParams1;             // Offset:  368 Size:    16 [unused]
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// StereoParmsTexture                texture  float4          2d   20        1
// rage_matrices                     cbuffer      NA          NA    1        1
// misc_globals                      cbuffer      NA          NA    2        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xyz         0     NONE   float   xyz 
// COLOR                    0   xyz         1     NONE   float   xyz 
// TEXCOORD                 0   xy          2     NONE   float   xy  
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position              0   xyzw        0      POS   float   xyzw
// TEXCOORD                 0   xy          1     NONE   float   xy  
// TEXCOORD                 1   xyz         2     NONE   float   xyz 
//
vs_4_0
dcl_constantbuffer cb1[12], immediateIndexed
dcl_constantbuffer cb2[13], immediateIndexed
dcl_resource_texture2d (float,float,float,float) t20
dcl_input v0.xyz
dcl_input v1.xyz
dcl_input v2.xy
dcl_output_siv o0.xyzw, position
dcl_output o1.xy
dcl_output o2.xyz
dcl_temps 2
mul r0.xyzw, v0.yyyy, cb1[9].xyzw
mad r0.xyzw, v0.xxxx, cb1[8].xyzw, r0.xyzw
mad r0.xyzw, v0.zzzz, cb1[10].xyzw, r0.xyzw
add r0.xyzw, r0.xyzw, cb1[11].xyzw
ld r1.xyzw, l(0, 0, 0, 0), t20.xyzw
add r1.y, r0.w, -r1.y
mad o0.x, r1.x, r1.y, r0.x
mov o0.yzw, r0.yyzw
mov o1.xy, v2.xyxx
mul r0.xyz, v1.xyzx, v1.xyzx
mul o2.xyz, r0.xyzx, cb2[12].wwww
ret 
// Approximately 12 instruction slots used

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