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

cbuffer cbParam : register(b0)
{
  float4 g_TexColorMult : packoffset(c0);
  float4 g_TexColorAdd : packoffset(c1);
  float4 g_TexGamma : packoffset(c2);
}

SamplerState SS_ClampLinear_s : register(s0);
TextureCube<float4> g_TextureCube0 : register(t0);


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


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

  r0.x = g_TextureCube0.Sample(SS_ClampLinear_s, v2.xyz).w;
  r0.x = r0.x * g_TexColorMult.w + g_TexColorAdd.w;
  r0.x = log2(r0.x);
  r0.x = g_TexGamma.w * r0.x;
  r0.xyz = exp2(r0.xxx);
  r0.w = 1;
  o0.xyzw = v1.xyzw * r0.xyzw;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Original ASM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.20546
//
//
// Buffer Definitions: 
//
// cbuffer cbParam
// {
//
//   float4 g_TexColorMult;             // Offset:    0 Size:    16
//   float4 g_TexColorAdd;              // Offset:   16 Size:    16
//   float4 g_TexGamma;                 // Offset:   32 Size:    16
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// SS_ClampLinear                    sampler      NA          NA    0        1
// g_TextureCube0                    texture  float4        cube    0        1
// cbParam                           cbuffer      NA          NA    0        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position              0   xyzw        0      POS   float       
// COLOR                    0   xyzw        1     NONE   float   xyzw
// TEXCOORD                 0   xyz         2     NONE   float   xyz 
//
//
// 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 cb0[3], immediateIndexed
dcl_sampler s0, mode_default
dcl_resource_texturecube (float,float,float,float) t0
dcl_input_ps linear v1.xyzw
dcl_input_ps linear v2.xyz
dcl_output o0.xyzw
dcl_temps 1
sample_indexable(texturecube)(float,float,float,float) r0.x, v2.xyzx, t0.wxyz, s0
mad r0.x, r0.x, cb0[0].w, cb0[1].w
log r0.x, r0.x
mul r0.x, r0.x, cb0[2].w
exp r0.xyz, r0.xxxx
mov r0.w, l(1.000000)
mul o0.xyzw, r0.xyzw, v1.xyzw
ret 
// Approximately 8 instruction slots used

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