// ---- Created with 3Dmigoto v1.2.35 on Tue Apr 26 22:30:28 2016

cbuffer cbToneMap : register(b1)
{
  float3 g_ToneMapInvSceneLumScale : packoffset(c0);
  float3 g_ToneMapScaler : packoffset(c1);
  float4 g_ToneMapParam : packoffset(c2);
  float4 g_ToneMapSceneLumScale : packoffset(c3);
  float4 g_AdaptParam : packoffset(c4);
  float4 g_AdaptCenterWeight : packoffset(c5);
  float4 g_BrightPassThreshold : packoffset(c6);
  float4 g_GlareLuminance : packoffset(c7);
  float4 g_BloomBoostColor : packoffset(c8);
  float4 g_vBloomFinalColor : packoffset(c9);
  float4 g_vBloomScaleParam : packoffset(c10);
}



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


void main( 
  float4 v0 : SV_Position0,
  float3 v1 : TEXCOORD0,
  out float4 o0 : SV_Target0)
{
  float4 r0;
  uint4 bitmask, uiDest;
  float4 fDest;

  r0.x = 0.200000003 * v1.x;
  r0.y = 1 + -v1.x;
  r0.x = r0.x / r0.y;
  r0.y = -3.0891273 * r0.x;
  r0.x = exp2(-r0.x);
  r0.y = exp2(r0.y);
  r0.xy = float2(1,1) + -r0.xy;
  r0.z = r0.y * r0.y;
  r0.y = r0.z * r0.y + -r0.x;
  r0.x = g_ToneMapParam.x * r0.y + r0.x;
  r0.x = log2(r0.x);
  r0.y = 1 / g_ToneMapParam.y;
  r0.x = r0.y * r0.x;
  o0.xyz = exp2(r0.xxx);
  o0.w = 1;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Original ASM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.20546
//
//
// Buffer Definitions: 
//
// cbuffer cbToneMap
// {
//
//   float3 g_ToneMapInvSceneLumScale;  // Offset:    0 Size:    12 [unused]
//   float3 g_ToneMapScaler;            // Offset:   16 Size:    12 [unused]
//   float4 g_ToneMapParam;             // Offset:   32 Size:    16
//   float4 g_ToneMapSceneLumScale;     // Offset:   48 Size:    16 [unused]
//   float4 g_AdaptParam;               // Offset:   64 Size:    16 [unused]
//   float4 g_AdaptCenterWeight;        // Offset:   80 Size:    16 [unused]
//   float4 g_BrightPassThreshold;      // Offset:   96 Size:    16 [unused]
//   float4 g_GlareLuminance;           // Offset:  112 Size:    16 [unused]
//   float4 g_BloomBoostColor;          // Offset:  128 Size:    16 [unused]
//   float4 g_vBloomFinalColor;         // Offset:  144 Size:    16 [unused]
//   float4 g_vBloomScaleParam;         // Offset:  160 Size:    16 [unused]
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// cbToneMap                         cbuffer      NA          NA    1        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position              0   xyzw        0      POS   float       
// TEXCOORD                 0   xyz         1     NONE   float   x   
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target                0   xyzw        0   TARGET   float   xyzw
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb1[3], immediateIndexed
dcl_input_ps linear v1.x
dcl_output o0.xyzw
dcl_temps 1
mul r0.x, v1.x, l(0.200000)
add r0.y, -v1.x, l(1.000000)
div r0.x, r0.x, r0.y
mul r0.y, r0.x, l(-3.089127)
exp r0.x, -r0.x
exp r0.y, r0.y
add r0.xy, -r0.xyxx, l(1.000000, 1.000000, 0.000000, 0.000000)
mul r0.z, r0.y, r0.y
mad r0.y, r0.z, r0.y, -r0.x
mad r0.x, cb1[2].x, r0.y, r0.x
log r0.x, r0.x
div r0.y, l(1.000000, 1.000000, 1.000000, 1.000000), cb1[2].y
mul r0.x, r0.x, r0.y
exp o0.xyz, r0.xxxx
mov o0.w, l(1.000000)
ret 
// Approximately 16 instruction slots used

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