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

cbuffer cbToneMapCS : register(b1)
{
  float4 g_ToneMapLUTParam : packoffset(c0);
}

Texture2D<float4> g_ColorGrading2DBlendA : register(t0);
Texture2D<float4> g_ColorGrading2DBlendB : register(t1);


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


void main()
{
// Needs manual fix for instruction: 
// unknown dcl_: dcl_uav_typed_texture3d (float,float,float,float) u0
  float4 r0,r1;
  uint4 bitmask, uiDest;
  float4 fDest;

// Needs manual fix for instruction: 
// unknown dcl_: dcl_thread_group 16, 16, 1
  r0.y = mad((int)vThreadGroupID.z, 16, (int)vThreadIDInGroup.y);
  r0.x = vThreadIDInGroup.x;
  r0.zw = float2(0,0);
  r1.xyzw = g_ColorGrading2DBlendB.Load(r0.xyz).xyzw;
  r0.xyzw = g_ColorGrading2DBlendA.Load(r0.xyw).xyzw;
  r1.xyzw = r1.xyzw + -r0.xyzw;
  r0.xyzw = g_ToneMapLUTParam.xxxx * r1.xyzw + r0.xyzw;
  r1.xy = vThreadIDInGroup.xy;
  r1.zw = vThreadGroupID.zz;
// No code for instruction (needs manual fix):
store_uav_typed u0.xyzw, r1.xyzw, r0.xyzw
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Original ASM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.20546
//
//
// Buffer Definitions: 
//
// cbuffer cbToneMapCS
// {
//
//   float4 g_ToneMapLUTParam;          // Offset:    0 Size:    16
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// g_ColorGrading2DBlendA            texture  float4          2d    0        1
// g_ColorGrading2DBlendB            texture  float4          2d    1        1
// g_ColorGradingLUTUAV                  UAV  float4          3d    0        1
// cbToneMapCS                       cbuffer      NA          NA    1        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// no Input
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// no Output
cs_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb1[1], immediateIndexed
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_texture2d (float,float,float,float) t1
dcl_uav_typed_texture3d (float,float,float,float) u0
dcl_input vThreadGroupID.z
dcl_input vThreadIDInGroup.xy
dcl_temps 2
dcl_thread_group 16, 16, 1
imad r0.y, vThreadGroupID.z, l(16), vThreadIDInGroup.y
mov r0.x, vThreadIDInGroup.x
mov r0.zw, l(0,0,0,0)
ld_indexable(texture2d)(float,float,float,float) r1.xyzw, r0.xyzw, t1.xyzw
ld_indexable(texture2d)(float,float,float,float) r0.xyzw, r0.xyww, t0.xyzw
add r1.xyzw, -r0.xyzw, r1.xyzw
mad r0.xyzw, cb1[0].xxxx, r1.xyzw, r0.xyzw
mov r1.xy, vThreadIDInGroup.xyxx
mov r1.zw, vThreadGroupID.zzzz
store_uav_typed u0.xyzw, r1.xyzw, r0.xyzw
ret 
// Approximately 11 instruction slots used

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