// Bloom pushed to infinity

cbuffer SkyboxConstants : register(b3)
{
  float4x4 g_xFrustumToCamDir : packoffset(c0);
  float4 g_xSkyboxColour : packoffset(c4);
  float4 g_xHazeColour1 : packoffset(c5);
  float4 g_xHazeColour2 : packoffset(c6);
  float4 g_xSunDir1 : packoffset(c7);
  float4 g_xSunColour1 : packoffset(c8);
  float4 g_xSunDir2 : packoffset(c9);
  float4 g_xSunColour2 : packoffset(c10);
  float g_fHazeGradientPower1 : packoffset(c11);
  float g_fHazeGradientPower2 : packoffset(c11.y);
  float g_fSunGradientPower1 : packoffset(c11.z);
  float g_fSunGradientPower2 : packoffset(c11.w);
  float g_fDistance : packoffset(c12);
  bool g_bDisableHaze : packoffset(c12.y);
  bool g_bDisable2Haze : packoffset(c12.z);
  bool g_bMirrorBelowHorizon : packoffset(c12.w);
  bool g_b2MirrorBelowHorizon : packoffset(c13);
  bool g_bDisableSun : packoffset(c13.y);
  bool g_bDisable2Sun : packoffset(c13.z);
}



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


void main( 
  float4 v0 : SV_Position0,
  out float4 o0 : SV_Position0,
  out float3 o1 : Texcoords0)
{
  float4 r0;
  uint4 bitmask, uiDest;
  float4 fDest;

  o0.xyzw = v0.xyzw;
float4 stereo = StereoParams.Load(0);
float4 params = IniParams.Load(0);
v0.x -= stereo.x;
  r0.xyz = g_xFrustumToCamDir._m01_m11_m21 * v0.yyy;
  r0.xyz = g_xFrustumToCamDir._m00_m10_m20 * v0.xxx + r0.xyz;
  r0.xyz = g_xFrustumToCamDir._m02_m12_m22 * v0.zzz + r0.xyz;
  r0.xyz = g_xFrustumToCamDir._m03_m13_m23 * v0.www + r0.xyz;
  o1.xyz = -r0.xyz;


  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Original ASM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
//
//
// Buffer Definitions: 
//
// cbuffer SkyboxConstants
// {
//
//   float4x4 g_xFrustumToCamDir;       // Offset:    0 Size:    64
//   float4 g_xSkyboxColour;            // Offset:   64 Size:    16 [unused]
//   float4 g_xHazeColour1;             // Offset:   80 Size:    16 [unused]
//   float4 g_xHazeColour2;             // Offset:   96 Size:    16 [unused]
//   float4 g_xSunDir1;                 // Offset:  112 Size:    16 [unused]
//   float4 g_xSunColour1;              // Offset:  128 Size:    16 [unused]
//   float4 g_xSunDir2;                 // Offset:  144 Size:    16 [unused]
//   float4 g_xSunColour2;              // Offset:  160 Size:    16 [unused]
//   float g_fHazeGradientPower1;       // Offset:  176 Size:     4 [unused]
//   float g_fHazeGradientPower2;       // Offset:  180 Size:     4 [unused]
//   float g_fSunGradientPower1;        // Offset:  184 Size:     4 [unused]
//   float g_fSunGradientPower2;        // Offset:  188 Size:     4 [unused]
//   float g_fDistance;                 // Offset:  192 Size:     4 [unused]
//   bool g_bDisableHaze;               // Offset:  196 Size:     4 [unused]
//   bool g_bDisable2Haze;              // Offset:  200 Size:     4 [unused]
//   bool g_bMirrorBelowHorizon;        // Offset:  204 Size:     4 [unused]
//   bool g_b2MirrorBelowHorizon;       // Offset:  208 Size:     4 [unused]
//   bool g_bDisableSun;                // Offset:  212 Size:     4 [unused]
//   bool g_bDisable2Sun;               // Offset:  216 Size:     4 [unused]
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// SkyboxConstants                   cbuffer      NA          NA    3        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position              0   xyzw        0     NONE   float   xyzw
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position              0   xyzw        0      POS   float   xyzw
// Texcoords                0   xyz         1     NONE   float   xyz 
//
vs_4_0
dcl_constantbuffer cb3[4], immediateIndexed
dcl_input v0.xyzw
dcl_output_siv o0.xyzw, position
dcl_output o1.xyz
dcl_temps 1
mov o0.xyzw, v0.xyzw
mul r0.xyz, v0.yyyy, cb3[1].xyzx
mad r0.xyz, cb3[0].xyzx, v0.xxxx, r0.xyzx
mad r0.xyz, cb3[2].xyzx, v0.zzzz, r0.xyzx
mad r0.xyz, cb3[3].xyzx, v0.wwww, r0.xyzx
mov o1.xyz, -r0.xyzx
ret 
// Approximately 7 instruction slots used

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