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

cbuffer cbColorInterpolate : register(b2)
{
  float4 g_rangeMinColor : packoffset(c0);
  float4 g_rangeMaxColor : packoffset(c1);
  float g_rangeMinValue : packoffset(c2);
  float g_rangeMaxValue : packoffset(c2.y);
}

SamplerState SS_ClampPoint_s : register(s2);
Texture2D<float4> g_SourceTex : register(t0);


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


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

  r0.x = g_rangeMaxValue + -g_rangeMinValue;
  r0.yz = g_SourceTex.SampleLevel(SS_ClampPoint_s, v1.xy, 0).xz;
  r0.y = -g_rangeMinValue + r0.y;
  r0.z = cmp(0 != r0.z);
  r0.x = r0.y / r0.x;
  r1.xyzw = g_rangeMaxColor.xyzw + -g_rangeMinColor.xyzw;
  r1.xyzw = r0.xxxx * r1.xyzw + g_rangeMinColor.xyzw;
  o0.xyzw = r0.zzzz ? r1.xyzw : float4(0,0,0,1);
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Original ASM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.20546
//
//
// Buffer Definitions: 
//
// cbuffer cbColorInterpolate
// {
//
//   float4 g_rangeMinColor;            // Offset:    0 Size:    16
//   float4 g_rangeMaxColor;            // Offset:   16 Size:    16
//   float g_rangeMinValue;             // Offset:   32 Size:     4
//   float g_rangeMaxValue;             // Offset:   36 Size:     4
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// SS_ClampPoint                     sampler      NA          NA    2        1
// g_SourceTex                       texture  float4          2d    0        1
// cbColorInterpolate                cbuffer      NA          NA    2        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position              0   xyzw        0      POS   float       
// TEXCOORD                 0   xy          1     NONE   float   xy  
//
//
// 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 cb2[3], immediateIndexed
dcl_sampler s2, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_input_ps linear v1.xy
dcl_output o0.xyzw
dcl_temps 2
add r0.x, -cb2[2].x, cb2[2].y
sample_l_indexable(texture2d)(float,float,float,float) r0.yz, v1.xyxx, t0.yxzw, s2, l(0.000000)
add r0.y, r0.y, -cb2[2].x
ne r0.z, l(0.000000, 0.000000, 0.000000, 0.000000), r0.z
div r0.x, r0.y, r0.x
add r1.xyzw, -cb2[0].xyzw, cb2[1].xyzw
mad r1.xyzw, r0.xxxx, r1.xyzw, cb2[0].xyzw
movc o0.xyzw, r0.zzzz, r1.xyzw, l(0,0,0,1.000000)
ret 
// Approximately 9 instruction slots used

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